From 910d68170317f16e5d5f4f271a21950f2235767f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 08:09:23 +0000 Subject: [PATCH 1/2] build(deps): Bump js-yaml from 4.1.1 to 4.2.0 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.1.1...4.2.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 24 +++++++++++++++++------- package.json | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38dadfe86..de45d212c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "axios": "^1.16.1", "axios-retry": "^4.5.0", "fast-glob": "^3.3.3", - "js-yaml": "^4.1.1", + "js-yaml": "^4.2.0", "semver": "^7.8.1", "uuid": "^14.0.0", "yaml": "^2.9.0" @@ -4945,9 +4945,19 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "dependencies": { "argparse": "^2.0.1" }, @@ -11417,9 +11427,9 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", "requires": { "argparse": "^2.0.1" } diff --git a/package.json b/package.json index b5657b048..e7cfd802d 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "axios": "^1.16.1", "axios-retry": "^4.5.0", "fast-glob": "^3.3.3", - "js-yaml": "^4.1.1", + "js-yaml": "^4.2.0", "semver": "^7.8.1", "uuid": "^14.0.0", "yaml": "^2.9.0" From c08c801847ead934afcbf53e0242f89d0d14590e Mon Sep 17 00:00:00 2001 From: "extenda-platform-bot[bot]" <247398804+extenda-platform-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 08:10:12 +0000 Subject: [PATCH 2/2] build: Update dist files after dependency update [skip dependabot] --- cloud-deploy/dist/index.cjs | 7970 ++++++++++++++--------------- component-tests/dist/index.cjs | 5510 ++++++++++---------- customer-config/dist/index.cjs | 8808 ++++++++++++++++---------------- external-events/dist/index.cjs | 8744 ++++++++++++++++--------------- 4 files changed, 15094 insertions(+), 15938 deletions(-) diff --git a/cloud-deploy/dist/index.cjs b/cloud-deploy/dist/index.cjs index 487791fa6..53b0a2e05 100644 --- a/cloud-deploy/dist/index.cjs +++ b/cloud-deploy/dist/index.cjs @@ -40,31 +40,31 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { + var type = typeof val; + if (type === "string" && val.length > 0) { return parse2(val); - } else if (type2 === "number" && isFinite(val)) { + } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse2(str2) { - str2 = String(str2); - if (str2.length > 100) { + function parse2(str) { + str = String(str); + if (str.length > 100) { return; } var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i. exec( - str2 + str ); if (!match2) { return; } var n = parseFloat(match2[1]); - var type2 = (match2[2] || "ms").toLowerCase(); - switch (type2) { + var type = (match2[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -221,7 +221,7 @@ var require_common = __commonJS({ debug3.namespace = namespace2; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace2); - debug3.extend = extend5; + debug3.extend = extend3; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, @@ -246,12 +246,12 @@ var require_common = __commonJS({ return debug3; } __name(createDebug, "createDebug"); - function extend5(namespace2, delimiter4) { + function extend3(namespace2, delimiter4) { const newDebug = createDebug(this.namespace + (typeof delimiter4 === "undefined" ? ":" : delimiter4) + namespace2); newDebug.log = this.log; return newDebug; } - __name(extend5, "extend"); + __name(extend3, "extend"); function enable2(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; @@ -812,7 +812,7 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util8.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util8.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; @@ -867,8 +867,8 @@ var require_src2 = __commonJS({ } } __name(check, "check"); - function exists3(path18, type2 = exports2.READABLE) { - return check(path18, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0); + function exists3(path18, type = exports2.READABLE) { + return check(path18, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0); } __name(exists3, "exists"); exports2.exists = exists3; @@ -5503,12 +5503,12 @@ var require_data_url = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -5524,7 +5524,7 @@ var require_data_url = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -5661,28 +5661,28 @@ var require_data_url = __commonJS({ return char === 13 || char === 10 || char === 9 || char === 32; } __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); - function removeHTTPWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); } __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; } __name(isASCIIWhitespace, "isASCIIWhitespace"); - function removeASCIIWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isASCIIWhitespace); + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); } __name(removeASCIIWhitespace, "removeASCIIWhitespace"); - function removeChars(str2, leading, trailing, predicate) { + function removeChars(str, leading, trailing, predicate) { let lead = 0; - let trail = str2.length - 1; + let trail = str.length - 1; if (leading) { - while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; } if (trailing) { - while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; } - return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } __name(removeChars, "removeChars"); function isomorphicDecode(input) { @@ -5903,8 +5903,8 @@ var require_webidl = __commonJS({ return r2; }; webidl.util.Stringify = function(V) { - const type2 = webidl.util.Type(V); - switch (type2) { + const type = webidl.util.Type(V); + switch (type) { case "Symbol": return `Symbol(${V.description})`; case "Object": @@ -5924,7 +5924,7 @@ var require_webidl = __commonJS({ }); } const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq2 = []; + const seq = []; let index = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ @@ -5937,9 +5937,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq2.push(converter(value, prefix2, `${argument}[${index++}]`)); + seq.push(converter(value, prefix2, `${argument}[${index++}]`)); } - return seq2; + return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -5985,11 +5985,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix2, argument) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: prefix2, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -6339,8 +6339,8 @@ ption"); } } __name(appendRequestOriginHeader, "appendRequestOriginHeader"); - function coarsenTime(timestamp2, crossOriginIsolatedCapability) { - return timestamp2; + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; } __name(coarsenTime, "coarsenTime"); function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { @@ -7689,13 +7689,13 @@ var require_body = __commonJS({ let action6 = null; let source = null; let length = null; - let type2 = null; + let type = null; if (typeof object === "string") { source = object; - type2 = "text/plain;charset=UTF-8"; + type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (isArrayBuffer3(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { @@ -7704,8 +7704,8 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix2 = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = /* @__PURE__ */ __name((str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "\ -%22"), "escape"); + const escape2 = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%\ +22"), "escape"); const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinef\ eeds"); const blobParts = []; @@ -7751,12 +7751,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }, "action"); - type2 = `multipart/form-data; boundary=${boundary}`; + type = `multipart/form-data; boundary=${boundary}`; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { - type2 = object.type; + type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { @@ -7802,7 +7802,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } const body2 = { stream: stream6, source, length }; - return [body2, type2]; + return [body2, type]; } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { @@ -8098,14 +8098,14 @@ var require_client_h1 = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(delay5, type2) { - if (delay5 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + setTimeout(delay5, type) { + if (delay5 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { if (this.timeout) { timers.clearTimeout(this.timeout); this.timeout = null; } if (delay5) { - if (type2 & USE_FAST_TIMER) { + if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay5, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay5, new WeakRef(this)); @@ -8118,7 +8118,7 @@ var require_client_h1 = __commonJS({ this.timeout.refresh(); } } - this.timeoutType = type2; + this.timeoutType = type; } resume() { if (this.socket.destroyed || !this.paused) { @@ -9158,9 +9158,9 @@ var require_client_h2 = __commonJS({ this[kClient][kOnError](err); } __name(onHttp2SessionError, "onHttp2SessionError"); - function onHttp2FrameError(type2, code, id) { + function onHttp2FrameError(type, code, id) { if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -9352,8 +9352,8 @@ var require_client_h2 = __commonJS({ stream6.once("error", function(err) { abort(err); }); - stream6.once("frameError", (type2, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + stream6.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); return true; function writeBodyH2() { @@ -11750,7 +11750,7 @@ var require_readable = __commonJS({ return util8.isDisturbed(self2) || isLocked(self2); } __name(isUnusable, "isUnusable"); - async function consume(stream6, type2) { + async function consume(stream6, type) { assert4(!stream6[kConsume]); return new Promise((resolve2, reject) => { if (isUnusable(stream6)) { @@ -11767,7 +11767,7 @@ var require_readable = __commonJS({ } else { queueMicrotask(() => { stream6[kConsume] = { - type: type2, + type, stream: stream6, resolve: resolve2, reject, @@ -11843,17 +11843,17 @@ var require_readable = __commonJS({ } __name(chunksConcat, "chunksConcat"); function consumeEnd(consume2) { - const { type: type2, body: body2, resolve: resolve2, stream: stream6, length } = consume2; + const { type, body: body2, resolve: resolve2, stream: stream6, length } = consume2; try { - if (type2 === "text") { + if (type === "text") { resolve2(chunksDecode(body2, length)); - } else if (type2 === "json") { + } else if (type === "json") { resolve2(JSON.parse(chunksDecode(body2, length))); - } else if (type2 === "arrayBuffer") { + } else if (type === "arrayBuffer") { resolve2(chunksConcat(body2, length).buffer); - } else if (type2 === "blob") { + } else if (type === "blob") { resolve2(new Blob(body2, { type: stream6[kContentType] })); - } else if (type2 === "bytes") { + } else if (type === "bytes") { resolve2(chunksConcat(body2, length)); } consumeFinish(consume2); @@ -14045,10 +14045,10 @@ var require_dns = __commonJS({ return ip; } setRecords(origin2, addresses) { - const timestamp2 = Date.now(); + const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; for (const record of addresses) { - record.timestamp = timestamp2; + record.timestamp = timestamp; if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); } else { @@ -14728,8 +14728,8 @@ var require_response = __commonJS({ setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; if (body2 != null) { - const [extractedBody, type2] = extractBody(body2); - bodyWithType = { body: extractedBody, type: type2 }; + const [extractedBody, type] = extractBody(body2); + bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } @@ -14903,18 +14903,18 @@ var require_response = __commonJS({ }); } __name(makeFilteredResponse, "makeFilteredResponse"); - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -14922,7 +14922,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -16221,13 +16221,13 @@ processBodyError"); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type2 = blob.type; + const type = blob.type; if (!request.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; const rangeHeader = request.headersList.get("range", true); @@ -16247,7 +16247,7 @@ processBodyError"); rangeEnd = fullLength - 1; } } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type2); + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); const slicedBodyWithType = extractBody(slicedBlob); response.body = slicedBodyWithType[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); @@ -16255,7 +16255,7 @@ processBodyError"); response.status = 206; response.statusText = "Partial Content"; response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); response.headersList.set("content-range", contentRange, true); } return Promise.resolve(response); @@ -16924,10 +16924,10 @@ var require_progressevent = __commonJS({ static { __name(this, "ProgressEvent"); } - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2, "ProgressEvent constructor", "type"); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -17294,7 +17294,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException("Invalid state", "InvalidStateError"); } @@ -17329,7 +17329,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -17371,8 +17371,8 @@ var require_util4 = __commonJS({ reader.dispatchEvent(event); } __name(fireAProgressEvent, "fireAProgressEvent"); - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -17393,9 +17393,9 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { @@ -18814,9 +18814,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, "setCookie"); webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify(cookie); - if (str2) { - headers.append("Set-Cookie", str2); + const str = stringify(cookie); + if (str) { + headers.append("Set-Cookie", str); } } __name(setCookie, "setCookie"); @@ -18909,17 +18909,17 @@ var require_events = __commonJS({ __name(this, "MessageEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { - if (type2 === kConstruct) { + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { super(arguments[1], arguments[2]); webidl.util.markAsUncloneable(this); return; } const prefix2 = "MessageEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix2, "eventInitDict"); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -18946,10 +18946,10 @@ var require_events = __commonJS({ } return this.#eventInit.ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -18959,8 +18959,8 @@ var require_events = __commonJS({ ports }); } - static createFastMessageEvent(type2, init) { - const messageEvent = new _MessageEvent(kConstruct, type2, init); + static createFastMessageEvent(type, init) { + const messageEvent = new _MessageEvent(kConstruct, type, init); messageEvent.#eventInit = init; messageEvent.#eventInit.data ??= null; messageEvent.#eventInit.origin ??= ""; @@ -18977,12 +18977,12 @@ var require_events = __commonJS({ __name(this, "CloseEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { const prefix2 = "CloseEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -19004,12 +19004,12 @@ var require_events = __commonJS({ __name(this, "ErrorEvent"); } #eventInit; - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { const prefix2 = "ErrorEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - super(type2, eventInitDict); + super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -19270,24 +19270,24 @@ var require_util7 = __commonJS({ return ws[kReadyState] === states.CLOSED; } __name(isClosed, "isClosed"); - function fireEvent(e, target, eventFactory = (type2, init) => new Event(type2, init), eventInitDict = {}) { + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { const event = eventFactory(e, eventInitDict); target.dispatchEvent(event); } __name(fireEvent, "fireEvent"); - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = utf8Decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -19353,7 +19353,7 @@ var require_util7 = __commonJS({ response.socket.destroy(); } if (reason) { - fireEvent("error", ws, (type2, init) => new ErrorEvent(type2, init), { + fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { error: new Error(reason), message: reason }); @@ -19675,7 +19675,7 @@ var require_connection = __commonJS({ code = 1006; } ws[kReadyState] = states.CLOSED; - fireEvent("close", ws, (type2, init) => new CloseEvent(type2, init), { + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { wasClean, code, reason @@ -20461,12 +20461,12 @@ ons"); webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } /** @@ -22173,8 +22173,8 @@ var require_truncate = __commonJS({ } return version3.format(); }, "doTruncation"); - var isPrerelease = /* @__PURE__ */ __name((type2) => { - return type2.startsWith("pre"); + var isPrerelease = /* @__PURE__ */ __name((type) => { + return type.startsWith("pre"); }, "isPrerelease"); module2.exports = truncate; } @@ -22579,20 +22579,20 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }, "hyphenReplace"); - var testSet = /* @__PURE__ */ __name((set2, version3, options) => { - for (let i2 = 0; i2 < set2.length; i2++) { - if (!set2[i2].test(version3)) { + var testSet = /* @__PURE__ */ __name((set, version3, options) => { + for (let i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version3)) { return false; } } if (version3.prerelease.length && !options.includePrerelease) { - for (let i2 = 0; i2 < set2.length; i2++) { - debug3(set2[i2].semver); - if (set2[i2].semver === Comparator.ANY) { + for (let i2 = 0; i2 < set.length; i2++) { + debug3(set[i2].semver); + if (set[i2].semver === Comparator.ANY) { continue; } - if (set2[i2].semver.prerelease.length > 0) { - const allowed = set2[i2].semver; + if (set[i2].semver.prerelease.length > 0) { + const allowed = set[i2].semver; if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } @@ -22994,7 +22994,7 @@ var require_simplify = __commonJS({ var satisfies3 = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range2, options) => { - const set2 = []; + const set = []; let first2 = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); @@ -23007,17 +23007,17 @@ var require_simplify = __commonJS({ } } else { if (prev) { - set2.push([first2, prev]); + set.push([first2, prev]); } prev = null; first2 = null; } } if (first2) { - set2.push([first2, null]); + set.push([first2, null]); } const ranges = []; - for (const [min, max] of set2) { + for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { @@ -32112,11 +32112,11 @@ var require_mime_types = __commonJS({ exports2.lookup = lookup; exports2.types = /* @__PURE__ */ Object.create(null); populateMaps(exports2.extensions, exports2.types); - function charset(type2) { - if (!type2 || typeof type2 !== "string") { + function charset(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var mime = match2 && db[match2[1].toLowerCase()]; if (mime && mime.charset) { return mime.charset; @@ -32127,11 +32127,11 @@ var require_mime_types = __commonJS({ return false; } __name(charset, "charset"); - function contentType2(str2) { - if (!str2 || typeof str2 !== "string") { + function contentType2(str) { + if (!str || typeof str !== "string") { return false; } - var mime = str2.indexOf("/") === -1 ? exports2.lookup(str2) : str2; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } @@ -32142,11 +32142,11 @@ var require_mime_types = __commonJS({ return mime; } __name(contentType2, "contentType"); - function extension(type2) { - if (!type2 || typeof type2 !== "string") { + function extension(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var exts = match2 && exports2.extensions[match2[1].toLowerCase()]; if (!exts || !exts.length) { return false; @@ -32167,13 +32167,13 @@ var require_mime_types = __commonJS({ __name(lookup, "lookup"); function populateMaps(extensions, types2) { var preference = ["nginx", "apache", void 0, "iana"]; - Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type2) { - var mime = db[type2]; + Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type) { + var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { return; } - extensions[type2] = exts; + extensions[type] = exts; for (var i2 = 0; i2 < exts.length; i2++) { var extension2 = exts[i2]; if (types2[extension2]) { @@ -32184,7 +32184,7 @@ var require_mime_types = __commonJS({ continue; } } - types2[extension2] = type2; + types2[extension2] = type; } }, "forEachMimeType")); } @@ -32713,14 +32713,14 @@ var require_implementation = __commonJS({ return arr; }, "slicy"); var joiny = /* @__PURE__ */ __name(function(arr, joiner) { - var str2 = ""; + var str = ""; for (var i2 = 0; i2 < arr.length; i2 += 1) { - str2 += arr[i2]; + str += arr[i2]; if (i2 + 1 < arr.length) { - str2 += joiner; + str += joiner; } } - return str2; + return str; }, "joiny"); module2.exports = /* @__PURE__ */ __name(function bind2(that) { var target = this; @@ -34656,40 +34656,40 @@ var require_balanced_match = __commonJS({ "node_modules/@actions/glob/node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r2 = range2(a, b, str2); + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r2 = range2(a, b, str); return r2 && { start: r2[0], end: r2[1], - pre: str2.slice(0, r2[0]), - body: str2.slice(r2[0] + a.length, r2[1]), - post: str2.slice(r2[1] + b.length) + pre: str.slice(0, r2[0]), + body: str.slice(r2[0] + a.length, r2[1]), + post: str.slice(r2[1] + b.length) }; } __name(balanced, "balanced"); - function maybeMatch(reg, str2) { - var m = str2.match(reg); + function maybeMatch(reg, str) { + var m = str.match(reg); return m ? m[0] : null; } __name(maybeMatch, "maybeMatch"); balanced.range = range2; - function range2(a, b, str2) { + function range2(a, b, str) { var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); var i2 = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; - left = str2.length; + left = str.length; while (i2 >= 0 && !result) { if (i2 == ai) { begs.push(i2); - ai = str2.indexOf(a, i2 + 1); + ai = str.indexOf(a, i2 + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { @@ -34698,7 +34698,7 @@ var require_balanced_match = __commonJS({ left = beg; right = bi; } - bi = str2.indexOf(b, i2 + 1); + bi = str.indexOf(b, i2 + 1); } i2 = ai < bi && ai >= 0 ? ai : bi; } @@ -34723,27 +34723,27 @@ var require_brace_expansion = __commonJS({ var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } __name(numeric, "numeric"); - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join( - escComma).split("\\.").join(escPeriod); + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma). + split("\\.").join(escPeriod); } __name(escapeBraces, "escapeBraces"); - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). split(escPeriod).join("."); } __name(unescapeBraces, "unescapeBraces"); - function parseCommaParts(str2) { - if (!str2) + function parseCommaParts(str) { + if (!str) return [""]; var parts = []; - var m = balanced("{", "}", str2); + var m = balanced("{", "}", str); if (!m) - return str2.split(","); + return str.split(","); var pre = m.pre; var body2 = m.body; var post = m.post; @@ -34758,19 +34758,19 @@ var require_brace_expansion = __commonJS({ return parts; } __name(parseCommaParts, "parseCommaParts"); - function expandTop(str2, options) { - if (!str2) + function expandTop(str, options) { + if (!str) return []; options = options || {}; var max = options.max == null ? Infinity : options.max; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); } - return expand(escapeBraces(str2), max, true).map(unescapeBraces); + return expand(escapeBraces(str), max, true).map(unescapeBraces); } __name(expandTop, "expandTop"); - function embrace(str2) { - return "{" + str2 + "}"; + function embrace(str) { + return "{" + str + "}"; } __name(embrace, "embrace"); function isPadded(el) { @@ -34785,20 +34785,20 @@ var require_brace_expansion = __commonJS({ return i2 >= y; } __name(gte, "gte"); - function expand(str2, max, isTop) { + function expand(str, max, isTop) { var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2, max, true); + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str, max, true); } - return [str2]; + return [str]; } var n; if (isSequence) { @@ -34899,9 +34899,9 @@ var require_minimatch = __commonJS({ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { - return s.split("").reduce(function(set2, c3) { - set2[c3] = true; - return set2; + return s.split("").reduce(function(set, c3) { + set[c3] = true; + return set; }, {}); } __name(charSet, "charSet"); @@ -35006,24 +35006,24 @@ var require_minimatch = __commonJS({ return; } this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); + var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = /* @__PURE__ */ __name(function debug3() { console.error.apply(console, arguments); }, "debug"); - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { + this.debug(this.pattern, set); + set = set.filter(function(s) { return s.indexOf(false) === -1; }); - this.debug(this.pattern, set2); - this.set = set2; + this.debug(this.pattern, set); + this.set = set; } __name(make, "make"); Minimatch2.prototype.parseNegate = parseNegate; @@ -35314,15 +35314,15 @@ var require_minimatch = __commonJS({ Minimatch2.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { + var set = this.set; + if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { + var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); @@ -35360,16 +35360,16 @@ var require_minimatch = __commonJS({ } f = f.split(slashSplit); this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); + var set = this.set; + this.debug(this.pattern, "set", set); var filename; var i2; for (i2 = f.length - 1; i2 >= 0; i2--) { filename = f[i2]; if (filename) break; } - for (i2 = 0; i2 < set2.length; i2++) { - var pattern = set2[i2]; + for (i2 = 0; i2 < set.length; i2++) { + var pattern = set[i2]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; @@ -35602,19 +35602,19 @@ var require_helpers = __commonJS({ } __name(toBuffer, "toBuffer"); exports2.toBuffer = toBuffer; - async function json2(stream6) { + async function json(stream6) { const buf = await toBuffer(stream6); - const str2 = buf.toString("utf8"); + const str = buf.toString("utf8"); try { - return JSON.parse(str2); + return JSON.parse(str); } catch (_err) { const err = _err; - err.message += ` (input: ${str2})`; + err.message += ` (input: ${str})`; throw err; } } - __name(json2, "json"); - exports2.json = json2; + __name(json, "json"); + exports2.json = json; function req(url3, opts = {}) { const href = typeof url3 === "string" ? url3 : url3.href; const req2 = (href.startsWith("https:") ? https4 : http4).request(url3, opts); @@ -37232,8 +37232,8 @@ var require_binary_writer = __commonJS({ * * Generated code should compute the tag ahead of time and call `uint32()`. */ - tag(fieldNo, type2) { - return this.uint32((fieldNo << 3 | type2) >>> 0); + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } /** * Write a chunk of raw bytes. @@ -37762,31 +37762,31 @@ var require_reflection_type_check = __commonJS({ } return true; } - message(arg, type2, allowExcessProperties, depth) { + message(arg, type, allowExcessProperties, depth) { if (allowExcessProperties) { - return type2.isAssignable(arg, depth); + return type.isAssignable(arg, depth); } - return type2.is(arg, depth); + return type.is(arg, depth); } - messages(arg, type2, allowExcessProperties, depth) { + messages(arg, type, allowExcessProperties, depth) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (allowExcessProperties) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.isAssignable(arg[i2], depth - 1)) + if (!type.isAssignable(arg[i2], depth - 1)) return false; } else { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.is(arg[i2], depth - 1)) + if (!type.is(arg[i2], depth - 1)) return false; } return true; } - scalar(arg, type2, longType) { + scalar(arg, type, longType) { let argType = typeof arg; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.UINT64: case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.INT64: @@ -37813,31 +37813,31 @@ var require_reflection_type_check = __commonJS({ return argType == "number" && Number.isInteger(arg); } } - scalars(arg, type2, depth, longType) { + scalars(arg, type, depth, longType) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (Array.isArray(arg)) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!this.scalar(arg[i2], type2, longType)) + if (!this.scalar(arg[i2], type, longType)) return false; } return true; } - mapKeys(map2, type2, depth) { - let keys = Object.keys(map2); - switch (type2) { + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); case reflection_info_1.ScalarType.BOOL: - return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); default: - return this.scalars(keys, type2, depth, reflection_info_1.LongType.STRING); + return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING); } } }; @@ -37852,8 +37852,8 @@ var require_reflection_long_convert = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionLongConvert = void 0; var reflection_info_1 = require_reflection_info(); - function reflectionLongConvert(long, type2) { - switch (type2) { + function reflectionLongConvert(long, type) { + switch (type) { case reflection_info_1.LongType.BIGINT: return long.toBigInt(); case reflection_info_1.LongType.NUMBER: @@ -38026,93 +38026,93 @@ var require_reflection_json_reader = __commonJS({ * * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - enum(type2, json2, fieldName, ignoreUnknownFields) { - if (type2[0] == "google.protobuf.NullValue") - assert_1.assert(json2 === null || json2 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ -, enum ${type2[0]} only accepts null.`); - if (json2 === null) + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") + assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ +, enum ${type[0]} only accepts null.`); + if (json === null) return 0; - switch (typeof json2) { + switch (typeof json) { case "number": - assert_1.assert(Number.isInteger(json2), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can\ - only be integral number, got ${json2}.`); - return json2; + assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can \ +only be integral number, got ${json}.`); + return json; case "string": - let localEnumName = json2; - if (type2[2] && json2.substring(0, type2[2].length) === type2[2]) - localEnumName = json2.substring(type2[2].length); - let enumNumber = type2[1][localEnumName]; + let localEnumName = json; + if (type[2] && json.substring(0, type[2].length) === type[2]) + localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; if (typeof enumNumber === "undefined" && ignoreUnknownFields) { return false; } assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, en\ -um ${type2[0]} has no value for "${json2}".`); +um ${type[0]} has no value for "${json}".`); return enumNumber; } - assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json2}\ + assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}\ ".`); } - scalar(json2, type2, longType, fieldName) { + scalar(json, type, longType, fieldName) { let e; try { - switch (type2) { + switch (type) { // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity". // Either numbers or strings are accepted. Exponent notation is also accepted. case reflection_info_1.ScalarType.DOUBLE: case reflection_info_1.ScalarType.FLOAT: - if (json2 === null) + if (json === null) return 0; - if (json2 === "NaN") + if (json === "NaN") return Number.NaN; - if (json2 === "Infinity") + if (json === "Infinity") return Number.POSITIVE_INFINITY; - if (json2 === "-Infinity") + if (json === "-Infinity") return Number.NEGATIVE_INFINITY; - if (json2 === "") { + if (json === "") { e = "empty string"; break; } - if (typeof json2 == "string" && json2.trim().length !== json2.length) { + if (typeof json == "string" && json.trim().length !== json.length) { e = "extra whitespace"; break; } - if (typeof json2 != "string" && typeof json2 != "number") { + if (typeof json != "string" && typeof json != "number") { break; } - let float2 = Number(json2); - if (Number.isNaN(float2)) { + let float = Number(json); + if (Number.isNaN(float)) { e = "not a number"; break; } - if (!Number.isFinite(float2)) { + if (!Number.isFinite(float)) { e = "too large or small"; break; } - if (type2 == reflection_info_1.ScalarType.FLOAT) - assert_1.assertFloat32(float2); - return float2; + if (type == reflection_info_1.ScalarType.FLOAT) + assert_1.assertFloat32(float); + return float; // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - if (json2 === null) + if (json === null) return 0; let int32; - if (typeof json2 == "number") - int32 = json2; - else if (json2 === "") + if (typeof json == "number") + int32 = json; + else if (json === "") e = "empty string"; - else if (typeof json2 == "string") { - if (json2.trim().length !== json2.length) + else if (typeof json == "string") { + if (json.trim().length !== json.length) e = "extra whitespace"; else - int32 = Number(json2); + int32 = Number(json); } if (int32 === void 0) break; - if (type2 == reflection_info_1.ScalarType.UINT32) + if (type == reflection_info_1.ScalarType.UINT32) assert_1.assertUInt32(int32); else assert_1.assertInt32(int32); @@ -38121,53 +38121,53 @@ um ${type2[0]} has no value for "${json2}".`); case reflection_info_1.ScalarType.INT64: case reflection_info_1.ScalarType.SFIXED64: case reflection_info_1.ScalarType.SINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType); case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.UINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType); // bool: case reflection_info_1.ScalarType.BOOL: - if (json2 === null) + if (json === null) return false; - if (typeof json2 !== "boolean") + if (typeof json !== "boolean") break; - return json2; + return json; // string: case reflection_info_1.ScalarType.STRING: - if (json2 === null) + if (json === null) return ""; - if (typeof json2 !== "string") { + if (typeof json !== "string") { e = "extra whitespace"; break; } try { - encodeURIComponent(json2); + encodeURIComponent(json); } catch (e2) { e2 = "invalid UTF8"; break; } - return json2; + return json; // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. // Either standard or URL-safe base64 encoding with/without paddings are accepted. case reflection_info_1.ScalarType.BYTES: - if (json2 === null || json2 === "") + if (json === null || json === "") return new Uint8Array(0); - if (typeof json2 !== "string") + if (typeof json !== "string") break; - return base64_1.base64decode(json2); + return base64_1.base64decode(json); } } catch (error2) { e = error2.message; } - this.assert(false, fieldName + (e ? " - " + e : ""), json2); + this.assert(false, fieldName + (e ? " - " + e : ""), json); } }; exports2.ReflectionJsonReader = ReflectionJsonReader; @@ -38196,12 +38196,12 @@ var require_reflection_json_writer = __commonJS({ * Converts the message to a JSON object, based on the field descriptors. */ write(message, options) { - const json2 = {}, source = message; + const json = {}, source = message; for (const field of this.fields) { if (!field.oneof) { let jsonValue2 = this.field(field, source[field.localName], options); if (jsonValue2 !== void 0) - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; continue; } const group = source[field.oneof]; @@ -38211,9 +38211,9 @@ var require_reflection_json_writer = __commonJS({ options; let jsonValue = this.field(field, group[field.localName], opt); assert_1.assert(jsonValue !== void 0); - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; } - return json2; + return json; } field(field, value, options) { let jsonValue = void 0; @@ -38297,8 +38297,8 @@ var require_reflection_json_writer = __commonJS({ /** * Returns `null` as the default for google.protobuf.NullValue. */ - enum(type2, value, fieldName, optional, emitDefaultValues, enumAsInteger) { - if (type2[0] == "google.protobuf.NullValue") + enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; if (value === void 0) { assert_1.assert(optional); @@ -38308,24 +38308,24 @@ var require_reflection_json_writer = __commonJS({ return void 0; assert_1.assert(typeof value == "number"); assert_1.assert(Number.isInteger(value)); - if (enumAsInteger || !type2[1].hasOwnProperty(value)) + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type2[2]) - return type2[2] + type2[1][value]; - return type2[1][value]; + if (type[2]) + return type[2] + type[1][value]; + return type[1][value]; } - message(type2, value, fieldName, options) { + message(type, value, fieldName, options) { if (value === void 0) return options.emitDefaultValues ? null : void 0; - return type2.internalJsonWrite(value, options); + return type.internalJsonWrite(value, options); } - scalar(type2, value, fieldName, optional, emitDefaultValues) { + scalar(type, value, fieldName, optional, emitDefaultValues) { if (value === void 0) { assert_1.assert(optional); return void 0; } const ed = emitDefaultValues || optional; - switch (type2) { + switch (type) { // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.SFIXED32: @@ -38407,8 +38407,8 @@ var require_reflection_scalar_default = __commonJS({ var reflection_info_1 = require_reflection_info(); var reflection_long_convert_1 = require_reflection_long_convert(); var pb_long_1 = require_pb_long(); - function reflectionScalarDefault(type2, longType = reflection_info_1.LongType.STRING) { - switch (type2) { + function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) { + switch (type) { case reflection_info_1.ScalarType.BOOL: return false; case reflection_info_1.ScalarType.UINT64: @@ -38575,8 +38575,8 @@ var require_reflection_binary_reader = __commonJS({ } return [key, val]; } - scalar(reader, type2, longType) { - switch (type2) { + scalar(reader, type, longType) { + switch (type) { case reflection_info_1.ScalarType.INT32: return reader.int32(); case reflection_info_1.ScalarType.STRING: @@ -38731,8 +38731,8 @@ var require_reflection_binary_writer = __commonJS({ /** * Write a single scalar value. */ - scalar(writer, type2, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type2, value); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); if (!isDefault || emitDefault) { writer.tag(fieldNo, wireType); writer[method](value); @@ -38741,13 +38741,13 @@ var require_reflection_binary_writer = __commonJS({ /** * Write an array of scalar values in packed format. */ - packed(writer, type2, fieldNo, value) { + packed(writer, type, fieldNo, value) { if (!value.length) return; - assert_1.assert(type2 !== reflection_info_1.ScalarType.BYTES && type2 !== reflection_info_1.ScalarType.STRING); + assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING); writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited); writer.fork(); - let [, method] = this.scalarInfo(type2); + let [, method] = this.scalarInfo(type); for (let i2 = 0; i2 < value.length; i2++) writer[method](value[i2]); writer.join(); @@ -38762,12 +38762,12 @@ var require_reflection_binary_writer = __commonJS({ * * If argument `value` is omitted, [2] is always false. */ - scalarInfo(type2, value) { + scalarInfo(type, value) { let t2 = binary_format_contract_1.WireType.Varint; let m; let i2 = value === void 0; let d = value === 0; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.INT32: m = "int32"; break; @@ -38845,10 +38845,10 @@ var require_reflection_create = __commonJS({ exports2.reflectionCreate = void 0; var reflection_scalar_default_1 = require_reflection_scalar_default(); var message_type_contract_1 = require_message_type_contract(); - function reflectionCreate(type2) { - const msg = type2.messagePrototype ? Object.create(type2.messagePrototype) : Object.defineProperty({}, message_type_contract_1. - MESSAGE_TYPE, { value: type2 }); - for (let field of type2.fields) { + function reflectionCreate(type) { + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1. + MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { let name = field.localName; if (field.opt) continue; @@ -38987,10 +38987,10 @@ var require_reflection_equals = __commonJS({ __name(reflectionEquals, "reflectionEquals"); exports2.reflectionEquals = reflectionEquals; var objectValues = Object.values; - function primitiveEq(type2, a, b) { + function primitiveEq(type, a, b) { if (a === b) return true; - if (type2 !== reflection_info_1.ScalarType.BYTES) + if (type !== reflection_info_1.ScalarType.BYTES) return false; let ba = a; let bb = b; @@ -39002,20 +39002,20 @@ var require_reflection_equals = __commonJS({ return true; } __name(primitiveEq, "primitiveEq"); - function repeatedPrimitiveEq(type2, a, b) { + function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!primitiveEq(type2, a[i2], b[i2])) + if (!primitiveEq(type, a[i2], b[i2])) return false; return true; } __name(repeatedPrimitiveEq, "repeatedPrimitiveEq"); - function repeatedMsgEq(type2, a, b) { + function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!type2.equals(a[i2], b[i2])) + if (!type.equals(a[i2], b[i2])) return false; return true; } @@ -39118,15 +39118,15 @@ var require_message_type = __commonJS({ /** * Read a new message from a JSON value. */ - fromJson(json2, options) { - return this.internalJsonRead(json2, json_format_contract_1.jsonReadOptions(options)); + fromJson(json, options) { + return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options)); } /** * Read a new message from a JSON string. * This is equivalent to `T.fromJson(JSON.parse(json))`. */ - fromJsonString(json2, options) { - let value = JSON.parse(json2); + fromJsonString(json, options) { + let value = JSON.parse(json); return this.fromJson(value, options); } /** @@ -39160,13 +39160,13 @@ var require_message_type = __commonJS({ * according to protobuf rules. If the target is omitted, * a new instance is created first. */ - internalJsonRead(json2, options, target) { - if (json2 !== null && typeof json2 == "object" && !Array.isArray(json2)) { + internalJsonRead(json, options, target) { + if (json !== null && typeof json == "object" && !Array.isArray(json)) { let message = target !== null && target !== void 0 ? target : this.create(); - this.refJsonReader.read(json2, message, options); + this.refJsonReader.read(json, message, options); return message; } - throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json2)}.`); + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`); } /** * This is an internal method. If you just want to write a message @@ -40858,14 +40858,14 @@ var require_path = __commonJS({ // node_modules/is-extglob/index.js var require_is_extglob = __commonJS({ "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = /* @__PURE__ */ __name(function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isExtglob(str) { + if (typeof str !== "string" || str === "") { return false; } var match2; - while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { + while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { if (match2[2]) return true; - str2 = str2.slice(match2.index + match2[0].length); + str = str.slice(match2.index + match2[0].length); } return false; }, "isExtglob"); @@ -40877,8 +40877,8 @@ var require_is_glob = __commonJS({ "node_modules/is-glob/index.js"(exports2, module2) { var isExtglob = require_is_extglob(); var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var strictCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; @@ -40887,71 +40887,71 @@ var require_is_glob = __commonJS({ var closeCurlyIndex = -2; var closeParenIndex = -2; var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { + while (index < str.length) { + if (str[index] === "*") { return true; } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) { return true; } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); + closeSquareIndex = str.indexOf("]", index); } if (closeSquareIndex > index) { if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } } } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { return true; } } } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && - str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); + pipeIndex = str.indexOf("|", index); } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); + backSlashIndex = str.indexOf("\\", pipeIndex); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -40960,26 +40960,26 @@ var require_is_glob = __commonJS({ } return false; }, "strictCheck"); - var relaxedCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var relaxedCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { return true; } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -40988,18 +40988,18 @@ var require_is_glob = __commonJS({ } return false; }, "relaxedCheck"); - module2.exports = /* @__PURE__ */ __name(function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isGlob(str, options) { + if (typeof str !== "string" || str === "") { return false; } - if (isExtglob(str2)) { + if (isExtglob(str)) { return true; } var check = strictCheck; if (options && options.strict === false) { check = relaxedCheck; } - return check(str2); + return check(str); }, "isGlob"); } }); @@ -41016,19 +41016,19 @@ var require_glob_parent = __commonJS({ var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = /* @__PURE__ */ __name(function globParent(str2, opts) { + module2.exports = /* @__PURE__ */ __name(function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); } - if (enclosure.test(str2)) { - str2 += slash; + if (enclosure.test(str)) { + str += slash; } - str2 += "a"; + str += "a"; do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); }, "globParent"); } }); @@ -41046,16 +41046,16 @@ var require_utils2 = __commonJS({ } return false; }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); + exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type); exports2.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; return (Number(max) - Number(min)) / Number(step) >= limit; }; - exports2.escapeNode = (block, n = 0, type2) => { + exports2.escapeNode = (block, n = 0, type) => { const node = block.nodes[n]; if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { + if (type && node.type === type || node.type === "open" || node.type === "close") { if (node.escaped !== true) { node.value = "\\" + node.value; node.escaped = true; @@ -41358,8 +41358,8 @@ var require_to_regex_range = __commonJS({ return `[${a}${b - a === 1 ? "" : "-"}${b}]`; } __name(toCharacterClass, "toCharacterClass"); - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); + function hasPadding(str) { + return /^-?(0+)\d/.test(str); } __name(hasPadding, "hasPadding"); function padZeros(value, tok, options) { @@ -41393,7 +41393,7 @@ var require_fill_range = __commonJS({ "use strict"; var util8 = require("util"); var toRegexRange = require_to_regex_range(); - var isObject4 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ + var isObject3 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ bject"); var transform = /* @__PURE__ */ __name((toNumber3) => { return (value) => toNumber3 === true ? Number(value) : String(value); @@ -41563,14 +41563,14 @@ bject"); if (typeof step === "function") { return fill(start, end, 1, { transform: step }); } - if (isObject4(step)) { + if (isObject3(step)) { return fill(start, end, 0, step); } let opts = { ...options }; if (opts.capture === true) opts.wrap = true; step = step || opts.step || 1; if (!isNumber2(step)) { - if (step != null && !isObject4(step)) return invalidStep(step, opts); + if (step != null && !isObject3(step)) return invalidStep(step, opts); return fill(start, end, 1, step); } if (isNumber2(start) && isNumber2(end)) { @@ -41841,7 +41841,7 @@ var require_parse3 = __commonJS({ /* \ */ CHAR_BACKTICK, /* ` */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -41853,13 +41853,13 @@ var require_parse3 = __commonJS({ /* { */ CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, + CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, + CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE @@ -41908,16 +41908,16 @@ var require_parse3 = __commonJS({ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); continue; } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { + if (value === CHAR_RIGHT_SQUARE_BRACKET) { push({ type: "text", value: "\\" + value }); continue; } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { + if (value === CHAR_LEFT_SQUARE_BRACKET) { brackets++; let next; while (index < length && (next = advance())) { value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { + if (next === CHAR_LEFT_SQUARE_BRACKET) { brackets++; continue; } @@ -41925,7 +41925,7 @@ var require_parse3 = __commonJS({ value += advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { brackets--; if (brackets === 0) { break; @@ -41951,7 +41951,7 @@ var require_parse3 = __commonJS({ block = stack[stack.length - 1]; continue; } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { const open2 = value; let next; if (options.keepQuotes !== true) { @@ -41994,15 +41994,15 @@ var require_parse3 = __commonJS({ push({ type: "text", value }); continue; } - const type2 = "close"; + const type = "close"; block = stack.pop(); block.close = true; - push({ type: type2, value }); + push({ type, value }); depth--; block = stack[stack.length - 1]; continue; } - if (value === CHAR_COMMA2 && depth > 0) { + if (value === CHAR_COMMA && depth > 0) { if (block.ranges > 0) { block.ranges = 0; const open2 = block.nodes.shift(); @@ -42345,12 +42345,12 @@ var require_utils3 = __commonJS({ REGEX_SPECIAL_CHARS_GLOBAL } = require_constants8(); exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match2) => { + exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str); + exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports2.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => { return match2 === "\\" ? "" : match2; }); }; @@ -42399,13 +42399,13 @@ var require_scan = __commonJS({ "use strict"; var utils = require_utils3(); var { - CHAR_ASTERISK: CHAR_ASTERISK2, + CHAR_ASTERISK, /* * */ CHAR_AT, /* @ */ CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -42417,7 +42417,7 @@ var require_scan = __commonJS({ /* { */ CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ CHAR_PLUS, /* + */ @@ -42427,7 +42427,7 @@ var require_scan = __commonJS({ /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 + CHAR_RIGHT_SQUARE_BRACKET /* ] */ } = require_constants8(); var isPathSeparator = /* @__PURE__ */ __name((code) => { @@ -42445,7 +42445,7 @@ var require_scan = __commonJS({ const slashes = []; const tokens = []; const parts = []; - let str2 = input; + let str = input; let index = -1; let start = 0; let lastIndex = 0; @@ -42464,10 +42464,10 @@ var require_scan = __commonJS({ let code; let token = { value: "", depth: 0, isGlob: false }; const eos = /* @__PURE__ */ __name(() => index >= length, "eos"); - const peek = /* @__PURE__ */ __name(() => str2.charCodeAt(index + 1), "peek"); + const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek"); const advance = /* @__PURE__ */ __name(() => { prev = code; - return str2.charCodeAt(++index); + return str.charCodeAt(++index); }, "advance"); while (index < length) { code = advance(); @@ -42501,7 +42501,7 @@ var require_scan = __commonJS({ } break; } - if (braceEscaped !== true && code === CHAR_COMMA2) { + if (braceEscaped !== true && code === CHAR_COMMA) { isBrace = token.isBrace = true; isGlob = token.isGlob = true; finished = true; @@ -42538,7 +42538,7 @@ var require_scan = __commonJS({ continue; } if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { isGlob = token.isGlob = true; @@ -42565,8 +42565,8 @@ var require_scan = __commonJS({ break; } } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; isGlob = token.isGlob = true; finished = true; if (scanToEnd === true) { @@ -42582,14 +42582,14 @@ var require_scan = __commonJS({ } break; } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { + if (code === CHAR_LEFT_SQUARE_BRACKET) { while (eos() !== true && (next = advance())) { if (next === CHAR_BACKWARD_SLASH) { backslashes = token.backslashes = true; advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { isBracket = token.isBracket = true; isGlob = token.isGlob = true; finished = true; @@ -42636,24 +42636,24 @@ var require_scan = __commonJS({ isExtglob = false; isGlob = false; } - let base = str2; + let base = str; let prefix2 = ""; let glob3 = ""; if (start > 0) { - prefix2 = str2.slice(0, start); - str2 = str2.slice(start); + prefix2 = str.slice(0, start); + str = str.slice(start); lastIndex -= start; } if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob3 = str2.slice(lastIndex); + base = str.slice(0, lastIndex); + glob3 = str.slice(lastIndex); } else if (isGlob === true) { base = ""; - glob3 = str2; + glob3 = str; } else { - base = str2; + base = str; } - if (base && base !== "" && base !== "/" && base !== str2) { + if (base && base !== "" && base !== "/" && base !== str) { if (isPathSeparator(base.charCodeAt(base.length - 1))) { base = base.slice(0, -1); } @@ -42750,8 +42750,8 @@ var require_parse4 = __commonJS({ } return value; }, "expandRange"); - var syntaxError = /* @__PURE__ */ __name((type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + var syntaxError = /* @__PURE__ */ __name((type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; }, "syntaxError"); var splitTopLevel = /* @__PURE__ */ __name((input) => { const parts = []; @@ -43055,12 +43055,12 @@ var require_parse4 = __commonJS({ state3.start++; return true; }, "negate"); - const increment = /* @__PURE__ */ __name((type2) => { - state3[type2]++; - stack.push(type2); + const increment = /* @__PURE__ */ __name((type) => { + state3[type]++; + stack.push(type); }, "increment"); - const decrement = /* @__PURE__ */ __name((type2) => { - state3[type2]--; + const decrement = /* @__PURE__ */ __name((type) => { + state3[type]--; stack.pop(); }, "decrement"); const push = /* @__PURE__ */ __name((tok) => { @@ -43088,7 +43088,7 @@ var require_parse4 = __commonJS({ tokens.push(tok); prev = tok; }, "push"); - const extglobOpen = /* @__PURE__ */ __name((type2, value2) => { + const extglobOpen = /* @__PURE__ */ __name((type, value2) => { const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; token.prev = prev; token.parens = state3.parens; @@ -43097,7 +43097,7 @@ var require_parse4 = __commonJS({ token.tokensIndex = tokens.length; const output = (opts.capture ? "(" : "") + token.open; increment("parens"); - push({ type: type2, value: value2, output: state3.output ? "" : ONE_CHAR }); + push({ type, value: value2, output: state3.output ? "" : ONE_CHAR }); push({ type: "paren", extglob: true, value: advance(), output }); extglobs.push(token); }, "extglobOpen"); @@ -43691,8 +43691,8 @@ var require_parse4 = __commonJS({ if (opts2.noglobstar === true) return star; return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }, "globstar"); - const create3 = /* @__PURE__ */ __name((str2) => { - switch (str2) { + const create3 = /* @__PURE__ */ __name((str) => { + switch (str) { case "*": return `${nodot}${ONE_CHAR}${star}`; case ".*": @@ -43710,7 +43710,7 @@ var require_parse4 = __commonJS({ case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; default: { - const match2 = /^(.*?)\.(\w+)$/.exec(str2); + const match2 = /^(.*?)\.(\w+)$/.exec(str); if (!match2) return; const source2 = create3(match2[1]); if (!source2) return; @@ -43738,20 +43738,20 @@ var require_picomatch = __commonJS({ var parse2 = require_parse4(); var utils = require_utils3(); var constants4 = require_constants8(); - var isObject4 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); + var isObject3 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); var picomatch = /* @__PURE__ */ __name((glob3, options, returnState = false) => { if (Array.isArray(glob3)) { const fns = glob3.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = /* @__PURE__ */ __name((str2) => { + const arrayMatcher = /* @__PURE__ */ __name((str) => { for (const isMatch of fns) { - const state4 = isMatch(str2); + const state4 = isMatch(str); if (state4) return state4; } return false; }, "arrayMatcher"); return arrayMatcher; } - const isState = isObject4(glob3) && glob3.tokens && glob3.input; + const isState = isObject3(glob3) && glob3.tokens && glob3.input; if (glob3 === "" || typeof glob3 !== "string" && !isState) { throw new TypeError("Expected pattern to be a non-empty string"); } @@ -43820,7 +43820,7 @@ var require_picomatch = __commonJS({ const regex = glob3 instanceof RegExp ? glob3 : picomatch.makeRe(glob3, options); return regex.test(path18.basename(input)); }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + 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 parse2(pattern, { ...options, fastpaths: false }); @@ -43934,7 +43934,7 @@ var require_micromatch = __commonJS({ }, "micromatch"); micromatch.match = micromatch; micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); micromatch.any = micromatch.isMatch; micromatch.not = (list, patterns, options = {}) => { patterns = [].concat(patterns).map(String); @@ -43952,22 +43952,22 @@ var require_micromatch = __commonJS({ } return [...result]; }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); + return pattern.some((p) => micromatch.contains(str, p, options)); } if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { + if (isEmptyString(str) || isEmptyString(pattern)) { return false; } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { return true; } } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); + return micromatch.isMatch(str, pattern, { ...options, contains: true }); }; micromatch.matchKeys = (obj, patterns, options) => { if (!utils.isObject(obj)) { @@ -43998,11 +43998,11 @@ var require_micromatch = __commonJS({ } return true; }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); + return [].concat(patterns).every((p) => picomatch(p, options)(str)); }; micromatch.capture = (glob3, input, options) => { let posix = utils.isWindows(options); @@ -44017,8 +44017,8 @@ var require_micromatch = __commonJS({ micromatch.parse = (patterns, options) => { let res = []; for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); } } return res; @@ -44243,8 +44243,8 @@ var require_merge2 = __commonJS({ var Stream = require("stream"); var PassThrough = Stream.PassThrough; var slice = Array.prototype.slice; - module2.exports = merge22; - function merge22() { + module2.exports = merge2; + function merge2() { const streamsQueue = []; const args = slice.call(arguments); let merging = false; @@ -44343,7 +44343,7 @@ var require_merge2 = __commonJS({ } return mergedStream; } - __name(merge22, "merge2"); + __name(merge2, "merge2"); function pauseStreams(streams, options) { if (!Array.isArray(streams)) { if (!streams._readableState && streams.pipe) { @@ -44370,9 +44370,9 @@ var require_stream = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.merge = void 0; - var merge22 = require_merge2(); + var merge2 = require_merge2(); function merge3(streams) { - const mergedStream = merge22(streams); + const mergedStream = merge2(streams); streams.forEach((stream6) => { stream6.once("error", (error2) => mergedStream.emit("error", error2)); }); @@ -44848,7 +44848,7 @@ var require_async3 = __commonJS({ var rpl = require_run_parallel(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); @@ -44867,7 +44867,7 @@ var require_async3 = __commonJS({ const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { callSuccessCallback(callback, entries); @@ -44913,7 +44913,7 @@ var require_async3 = __commonJS({ return; } const tasks = names.map((name) => { - const path18 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path18 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { fsStat2.stat(path18, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { @@ -44963,7 +44963,7 @@ var require_sync2 = __commonJS({ var fsStat2 = require_out(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); @@ -44978,7 +44978,7 @@ var require_sync2 = __commonJS({ const entry = { dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { try { @@ -44998,7 +44998,7 @@ var require_sync2 = __commonJS({ function readdir2(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); const stats = fsStat2.statSync(entryPath, settings.fsStatSettings); const entry = { name, @@ -45493,7 +45493,7 @@ var require_reader = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common3(); + var common = require_common3(); var Reader = class { static { __name(this, "Reader"); @@ -45501,7 +45501,7 @@ var require_reader = __commonJS({ constructor(_root, _settings) { this._root = _root; this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } }; exports2.default = Reader; @@ -45516,7 +45516,7 @@ var require_async4 = __commonJS({ var events_1 = require("events"); var fsScandir = require_out2(); var fastq = require_queue(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var AsyncReader = class extends reader_1.default { static { @@ -45584,7 +45584,7 @@ var require_async4 = __commonJS({ }); } _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { + if (this._isDestroyed || !common.isFatalError(this._settings, error2)) { return; } this._isFatalError = true; @@ -45597,12 +45597,12 @@ var require_async4 = __commonJS({ } const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -45705,7 +45705,7 @@ var require_sync3 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var fsScandir = require_out2(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var SyncReader = class extends reader_1.default { static { @@ -45741,7 +45741,7 @@ var require_sync3 = __commonJS({ } } _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { + if (!common.isFatalError(this._settings, error2)) { return; } throw error2; @@ -45749,12 +45749,12 @@ var require_sync3 = __commonJS({ _handleEntry(entry, base) { const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -47282,8 +47282,8 @@ var require_Node = __commonJS({ static { __name(this, "NodeBase"); } - constructor(type2) { - Object.defineProperty(this, identity.NODE_TYPE, { value: type2 }); + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); } /** Create a copy of this node. */ clone() { @@ -47494,15 +47494,15 @@ var require_createNode = __commonJS({ if (identity.isNode(value)) return value; if (identity.isPair(value)) { - const map2 = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); - map2.items.push(value); - return map2; + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; } if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) { value = value.valueOf(); } - const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema2, sourceObjects } = ctx; + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; let ref = void 0; if (aliasDuplicateObjects && value && typeof value === "object") { ref = sourceObjects.get(value); @@ -47516,7 +47516,7 @@ var require_createNode = __commonJS({ } if (tagName?.startsWith("!!")) tagName = defaultTagPrefix + tagName.slice(2); - let tagObj = findTagObject(value, tagName, schema2.tags); + let tagObj = findTagObject(value, tagName, schema.tags); if (!tagObj) { if (value && typeof value.toJSON === "function") { value = value.toJSON(); @@ -47527,8 +47527,8 @@ var require_createNode = __commonJS({ ref.node = node2; return node2; } - tagObj = value instanceof Map ? schema2[identity.MAP] : Symbol.iterator in Object(value) ? schema2[identity.SEQ] : - schema2[identity.MAP]; + tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : + schema[identity.MAP]; } if (onTagObj) { onTagObj(tagObj); @@ -47556,7 +47556,7 @@ var require_Collection = __commonJS({ var createNode = require_createNode(); var identity = require_identity(); var Node = require_Node(); - function collectionFromPath(schema2, path18, value) { + function collectionFromPath(schema, path18, value) { let v = value; for (let i2 = path18.length - 1; i2 >= 0; --i2) { const k = path18[i2]; @@ -47574,7 +47574,7 @@ var require_Collection = __commonJS({ onAnchor: /* @__PURE__ */ __name(() => { throw new Error("This should not happen, please report a bug."); }, "onAnchor"), - schema: schema2, + schema, sourceObjects: /* @__PURE__ */ new Map() }); } @@ -47585,10 +47585,10 @@ var require_Collection = __commonJS({ static { __name(this, "Collection"); } - constructor(type2, schema2) { - super(type2); + constructor(type, schema) { + super(type); Object.defineProperty(this, "schema", { - value: schema2, + value: schema, configurable: true, enumerable: false, writable: true @@ -47599,11 +47599,11 @@ var require_Collection = __commonJS({ * * @param schema - If defined, overwrites the original's schema */ - clone(schema2) { + clone(schema) { const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); - if (schema2) - copy.schema = schema2; - copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema2) : it); + 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; @@ -47702,16 +47702,16 @@ var require_Collection = __commonJS({ var require_stringifyComment = __commonJS({ "node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) { "use strict"; - var stringifyComment = /* @__PURE__ */ __name((str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); + var stringifyComment = /* @__PURE__ */ __name((str) => str.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); function indentComment(comment, indent) { if (/^\n+$/.test(comment)) return comment.substring(1); return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; } __name(indentComment, "indentComment"); - var lineComment = /* @__PURE__ */ __name((str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : - comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment, "lineCom\ -ment"); + var lineComment = /* @__PURE__ */ __name((str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : + comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment, "lineComm\ +ent"); exports2.indentComment = indentComment; exports2.lineComment = lineComment; exports2.stringifyComment = stringifyComment; @@ -47867,16 +47867,16 @@ var require_stringifyString = __commonJS({ lineWidth: ctx.options.lineWidth, minContentWidth: ctx.options.minContentWidth }), "getFoldOptions"); - var containsDocumentMarker = /* @__PURE__ */ __name((str2) => /^(%|---|\.\.\.)/m.test(str2), "containsDocumentMarker"); - function lineLengthOverLimit(str2, lineWidth, indentLength) { + var containsDocumentMarker = /* @__PURE__ */ __name((str) => /^(%|---|\.\.\.)/m.test(str), "containsDocumentMarker"); + function lineLengthOverLimit(str, lineWidth, indentLength) { if (!lineWidth || lineWidth < 0) return false; const limit = lineWidth - indentLength; - const strLen = str2.length; + const strLen = str.length; if (strLen <= limit) return false; for (let i2 = 0, start = 0; i2 < strLen; ++i2) { - if (str2[i2] === "\n") { + if (str[i2] === "\n") { if (i2 - start > limit) return true; start = i2 + 1; @@ -47888,74 +47888,74 @@ var require_stringifyString = __commonJS({ } __name(lineLengthOverLimit, "lineLengthOverLimit"); function doubleQuotedString(value, ctx) { - const json2 = JSON.stringify(value); + const json = JSON.stringify(value); if (ctx.options.doubleQuotedAsJSON) - return json2; + return json; const { implicitKey } = ctx; const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); - let str2 = ""; + let str = ""; let start = 0; - for (let i2 = 0, ch = json2[i2]; ch; ch = json2[++i2]) { - if (ch === " " && json2[i2 + 1] === "\\" && json2[i2 + 2] === "n") { - str2 += json2.slice(start, i2) + "\\ "; + for (let i2 = 0, ch = json[i2]; ch; ch = json[++i2]) { + if (ch === " " && json[i2 + 1] === "\\" && json[i2 + 2] === "n") { + str += json.slice(start, i2) + "\\ "; i2 += 1; start = i2; ch = "\\"; } if (ch === "\\") - switch (json2[i2 + 1]) { + switch (json[i2 + 1]) { case "u": { - str2 += json2.slice(start, i2); - const code = json2.substr(i2 + 2, 4); + str += json.slice(start, i2); + const code = json.substr(i2 + 2, 4); switch (code) { case "0000": - str2 += "\\0"; + str += "\\0"; break; case "0007": - str2 += "\\a"; + str += "\\a"; break; case "000b": - str2 += "\\v"; + str += "\\v"; break; case "001b": - str2 += "\\e"; + str += "\\e"; break; case "0085": - str2 += "\\N"; + str += "\\N"; break; case "00a0": - str2 += "\\_"; + str += "\\_"; break; case "2028": - str2 += "\\L"; + str += "\\L"; break; case "2029": - str2 += "\\P"; + str += "\\P"; break; default: if (code.substr(0, 2) === "00") - str2 += "\\x" + code.substr(2); + str += "\\x" + code.substr(2); else - str2 += json2.substr(i2, 6); + str += json.substr(i2, 6); } i2 += 5; start = i2 + 1; } break; case "n": - if (implicitKey || json2[i2 + 2] === '"' || json2.length < minMultiLineLength) { + if (implicitKey || json[i2 + 2] === '"' || json.length < minMultiLineLength) { i2 += 1; } else { - str2 += json2.slice(start, i2) + "\n\n"; - while (json2[i2 + 2] === "\\" && json2[i2 + 3] === "n" && json2[i2 + 4] !== '"') { - str2 += "\n"; + str += json.slice(start, i2) + "\n\n"; + while (json[i2 + 2] === "\\" && json[i2 + 3] === "n" && json[i2 + 4] !== '"') { + str += "\n"; i2 += 2; } - str2 += indent; - if (json2[i2 + 2] === " ") - str2 += "\\"; + str += indent; + if (json[i2 + 2] === " ") + str += "\\"; i2 += 1; start = i2 + 1; } @@ -47964,8 +47964,8 @@ var require_stringifyString = __commonJS({ i2 += 1; } } - str2 = start ? str2 + json2.slice(start) : json2; - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); } __name(doubleQuotedString, "doubleQuotedString"); @@ -48003,14 +48003,14 @@ ${indent}`) + "'"; } catch { blockEndNewlines = /\n+(?!\n|$)/g; } - function blockString({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + function blockString({ comment, type, value }, ctx, onComment, onChompKeep) { const { blockQuote, commentString, lineWidth } = ctx.options; if (!blockQuote || /\n[\t ]+$/.test(value)) { return quotedString(value, ctx); } const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); - const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type2 === Scalar.Scalar.BLOCK_FOLDED ? - false : type2 === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); + const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.Scalar.BLOCK_FOLDED ? + false : type === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); if (!value) return literal ? "|\n" : ">\n"; let chomp; @@ -48066,7 +48066,7 @@ ${indent}`) + "'"; 2").replace(/\n+/g, `$&${indent}`); let literalFallback = false; const foldOptions = getFoldOptions(ctx, true); - if (blockQuote !== "folded" && type2 !== Scalar.Scalar.BLOCK_FOLDED) { + if (blockQuote !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) { foldOptions.onOverflow = () => { literalFallback = true; }; @@ -48082,7 +48082,7 @@ ${indent}${start}${value}${end}`; } __name(blockString, "blockString"); function plainString(item, ctx, onComment, onChompKeep) { - const { type: type2, value } = item; + const { type, value } = item; const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { return quotedString(value, ctx); @@ -48091,7 +48091,7 @@ ${indent}${start}${value}${end}`; return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); } - if (!implicitKey && !inFlow && type2 !== Scalar.Scalar.PLAIN && value.includes("\n")) { + if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) { return blockString(item, ctx, onComment, onChompKeep); } if (containsDocumentMarker(value)) { @@ -48102,26 +48102,25 @@ ${indent}${start}${value}${end}`; return quotedString(value, ctx); } } - const str2 = value.replace(/\n+/g, `$& + const str = value.replace(/\n+/g, `$& ${indent}`); if (actualString) { const test2 = /* @__PURE__ */ __name((tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test( - str2), "test"); + str), "test"); const { compat, tags: tags2 } = ctx.doc.schema; if (tags2.some(test2) || compat?.some(test2)) return quotedString(value, ctx); } - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, - false)); + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } __name(plainString, "plainString"); 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: type2 } = item; - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) - type2 = Scalar.Scalar.QUOTE_DOUBLE; + type = Scalar.Scalar.QUOTE_DOUBLE; } const _stringify = /* @__PURE__ */ __name((_type) => { switch (_type) { @@ -48138,7 +48137,7 @@ ${indent}`); return null; } }, "_stringify"); - let res = _stringify(type2); + let res = _stringify(type); if (res === null) { const { defaultKeyType, defaultStringType } = ctx.options; const t2 = implicitKey && defaultKeyType || defaultStringType; @@ -48270,13 +48269,13 @@ var require_stringify2 = __commonJS({ const props = stringifyProps(node, tagObj, ctx); if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; - const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity. + 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 str2; - return identity.isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} -${ctx.indent}${str2}`; + return str; + return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; } __name(stringify, "stringify"); exports2.createStringifyContext = createStringifyContext; @@ -48314,8 +48313,8 @@ var require_stringifyPair = __commonJS({ }); let keyCommentDone = false; let chompKeep = false; - let str2 = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); - if (!explicitKey && !ctx.inFlow && str2.length > 1024) { + let str = stringify.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; @@ -48324,27 +48323,27 @@ var require_stringifyPair = __commonJS({ if (allNullValues || value == null) { if (keyCommentDone && onComment) onComment(); - return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; + return str === "" ? "?" : explicitKey ? `? ${str}` : str; } } else if (allNullValues && !simpleKeys || value == null && explicitKey) { - str2 = `? ${str2}`; + str = `? ${str}`; if (keyComment && !keyCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } if (keyCommentDone) keyComment = null; if (explicitKey) { if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); - str2 = `? ${str2} + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str} ${indent}:`; } else { - str2 = `${str2}:`; + str = `${str}:`; if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } let vsb, vcb, valueComment; if (identity.isNode(value)) { @@ -48360,7 +48359,7 @@ ${indent}:`; } ctx.implicitKey = false; if (!explicitKey && !keyComment && identity.isScalar(value)) - ctx.indentAtStart = str2.length + 1; + ctx.indentAtStart = str.length + 1; chompKeep = false; if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) { @@ -48405,16 +48404,16 @@ ${ctx.indent}`; } else if (valueStr === "" || valueStr[0] === "\n") { ws = ""; } - str2 += ws + valueStr; + str += ws + valueStr; if (ctx.inFlow) { if (valueCommentDone && onComment) onComment(); } else if (valueComment && !valueCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); } else if (chompKeep && onChompKeep) { onChompKeep(); } - return str2; + return str; } __name(stringifyPair, "stringifyPair"); exports2.stringifyPair = stringifyPair; @@ -48446,13 +48445,13 @@ var require_log = __commonJS({ }); // node_modules/yaml/dist/schema/yaml-1.1/merge.js -var require_merge = __commonJS({ +var require_merge3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) { "use strict"; var identity = require_identity(); var Scalar = require_Scalar(); var MERGE_KEY = "<<"; - var merge3 = { + var merge2 = { identify: /* @__PURE__ */ __name((value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY, "identify"), default: "key", @@ -48463,34 +48462,34 @@ var require_merge = __commonJS({ }), "resolve"), stringify: /* @__PURE__ */ __name(() => MERGE_KEY, "stringify") }; - var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || - key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3. + var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || + key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2. tag && tag.default), "isMergeKey"); - function addMergeToJSMap(ctx, map2, value) { + function addMergeToJSMap(ctx, map, value) { const source = resolveAliasValue(ctx, value); if (identity.isSeq(source)) for (const it of source.items) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else if (Array.isArray(source)) for (const it of source) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else - mergeValue(ctx, map2, source); + mergeValue(ctx, map, source); } __name(addMergeToJSMap, "addMergeToJSMap"); - function mergeValue(ctx, map2, value) { + function mergeValue(ctx, map, value) { const source = resolveAliasValue(ctx, 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 (map2 instanceof Map) { - if (!map2.has(key)) - map2.set(key, value2); - } else if (map2 instanceof Set) { - map2.add(key); - } else if (!Object.prototype.hasOwnProperty.call(map2, key)) { - Object.defineProperty(map2, key, { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value2); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { value: value2, writable: true, enumerable: true, @@ -48498,7 +48497,7 @@ var require_merge = __commonJS({ }); } } - return map2; + return map; } __name(mergeValue, "mergeValue"); function resolveAliasValue(ctx, value) { @@ -48507,7 +48506,7 @@ var require_merge = __commonJS({ __name(resolveAliasValue, "resolveAliasValue"); exports2.addMergeToJSMap = addMergeToJSMap; exports2.isMergeKey = isMergeKey; - exports2.merge = merge3; + exports2.merge = merge2; } }); @@ -48516,36 +48515,36 @@ var require_addPairToJSMap = __commonJS({ "node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) { "use strict"; var log2 = require_log(); - var merge3 = require_merge(); + var merge2 = require_merge3(); var stringify = require_stringify2(); var identity = require_identity(); var toJS = require_toJS(); - function addPairToJSMap(ctx, map2, { key, value }) { + function addPairToJSMap(ctx, map, { key, value }) { if (identity.isNode(key) && key.addToJSMap) - key.addToJSMap(ctx, map2, value); - else if (merge3.isMergeKey(ctx, key)) - merge3.addMergeToJSMap(ctx, map2, value); + key.addToJSMap(ctx, map, value); + else if (merge2.isMergeKey(ctx, key)) + merge2.addMergeToJSMap(ctx, map, value); else { const jsKey = toJS.toJS(key, "", ctx); - if (map2 instanceof Map) { - map2.set(jsKey, toJS.toJS(value, jsKey, ctx)); - } else if (map2 instanceof Set) { - map2.add(jsKey); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map instanceof Set) { + map.add(jsKey); } else { const stringKey = stringifyKey(key, jsKey, ctx); const jsValue = toJS.toJS(value, stringKey, ctx); - if (stringKey in map2) - Object.defineProperty(map2, stringKey, { + if (stringKey in map) + Object.defineProperty(map, stringKey, { value: jsValue, writable: true, enumerable: true, configurable: true }); else - map2[stringKey] = jsValue; + map[stringKey] = jsValue; } } - return map2; + return map; } __name(addPairToJSMap, "addPairToJSMap"); function stringifyKey(key, jsKey, ctx) { @@ -48601,12 +48600,12 @@ var require_Pair = __commonJS({ this.key = key; this.value = value; } - clone(schema2) { + clone(schema) { let { key, value } = this; if (identity.isNode(key)) - key = key.clone(schema2); + key = key.clone(schema); if (identity.isNode(value)) - value = value.clone(schema2); + value = value.clone(schema); return new _Pair(key, value); } toJSON(_, ctx) { @@ -48658,31 +48657,31 @@ var require_stringifyCollection = __commonJS({ } } chompKeep = false; - let str3 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); if (comment2) - str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2)); + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); if (chompKeep && comment2) chompKeep = false; - lines.push(blockItemPrefix + str3); + lines.push(blockItemPrefix + str2); } - let str2; + let str; if (lines.length === 0) { - str2 = flowChars.start + flowChars.end; + str = flowChars.start + flowChars.end; } else { - str2 = lines[0]; + str = lines[0]; for (let i2 = 1; i2 < lines.length; ++i2) { const line = lines[i2]; - str2 += line ? ` + str += line ? ` ${indent}${line}` : "\n"; } } if (comment) { - str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent); + str += "\n" + stringifyComment.indentComment(commentString(comment), indent); if (onComment) onComment(); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } __name(stringifyBlockCollection, "stringifyBlockCollection"); function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { @@ -48726,22 +48725,22 @@ ${indent}${line}` : "\n"; } if (comment) reqNewline = true; - let str2 = stringify.stringify(item, itemCtx, () => comment = null); - reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n")); + let str = stringify.stringify(item, itemCtx, () => comment = null); + reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n")); if (i2 < items.length - 1) { - str2 += ","; + str += ","; } else if (ctx.options.trailingComma) { if (ctx.options.lineWidth > 0) { - reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx. - options.lineWidth); + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options. + lineWidth); } if (reqNewline) { - str2 += ","; + str += ","; } } if (comment) - str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment)); - lines.push(str2); + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + lines.push(str); linesAtValue = lines.length; } const { start, end } = flowChars; @@ -48753,11 +48752,11 @@ ${indent}${line}` : "\n"; reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - let str2 = start; + let str = start; for (const line of lines) - str2 += line ? ` + str += line ? ` ${indentStep}${indent}${line}` : "\n"; - return `${str2} + return `${str} ${indent}${end}`; } else { return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; @@ -48808,24 +48807,24 @@ var require_YAMLMap = __commonJS({ static get tagName() { return "tag:yaml.org,2002:map"; } - constructor(schema2) { - super(identity.MAP, schema2); + 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(schema2, obj, ctx) { + static from(schema, obj, ctx) { const { keepUndefined, replacer } = ctx; - const map2 = new this(schema2); + const map = new this(schema); const add = /* @__PURE__ */ __name((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) - map2.items.push(Pair.createPair(key, value, ctx)); + map.items.push(Pair.createPair(key, value, ctx)); }, "add"); if (obj instanceof Map) { for (const [key, value] of obj) @@ -48834,10 +48833,10 @@ var require_YAMLMap = __commonJS({ for (const key of Object.keys(obj)) add(key, obj[key]); } - if (typeof schema2.sortMapEntries === "function") { - map2.items.sort(schema2.sortMapEntries); + if (typeof schema.sortMapEntries === "function") { + map.items.sort(schema.sortMapEntries); } - return map2; + return map; } /** * Adds a value to the collection. @@ -48896,12 +48895,12 @@ var require_YAMLMap = __commonJS({ * @returns Instance of Type, Map, or Object */ toJSON(_, ctx, Type2) { - const map2 = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + const map = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const item of this.items) - addPairToJSMap.addPairToJSMap(ctx, map2, item); - return map2; + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -48927,24 +48926,24 @@ var require_YAMLMap = __commonJS({ }); // node_modules/yaml/dist/schema/common/map.js -var require_map = __commonJS({ +var require_map2 = __commonJS({ "node_modules/yaml/dist/schema/common/map.js"(exports2) { "use strict"; var identity = require_identity(); var YAMLMap = require_YAMLMap(); - var map2 = { + var map = { collection: "map", default: true, nodeClass: YAMLMap.YAMLMap, tag: "tag:yaml.org,2002:map", - resolve(map3, onError2) { - if (!identity.isMap(map3)) + resolve(map2, onError2) { + if (!identity.isMap(map2)) onError2("Expected a mapping for this tag"); - return map3; + return map2; }, - createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLMap.YAMLMap.from(schema2, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx), "createNode") }; - exports2.map = map2; + exports2.map = map; } }); @@ -48965,8 +48964,8 @@ var require_YAMLSeq = __commonJS({ static get tagName() { return "tag:yaml.org,2002:seq"; } - constructor(schema2) { - super(identity.SEQ, schema2); + constructor(schema) { + super(identity.SEQ, schema); this.items = []; } add(value) { @@ -49022,13 +49021,13 @@ var require_YAMLSeq = __commonJS({ this.items[idx] = value; } toJSON(_, ctx) { - const seq2 = []; + const seq = []; if (ctx?.onCreate) - ctx.onCreate(seq2); + ctx.onCreate(seq); let i2 = 0; for (const item of this.items) - seq2.push(toJS.toJS(item, String(i2++), ctx)); - return seq2; + seq.push(toJS.toJS(item, String(i2++), ctx)); + return seq; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -49041,9 +49040,9 @@ var require_YAMLSeq = __commonJS({ onComment }); } - static from(schema2, obj, ctx) { + static from(schema, obj, ctx) { const { replacer } = ctx; - const seq2 = new this(schema2); + const seq = new this(schema); if (obj && Symbol.iterator in Object(obj)) { let i2 = 0; for (let it of obj) { @@ -49051,10 +49050,10 @@ var require_YAMLSeq = __commonJS({ const key = obj instanceof Set ? it : String(i2++); it = replacer.call(obj, key, it); } - seq2.items.push(createNode.createNode(it, void 0, ctx)); + seq.items.push(createNode.createNode(it, void 0, ctx)); } } - return seq2; + return seq; } }; function asItemIndex(key) { @@ -49069,24 +49068,24 @@ var require_YAMLSeq = __commonJS({ }); // node_modules/yaml/dist/schema/common/seq.js -var require_seq = __commonJS({ +var require_seq2 = __commonJS({ "node_modules/yaml/dist/schema/common/seq.js"(exports2) { "use strict"; var identity = require_identity(); var YAMLSeq = require_YAMLSeq(); - var seq2 = { + var seq = { collection: "seq", default: true, nodeClass: YAMLSeq.YAMLSeq, tag: "tag:yaml.org,2002:seq", - resolve(seq3, onError2) { - if (!identity.isSeq(seq3)) + resolve(seq2, onError2) { + if (!identity.isSeq(seq2)) onError2("Expected a sequence for this tag"); - return seq3; + return seq2; }, - createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLSeq.YAMLSeq.from(schema2, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx), "createNode") }; - exports2.seq = seq2; + exports2.seq = seq; } }); @@ -49099,7 +49098,7 @@ var require_string2 = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify(item, ctx, onComment, onChompKeep) { ctx = Object.assign({ actualString: true }, ctx); return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); @@ -49110,7 +49109,7 @@ var require_string2 = __commonJS({ }); // node_modules/yaml/dist/schema/common/null.js -var require_null = __commonJS({ +var require_null2 = __commonJS({ "node_modules/yaml/dist/schema/common/null.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -49129,7 +49128,7 @@ var require_null = __commonJS({ }); // node_modules/yaml/dist/schema/core/bool.js -var require_bool = __commonJS({ +var require_bool2 = __commonJS({ "node_modules/yaml/dist/schema/core/bool.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -49138,7 +49137,7 @@ var require_bool = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, - resolve: /* @__PURE__ */ __name((str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"), "resolve"), + resolve: /* @__PURE__ */ __name((str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"), "resolve"), stringify({ source, value }, ctx) { if (source && boolTag.test.test(source)) { const sv = source[0] === "t" || source[0] === "T"; @@ -49182,7 +49181,7 @@ var require_stringifyNumber = __commonJS({ }); // node_modules/yaml/dist/schema/core/float.js -var require_float = __commonJS({ +var require_float2 = __commonJS({ "node_modules/yaml/dist/schema/core/float.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -49192,8 +49191,8 @@ var require_float = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -49202,41 +49201,41 @@ var require_float = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2)); - const dot = str2.indexOf("."); - if (dot !== -1 && str2[str2.length - 1] === "0") - node.minFractionDigits = str2.length - dot - 1; + 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 }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } }); // node_modules/yaml/dist/schema/core/int.js -var require_int = __commonJS({ +var require_int2 = __commonJS({ "node_modules/yaml/dist/schema/core/int.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - var intResolve = /* @__PURE__ */ __name((str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt( - str2.substring(offset), radix), "intResolve"); + var intResolve = /* @__PURE__ */ __name((str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt( + str.substring(offset), radix), "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value) && value >= 0) @@ -49250,15 +49249,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o[0-7]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0o"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -49267,50 +49266,50 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x[0-9a-fA-F]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intHex = intHex; exports2.intOct = intOct; } }); // node_modules/yaml/dist/schema/core/schema.js -var require_schema = __commonJS({ +var require_schema2 = __commonJS({ "node_modules/yaml/dist/schema/core/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema2 = [ - map2.map, - seq2.seq, + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.boolTag, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float ]; - exports2.schema = schema2; + exports2.schema = schema; } }); // node_modules/yaml/dist/schema/json/schema.js -var require_schema2 = __commonJS({ +var require_schema3 = __commonJS({ "node_modules/yaml/dist/schema/json/schema.js"(exports2) { "use strict"; var Scalar = require_Scalar(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map2(); + var seq = require_seq2(); function intIdentify(value) { return typeof value === "bigint" || Number.isInteger(value); } @@ -49321,7 +49320,7 @@ var require_schema2 = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify: stringifyJSON }, { @@ -49338,7 +49337,7 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^true$|^false$/, - resolve: /* @__PURE__ */ __name((str2) => str2 === "true", "resolve"), + resolve: /* @__PURE__ */ __name((str) => str === "true", "resolve"), stringify: stringifyJSON }, { @@ -49346,8 +49345,8 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, - 10), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + "resolve"), stringify: /* @__PURE__ */ __name(({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value), "\ stringify") }, @@ -49356,7 +49355,7 @@ stringify") default: true, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify: stringifyJSON } ]; @@ -49364,24 +49363,24 @@ stringify") default: true, tag: "", test: /^/, - resolve(str2, onError2) { - onError2(`Unresolved plain scalar ${JSON.stringify(str2)}`); - return str2; + resolve(str, onError2) { + onError2(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; } }; - var schema2 = [map2.map, seq2.seq].concat(jsonScalars, jsonError); - exports2.schema = schema2; + var schema = [map.map, seq.seq].concat(jsonScalars, jsonError); + exports2.schema = schema; } }); // node_modules/yaml/dist/schema/yaml-1.1/binary.js -var require_binary = __commonJS({ +var require_binary2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) { "use strict"; var node_buffer = require("buffer"); var Scalar = require_Scalar(); var stringifyString = require_stringifyString(); - var binary2 = { + var binary = { identify: /* @__PURE__ */ __name((value) => value instanceof Uint8Array, "identify"), // Buffer inherits from Uint8Array default: false, @@ -49398,61 +49397,61 @@ var require_binary = __commonJS({ if (typeof node_buffer.Buffer === "function") { return node_buffer.Buffer.from(src, "base64"); } else if (typeof atob === "function") { - const str2 = atob(src.replace(/[\n\r]/g, "")); - const buffer3 = new Uint8Array(str2.length); - for (let i2 = 0; i2 < str2.length; ++i2) - buffer3[i2] = str2.charCodeAt(i2); + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer3 = new Uint8Array(str.length); + for (let i2 = 0; i2 < str.length; ++i2) + buffer3[i2] = str.charCodeAt(i2); return buffer3; } else { onError2("This environment does not support reading binary tags; either Buffer or atob is required"); return src; } }, - stringify({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { if (!value) return ""; const buf = value; - let str2; + let str; if (typeof node_buffer.Buffer === "function") { - str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( + str = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( "base64"); } else if (typeof btoa === "function") { let s = ""; for (let i2 = 0; i2 < buf.length; ++i2) s += String.fromCharCode(buf[i2]); - str2 = btoa(s); + str = btoa(s); } else { throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); } - type2 ?? (type2 = Scalar.Scalar.BLOCK_LITERAL); - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + 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(str2.length / lineWidth); + const n = Math.ceil(str.length / lineWidth); const lines = new Array(n); for (let i2 = 0, o2 = 0; i2 < n; ++i2, o2 += lineWidth) { - lines[i2] = str2.substr(o2, lineWidth); + lines[i2] = str.substr(o2, lineWidth); } - str2 = lines.join(type2 === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); } - return stringifyString.stringifyString({ comment, type: type2, value: str2 }, ctx, onComment, onChompKeep); + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); } }; - exports2.binary = binary2; + exports2.binary = binary; } }); // node_modules/yaml/dist/schema/yaml-1.1/pairs.js -var require_pairs = __commonJS({ +var require_pairs2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) { "use strict"; var identity = require_identity(); var Pair = require_Pair(); var Scalar = require_Scalar(); var YAMLSeq = require_YAMLSeq(); - function resolvePairs(seq2, onError2) { - if (identity.isSeq(seq2)) { - for (let i2 = 0; i2 < seq2.items.length; ++i2) { - let item = seq2.items[i2]; + function resolvePairs(seq, onError2) { + if (identity.isSeq(seq)) { + for (let i2 = 0; i2 < seq.items.length; ++i2) { + let item = seq.items[i2]; if (identity.isPair(item)) continue; else if (identity.isMap(item)) { @@ -49469,17 +49468,17 @@ ${cn.comment}` : item.comment; } item = pair; } - seq2.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); + seq.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); } } else onError2("Expected a sequence for this tag"); - return seq2; + return seq; } __name(resolvePairs, "resolvePairs"); - function createPairs(schema2, iterable, ctx) { + function createPairs(schema, iterable, ctx) { const { replacer } = ctx; - const pairs3 = new YAMLSeq.YAMLSeq(schema2); - pairs3.tag = "tag:yaml.org,2002:pairs"; + const pairs2 = new YAMLSeq.YAMLSeq(schema); + pairs2.tag = "tag:yaml.org,2002:pairs"; let i2 = 0; if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) { @@ -49503,12 +49502,12 @@ ${cn.comment}` : item.comment; } else { key = it; } - pairs3.items.push(Pair.createPair(key, value, ctx)); + pairs2.items.push(Pair.createPair(key, value, ctx)); } - return pairs3; + return pairs2; } __name(createPairs, "createPairs"); - var pairs2 = { + var pairs = { collection: "seq", default: false, tag: "tag:yaml.org,2002:pairs", @@ -49516,20 +49515,20 @@ ${cn.comment}` : item.comment; createNode: createPairs }; exports2.createPairs = createPairs; - exports2.pairs = pairs2; + exports2.pairs = pairs; exports2.resolvePairs = resolvePairs; } }); // node_modules/yaml/dist/schema/yaml-1.1/omap.js -var require_omap = __commonJS({ +var require_omap2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) { "use strict"; var identity = require_identity(); var toJS = require_toJS(); var YAMLMap = require_YAMLMap(); var YAMLSeq = require_YAMLSeq(); - var pairs2 = require_pairs(); + var pairs = require_pairs2(); var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq { static { __name(this, "YAMLOMap"); @@ -49550,9 +49549,9 @@ var require_omap = __commonJS({ toJSON(_, ctx) { if (!ctx) return super.toJSON(_); - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const pair of this.items) { let key, value; if (identity.isPair(pair)) { @@ -49561,28 +49560,28 @@ var require_omap = __commonJS({ } else { key = toJS.toJS(pair, "", ctx); } - if (map2.has(key)) + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); - map2.set(key, value); + map.set(key, value); } - return map2; + return map; } - static from(schema2, iterable, ctx) { - const pairs$1 = pairs2.createPairs(schema2, iterable, ctx); - const omap3 = new this(); - omap3.items = pairs$1.items; - return omap3; + 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 omap2 = { + var omap = { collection: "seq", identify: /* @__PURE__ */ __name((value) => value instanceof Map, "identify"), nodeClass: YAMLOMap, default: false, tag: "tag:yaml.org,2002:omap", - resolve(seq2, onError2) { - const pairs$1 = pairs2.resolvePairs(seq2, onError2); + resolve(seq, onError2) { + const pairs$1 = pairs.resolvePairs(seq, onError2); const seenKeys = []; for (const { key } of pairs$1.items) { if (identity.isScalar(key)) { @@ -49595,15 +49594,15 @@ var require_omap = __commonJS({ } return Object.assign(new YAMLOMap(), pairs$1); }, - createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLOMap.from(schema2, iterable, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx), "createNode") }; exports2.YAMLOMap = YAMLOMap; - exports2.omap = omap2; + exports2.omap = omap; } }); // node_modules/yaml/dist/schema/yaml-1.1/bool.js -var require_bool2 = __commonJS({ +var require_bool3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -49636,7 +49635,7 @@ var require_bool2 = __commonJS({ }); // node_modules/yaml/dist/schema/yaml-1.1/float.js -var require_float2 = __commonJS({ +var require_float3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -49646,8 +49645,8 @@ var require_float2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -49656,22 +49655,22 @@ var require_float2 = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2.replace(/_/g, "")), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str.replace(/_/g, "")), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2.replace(/_/g, ""))); - const dot = str2.indexOf("."); + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ""))); + const dot = str.indexOf("."); if (dot !== -1) { - const f = str2.substring(dot + 1).replace(/_/g, ""); + const f = str.substring(dot + 1).replace(/_/g, ""); if (f[f.length - 1] === "0") node.minFractionDigits = f.length; } @@ -49679,48 +49678,48 @@ var require_float2 = __commonJS({ }, stringify: stringifyNumber.stringifyNumber }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } }); // node_modules/yaml/dist/schema/yaml-1.1/int.js -var require_int2 = __commonJS({ +var require_int3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - function intResolve(str2, offset, radix, { intAsBigInt }) { - const sign = str2[0]; + function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; if (sign === "-" || sign === "+") offset += 1; - str2 = str2.substring(offset).replace(/_/g, ""); + str = str.substring(offset).replace(/_/g, ""); if (intAsBigInt) { switch (radix) { case 2: - str2 = `0b${str2}`; + str = `0b${str}`; break; case 8: - str2 = `0o${str2}`; + str = `0o${str}`; break; case 16: - str2 = `0x${str2}`; + str = `0x${str}`; break; } - const n2 = BigInt(str2); + const n2 = BigInt(str); return sign === "-" ? BigInt(-1) * n2 : n2; } - const n = parseInt(str2, radix); + const n = parseInt(str, radix); return sign === "-" ? -1 * n : n; } __name(intResolve, "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value)) { - const str2 = value.toString(radix); - return value < 0 ? "-" + prefix2 + str2.substr(1) : prefix2 + str2; + const str = value.toString(radix); + return value < 0 ? "-" + prefix2 + str.substr(1) : prefix2 + str; } return stringifyNumber.stringifyNumber(node); } @@ -49731,7 +49730,7 @@ fy"); tag: "tag:yaml.org,2002:int", format: "BIN", test: /^[-+]?0b[0-1_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 2, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 2, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 2, "0b"), "stringify") }; var intOct = { @@ -49740,15 +49739,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^[-+]?0[0-7_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 1, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 1, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9][0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -49757,10 +49756,10 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^[-+]?0x[0-9a-fA-F_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intBin = intBin; exports2.intHex = intHex; exports2.intOct = intOct; @@ -49768,7 +49767,7 @@ fy"); }); // node_modules/yaml/dist/schema/yaml-1.1/set.js -var require_set = __commonJS({ +var require_set2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) { "use strict"; var identity = require_identity(); @@ -49778,8 +49777,8 @@ var require_set = __commonJS({ static { __name(this, "YAMLSet"); } - constructor(schema2) { - super(schema2); + constructor(schema) { + super(schema); this.tag = _YAMLSet.tag; } add(key) { @@ -49823,50 +49822,50 @@ var require_set = __commonJS({ else throw new Error("Set items must all have null values"); } - static from(schema2, iterable, ctx) { + static from(schema, iterable, ctx) { const { replacer } = ctx; - const set3 = new this(schema2); + 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); - set3.items.push(Pair.createPair(value, null, ctx)); + set2.items.push(Pair.createPair(value, null, ctx)); } - return set3; + return set2; } }; YAMLSet.tag = "tag:yaml.org,2002:set"; - var set2 = { + var set = { collection: "map", identify: /* @__PURE__ */ __name((value) => value instanceof Set, "identify"), nodeClass: YAMLSet, default: false, tag: "tag:yaml.org,2002:set", - createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLSet.from(schema2, iterable, ctx), "createNode"), - resolve(map2, onError2) { - if (identity.isMap(map2)) { - if (map2.hasAllNullValues(true)) - return Object.assign(new YAMLSet(), map2); + createNode: /* @__PURE__ */ __name((schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), "createNode"), + resolve(map, onError2) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); else onError2("Set items must all have null values"); } else onError2("Expected a mapping for this tag"); - return map2; + return map; } }; exports2.YAMLSet = YAMLSet; - exports2.set = set2; + exports2.set = set; } }); // node_modules/yaml/dist/schema/yaml-1.1/timestamp.js -var require_timestamp = __commonJS({ +var require_timestamp2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); - function parseSexagesimal(str2, asBigInt) { - const sign = str2[0]; - const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; + function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === "-" || sign === "+" ? str.substring(1) : str; const num = /* @__PURE__ */ __name((n) => asBigInt ? BigInt(n) : Number(n), "num"); const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0)); return sign === "-" ? num(-1) * res : res; @@ -49905,7 +49904,7 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:int", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), "resolve"), stringify: stringifySexagesimal }; var floatTime = { @@ -49914,10 +49913,10 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:float", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2) => parseSexagesimal(str2, false), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseSexagesimal(str, false), "resolve"), stringify: stringifySexagesimal }; - var timestamp2 = { + var timestamp = { identify: /* @__PURE__ */ __name((value) => value instanceof Date, "identify"), default: true, tag: "tag:yaml.org,2002:timestamp", @@ -49926,8 +49925,8 @@ var require_timestamp = __commonJS({ // assumed to be 00:00:00Z (start of day, UTC). test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+\ )?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), - resolve(str2) { - const match2 = str2.match(timestamp2.test); + 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); @@ -49947,51 +49946,51 @@ tringify") }; exports2.floatTime = floatTime; exports2.intTime = intTime; - exports2.timestamp = timestamp2; + exports2.timestamp = timestamp; } }); // node_modules/yaml/dist/schema/yaml-1.1/schema.js -var require_schema3 = __commonJS({ +var require_schema4 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var binary2 = require_binary(); - var bool2 = require_bool2(); - var float2 = require_float2(); - var int2 = require_int2(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); - var schema2 = [ - map2.map, - seq2.seq, + var binary = require_binary2(); + var bool = require_bool3(); + var float = require_float3(); + var int = require_int3(); + var merge2 = require_merge3(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var set = require_set2(); + var timestamp = require_timestamp2(); + var schema = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.trueTag, - bool2.falseTag, - int2.intBin, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float, - binary2.binary, - merge3.merge, - omap2.omap, - pairs2.pairs, - set2.set, - timestamp2.intTime, - timestamp2.floatTime, - timestamp2.timestamp + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + merge2.merge, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp ]; - exports2.schema = schema2; + exports2.schema = schema; } }); @@ -49999,61 +49998,61 @@ var require_schema3 = __commonJS({ var require_tags = __commonJS({ "node_modules/yaml/dist/schema/tags.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema2 = require_schema(); - var schema$1 = require_schema2(); - var binary2 = require_binary(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); - var schema$2 = require_schema3(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema = require_schema2(); + var schema$1 = require_schema3(); + var binary = require_binary2(); + var merge2 = require_merge3(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var schema$2 = require_schema4(); + var set = require_set2(); + var timestamp = require_timestamp2(); var schemas = /* @__PURE__ */ new Map([ - ["core", schema2.schema], - ["failsafe", [map2.map, seq2.seq, string.string]], + ["core", schema.schema], + ["failsafe", [map.map, seq.seq, string.string]], ["json", schema$1.schema], ["yaml11", schema$2.schema], ["yaml-1.1", schema$2.schema] ]); var tagsByName = { - binary: binary2.binary, - bool: bool2.boolTag, - float: float2.float, - floatExp: float2.floatExp, - floatNaN: float2.floatNaN, - floatTime: timestamp2.floatTime, - int: int2.int, - intHex: int2.intHex, - intOct: int2.intOct, - intTime: timestamp2.intTime, - map: map2.map, - merge: merge3.merge, - null: _null2.nullTag, - omap: omap2.omap, - pairs: pairs2.pairs, - seq: seq2.seq, - set: set2.set, - timestamp: timestamp2.timestamp + 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: map.map, + merge: merge2.merge, + 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": binary2.binary, - "tag:yaml.org,2002:merge": merge3.merge, - "tag:yaml.org,2002:omap": omap2.omap, - "tag:yaml.org,2002:pairs": pairs2.pairs, - "tag:yaml.org,2002:set": set2.set, - "tag:yaml.org,2002:timestamp": timestamp2.timestamp + "tag:yaml.org,2002:binary": binary.binary, + "tag:yaml.org,2002:merge": merge2.merge, + "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, addMergeTag) { const schemaTags = schemas.get(schemaName); if (schemaTags && !customTags) { - return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice(); + return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice(); } let tags2 = schemaTags; if (!tags2) { @@ -50072,7 +50071,7 @@ var require_tags = __commonJS({ tags2 = customTags(tags2.slice()); } if (addMergeTag) - tags2 = tags2.concat(merge3.merge); + tags2 = tags2.concat(merge2.merge); return tags2.reduce((tags3, tag) => { const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; if (!tagObj) { @@ -50096,8 +50095,8 @@ var require_Schema = __commonJS({ "node_modules/yaml/dist/schema/Schema.js"(exports2) { "use strict"; var identity = require_identity(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map2(); + var seq = require_seq2(); var string = require_string2(); var tags2 = require_tags(); var sortMapEntriesByKey = /* @__PURE__ */ __name((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0, "sortMapEntri\ @@ -50106,15 +50105,15 @@ esByKey"); static { __name(this, "Schema"); } - constructor({ compat, customTags, merge: merge3, resolveKnownTags, schema: schema2, sortMapEntries, toStringDefaults }) { + constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { this.compat = Array.isArray(compat) ? tags2.getTags(compat, "compat") : compat ? tags2.getTags(null, compat) : null; - this.name = typeof schema2 === "string" && schema2 || "core"; + this.name = typeof schema === "string" && schema || "core"; this.knownTags = resolveKnownTags ? tags2.coreKnownTags : {}; - this.tags = tags2.getTags(customTags, this.name, merge3); + this.tags = tags2.getTags(customTags, this.name, merge2); this.toStringOptions = toStringDefaults ?? null; - Object.defineProperty(this, identity.MAP, { value: map2.map }); + Object.defineProperty(this, identity.MAP, { value: map.map }); Object.defineProperty(this, identity.SCALAR, { value: string.string }); - Object.defineProperty(this, identity.SEQ, { value: seq2.seq }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; } @@ -50478,11 +50477,11 @@ var require_Document = __commonJS({ throw new Error(`With a null YAML version, the { schema: Schema } option is required`); } // json & jsonArg are only used from toJSON() - toJS({ json: json2, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { const ctx = { anchors: /* @__PURE__ */ new Map(), doc: this, - keep: !json2, + keep: !json, mapAsMap: mapAsMap === true, mapKeyWarned: false, maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 @@ -50825,9 +50824,9 @@ var require_resolve_block_map = __commonJS({ 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: composeNode2, composeEmptyNode }, ctx, bm, onError2, tag) { + function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; - const map2 = new NodeClass(ctx.schema); + const map = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; let offset = bm.offset; @@ -50853,10 +50852,10 @@ var require_resolve_block_map = __commonJS({ if (!keyProps.anchor && !keyProps.tag && !sep7) { commentEnd = keyProps.end; if (keyProps.comment) { - if (map2.comment) - map2.comment += "\n" + keyProps.comment; + if (map.comment) + map.comment += "\n" + keyProps.comment; else - map2.comment = keyProps.comment; + map.comment = keyProps.comment; } continue; } @@ -50869,12 +50868,12 @@ e"); } ctx.atKey = true; const keyStart = keyProps.end; - const keyNode = key ? composeNode2(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, + const keyNode = key ? composeNode(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError2); ctx.atKey = false; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); const valueProps = resolveProps.resolveProps(sep7 ?? [], { indicator: "map-value-ind", @@ -50893,15 +50892,15 @@ e"); onError2(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 ? composeNode2(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, - null, valueProps, onError2); + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, null, + valueProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError2); offset = valueNode.range[2]; const pair = new Pair.Pair(keyNode, valueNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } else { if (implicitKey) onError2(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); @@ -50914,13 +50913,13 @@ e"); const pair = new Pair.Pair(keyNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } } if (commentEnd && commentEnd < offset) onError2(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); - map2.range = [bm.offset, offset, commentEnd ?? offset]; - return map2; + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; } __name(resolveBlockMap, "resolveBlockMap"); exports2.resolveBlockMap = resolveBlockMap; @@ -50934,9 +50933,9 @@ var require_resolve_block_seq = __commonJS({ var YAMLSeq = require_YAMLSeq(); var resolveProps = require_resolve_props(); var utilFlowIndentCheck = require_util_flow_indent_check(); - function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode }, ctx, bs, onError2, tag) { + function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; - const seq2 = new NodeClass(ctx.schema); + const seq = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; if (ctx.atKey) @@ -50961,19 +50960,19 @@ var require_resolve_block_seq = __commonJS({ } else { commentEnd = props.end; if (props.comment) - seq2.comment = props.comment; + seq.comment = props.comment; continue; } } - const node = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, + const node = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError2); offset = node.range[2]; - seq2.items.push(node); + seq.items.push(node); } - seq2.range = [bs.offset, offset, commentEnd ?? offset]; - return seq2; + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; } __name(resolveBlockSeq, "resolveBlockSeq"); exports2.resolveBlockSeq = resolveBlockSeq; @@ -50990,8 +50989,8 @@ var require_resolve_end = __commonJS({ let hasSpace = false; let sep7 = ""; for (const token of end) { - const { source, type: type2 } = token; - switch (type2) { + const { source, type } = token; + switch (type) { case "space": hasSpace = true; break; @@ -51012,7 +51011,7 @@ var require_resolve_end = __commonJS({ hasSpace = true; break; default: - onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type2} at node end`); + onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); } offset += source.length; } @@ -51039,7 +51038,7 @@ var require_resolve_flow_collection = __commonJS({ var blockMsg = "Block collections are not allowed within flow collections"; var isBlock = /* @__PURE__ */ __name((token) => token && (token.type === "block-map" || token.type === "block-seq"), "isBlock"); - function resolveFlowCollection({ composeNode: composeNode2, composeEmptyNode }, ctx, fc, onError2, tag) { + function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError2, tag) { const isMap = fc.start.source === "{"; const fcName = isMap ? "flow map" : "flow sequence"; const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq); @@ -51119,7 +51118,7 @@ var require_resolve_flow_collection = __commonJS({ } } if (!isMap && !sep7 && !props.found) { - const valueNode = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, + const valueNode = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, props, onError2); coll.items.push(valueNode); offset = valueNode.range[2]; @@ -51128,7 +51127,7 @@ var require_resolve_flow_collection = __commonJS({ } else { ctx.atKey = true; const keyStart = props.end; - const keyNode = key ? composeNode2(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, + const keyNode = key ? composeNode(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, onError2); if (isBlock(key)) onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg); @@ -51164,7 +51163,7 @@ start of an implicit flow sequence key"); else onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); } - const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( ctx, valueProps.end, sep7, null, valueProps, onError2) : null; if (valueNode) { if (isBlock(value)) @@ -51179,17 +51178,17 @@ start of an implicit flow sequence key"); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; if (isMap) { - const map2 = coll; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); - map2.items.push(pair); + map.items.push(pair); } else { - const map2 = new YAMLMap.YAMLMap(ctx.schema); - map2.flow = true; - map2.items.push(pair); + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); const endRange = (valueNode ?? keyNode).range; - map2.range = [keyNode.range[0], endRange[1], endRange[2]]; - coll.items.push(map2); + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); } offset = valueNode ? valueNode.range[2] : valueProps.end; } @@ -51309,7 +51308,7 @@ var require_resolve_block_scalar = __commonJS({ const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError2); if (!header) return { value: "", type: null, comment: "", range: [start, start, start] }; - const type2 = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + 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 i2 = lines.length - 1; i2 >= 0; --i2) { @@ -51324,7 +51323,7 @@ var require_resolve_block_scalar = __commonJS({ let end2 = start + header.length; if (scalar.source) end2 += scalar.source.length; - return { value: value2, type: type2, comment: header.comment, range: [start, end2, end2] }; + return { value: value2, type, comment: header.comment, range: [start, end2, end2] }; } let trimIndent = scalar.indent + header.indent; let offset = scalar.offset + header.length; @@ -51372,7 +51371,7 @@ ator"; onError2(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); indent = ""; } - if (type2 === Scalar.Scalar.BLOCK_LITERAL) { + if (type === Scalar.Scalar.BLOCK_LITERAL) { value += sep7 + indent.slice(trimIndent) + content; sep7 = "\n"; } else if (indent.length > trimIndent || content[0] === " ") { @@ -51407,7 +51406,7 @@ ator"; value += "\n"; } const end = start + header.length + scalar.source.length; - return { value, type: type2, comment: header.comment, range: [start, end, end] }; + return { value, type, comment: header.comment, range: [start, end, end] }; } __name(resolveBlockScalar, "resolveBlockScalar"); function parseBlockScalarHeader({ offset, props }, strict, onError2) { @@ -51493,11 +51492,11 @@ var require_resolve_flow_scalar = __commonJS({ var Scalar = require_Scalar(); var resolveEnd = require_resolve_end(); function resolveFlowScalar(scalar, strict, onError2) { - const { offset, type: type2, source, end } = scalar; + const { offset, type, source, end } = scalar; let _type; let value; const _onError = /* @__PURE__ */ __name((rel, code, msg) => onError2(offset + rel, code, msg), "_onError"); - switch (type2) { + switch (type) { case "scalar": _type = Scalar.Scalar.PLAIN; value = plainValue(source, _onError); @@ -51512,7 +51511,7 @@ var require_resolve_flow_scalar = __commonJS({ break; /* istanbul ignore next should not happen */ default: - onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type2}`); + onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); return { value: "", type: null, @@ -51722,7 +51721,7 @@ var require_compose_scalar = __commonJS({ var resolveBlockScalar = require_resolve_block_scalar(); var resolveFlowScalar = require_resolve_flow_scalar(); function composeScalar(ctx, token, tagToken, onError2) { - const { value, type: type2, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( + const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( ctx, token, onError2) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError2); const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError2(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; @@ -51746,8 +51745,8 @@ var require_compose_scalar = __commonJS({ } scalar.range = range2; scalar.source = value; - if (type2) - scalar.type = type2; + if (type) + scalar.type = type; if (tagName) scalar.tag = tagName; if (tag.format) @@ -51757,11 +51756,11 @@ var require_compose_scalar = __commonJS({ return scalar; } __name(composeScalar, "composeScalar"); - function findScalarTagByName(schema2, value, tagName, tagToken, onError2) { + function findScalarTagByName(schema, value, tagName, tagToken, onError2) { if (tagName === "!") - return schema2[identity.SCALAR]; + return schema[identity.SCALAR]; const matchWithTest = []; - for (const tag of schema2.tags) { + for (const tag of schema.tags) { if (!tag.collection && tag.tag === tagName) { if (tag.default && tag.test) matchWithTest.push(tag); @@ -51772,20 +51771,20 @@ var require_compose_scalar = __commonJS({ for (const tag of matchWithTest) if (tag.test?.test(value)) return tag; - const kt = schema2.knownTags[tagName]; + const kt = schema.knownTags[tagName]; if (kt && !kt.collection) { - schema2.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); return kt; } onError2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); - return schema2[identity.SCALAR]; + return schema[identity.SCALAR]; } __name(findScalarTagByName, "findScalarTagByName"); - function findScalarTagByTest({ atKey, directives, schema: schema2 }, value, token, onError2) { - const tag = schema2.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test( - value)) || schema2[identity.SCALAR]; - if (schema2.compat) { - const compat = schema2.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema2[identity.SCALAR]; + function findScalarTagByTest({ atKey, directives, schema }, value, token, onError2) { + const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && 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); @@ -51841,8 +51840,8 @@ var require_compose_node = __commonJS({ var composeScalar = require_compose_scalar(); var resolveEnd = require_resolve_end(); var utilEmptyScalarPosition = require_util_empty_scalar_position(); - var CN = { composeNode: composeNode2, composeEmptyNode }; - function composeNode2(ctx, token, props, onError2) { + var CN = { composeNode, composeEmptyNode }; + function composeNode(ctx, token, props, onError2) { const atKey = ctx.atKey; const { spaceBefore, comment, anchor, tag } = props; let node; @@ -51899,7 +51898,7 @@ var require_compose_node = __commonJS({ node.srcToken = token; return node; } - __name(composeNode2, "composeNode"); + __name(composeNode, "composeNode"); function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError2) { const token = { type: "scalar", @@ -51937,7 +51936,7 @@ var require_compose_node = __commonJS({ } __name(composeAlias, "composeAlias"); exports2.composeEmptyNode = composeEmptyNode; - exports2.composeNode = composeNode2; + exports2.composeNode = composeNode; } }); @@ -51946,7 +51945,7 @@ var require_compose_doc = __commonJS({ "node_modules/yaml/dist/compose/compose-doc.js"(exports2) { "use strict"; var Document = require_Document(); - var composeNode2 = require_compose_node(); + var composeNode = require_compose_node(); var resolveEnd = require_resolve_end(); var resolveProps = require_resolve_props(); function composeDoc(options, directives, { offset, start, value, end }, onError2) { @@ -51972,7 +51971,7 @@ var require_compose_doc = __commonJS({ if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) onError2(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); } - doc.contents = value ? composeNode2.composeNode(ctx, value, props, onError2) : composeNode2.composeEmptyNode(ctx, props. + doc.contents = value ? composeNode.composeNode(ctx, value, props, onError2) : composeNode.composeEmptyNode(ctx, props. end, start, null, props, onError2); const contentEnd = doc.contents.range[2]; const re = resolveEnd.resolveEnd(end, contentEnd, false, onError2); @@ -52231,8 +52230,8 @@ var require_cst_scalar = __commonJS({ } __name(resolveAsScalar, "resolveAsScalar"); function createScalarToken(value, context3) { - const { implicitKey = false, indent, inFlow = false, offset = -1, type: type2 = "PLAIN" } = context3; - const source = stringifyString.stringifyString({ type: type2, value }, { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = "PLAIN" } = context3; + const source = stringifyString.stringifyString({ type, value }, { implicitKey, indent: indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -52264,29 +52263,29 @@ var require_cst_scalar = __commonJS({ } __name(createScalarToken, "createScalarToken"); function setScalarValue(token, value, context3 = {}) { - let { afterKey = false, implicitKey = false, inFlow = false, type: type2 } = context3; + let { afterKey = false, implicitKey = false, inFlow = false, type } = context3; let indent = "indent" in token ? token.indent : null; if (afterKey && typeof indent === "number") indent += 2; - if (!type2) + if (!type) switch (token.type) { case "single-quoted-scalar": - type2 = "QUOTE_SINGLE"; + type = "QUOTE_SINGLE"; break; case "double-quoted-scalar": - type2 = "QUOTE_DOUBLE"; + 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"); - type2 = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; + type = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; break; } default: - type2 = "PLAIN"; + type = "PLAIN"; } - const source = stringifyString.stringifyString({ type: type2, value }, { + const source = stringifyString.stringifyString({ type, value }, { implicitKey: implicitKey || indent === null, indent: indent !== null && indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -52348,12 +52347,12 @@ var require_cst_scalar = __commonJS({ return false; } __name(addEndtoBlockProps, "addEndtoBlockProps"); - function setFlowScalarValue(token, source, type2) { + function setFlowScalarValue(token, source, type) { switch (token.type) { case "scalar": case "double-quoted-scalar": case "single-quoted-scalar": - token.type = type2; + token.type = type; token.source = source; break; case "block-scalar": { @@ -52364,7 +52363,7 @@ var require_cst_scalar = __commonJS({ for (const tok of end) tok.offset += oa; delete token.props; - Object.assign(token, { type: type2, source, end }); + Object.assign(token, { type, source, end }); break; } case "block-map": @@ -52372,7 +52371,7 @@ var require_cst_scalar = __commonJS({ const offset = token.offset + source.length; const nl = { type: "newline", offset, indent: token.indent, source: "\n" }; delete token.items; - Object.assign(token, { type: type2, source, end: [nl] }); + Object.assign(token, { type, source, end: [nl] }); break; } default: { @@ -52382,7 +52381,7 @@ var require_cst_scalar = __commonJS({ for (const key of Object.keys(token)) if (key !== "type" && key !== "offset") delete token[key]; - Object.assign(token, { type: type2, indent, source, end }); + Object.assign(token, { type, indent, source, end }); } } } @@ -53261,9 +53260,9 @@ var require_parser = __commonJS({ var node_process = require("process"); var cst = require_cst(); var lexer = require_lexer(); - function includesToken(list, type2) { + function includesToken(list, type) { for (let i2 = 0; i2 < list.length; ++i2) - if (list[i2].type === type2) + if (list[i2].type === type) return true; return false; } @@ -53408,19 +53407,19 @@ nd")) { this.offset += source.length; return; } - const type2 = cst.tokenType(source); - if (!type2) { + 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 (type2 === "scalar") { + } else if (type === "scalar") { this.atNewLine = false; this.atScalar = true; this.type = "scalar"; } else { - this.type = type2; + this.type = type; yield* this.step(); - switch (type2) { + switch (type) { case "newline": this.atNewLine = true; this.indent = 0; @@ -53647,14 +53646,14 @@ k-map" || token.type === "block-seq")) { delete scalar.end; } else sep7 = [this.sourceToken]; - const map2 = { + const map = { type: "block-map", offset: scalar.offset, indent: scalar.indent, items: [{ start, key: scalar, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else yield* this.lineEnd(scalar); } @@ -53684,8 +53683,8 @@ k-map" || token.type === "block-seq")) { yield* this.step(); } } - *blockMap(map2) { - const it = map2.items[map2.items.length - 1]; + *blockMap(map) { + const it = map.items[map.items.length - 1]; switch (this.type) { case "newline": this.onKeyLine = false; @@ -53695,7 +53694,7 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { @@ -53705,17 +53704,17 @@ k-map" || token.type === "block-seq")) { case "space": case "comment": if (it.value) { - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { - if (this.atIndentedComment(it.start, map2.indent)) { - const prev = map2.items[map2.items.length - 2]; + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - map2.items.pop(); + map.items.pop(); return; } } @@ -53723,8 +53722,8 @@ k-map" || token.type === "block-seq")) { } return; } - if (this.indent >= map2.indent) { - const atMapIndent = !this.onKeyLine && this.indent === map2.indent; + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind"; let start = []; if (atNextItem && it.sep && !it.value) { @@ -53738,7 +53737,7 @@ k-map" || token.type === "block-seq")) { case "space": break; case "comment": - if (st.indent > map2.indent) + if (st.indent > map.indent) nl.length = 0; break; default: @@ -53753,7 +53752,7 @@ k-map" || token.type === "block-seq")) { case "tag": if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start }); + map.items.push({ start }); this.onKeyLine = true; } else if (it.sep) { it.sep.push(this.sourceToken); @@ -53767,7 +53766,7 @@ k-map" || token.type === "block-seq")) { it.explicitKey = true; } else if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start, explicitKey: true }); + map.items.push({ start, explicitKey: true }); } else { this.stack.push({ type: "block-map", @@ -53793,7 +53792,7 @@ k-map" || token.type === "block-seq")) { }); } } else if (it.value) { - map2.items.push({ start: [], key: null, sep: [this.sourceToken] }); + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -53823,7 +53822,7 @@ k-map" || token.type === "block-seq")) { if (!it.sep) { Object.assign(it, { key: null, sep: [this.sourceToken] }); } else if (it.value || atNextItem) { - map2.items.push({ start, key: null, sep: [this.sourceToken] }); + map.items.push({ start, key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -53843,7 +53842,7 @@ k-map" || token.type === "block-seq")) { case "double-quoted-scalar": { const fs23 = this.flowScalar(this.type); if (atNextItem || it.value) { - map2.items.push({ start, key: fs23, sep: [] }); + map.items.push({ start, key: fs23, sep: [] }); this.onKeyLine = true; } else if (it.sep) { this.stack.push(fs23); @@ -53854,7 +53853,7 @@ k-map" || token.type === "block-seq")) { return; } default: { - const bv = this.startBlockValue(map2); + const bv = this.startBlockValue(map); if (bv) { if (bv.type === "block-seq") { if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) { @@ -53867,7 +53866,7 @@ k-map" || token.type === "block-seq")) { return; } } else if (atMapIndent) { - map2.items.push({ start }); + map.items.push({ start }); } this.stack.push(bv); return; @@ -53878,8 +53877,8 @@ k-map" || token.type === "block-seq")) { yield* this.pop(); yield* this.step(); } - *blockSequence(seq2) { - const it = seq2.items[seq2.items.length - 1]; + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; switch (this.type) { case "newline": if (it.value) { @@ -53888,22 +53887,22 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); } else it.start.push(this.sourceToken); return; case "space": case "comment": if (it.value) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else { - if (this.atIndentedComment(it.start, seq2.indent)) { - const prev = seq2.items[seq2.items.length - 2]; + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - seq2.items.pop(); + seq.items.pop(); return; } } @@ -53912,21 +53911,21 @@ k-map" || token.type === "block-seq")) { return; case "anchor": case "tag": - if (it.value || this.indent <= seq2.indent) + if (it.value || this.indent <= seq.indent) break; it.start.push(this.sourceToken); return; case "seq-item-ind": - if (this.indent !== seq2.indent) + if (this.indent !== seq.indent) break; if (it.value || includesToken(it.start, "seq-item-ind")) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else it.start.push(this.sourceToken); return; } - if (this.indent > seq2.indent) { - const bv = this.startBlockValue(seq2); + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); if (bv) { this.stack.push(bv); return; @@ -54009,20 +54008,20 @@ k-map" || token.type === "block-seq")) { fixFlowSeqItems(fc); const sep7 = fc.end.splice(1, fc.end.length); sep7.push(this.sourceToken); - const map2 = { + const map = { type: "block-map", offset: fc.offset, indent: fc.indent, items: [{ start, key: fc, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else { yield* this.lineEnd(fc); } } } - flowScalar(type2) { + flowScalar(type) { if (this.onNewLine) { let nl = this.source.indexOf("\n") + 1; while (nl !== 0) { @@ -54031,7 +54030,7 @@ k-map" || token.type === "block-seq")) { } } return { - type: type2, + type, offset: this.offset, indent: this.indent, source: this.source @@ -54301,7 +54300,7 @@ var require_dist7 = __commonJS({ var require_helpers2 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; - var ValidationError2 = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError3(message, instance, schema2, path18, name, argument) { + var ValidationError2 = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError3(message, instance, schema, path18, name, argument) { if (Array.isArray(path18)) { this.path = path18; this.property = path18.reduce(function(sum, item) { @@ -54313,9 +54312,9 @@ var require_helpers2 = __commonJS({ if (message) { this.message = message; } - if (schema2) { - var id = schema2.$id || schema2.id; - this.schema = id || schema2; + if (schema) { + var id = schema.$id || schema.id; + this.schema = id || schema; } if (instance !== void 0) { this.instance = instance; @@ -54324,12 +54323,12 @@ var require_helpers2 = __commonJS({ this.argument = argument; this.stack = this.toString(); }, "ValidationError"); - ValidationError2.prototype.toString = /* @__PURE__ */ __name(function toString6() { + ValidationError2.prototype.toString = /* @__PURE__ */ __name(function toString5() { return this.property + " " + this.message; }, "toString"); - var ValidatorResult = exports2.ValidatorResult = /* @__PURE__ */ __name(function ValidatorResult2(instance, schema2, options, ctx) { + var ValidatorResult = exports2.ValidatorResult = /* @__PURE__ */ __name(function ValidatorResult2(instance, schema, options, ctx) { this.instance = instance; - this.schema = schema2; + this.schema = schema; this.options = options; this.path = ctx.path; this.propertyPath = ctx.propertyPath; @@ -54368,7 +54367,7 @@ var require_helpers2 = __commonJS({ return i2 + ": " + v.toString() + "\n"; } __name(stringizer, "stringizer"); - ValidatorResult.prototype.toString = /* @__PURE__ */ __name(function toString6(res) { + ValidatorResult.prototype.toString = /* @__PURE__ */ __name(function toString5(res) { return this.errors.map(stringizer).join(""); }, "toString"); Object.defineProperty(ValidatorResult.prototype, "valid", { get: /* @__PURE__ */ __name(function() { @@ -54388,9 +54387,9 @@ var require_helpers2 = __commonJS({ ValidatorResultError.prototype = new Error(); ValidatorResultError.prototype.constructor = ValidatorResultError; ValidatorResultError.prototype.name = "Validation Error"; - var SchemaError = exports2.SchemaError = /* @__PURE__ */ __name(function SchemaError2(msg, schema2) { + var SchemaError = exports2.SchemaError = /* @__PURE__ */ __name(function SchemaError2(msg, schema) { this.message = msg; - this.schema = schema2; + this.schema = schema; Error.call(this, msg); if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, SchemaError2); @@ -54403,8 +54402,8 @@ var require_helpers2 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema2, options, path18, base, schemas) { - this.schema = schema2; + var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path18, base, schemas) { + this.schema = schema; this.options = options; if (Array.isArray(path18)) { this.path = path18; @@ -54420,13 +54419,13 @@ var require_helpers2 = __commonJS({ SchemaContext.prototype.resolve = /* @__PURE__ */ __name(function resolve2(target) { return (() => resolveUrl(this.base, target))(); }, "resolve"); - SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema2, propertyName) { + SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) { var path18 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); - var id = schema2.$id || schema2.id; + var id = schema.$id || schema.id; let base = (() => resolveUrl(this.base, id || ""))(); - var ctx = new SchemaContext(schema2, this.options, path18, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema, this.options, path18, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { - ctx.schemas[base] = schema2; + ctx.schemas[base] = schema; } return ctx; }, "makeChild"); @@ -54657,13 +54656,13 @@ var require_attribute = __commonJS({ "extends": true }; var validators3 = attribute.validators = {}; - validators3.type = /* @__PURE__ */ __name(function validateType(instance, schema2, options, ctx) { + validators3.type = /* @__PURE__ */ __name(function validateType(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - var types2 = Array.isArray(schema2.type) ? schema2.type : [schema2.type]; - if (!types2.some(this.testType.bind(this, instance, schema2, options, ctx))) { + var result = new ValidatorResult(instance, schema, options, ctx); + var types2 = Array.isArray(schema.type) ? schema.type : [schema.type]; + if (!types2.some(this.testType.bind(this, instance, schema, options, ctx))) { var list = types2.map(function(v) { if (!v) return; var id = v.$id || v.id; @@ -54677,13 +54676,13 @@ var require_attribute = __commonJS({ } return result; }, "validateType"); - function testSchemaNoThrow(instance, options, ctx, callback, schema2) { - var throwError2 = options.throwError; + function testSchemaNoThrow(instance, options, ctx, callback, schema) { + var throwError = options.throwError; var throwAll = options.throwAll; options.throwError = false; options.throwAll = false; - var res = this.validateSchema(instance, schema2, options, ctx); - options.throwError = throwError2; + var res = this.validateSchema(instance, schema, options, ctx); + options.throwError = throwError; options.throwAll = throwAll; if (!res.valid && callback instanceof Function) { callback(res); @@ -54691,16 +54690,16 @@ var require_attribute = __commonJS({ return res.valid; } __name(testSchemaNoThrow, "testSchemaNoThrow"); - validators3.anyOf = /* @__PURE__ */ __name(function validateAnyOf(instance, schema2, options, ctx) { + validators3.anyOf = /* @__PURE__ */ __name(function validateAnyOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - var inner = new ValidatorResult(instance, schema2, options, ctx); - if (!Array.isArray(schema2.anyOf)) { + var result = new ValidatorResult(instance, schema, options, ctx); + var inner = new ValidatorResult(instance, schema, options, ctx); + if (!Array.isArray(schema.anyOf)) { throw new SchemaError("anyOf must be an array"); } - if (!schema2.anyOf.some( + if (!schema.anyOf.some( testSchemaNoThrow.bind( this, instance, @@ -54711,7 +54710,7 @@ var require_attribute = __commonJS({ } ) )) { - var list = schema2.anyOf.map(function(v, i2) { + var list = schema.anyOf.map(function(v, i2) { var id = v.$id || v.id; if (id) return "<" + id + ">"; return v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i2 + "]"; @@ -54727,16 +54726,16 @@ var require_attribute = __commonJS({ } return result; }, "validateAnyOf"); - validators3.allOf = /* @__PURE__ */ __name(function validateAllOf(instance, schema2, options, ctx) { + validators3.allOf = /* @__PURE__ */ __name(function validateAllOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2.allOf)) { + if (!Array.isArray(schema.allOf)) { throw new SchemaError("allOf must be an array"); } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var self2 = this; - schema2.allOf.forEach(function(v, i2) { + schema.allOf.forEach(function(v, i2) { var valid3 = self2.validateSchema(instance, v, options, ctx); if (!valid3.valid) { var id = v.$id || v.id; @@ -54752,16 +54751,16 @@ var require_attribute = __commonJS({ }); return result; }, "validateAllOf"); - validators3.oneOf = /* @__PURE__ */ __name(function validateOneOf(instance, schema2, options, ctx) { + validators3.oneOf = /* @__PURE__ */ __name(function validateOneOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2.oneOf)) { + if (!Array.isArray(schema.oneOf)) { throw new SchemaError("oneOf must be an array"); } - var result = new ValidatorResult(instance, schema2, options, ctx); - var inner = new ValidatorResult(instance, schema2, options, ctx); - var count = schema2.oneOf.filter( + var result = new ValidatorResult(instance, schema, options, ctx); + var inner = new ValidatorResult(instance, schema, options, ctx); + var count = schema.oneOf.filter( testSchemaNoThrow.bind( this, instance, @@ -54772,7 +54771,7 @@ var require_attribute = __commonJS({ } ) ).length; - var list = schema2.oneOf.map(function(v, i2) { + var list = schema.oneOf.map(function(v, i2) { var id = v.$id || v.id; return id || v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i2 + "]"; }); @@ -54788,21 +54787,21 @@ var require_attribute = __commonJS({ } return result; }, "validateOneOf"); - validators3.if = /* @__PURE__ */ __name(function validateIf(instance, schema2, options, ctx) { + validators3.if = /* @__PURE__ */ __name(function validateIf(instance, schema, options, ctx) { if (instance === void 0) return null; - if (!helpers.isSchema(schema2.if)) throw new Error('Expected "if" keyword to be a schema'); - var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema2.if); - var result = new ValidatorResult(instance, schema2, options, ctx); + if (!helpers.isSchema(schema.if)) throw new Error('Expected "if" keyword to be a schema'); + var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema.if); + var result = new ValidatorResult(instance, schema, options, ctx); var res; if (ifValid) { - if (schema2.then === void 0) return; - if (!helpers.isSchema(schema2.then)) throw new Error('Expected "then" keyword to be a schema'); - res = this.validateSchema(instance, schema2.then, options, ctx.makeChild(schema2.then)); + if (schema.then === void 0) return; + if (!helpers.isSchema(schema.then)) throw new Error('Expected "then" keyword to be a schema'); + res = this.validateSchema(instance, schema.then, options, ctx.makeChild(schema.then)); result.importErrors(res); } else { - if (schema2.else === void 0) return; - if (!helpers.isSchema(schema2.else)) throw new Error('Expected "else" keyword to be a schema'); - res = this.validateSchema(instance, schema2.else, options, ctx.makeChild(schema2.else)); + if (schema.else === void 0) return; + if (!helpers.isSchema(schema.else)) throw new Error('Expected "else" keyword to be a schema'); + res = this.validateSchema(instance, schema.else, options, ctx.makeChild(schema.else)); result.importErrors(res); } return result; @@ -54815,10 +54814,10 @@ var require_attribute = __commonJS({ } } __name(getEnumerableProperty, "getEnumerableProperty"); - validators3.propertyNames = /* @__PURE__ */ __name(function validatePropertyNames(instance, schema2, options, ctx) { + validators3.propertyNames = /* @__PURE__ */ __name(function validatePropertyNames(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var subschema = schema2.propertyNames !== void 0 ? schema2.propertyNames : {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var subschema = schema.propertyNames !== void 0 ? schema.propertyNames : {}; if (!helpers.isSchema(subschema)) throw new SchemaError('Expected "propertyNames" to be a schema (object or boolea\ n)'); for (var property in instance) { @@ -54829,10 +54828,10 @@ n)'); } return result; }, "validatePropertyNames"); - validators3.properties = /* @__PURE__ */ __name(function validateProperties(instance, schema2, options, ctx) { + validators3.properties = /* @__PURE__ */ __name(function validateProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var properties = schema2.properties || {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var properties = schema.properties || {}; for (var property in properties) { var subschema = properties[property]; if (subschema === void 0) { @@ -54850,19 +54849,19 @@ n)'); } return result; }, "validateProperties"); - function testAdditionalProperty(instance, schema2, options, ctx, property, result) { + function testAdditionalProperty(instance, schema, options, ctx, property, result) { if (!this.types.object(instance)) return; - if (schema2.properties && schema2.properties[property] !== void 0) { + if (schema.properties && schema.properties[property] !== void 0) { return; } - if (schema2.additionalProperties === false) { + if (schema.additionalProperties === false) { result.addError({ name: "additionalProperties", argument: property, message: "is not allowed to have the additional property " + JSON.stringify(property) }); } else { - var additionalProperties = schema2.additionalProperties || {}; + var additionalProperties = schema.additionalProperties || {}; if (typeof options.preValidateProperty == "function") { options.preValidateProperty(instance, property, additionalProperties, options, ctx); } @@ -54873,10 +54872,10 @@ n)'); } } __name(testAdditionalProperty, "testAdditionalProperty"); - validators3.patternProperties = /* @__PURE__ */ __name(function validatePatternProperties(instance, schema2, options, ctx) { + validators3.patternProperties = /* @__PURE__ */ __name(function validatePatternProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var patternProperties = schema2.patternProperties || {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var patternProperties = schema.patternProperties || {}; for (var property in instance) { var test2 = true; for (var pattern in patternProperties) { @@ -54903,58 +54902,58 @@ n)'); result.importErrors(res); } if (test2) { - testAdditionalProperty.call(this, instance, schema2, options, ctx, property, result); + testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } } return result; }, "validatePatternProperties"); - validators3.additionalProperties = /* @__PURE__ */ __name(function validateAdditionalProperties(instance, schema2, options, ctx) { + validators3.additionalProperties = /* @__PURE__ */ __name(function validateAdditionalProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - if (schema2.patternProperties) { + if (schema.patternProperties) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); for (var property in instance) { - testAdditionalProperty.call(this, instance, schema2, options, ctx, property, result); + testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } return result; }, "validateAdditionalProperties"); - validators3.minProperties = /* @__PURE__ */ __name(function validateMinProperties(instance, schema2, options, ctx) { + validators3.minProperties = /* @__PURE__ */ __name(function validateMinProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); - if (!(keys.length >= schema2.minProperties)) { + if (!(keys.length >= schema.minProperties)) { result.addError({ name: "minProperties", - argument: schema2.minProperties, - message: "does not meet minimum property length of " + schema2.minProperties + argument: schema.minProperties, + message: "does not meet minimum property length of " + schema.minProperties }); } return result; }, "validateMinProperties"); - validators3.maxProperties = /* @__PURE__ */ __name(function validateMaxProperties(instance, schema2, options, ctx) { + validators3.maxProperties = /* @__PURE__ */ __name(function validateMaxProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); - if (!(keys.length <= schema2.maxProperties)) { + if (!(keys.length <= schema.maxProperties)) { result.addError({ name: "maxProperties", - argument: schema2.maxProperties, - message: "does not meet maximum property length of " + schema2.maxProperties + argument: schema.maxProperties, + message: "does not meet maximum property length of " + schema.maxProperties }); } return result; }, "validateMaxProperties"); - validators3.items = /* @__PURE__ */ __name(function validateItems(instance, schema2, options, ctx) { + validators3.items = /* @__PURE__ */ __name(function validateItems(instance, schema, options, ctx) { var self2 = this; if (!this.types.array(instance)) return; - if (schema2.items === void 0) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + if (schema.items === void 0) return; + var result = new ValidatorResult(instance, schema, options, ctx); instance.every(function(value, i2) { - if (Array.isArray(schema2.items)) { - var items = schema2.items[i2] === void 0 ? schema2.additionalItems : schema2.items[i2]; + if (Array.isArray(schema.items)) { + var items = schema.items[i2] === void 0 ? schema.additionalItems : schema.items[i2]; } else { - var items = schema2.items; + var items = schema.items; } if (items === void 0) { return true; @@ -54973,104 +54972,104 @@ n)'); }); return result; }, "validateItems"); - validators3.contains = /* @__PURE__ */ __name(function validateContains(instance, schema2, options, ctx) { + validators3.contains = /* @__PURE__ */ __name(function validateContains(instance, schema, options, ctx) { var self2 = this; if (!this.types.array(instance)) return; - if (schema2.contains === void 0) return; - if (!helpers.isSchema(schema2.contains)) throw new Error('Expected "contains" keyword to be a schema'); - var result = new ValidatorResult(instance, schema2, options, ctx); + if (schema.contains === void 0) return; + if (!helpers.isSchema(schema.contains)) throw new Error('Expected "contains" keyword to be a schema'); + var result = new ValidatorResult(instance, schema, options, ctx); var count = instance.some(function(value, i2) { - var res = self2.validateSchema(value, schema2.contains, options, ctx.makeChild(schema2.contains, i2)); + var res = self2.validateSchema(value, schema.contains, options, ctx.makeChild(schema.contains, i2)); return res.errors.length === 0; }); if (count === false) { result.addError({ name: "contains", - argument: schema2.contains, + argument: schema.contains, message: "must contain an item matching given schema" }); } return result; }, "validateContains"); - validators3.minimum = /* @__PURE__ */ __name(function validateMinimum(instance, schema2, options, ctx) { + validators3.minimum = /* @__PURE__ */ __name(function validateMinimum(instance, schema, options, ctx) { if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (schema2.exclusiveMinimum && schema2.exclusiveMinimum === true) { - if (!(instance > schema2.minimum)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (schema.exclusiveMinimum && schema.exclusiveMinimum === true) { + if (!(instance > schema.minimum)) { result.addError({ name: "minimum", - argument: schema2.minimum, - message: "must be greater than " + schema2.minimum + argument: schema.minimum, + message: "must be greater than " + schema.minimum }); } } else { - if (!(instance >= schema2.minimum)) { + if (!(instance >= schema.minimum)) { result.addError({ name: "minimum", - argument: schema2.minimum, - message: "must be greater than or equal to " + schema2.minimum + argument: schema.minimum, + message: "must be greater than or equal to " + schema.minimum }); } } return result; }, "validateMinimum"); - validators3.maximum = /* @__PURE__ */ __name(function validateMaximum(instance, schema2, options, ctx) { + validators3.maximum = /* @__PURE__ */ __name(function validateMaximum(instance, schema, options, ctx) { if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (schema2.exclusiveMaximum && schema2.exclusiveMaximum === true) { - if (!(instance < schema2.maximum)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (schema.exclusiveMaximum && schema.exclusiveMaximum === true) { + if (!(instance < schema.maximum)) { result.addError({ name: "maximum", - argument: schema2.maximum, - message: "must be less than " + schema2.maximum + argument: schema.maximum, + message: "must be less than " + schema.maximum }); } } else { - if (!(instance <= schema2.maximum)) { + if (!(instance <= schema.maximum)) { result.addError({ name: "maximum", - argument: schema2.maximum, - message: "must be less than or equal to " + schema2.maximum + argument: schema.maximum, + message: "must be less than or equal to " + schema.maximum }); } } return result; }, "validateMaximum"); - validators3.exclusiveMinimum = /* @__PURE__ */ __name(function validateExclusiveMinimum(instance, schema2, options, ctx) { - if (typeof schema2.exclusiveMinimum === "boolean") return; + validators3.exclusiveMinimum = /* @__PURE__ */ __name(function validateExclusiveMinimum(instance, schema, options, ctx) { + if (typeof schema.exclusiveMinimum === "boolean") return; if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var valid3 = instance > schema2.exclusiveMinimum; + var result = new ValidatorResult(instance, schema, options, ctx); + var valid3 = instance > schema.exclusiveMinimum; if (!valid3) { result.addError({ name: "exclusiveMinimum", - argument: schema2.exclusiveMinimum, - message: "must be strictly greater than " + schema2.exclusiveMinimum + argument: schema.exclusiveMinimum, + message: "must be strictly greater than " + schema.exclusiveMinimum }); } return result; }, "validateExclusiveMinimum"); - validators3.exclusiveMaximum = /* @__PURE__ */ __name(function validateExclusiveMaximum(instance, schema2, options, ctx) { - if (typeof schema2.exclusiveMaximum === "boolean") return; + validators3.exclusiveMaximum = /* @__PURE__ */ __name(function validateExclusiveMaximum(instance, schema, options, ctx) { + if (typeof schema.exclusiveMaximum === "boolean") return; if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var valid3 = instance < schema2.exclusiveMaximum; + var result = new ValidatorResult(instance, schema, options, ctx); + var valid3 = instance < schema.exclusiveMaximum; if (!valid3) { result.addError({ name: "exclusiveMaximum", - argument: schema2.exclusiveMaximum, - message: "must be strictly less than " + schema2.exclusiveMaximum + argument: schema.exclusiveMaximum, + message: "must be strictly less than " + schema.exclusiveMaximum }); } return result; }, "validateExclusiveMaximum"); - var validateMultipleOfOrDivisbleBy = /* @__PURE__ */ __name(function validateMultipleOfOrDivisbleBy2(instance, schema2, options, ctx, validationType, errorMessage) { + var validateMultipleOfOrDivisbleBy = /* @__PURE__ */ __name(function validateMultipleOfOrDivisbleBy2(instance, schema, options, ctx, validationType, errorMessage) { if (!this.types.number(instance)) return; - var validationArgument = schema2[validationType]; + var validationArgument = schema[validationType]; if (validationArgument == 0) { throw new SchemaError(validationType + " cannot be zero"); } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var instanceDecimals = helpers.getDecimalPlaces(instance); var divisorDecimals = helpers.getDecimalPlaces(validationArgument); var maxDecimals = Math.max(instanceDecimals, divisorDecimals); @@ -55084,23 +55083,23 @@ n)'); } return result; }, "validateMultipleOfOrDivisbleBy"); - validators3.multipleOf = /* @__PURE__ */ __name(function validateMultipleOf(instance, schema2, options, ctx) { - return validateMultipleOfOrDivisbleBy.call(this, instance, schema2, options, ctx, "multipleOf", "is not a multiple\ - of (divisible by) "); + validators3.multipleOf = /* @__PURE__ */ __name(function validateMultipleOf(instance, schema, options, ctx) { + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "multipleOf", "is not a multiple \ +of (divisible by) "); }, "validateMultipleOf"); - validators3.divisibleBy = /* @__PURE__ */ __name(function validateDivisibleBy(instance, schema2, options, ctx) { - return validateMultipleOfOrDivisbleBy.call(this, instance, schema2, options, ctx, "divisibleBy", "is not divisible\ - by (multiple of) "); + validators3.divisibleBy = /* @__PURE__ */ __name(function validateDivisibleBy(instance, schema, options, ctx) { + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "divisibleBy", "is not divisible \ +by (multiple of) "); }, "validateDivisibleBy"); - validators3.required = /* @__PURE__ */ __name(function validateRequired(instance, schema2, options, ctx) { - var result = new ValidatorResult(instance, schema2, options, ctx); - if (instance === void 0 && schema2.required === true) { + validators3.required = /* @__PURE__ */ __name(function validateRequired(instance, schema, options, ctx) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (instance === void 0 && schema.required === true) { result.addError({ name: "required", message: "is required" }); - } else if (this.types.object(instance) && Array.isArray(schema2.required)) { - schema2.required.forEach(function(n) { + } else if (this.types.object(instance) && Array.isArray(schema.required)) { + schema.required.forEach(function(n) { if (getEnumerableProperty(instance, n) === void 0) { result.addError({ name: "required", @@ -55112,10 +55111,10 @@ n)'); } return result; }, "validateRequired"); - validators3.pattern = /* @__PURE__ */ __name(function validatePattern(instance, schema2, options, ctx) { + validators3.pattern = /* @__PURE__ */ __name(function validatePattern(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var pattern = schema2.pattern; + var result = new ValidatorResult(instance, schema, options, ctx); + var pattern = schema.pattern; try { var regexp = new RegExp(pattern, "u"); } catch (_e) { @@ -55124,72 +55123,72 @@ n)'); if (!instance.match(regexp)) { result.addError({ name: "pattern", - argument: schema2.pattern, - message: "does not match pattern " + JSON.stringify(schema2.pattern.toString()) + argument: schema.pattern, + message: "does not match pattern " + JSON.stringify(schema.pattern.toString()) }); } return result; }, "validatePattern"); - validators3.format = /* @__PURE__ */ __name(function validateFormat(instance, schema2, options, ctx) { + validators3.format = /* @__PURE__ */ __name(function validateFormat(instance, schema, options, ctx) { if (instance === void 0) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!result.disableFormat && !helpers.isFormat(instance, schema2.format, this)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!result.disableFormat && !helpers.isFormat(instance, schema.format, this)) { result.addError({ name: "format", - argument: schema2.format, - message: "does not conform to the " + JSON.stringify(schema2.format) + " format" + argument: schema.format, + message: "does not conform to the " + JSON.stringify(schema.format) + " format" }); } return result; }, "validateFormat"); - validators3.minLength = /* @__PURE__ */ __name(function validateMinLength(instance, schema2, options, ctx) { + validators3.minLength = /* @__PURE__ */ __name(function validateMinLength(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); - if (!(length >= schema2.minLength)) { + if (!(length >= schema.minLength)) { result.addError({ name: "minLength", - argument: schema2.minLength, - message: "does not meet minimum length of " + schema2.minLength + argument: schema.minLength, + message: "does not meet minimum length of " + schema.minLength }); } return result; }, "validateMinLength"); - validators3.maxLength = /* @__PURE__ */ __name(function validateMaxLength(instance, schema2, options, ctx) { + validators3.maxLength = /* @__PURE__ */ __name(function validateMaxLength(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); - if (!(length <= schema2.maxLength)) { + if (!(length <= schema.maxLength)) { result.addError({ name: "maxLength", - argument: schema2.maxLength, - message: "does not meet maximum length of " + schema2.maxLength + argument: schema.maxLength, + message: "does not meet maximum length of " + schema.maxLength }); } return result; }, "validateMaxLength"); - validators3.minItems = /* @__PURE__ */ __name(function validateMinItems(instance, schema2, options, ctx) { + validators3.minItems = /* @__PURE__ */ __name(function validateMinItems(instance, schema, options, ctx) { if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!(instance.length >= schema2.minItems)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!(instance.length >= schema.minItems)) { result.addError({ name: "minItems", - argument: schema2.minItems, - message: "does not meet minimum length of " + schema2.minItems + argument: schema.minItems, + message: "does not meet minimum length of " + schema.minItems }); } return result; }, "validateMinItems"); - validators3.maxItems = /* @__PURE__ */ __name(function validateMaxItems(instance, schema2, options, ctx) { + validators3.maxItems = /* @__PURE__ */ __name(function validateMaxItems(instance, schema, options, ctx) { if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!(instance.length <= schema2.maxItems)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!(instance.length <= schema.maxItems)) { result.addError({ name: "maxItems", - argument: schema2.maxItems, - message: "does not meet maximum length of " + schema2.maxItems + argument: schema.maxItems, + message: "does not meet maximum length of " + schema.maxItems }); } return result; @@ -55204,10 +55203,10 @@ n)'); return true; } __name(testArrays, "testArrays"); - validators3.uniqueItems = /* @__PURE__ */ __name(function validateUniqueItems(instance, schema2, options, ctx) { - if (schema2.uniqueItems !== true) return; + validators3.uniqueItems = /* @__PURE__ */ __name(function validateUniqueItems(instance, schema, options, ctx) { + if (schema.uniqueItems !== true) return; if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); if (!instance.every(testArrays)) { result.addError({ name: "uniqueItems", @@ -55216,14 +55215,14 @@ n)'); } return result; }, "validateUniqueItems"); - validators3.dependencies = /* @__PURE__ */ __name(function validateDependencies(instance, schema2, options, ctx) { + validators3.dependencies = /* @__PURE__ */ __name(function validateDependencies(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - for (var property in schema2.dependencies) { + var result = new ValidatorResult(instance, schema, options, ctx); + for (var property in schema.dependencies) { if (instance[property] === void 0) { continue; } - var dep = schema2.dependencies[property]; + var dep = schema.dependencies[property]; var childContext = ctx.makeChild(dep, property); if (typeof dep == "string") { dep = [dep]; @@ -55255,48 +55254,48 @@ n)'); } return result; }, "validateDependencies"); - validators3["enum"] = /* @__PURE__ */ __name(function validateEnum(instance, schema2, options, ctx) { + validators3["enum"] = /* @__PURE__ */ __name(function validateEnum(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2["enum"])) { - throw new SchemaError("enum expects an array", schema2); + if (!Array.isArray(schema["enum"])) { + throw new SchemaError("enum expects an array", schema); } - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!schema2["enum"].some(helpers.deepCompareStrict.bind(null, instance))) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!schema["enum"].some(helpers.deepCompareStrict.bind(null, instance))) { result.addError({ name: "enum", - argument: schema2["enum"], - message: "is not one of enum values: " + schema2["enum"].map(String).join(",") + argument: schema["enum"], + message: "is not one of enum values: " + schema["enum"].map(String).join(",") }); } return result; }, "validateEnum"); - validators3["const"] = /* @__PURE__ */ __name(function validateEnum(instance, schema2, options, ctx) { + validators3["const"] = /* @__PURE__ */ __name(function validateEnum(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!helpers.deepCompareStrict(schema2["const"], instance)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!helpers.deepCompareStrict(schema["const"], instance)) { result.addError({ name: "const", - argument: schema2["const"], - message: "does not exactly match expected constant: " + schema2["const"] + argument: schema["const"], + message: "does not exactly match expected constant: " + schema["const"] }); } return result; }, "validateEnum"); - validators3.not = validators3.disallow = /* @__PURE__ */ __name(function validateNot(instance, schema2, options, ctx) { + validators3.not = validators3.disallow = /* @__PURE__ */ __name(function validateNot(instance, schema, options, ctx) { var self2 = this; if (instance === void 0) return null; - var result = new ValidatorResult(instance, schema2, options, ctx); - var notTypes = schema2.not || schema2.disallow; + var result = new ValidatorResult(instance, schema, options, ctx); + var notTypes = schema.not || schema.disallow; if (!notTypes) return null; if (!Array.isArray(notTypes)) notTypes = [notTypes]; - notTypes.forEach(function(type2) { - if (self2.testType(instance, schema2, options, ctx, type2)) { - var id = type2 && (type2.$id || type2.id); - var schemaId = id || type2; + notTypes.forEach(function(type) { + if (self2.testType(instance, schema, options, ctx, type)) { + var id = type && (type.$id || type.id); + var schemaId = id || type; result.addError({ name: "not", argument: schemaId, @@ -55321,43 +55320,43 @@ var require_scan2 = __commonJS({ this.ref = ref; } __name(SchemaScanResult, "SchemaScanResult"); - module2.exports.scan = /* @__PURE__ */ __name(function scan(base, schema2) { - function scanSchema(baseuri, schema3) { - if (!schema3 || typeof schema3 != "object") return; - if (schema3.$ref) { - let resolvedUri = helpers.resolveUrl(baseuri, schema3.$ref); + module2.exports.scan = /* @__PURE__ */ __name(function scan(base, schema) { + function scanSchema(baseuri, schema2) { + if (!schema2 || typeof schema2 != "object") return; + if (schema2.$ref) { + let resolvedUri = helpers.resolveUrl(baseuri, schema2.$ref); ref[resolvedUri] = ref[resolvedUri] ? ref[resolvedUri] + 1 : 0; return; } - var id = schema3.$id || schema3.id; + var id = schema2.$id || schema2.id; let resolvedBase = helpers.resolveUrl(baseuri, id); var ourBase = id ? resolvedBase : baseuri; if (ourBase) { if (ourBase.indexOf("#") < 0) ourBase += "#"; if (found[ourBase]) { - if (!helpers.deepCompareStrict(found[ourBase], schema3)) { + if (!helpers.deepCompareStrict(found[ourBase], schema2)) { throw new Error("Schema <" + ourBase + "> already exists with different definition"); } return found[ourBase]; } - found[ourBase] = schema3; + found[ourBase] = schema2; if (ourBase[ourBase.length - 1] == "#") { - found[ourBase.substring(0, ourBase.length - 1)] = schema3; - } - } - scanArray(ourBase + "/items", Array.isArray(schema3.items) ? schema3.items : [schema3.items]); - scanArray(ourBase + "/extends", Array.isArray(schema3.extends) ? schema3.extends : [schema3.extends]); - scanSchema(ourBase + "/additionalItems", schema3.additionalItems); - scanObject(ourBase + "/properties", schema3.properties); - scanSchema(ourBase + "/additionalProperties", schema3.additionalProperties); - scanObject(ourBase + "/definitions", schema3.definitions); - scanObject(ourBase + "/patternProperties", schema3.patternProperties); - scanObject(ourBase + "/dependencies", schema3.dependencies); - scanArray(ourBase + "/disallow", schema3.disallow); - scanArray(ourBase + "/allOf", schema3.allOf); - scanArray(ourBase + "/anyOf", schema3.anyOf); - scanArray(ourBase + "/oneOf", schema3.oneOf); - scanSchema(ourBase + "/not", schema3.not); + found[ourBase.substring(0, ourBase.length - 1)] = schema2; + } + } + scanArray(ourBase + "/items", Array.isArray(schema2.items) ? schema2.items : [schema2.items]); + scanArray(ourBase + "/extends", Array.isArray(schema2.extends) ? schema2.extends : [schema2.extends]); + scanSchema(ourBase + "/additionalItems", schema2.additionalItems); + scanObject(ourBase + "/properties", schema2.properties); + scanSchema(ourBase + "/additionalProperties", schema2.additionalProperties); + scanObject(ourBase + "/definitions", schema2.definitions); + scanObject(ourBase + "/patternProperties", schema2.patternProperties); + scanObject(ourBase + "/dependencies", schema2.dependencies); + scanArray(ourBase + "/disallow", schema2.disallow); + scanArray(ourBase + "/allOf", schema2.allOf); + scanArray(ourBase + "/anyOf", schema2.anyOf); + scanArray(ourBase + "/oneOf", schema2.oneOf); + scanSchema(ourBase + "/not", schema2.not); } __name(scanSchema, "scanSchema"); function scanArray(baseuri, schemas) { @@ -55376,7 +55375,7 @@ var require_scan2 = __commonJS({ __name(scanObject, "scanObject"); var found = {}; var ref = {}; - scanSchema(base, schema2); + scanSchema(base, schema); return new SchemaScanResult(found, ref); }, "scan"); } @@ -55406,13 +55405,13 @@ var require_validator = __commonJS({ Validator.prototype.types = null; Validator.prototype.attributes = null; Validator.prototype.unresolvedRefs = null; - Validator.prototype.addSchema = /* @__PURE__ */ __name(function addSchema(schema2, base) { + Validator.prototype.addSchema = /* @__PURE__ */ __name(function addSchema(schema, base) { var self2 = this; - if (!schema2) { + if (!schema) { return null; } - var scan = scanSchema(base || anonymousBase, schema2); - var ourUri = base || schema2.$id || schema2.id; + var scan = scanSchema(base || anonymousBase, schema); + var ourUri = base || schema.$id || schema.id; for (var uri in scan.id) { this.schemas[uri] = scan.id[uri]; } @@ -55442,32 +55441,32 @@ var require_validator = __commonJS({ Validator.prototype.getSchema = /* @__PURE__ */ __name(function getSchema(urn) { return this.schemas[urn]; }, "getSchema"); - Validator.prototype.validate = /* @__PURE__ */ __name(function validate4(instance, schema2, options, ctx) { - if (typeof schema2 !== "boolean" && typeof schema2 !== "object" || schema2 === null) { + Validator.prototype.validate = /* @__PURE__ */ __name(function validate4(instance, schema, options, ctx) { + if (typeof schema !== "boolean" && typeof schema !== "object" || schema === null) { throw new SchemaError("Expected `schema` to be an object or boolean"); } if (!options) { options = {}; } - var id = schema2.$id || schema2.id; + var id = schema.$id || schema.id; let base = helpers.resolveUrl(options.base, id || ""); if (!ctx) { - ctx = new SchemaContext(schema2, options, [], base, Object.create(this.schemas)); + ctx = new SchemaContext(schema, options, [], base, Object.create(this.schemas)); if (!ctx.schemas[base]) { - ctx.schemas[base] = schema2; + ctx.schemas[base] = schema; } - var found = scanSchema(base, schema2); + var found = scanSchema(base, schema); for (var n in found.id) { var sch = found.id[n]; ctx.schemas[n] = sch; } } if (options.required && instance === void 0) { - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); result.addError("is required, but is undefined"); return result; } - var result = this.validateSchema(instance, schema2, options, ctx); + var result = this.validateSchema(instance, schema, options, ctx); if (!result) { throw new Error("Result undefined"); } else if (options.throwAll && result.errors.length) { @@ -55475,50 +55474,50 @@ var require_validator = __commonJS({ } return result; }, "validate"); - function shouldResolve(schema2) { - var ref = typeof schema2 === "string" ? schema2 : schema2.$ref; + function shouldResolve(schema) { + var ref = typeof schema === "string" ? schema : schema.$ref; if (typeof ref == "string") return ref; return false; } __name(shouldResolve, "shouldResolve"); - Validator.prototype.validateSchema = /* @__PURE__ */ __name(function validateSchema2(instance, schema2, options, ctx) { - var result = new ValidatorResult(instance, schema2, options, ctx); - if (typeof schema2 === "boolean") { - if (schema2 === true) { - schema2 = {}; - } else if (schema2 === false) { - schema2 = { type: [] }; - } - } else if (!schema2) { + Validator.prototype.validateSchema = /* @__PURE__ */ __name(function validateSchema2(instance, schema, options, ctx) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (typeof schema === "boolean") { + if (schema === true) { + schema = {}; + } else if (schema === false) { + schema = { type: [] }; + } + } else if (!schema) { throw new Error("schema is undefined"); } - if (schema2["extends"]) { - if (Array.isArray(schema2["extends"])) { - var schemaobj = { schema: schema2, ctx }; - schema2["extends"].forEach(this.schemaTraverser.bind(this, schemaobj)); - schema2 = schemaobj.schema; + if (schema["extends"]) { + if (Array.isArray(schema["extends"])) { + var schemaobj = { schema, ctx }; + schema["extends"].forEach(this.schemaTraverser.bind(this, schemaobj)); + schema = schemaobj.schema; schemaobj.schema = null; schemaobj.ctx = null; schemaobj = null; } else { - schema2 = helpers.deepMerge(schema2, this.superResolve(schema2["extends"], ctx)); + schema = helpers.deepMerge(schema, this.superResolve(schema["extends"], ctx)); } } - var switchSchema = shouldResolve(schema2); + var switchSchema = shouldResolve(schema); if (switchSchema) { - var resolved = this.resolve(schema2, switchSchema, ctx); + var resolved = this.resolve(schema, switchSchema, ctx); var subctx = new SchemaContext(resolved.subschema, options, ctx.path, resolved.switchSchema, ctx.schemas); return this.validateSchema(instance, resolved.subschema, options, subctx); } var skipAttributes = options && options.skipAttributes || []; - for (var key in schema2) { + for (var key in schema) { if (!attribute.ignoreProperties[key] && skipAttributes.indexOf(key) < 0) { var validatorErr = null; var validator = this.attributes[key]; if (validator) { - validatorErr = validator.call(this, instance, schema2, options, ctx); + validatorErr = validator.call(this, instance, schema, options, ctx); } else if (options.allowUnknownAttributes === false) { - throw new SchemaError("Unsupported attribute: " + key, schema2); + throw new SchemaError("Unsupported attribute: " + key, schema); } if (validatorErr) { result.importErrors(validatorErr); @@ -55526,7 +55525,7 @@ var require_validator = __commonJS({ } } if (typeof options.rewrite == "function") { - var value = options.rewrite.call(this, instance, schema2, options, ctx); + var value = options.rewrite.call(this, instance, schema, options, ctx); result.instance = value; } return result; @@ -55534,14 +55533,14 @@ var require_validator = __commonJS({ Validator.prototype.schemaTraverser = /* @__PURE__ */ __name(function schemaTraverser(schemaobj, s) { schemaobj.schema = helpers.deepMerge(schemaobj.schema, this.superResolve(s, schemaobj.ctx)); }, "schemaTraverser"); - Validator.prototype.superResolve = /* @__PURE__ */ __name(function superResolve(schema2, ctx) { - var ref = shouldResolve(schema2); + Validator.prototype.superResolve = /* @__PURE__ */ __name(function superResolve(schema, ctx) { + var ref = shouldResolve(schema); if (ref) { - return this.resolve(schema2, ref, ctx).subschema; + return this.resolve(schema, ref, ctx).subschema; } - return schema2; + return schema; }, "superResolve"); - Validator.prototype.resolve = /* @__PURE__ */ __name(function resolve2(schema2, switchSchema, ctx) { + Validator.prototype.resolve = /* @__PURE__ */ __name(function resolve2(schema, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -55550,25 +55549,25 @@ var require_validator = __commonJS({ let fragment = parsed.hash; var document2 = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length); if (!document2 || !ctx.schemas[document2]) { - throw new SchemaError("no such schema <" + switchSchema + ">", schema2); + throw new SchemaError("no such schema <" + switchSchema + ">", schema); } var subschema = helpers.objectGetPath(ctx.schemas[document2], fragment.substr(1)); if (subschema === void 0) { - throw new SchemaError("no such schema " + fragment + " located in <" + document2 + ">", schema2); + throw new SchemaError("no such schema " + fragment + " located in <" + document2 + ">", schema); } return { subschema, switchSchema }; }, "resolve"); - Validator.prototype.testType = /* @__PURE__ */ __name(function validateType(instance, schema2, options, ctx, type2) { - if (type2 === void 0) { + Validator.prototype.testType = /* @__PURE__ */ __name(function validateType(instance, schema, options, ctx, type) { + if (type === void 0) { return; - } else if (type2 === null) { + } else if (type === null) { throw new SchemaError('Unexpected null in "type" keyword'); } - if (typeof this.types[type2] == "function") { - return this.types[type2].call(this, instance); + if (typeof this.types[type] == "function") { + return this.types[type].call(this, instance); } - if (type2 && typeof type2 == "object") { - var res = this.validateSchema(instance, type2, options, ctx); + if (type && typeof type == "object") { + var res = this.validateSchema(instance, type, options, ctx); return res === void 0 || !(res && res.errors.length); } return true; @@ -55616,9 +55615,9 @@ var require_lib = __commonJS({ module2.exports.SchemaError = require_helpers2().SchemaError; module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; module2.exports.scan = require_scan2().scan; - module2.exports.validate = function(instance, schema2, options) { + module2.exports.validate = function(instance, schema, options) { var v = new Validator(); - return v.validate(instance, schema2, options); + return v.validate(instance, schema, options); }; } }); @@ -55953,8 +55952,8 @@ function asArray(source) { return Array.isArray(source) ? source : [source]; } __name(asArray, "asArray"); -function asCamelCase(str2) { - return str2.replace(/[\s-]+(.)/g, (_all, chr) => { +function asCamelCase(str) { + return str.replace(/[\s-]+(.)/g, (_all, chr) => { return chr.toUpperCase(); }); } @@ -56027,8 +56026,8 @@ function filterType(input, filter2, def) { } __name(filterType, "filterType"); function filterPrimitives(input, omit) { - const type2 = r(input) ? "string" : typeof input; - return /number|string|boolean/.test(type2) && (!omit || !omit.includes(type2)); + const type = r(input) ? "string" : typeof input; + return /number|string|boolean/.test(type) && (!omit || !omit.includes(type)); } __name(filterPrimitives, "filterPrimitives"); function filterPlainObject(input) { @@ -57176,14 +57175,14 @@ var init_git_executor_chain = __esm({ return gitError; } async attemptRemoteTask(task, logger7) { - const binary2 = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); + const binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); const args = this._plugins.exec("spawn.args", [...task.commands], { ...pluginContext(task, task.commands), env: { ...this.env } }); const raw = await this.gitResponse( task, - binary2, + binary, args, this.outputHandler, logger7.step("SPAWN") @@ -58381,11 +58380,11 @@ function mergeTask(customArgs) { commands: ["merge", ...customArgs], format: "utf-8", parser(stdOut, stdErr) { - const merge3 = parseMergeResult(stdOut, stdErr); - if (merge3.failed) { - throw new GitResponseError(merge3); + const merge2 = parseMergeResult(stdOut, stdErr); + if (merge2.failed) { + throw new GitResponseError(merge2); } - return merge3; + return merge2; } }; } @@ -58431,8 +58430,8 @@ var init_parse_push = __esm({ local }; }), - new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type2]) => { - result.pushed.push(pushResultPushedItem(local, remote, type2)); + new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); }), new LineParser( /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, @@ -58673,9 +58672,9 @@ var init_StatusSummary = __esm({ result.renamed.push(renamedFile(file)); }), parser3("R", "M", (result, file) => { - const renamed2 = renamedFile(file); - result.renamed.push(renamed2); - result.modified.push(renamed2.to); + const renamed = renamedFile(file); + result.renamed.push(renamed); + result.modified.push(renamed.to); }), parser3("!", "!", (_result, _file) => { (_result.ignored = _result.ignored || []).push(_file); @@ -60832,7 +60831,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * For headers that must always be a single string (like Content-Type), use the * specialized _getExistingOrDefaultContentTypeHeader method instead. */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; @@ -60847,7 +60846,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } /** * Specialized version of _getExistingOrDefaultHeader for Content-Type header. @@ -60856,7 +60855,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; @@ -60883,7 +60882,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } _getAgent(parsedUrl) { let agent; @@ -61962,8 +61961,8 @@ var ToolRunner = class extends events.EventEmitter { } return this.args; } - _endsWith(str2, end) { - return str2.endsWith(end); + _endsWith(str, end) { + return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); @@ -63171,14 +63170,14 @@ var { toString } = Object.prototype; var { getPrototypeOf } = Object; var { iterator, toStringTag } = Symbol; var kindOf = /* @__PURE__ */ ((cache) => (thing) => { - const str2 = toString.call(thing); - return cache[str2] || (cache[str2] = str2.slice(8, -1).toLowerCase()); + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); -var kindOfTest = /* @__PURE__ */ __name((type2) => { - type2 = type2.toLowerCase(); - return (thing) => kindOf(thing) === type2; +var kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; }, "kindOfTest"); -var typeOfTest = /* @__PURE__ */ __name((type2) => (thing) => typeof thing === type2, "typeOfTest"); +var typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); var { isArray } = Array; var isUndefined = typeOfTest("undefined"); function isBuffer(val) { @@ -63257,8 +63256,8 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [ "Response", "Headers" ].map(kindOfTest); -var trim = /* @__PURE__ */ __name((str2) => { - return str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +var trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); }, "trim"); function forEach2(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") { @@ -63405,13 +63404,13 @@ var toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilt } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }, "toFlatObject"); -var endsWith = /* @__PURE__ */ __name((str2, searchString, position) => { - str2 = String(str2); - if (position === void 0 || position > str2.length) { - position = str2.length; +var endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; } position -= searchString.length; - const lastIndex = str2.indexOf(searchString, position); + const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }, "endsWith"); var toArray = /* @__PURE__ */ __name((thing) => { @@ -63439,17 +63438,17 @@ var forEachEntry = /* @__PURE__ */ __name((obj, fn) => { fn.call(obj, pair[0], pair[1]); } }, "forEachEntry"); -var matchAll = /* @__PURE__ */ __name((regExp, str2) => { +var matchAll = /* @__PURE__ */ __name((regExp, str) => { let matches; const arr = []; - while ((matches = regExp.exec(str2)) !== null) { + while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; }, "matchAll"); var isHTMLForm = kindOfTest("HTMLFormElement"); -var toCamelCase = /* @__PURE__ */ __name((str2) => { - return str2.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { +var toCamelCase = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { return p1.toUpperCase() + p2; }, "replacer")); }, "toCamelCase"); @@ -63664,24 +63663,24 @@ var parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { }, "default"); // node_modules/axios/lib/helpers/sanitizeHeaderValue.js -function trimSPorHTAB(str2) { +function trimSPorHTAB(str) { let start = 0; - let end = str2.length; + let end = str.length; while (start < end) { - const code = str2.charCodeAt(start); + const code = str.charCodeAt(start); if (code !== 9 && code !== 32) { break; } start += 1; } while (end > start) { - const code = str2.charCodeAt(end - 1); + const code = str.charCodeAt(end - 1); if (code !== 9 && code !== 32) { break; } end -= 1; } - return start === 0 && end === str2.length ? str2 : str2.slice(start, end); + return start === 0 && end === str.length ? str : str.slice(start, end); } __name(trimSPorHTAB, "trimSPorHTAB"); var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"); @@ -63719,18 +63718,18 @@ function normalizeValue(value) { return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); } __name(normalizeValue, "normalizeValue"); -function parseTokens(str2) { +function parseTokens(str) { const tokens = /* @__PURE__ */ Object.create(null); const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let match2; - while (match2 = tokensRE.exec(str2)) { + while (match2 = tokensRE.exec(str)) { tokens[match2[1]] = match2[2]; } return tokens; } __name(parseTokens, "parseTokens"); -var isValidHeaderName = /* @__PURE__ */ __name((str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim()), "isValidHea\ -derName"); +var isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeade\ +rName"); function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -63748,8 +63747,8 @@ function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) } __name(matchHeaderValue, "matchHeaderValue"); function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str2) => { - return char.toUpperCase() + str2; + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); } __name(formatHeader, "formatHeader"); @@ -64241,7 +64240,7 @@ __name(toFormData, "toFormData"); var toFormData_default = toFormData; // node_modules/axios/lib/helpers/AxiosURLSearchParams.js -function encode(str2) { +function encode(str) { const charMap = { "!": "%21", "'": "%27", @@ -64250,7 +64249,7 @@ function encode(str2) { "~": "%7E", "%20": "+" }; - return encodeURIComponent(str2).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { + return encodeURIComponent(str).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { return charMap[match2]; }, "replacer")); } @@ -64398,14 +64397,14 @@ var ALPHABET = { ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT }; var generateString = /* @__PURE__ */ __name((size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str2 = ""; + let str = ""; const { length } = alphabet; const randomValues = new Uint32Array(size); import_crypto.default.randomFillSync(randomValues); for (let i2 = 0; i2 < size; i2++) { - str2 += alphabet[randomValues[i2] % length]; + str += alphabet[randomValues[i2] % length]; } - return str2; + return str; }, "generateString"); var node_default = { isNode: true, @@ -64825,13 +64824,13 @@ function fromDataURI(uri, asBlob, options) { if (!match2) { throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); } - const type2 = match2[1]; + const type = match2[1]; const params = match2[2]; const encoding = match2[3] ? "base64" : "utf8"; const body2 = match2[4]; let mime; - if (type2) { - mime = params ? type2 + params : type2; + if (type) { + mime = params ? type + params : type; } else if (params) { mime = "text/plain" + params; } @@ -65290,12 +65289,12 @@ var speedometer_default = speedometer; // node_modules/axios/lib/helpers/throttle.js function throttle(fn, freq) { - let timestamp2 = 0; + let timestamp = 0; let threshold = 1e3 / freq; let lastArgs; let timer2; const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { - timestamp2 = now; + timestamp = now; lastArgs = null; if (timer2) { clearTimeout(timer2); @@ -65305,7 +65304,7 @@ function throttle(fn, freq) { }, "invoke"); const throttled = /* @__PURE__ */ __name((...args) => { const now = Date.now(); - const passed = now - timestamp2; + const passed = now - timestamp; if (passed >= threshold) { invoke(args, now); } else { @@ -66510,11 +66509,11 @@ function mergeConfig(config1, config2) { }; utils_default.forEach(Object.keys({ ...config1, ...config2 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; - const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0; const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0; - const configValue = merge3(a, b, prop); - utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue); + const configValue = merge2(a, b, prop); + utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue); }, "computeConfigValue")); return config; } @@ -66534,7 +66533,7 @@ function setFormDataHeaders2(headers, formHeaders, policy) { }); } __name(setFormDataHeaders2, "setFormDataHeaders"); -var encodeUTF8 = /* @__PURE__ */ __name((str2) => encodeURIComponent(str2).replace( +var encodeUTF8 = /* @__PURE__ */ __name((str) => encodeURIComponent(str).replace( /%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)) ), "encodeUTF8"); @@ -66884,8 +66883,8 @@ var factory = /* @__PURE__ */ __name((env2) => { return false; } const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); - const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str2) => encoder. - encode(str2))(new TextEncoder2()) : async (str2) => new Uint8Array(await new Request(str2).arrayBuffer())); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder. + encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { let duplexAccessed = false; const request = new Request(platform_default.origin, { @@ -66908,14 +66907,14 @@ var factory = /* @__PURE__ */ __name((env2) => { stream: supportsResponseStream && ((res) => res.body) }; isFetchSupported && (() => { - ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => { - !resolvers[type2] && (resolvers[type2] = (res, config) => { - let method = res && res[type2]; + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; if (method) { return method.call(res); } throw new AxiosError_default( - `Response type '${type2}' is not supported`, + `Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config ); @@ -67158,12 +67157,12 @@ var getFetch = /* @__PURE__ */ __name((config) => { let env2 = config && config.env || {}; const { fetch: fetch2, Request, Response } = env2; const seeds = [Request, Response, fetch2]; - let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + let len = seeds.length, i2 = len, seed, target, map = seedCache; while (i2--) { seed = seeds[i2]; - target = map2.get(seed); - target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); - map2 = target; + target = map.get(seed); + target === void 0 && map.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map = target; } return target; }, "getFetch"); @@ -67293,9 +67292,9 @@ __name(dispatchRequest, "dispatchRequest"); // node_modules/axios/lib/helpers/validator.js var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i2) => { - validators[type2] = /* @__PURE__ */ __name(function validator(thing) { - return typeof thing === type2 || "a" + (i2 < 1 ? "n " : " ") + type2; +["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; }, "validator"); }); var deprecatedWarnings = {}; @@ -67329,7 +67328,7 @@ validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) return true; }; }, "spelling"); -function assertOptions(options, schema2, allowUnknown) { +function assertOptions(options, schema, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } @@ -67337,7 +67336,7 @@ function assertOptions(options, schema2, allowUnknown) { let i2 = keys.length; while (i2-- > 0) { const opt = keys[i2]; - const validator = Object.prototype.hasOwnProperty.call(schema2, opt) ? schema2[opt] : void 0; + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0; if (validator) { const value = options[opt]; const result = value === void 0 || validator(value, opt, options); @@ -67869,11 +67868,11 @@ __name(_v4, "_v4"); var v4_default = v4; // utils/src/load-binary.js -var find2 = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3 }) => Promise.resolve( +var find2 = /* @__PURE__ */ __name(async ({ tool, binary, version: version3 }) => Promise.resolve( find(tool, version3) /* process.arch), */ ).then( - (dir) => dir ? import_node_path2.default.join(dir, binary2) : "" + (dir) => dir ? import_node_path2.default.join(dir, binary) : "" ), "find"); var downloadToolWithAuth = /* @__PURE__ */ __name(async (url3, auth) => { const targetFile = import_node_path2.default.join(import_os3.default.tmpdir(), v4_default(), v4_default()); @@ -67901,7 +67900,7 @@ var internalDownload = /* @__PURE__ */ __name(async (url3, auth) => auth ? downl url3), "internalDownload"); var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { if (!cachedTool) { - const { tool, binary: binary2, version: version3, downloadUrl, auth } = options; + const { tool, binary, version: version3, downloadUrl, auth } = options; info(`Downloading ${tool} from ${downloadUrl}`); const downloadUuid = await internalDownload(downloadUrl, auth); const tmpDir = import_node_path2.default.dirname(downloadUuid); @@ -67912,7 +67911,7 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } else if (downloadUrl.endsWith(".7z")) { await extract7z(downloadUuid, tmpDir); } else { - const tmpFile = import_node_path2.default.join(tmpDir, binary2); + const tmpFile = import_node_path2.default.join(tmpDir, binary); await cp(downloadUuid, tmpFile); import_node_fs.default.chmodSync(tmpFile, "0777"); } @@ -67921,10 +67920,10 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } return cachedTool; }, "downloadIfMissing"); -var loadTool = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3, downloadUrl, auth }) => { +var loadTool = /* @__PURE__ */ __name(async ({ tool, binary, version: version3, downloadUrl, auth }) => { const options = { tool, - binary: binary2, + binary, version: version3, downloadUrl, auth @@ -68198,10 +68197,10 @@ __name(getServiceAccountEmailAndProject, "getServiceAccountEmailAndProject"); async function authenticateGcloud(credentials, exportCredentials) { setSecret(credentials); const jsonCredentials = parseCredentials(credentials); - const { type: type2, email } = validateCredentialsShape(jsonCredentials); + const { type, email } = validateCredentialsShape(jsonCredentials); const { project_id: projectId } = jsonCredentials; const authEntry = { - type: type2, + type, email, projectId, exportCredentials, @@ -68697,26 +68696,26 @@ t not contain globs.`); } else if (c3 === "*" || c3 === "?") { return ""; } else if (c3 === "[" && i2 + 1 < segment.length) { - let set2 = ""; + let set = ""; let closed = -1; for (let i22 = i2 + 1; i22 < segment.length; i22++) { const c22 = segment[i22]; if (c22 === "\\" && !IS_WINDOWS7 && i22 + 1 < segment.length) { - set2 += segment[++i22]; + set += segment[++i22]; continue; } else if (c22 === "]") { closed = i22; break; } else { - set2 += c22; + set += c22; } } if (closed >= 0) { - if (set2.length > 1) { + if (set.length > 1) { return ""; } - if (set2) { - literal += set2; + if (set) { + literal += set; i2 = closed; continue; } @@ -69571,8 +69570,8 @@ function normalizeName(name) { return name.toLowerCase(); } __name(normalizeName, "normalizeName"); -function* headerIterator(map2) { - for (const entry of map2.values()) { +function* headerIterator(map) { + for (const entry of map.values()) { yield [entry.name, entry.value]; } } @@ -70981,9 +70980,9 @@ function getDefaultProxySettings(proxyUrl) { } } const parsedUrl = new URL(proxyUrl); - const schema2 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { - host: schema2 + parsedUrl.hostname, + host: schema + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password @@ -71300,16 +71299,16 @@ function getHeaderName2() { return "User-Agent"; } __name(getHeaderName2, "getHeaderName"); -async function setPlatformSpecificData2(map2) { +async function setPlatformSpecificData2(map) { if (import_node_process2.default && import_node_process2.default.versions) { const osInfo = `${import_node_os3.default.type()} ${import_node_os3.default.release()}; ${import_node_os3.default.arch()}`; const versions = import_node_process2.default.versions; if (versions.bun) { - map2.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { - map2.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { - map2.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", `${versions.node} (${osInfo})`); } } } @@ -72538,12 +72537,12 @@ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } __name(createSerializer, "createSerializer"); -function trimEnd(str2, ch) { - let len = str2.length; - while (len - 1 >= 0 && str2[len - 1] === ch) { +function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { --len; } - return str2.substr(0, len); + return str.substr(0, len); } __name(trimEnd, "trimEnd"); function bufferToBase64Url(buffer3) { @@ -72553,19 +72552,19 @@ function bufferToBase64Url(buffer3) { if (!(buffer3 instanceof Uint8Array)) { throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); } - const str2 = encodeByteArray(buffer3); - return trimEnd(str2, "=").replace(/\+/g, "-").replace(/\//g, "_"); + const str = encodeByteArray(buffer3); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } __name(bufferToBase64Url, "bufferToBase64Url"); -function base64UrlToByteArray(str2) { - if (!str2) { +function base64UrlToByteArray(str) { + if (!str) { return void 0; } - if (str2 && typeof str2.valueOf() !== "string") { + if (str && typeof str.valueOf() !== "string") { throw new Error("Please provide an input of type string for converting to Uint8Array"); } - str2 = str2.replace(/-/g, "+").replace(/_/g, "/"); - return decodeString(str2); + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return decodeString(str); } __name(base64UrlToByteArray, "base64UrlToByteArray"); function splitSerializeName(prop) { @@ -73719,8 +73718,8 @@ function simpleParseQueryParams(queryString) { return result; } queryString = queryString.slice(1); - const pairs2 = queryString.split("&"); - for (const pair of pairs2) { + const pairs = queryString.split("&"); + for (const pair of pairs) { const [name, value] = pair.split("=", 2); const existingValue = result.get(name); if (existingValue) { @@ -75923,10 +75922,10 @@ function validateEntityName(name) { __name(validateEntityName, "validateEntityName"); function mergeEntityMaps(...maps) { const out = /* @__PURE__ */ Object.create(null); - for (const map2 of maps) { - if (!map2) continue; - for (const key of Object.keys(map2)) { - const raw = map2[key]; + for (const map of maps) { + if (!map) continue; + for (const key of Object.keys(map)) { + const raw = map[key]; if (typeof raw === "string") { out[key] = raw; } else if (raw && typeof raw === "object" && raw.val !== void 0) { @@ -76022,13 +76021,13 @@ var EntityDecoder = class { * All keys are validated — throws on invalid characters. * @param {Record} map */ - setExternalEntities(map2) { - if (map2) { - for (const key of Object.keys(map2)) { + setExternalEntities(map) { + if (map) { + for (const key of Object.keys(map)) { validateEntityName(key); } } - this._externalMap = mergeEntityMaps(map2); + this._externalMap = mergeEntityMaps(map); } /** * Add a single persistent external entity. @@ -76049,10 +76048,10 @@ var EntityDecoder = class { * Also resets per-document expansion counters. * @param {Record} map */ - addInputEntities(map2) { + addInputEntities(map) { this._totalExpansions = 0; this._expandedLength = 0; - this._inputMap = mergeEntityMaps(map2); + this._inputMap = mergeEntityMaps(map); } // ------------------------------------------------------------------------- // Per-document reset @@ -76088,28 +76087,28 @@ var EntityDecoder = class { * @param {string} str * @returns {string} */ - decode(str2) { - if (typeof str2 !== "string" || str2.length === 0) return str2; - const original = str2; + decode(str) { + if (typeof str !== "string" || str.length === 0) return str; + const original = str; const chunks = []; - const len = str2.length; + const len = str.length; let last2 = 0; let i2 = 0; const limitExpansions = this._maxTotalExpansions > 0; const limitLength = this._maxExpandedLength > 0; const checkLimits = limitExpansions || limitLength; while (i2 < len) { - if (str2.charCodeAt(i2) !== 38) { + if (str.charCodeAt(i2) !== 38) { i2++; continue; } let j = i2 + 1; - while (j < len && str2.charCodeAt(j) !== 59 && j - i2 <= 32) j++; - if (j >= len || str2.charCodeAt(j) !== 59) { + while (j < len && str.charCodeAt(j) !== 59 && j - i2 <= 32) j++; + if (j >= len || str.charCodeAt(j) !== 59) { i2++; continue; } - const token = str2.slice(i2 + 1, j); + const token = str.slice(i2 + 1, j); if (token.length === 0) { i2++; continue; @@ -76141,7 +76140,7 @@ var EntityDecoder = class { i2++; continue; } - if (i2 > last2) chunks.push(str2.slice(last2, i2)); + if (i2 > last2) chunks.push(str.slice(last2, i2)); chunks.push(replacement); last2 = j + 1; i2 = last2; @@ -76167,8 +76166,8 @@ var EntityDecoder = class { } } } - if (last2 < len) chunks.push(str2.slice(last2)); - const result = chunks.length === 0 ? str2 : chunks.join(""); + if (last2 < len) chunks.push(str.slice(last2)); + const result = chunks.length === 0 ? str : chunks.join(""); return this._postCheck(result, original); } // ------------------------------------------------------------------------- @@ -76590,7 +76589,7 @@ var DocTypeReader = class { } return { notationName, publicIdentifier, systemIdentifier, index: --i2 }; } - readIdentifierVal(xmlData, i2, type2) { + readIdentifierVal(xmlData, i2, type) { let identifierVal = ""; const startChar = xmlData[i2]; if (startChar !== '"' && startChar !== "'") { @@ -76603,7 +76602,7 @@ var DocTypeReader = class { } identifierVal = xmlData.substring(startIndex, i2); if (xmlData[i2] !== startChar) { - throw new Error(`Unterminated ${type2} value`); + throw new Error(`Unterminated ${type} value`); } i2++; return [i2, identifierVal]; @@ -76727,9 +76726,9 @@ var skipWhitespace = /* @__PURE__ */ __name((data, index) => { } return index; }, "skipWhitespace"); -function hasSeq(data, seq2, i2) { - for (let j = 0; j < seq2.length; j++) { - if (seq2[j] !== data[i2 + j + 1]) return false; +function hasSeq(data, seq, i2) { + for (let j = 0; j < seq.length; j++) { + if (seq[j] !== data[i2 + j + 1]) return false; } return true; } @@ -76755,19 +76754,19 @@ var consider = { infinity: "original" // "null", "infinity" (Infinity type), "string" ("Infinity" (the string literal)) }; -function toNumber2(str2, options = {}) { +function toNumber2(str, options = {}) { options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (trimmedStr.length === 0) return str2; - else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; + if (!str || typeof str !== "string") return str; + let trimmedStr = str.trim(); + if (trimmedStr.length === 0) return str; + else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; else if (trimmedStr === "0") return 0; else if (options.hex && hexRegex.test(trimmedStr)) { return parse_int(trimmedStr, 16); } else if (!isFinite(trimmedStr)) { - return handleInfinity(str2, Number(trimmedStr), options); + return handleInfinity(str, Number(trimmedStr), options); } else if (trimmedStr.includes("e") || trimmedStr.includes("E")) { - return resolveEnotation(str2, trimmedStr, options); + return resolveEnotation(str, trimmedStr, options); } else { const match2 = numRegex.exec(trimmedStr); if (match2) { @@ -76776,39 +76775,39 @@ function toNumber2(str2, options = {}) { let numTrimmedByZeros = trimZeros(match2[3]); const decimalAdjacentToLeadingZeros = sign ? ( // 0., -00., 000. - str2[leadingZeros.length + 1] === "." - ) : str2[leadingZeros.length] === "."; + str[leadingZeros.length + 1] === "." + ) : str[leadingZeros.length] === "."; if (!options.leadingZeros && (leadingZeros.length > 1 || leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros)) { - return str2; + return str; } else { const num = Number(trimmedStr); const parsedStr = String(num); if (num === 0) return num; if (parsedStr.search(/[eE]/) !== -1) { if (options.eNotation) return num; - else return str2; + else return str; } else if (trimmedStr.indexOf(".") !== -1) { if (parsedStr === "0") return num; else if (parsedStr === numTrimmedByZeros) return num; else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num; - else return str2; + else return str; } let n = leadingZeros ? numTrimmedByZeros : trimmedStr; if (leadingZeros) { - return n === parsedStr || sign + n === parsedStr ? num : str2; + return n === parsedStr || sign + n === parsedStr ? num : str; } else { - return n === parsedStr || n === sign + parsedStr ? num : str2; + return n === parsedStr || n === sign + parsedStr ? num : str; } } } else { - return str2; + return str; } } } __name(toNumber2, "toNumber"); var eNotationRegx = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; -function resolveEnotation(str2, trimmedStr, options) { - if (!options.eNotation) return str2; +function resolveEnotation(str, trimmedStr, options) { + if (!options.eNotation) return str; const notation = trimmedStr.match(eNotationRegx); if (notation) { let sign = notation[1] || ""; @@ -76816,21 +76815,21 @@ function resolveEnotation(str2, trimmedStr, options) { const leadingZeros = notation[2]; const eAdjacentToLeadingZeros = sign ? ( // 0E. - str2[leadingZeros.length + 1] === eChar - ) : str2[leadingZeros.length] === eChar; - if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str2; + str[leadingZeros.length + 1] === eChar + ) : str[leadingZeros.length] === eChar; + if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str; else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) { return Number(trimmedStr); } else if (leadingZeros.length > 0) { if (options.leadingZeros && !eAdjacentToLeadingZeros) { trimmedStr = (notation[1] || "") + notation[3]; return Number(trimmedStr); - } else return str2; + } else return str; } else { return Number(trimmedStr); } } else { - return str2; + return str; } } __name(resolveEnotation, "resolveEnotation"); @@ -76852,7 +76851,7 @@ function parse_int(numStr, base) { else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); } __name(parse_int, "parse_int"); -function handleInfinity(str2, num, options) { +function handleInfinity(str, num, options) { const isPositive = num === Infinity; switch (options.infinity.toLowerCase()) { case "null": @@ -76864,7 +76863,7 @@ function handleInfinity(str2, num, options) { return isPositive ? "Infinity" : "-Infinity"; case "original": default: - return str2; + return str; } } __name(handleInfinity, "handleInfinity"); @@ -77637,7 +77636,7 @@ var Matcher = class { snapshot() { return { path: this.path.map((node) => ({ ...node })), - siblingStacks: this.siblingStacks.map((map2) => new Map(map2)) + siblingStacks: this.siblingStacks.map((map) => new Map(map)) }; } /** @@ -77647,7 +77646,7 @@ var Matcher = class { restore(snapshot2) { this._pathStringCache = null; this.path = snapshot2.path.map((node) => ({ ...node })); - this.siblingStacks = snapshot2.siblingStacks.map((map2) => new Map(map2)); + this.siblingStacks = snapshot2.siblingStacks.map((map) => new Map(map)); } /** * Return the read-only {@link MatcherView} for this matcher. @@ -78148,12 +78147,12 @@ function tagExpWithClosingIndex(xmlData, i2, closingChar = ">") { } } __name(tagExpWithClosingIndex, "tagExpWithClosingIndex"); -function findClosingIndex(xmlData, str2, i2, errMsg) { - const closingIndex = xmlData.indexOf(str2, i2); +function findClosingIndex(xmlData, str, i2, errMsg) { + const closingIndex = xmlData.indexOf(str, i2); if (closingIndex === -1) { throw new Error(errMsg); } else { - return closingIndex + str2.length - 1; + return closingIndex + str.length - 1; } } __name(findClosingIndex, "findClosingIndex"); @@ -79189,16 +79188,16 @@ function stringifyXML(obj, opts = {}) { return `${xmlData}`.replace(/\n/g, ""); } __name(stringifyXML, "stringifyXML"); -async function parseXML(str2, opts = {}) { - if (!str2) { +async function parseXML(str, opts = {}) { + if (!str) { throw new Error("Document is empty"); } - const validation = XMLValidator.validate(str2); + const validation = XMLValidator.validate(str); if (validation !== true) { throw validation; } const parser4 = new XMLParser(getParserOptions(opts)); - const parsedXml = parser4.parse(str2); + const parsedXml = parser4.parse(str); if (parsedXml["?xml"]) { delete parsedXml["?xml"]; } @@ -96276,14 +96275,14 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96304,7 +96303,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -96328,14 +96327,14 @@ function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96356,7 +96355,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", @@ -96382,14 +96381,14 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96418,7 +96417,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -96443,14 +96442,14 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96483,7 +96482,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -96508,14 +96507,14 @@ function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96548,7 +96547,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -96575,14 +96574,14 @@ function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -96618,7 +96617,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -97561,9 +97560,9 @@ var AvroParser = class _AvroParser { const readPairMethod = /* @__PURE__ */ __name((s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }, "readPairMethod"); - const pairs2 = await _AvroParser.readArray(stream6, readPairMethod, options); + const pairs = await _AvroParser.readArray(stream6, readPairMethod, options); const dict = {}; - for (const pair of pairs2) { + for (const pair of pairs) { dict[pair.key] = pair.value; } return dict; @@ -97612,17 +97611,17 @@ var AvroType = class _AvroType { * Determines the AvroType from the Avro Schema. */ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema2) { - if (typeof schema2 === "string") { - return _AvroType.fromStringSchema(schema2); - } else if (Array.isArray(schema2)) { - return _AvroType.fromArraySchema(schema2); + static fromSchema(schema) { + if (typeof schema === "string") { + return _AvroType.fromStringSchema(schema); + } else if (Array.isArray(schema)) { + return _AvroType.fromArraySchema(schema); } else { - return _AvroType.fromObjectSchema(schema2); + return _AvroType.fromObjectSchema(schema); } } - static fromStringSchema(schema2) { - switch (schema2) { + static fromStringSchema(schema) { + switch (schema) { case AvroPrimitive.NULL: case AvroPrimitive.BOOLEAN: case AvroPrimitive.INT: @@ -97631,55 +97630,55 @@ var AvroType = class _AvroType { case AvroPrimitive.DOUBLE: case AvroPrimitive.BYTES: case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema2); + return new AvroPrimitiveType(schema); default: - throw new Error(`Unexpected Avro type ${schema2}`); + throw new Error(`Unexpected Avro type ${schema}`); } } - static fromArraySchema(schema2) { - return new AvroUnionType(schema2.map(_AvroType.fromSchema)); + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(_AvroType.fromSchema)); } - static fromObjectSchema(schema2) { - const type2 = schema2.type; + static fromObjectSchema(schema) { + const type = schema.type; try { - return _AvroType.fromStringSchema(type2); + return _AvroType.fromStringSchema(type); } catch { } - switch (type2) { + switch (type) { case AvroComplex.RECORD: - if (schema2.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema2}`); + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - if (!schema2.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema2}`); + if (!schema.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); } const fields = {}; - if (!schema2.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema2}`); + if (!schema.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); } - for (const field of schema2.fields) { + for (const field of schema.fields) { fields[field.name] = _AvroType.fromSchema(field.type); } - return new AvroRecordType(fields, schema2.name); + return new AvroRecordType(fields, schema.name); case AvroComplex.ENUM: - if (schema2.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema2}`); + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - if (!schema2.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema2}`); + if (!schema.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); } - return new AvroEnumType(schema2.symbols); + return new AvroEnumType(schema.symbols); case AvroComplex.MAP: - if (!schema2.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema2}`); + if (!schema.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); } - return new AvroMapType(_AvroType.fromSchema(schema2.values)); + return new AvroMapType(_AvroType.fromSchema(schema.values)); case AvroComplex.ARRAY: // Unused today case AvroComplex.FIXED: // Unused today default: - throw new Error(`Unexpected Avro type ${type2} in ${schema2}`); + throw new Error(`Unexpected Avro type ${type} in ${schema}`); } } }; @@ -97851,8 +97850,8 @@ var AvroReader = class { this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } @@ -98033,11 +98032,11 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { break; } const obj = avroNext.value; - const schema2 = obj.$schema; - if (typeof schema2 !== "string") { + const schema = obj.$schema; + if (typeof schema !== "string") { throw Error("Missing schema in avro record."); } - switch (schema2) { + switch (schema) { case "com.microsoft.azure.storage.queryBlobContents.resultData": { const data = obj.data; @@ -98097,7 +98096,7 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { } break; default: - throw Error(`Unknown schema ${schema2} in avro progress record.`); + throw Error(`Unknown schema ${schema} in avro progress record.`); } } while (!avroNext.done && !this.avroPaused); } @@ -102681,8 +102680,8 @@ function getCacheApiUrl(resource) { return url3; } __name(getCacheApiUrl, "getCacheApiUrl"); -function createAcceptHeader(type2, apiVersion) { - return `${type2};api-version=${apiVersion}`; +function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } __name(createAcceptHeader, "createAcceptHeader"); function getRequestOptions() { @@ -103848,13 +103847,13 @@ function getTarPath() { } __name(getTarPath, "getTarPath"); function getTarArgs(tarPath_1, compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - switch (type2) { + switch (type) { case "create": args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "\ /"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "/"), "-P", "-C", workingDirectory. @@ -103883,14 +103882,14 @@ C", workingDirectory.replace(new RegExp(`\\${path14.sep}`, "g"), "/")); } __name(getTarArgs, "getTarArgs"); function getCommands(compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (compressionMethod, type, archivePath = "") { let args; const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); - const compressionArgs = type2 !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - if (BSD_TAR_ZSTD && type2 !== "create") { + if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; @@ -104663,564 +104662,549 @@ var project_info_default = projectInfo; var import_node_fs12 = __toESM(require("node:fs"), 1); // node_modules/js-yaml/dist/js-yaml.mjs -function isNothing(subject) { - return typeof subject === "undefined" || subject === null; -} -__name(isNothing, "isNothing"); -function isObject3(subject) { - return typeof subject === "object" && subject !== null; -} -__name(isObject3, "isObject"); -function toArray2(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - return [sequence]; -} -__name(toArray2, "toArray"); -function extend3(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]; - } - } - return target; -} -__name(extend3, "extend"); -function repeat(string, count) { - var result = "", cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - return result; -} -__name(repeat, "repeat"); -function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; -} -__name(isNegativeZero, "isNegativeZero"); -var isNothing_1 = isNothing; -var isObject_1 = isObject3; -var toArray_1 = toArray2; -var repeat_1 = repeat; -var isNegativeZero_1 = isNegativeZero; -var extend_1 = extend3; -var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 -}; -function formatError(exception2, compact) { - var where2 = "", message = exception2.reason || "(unknown reason)"; - if (!exception2.mark) return message; - if (exception2.mark.name) { - where2 += 'in "' + exception2.mark.name + '" '; - } - where2 += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; - if (!compact && exception2.mark.snippet) { - where2 += "\n\n" + exception2.mark.snippet; - } - return message + " " + where2; -} -__name(formatError, "formatError"); -function YAMLException$1(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 || ""; +var __create2 = Object.create; +var __defProp3 = Object.defineProperty; +var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames3 = Object.getOwnPropertyNames; +var __getProtoOf2 = Object.getPrototypeOf; +var __hasOwnProp3 = Object.prototype.hasOwnProperty; +var __commonJSMin = /* @__PURE__ */ __name((cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), +mod.exports), "__commonJSMin"); +var __copyProps3 = /* @__PURE__ */ __name((to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames3(from), i2 = 0, n = keys. + length, key; i2 < n; i2++) { + key = keys[i2]; + if (!__hasOwnProp3.call(to, key) && key !== except) __defProp3(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable + }); } -} -__name(YAMLException$1, "YAMLException$1"); -YAMLException$1.prototype = Object.create(Error.prototype); -YAMLException$1.prototype.constructor = YAMLException$1; -YAMLException$1.prototype.toString = /* @__PURE__ */ __name(function toString5(compact) { - return this.name + ": " + formatError(this, compact); -}, "toString"); -var exception = YAMLException$1; -function getLine(buffer3, 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 to; +}, "__copyProps"); +var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : +{}, __copyProps3(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { + value: mod, + enumerable: true +}) : target, mod)), "__toESM"); +var require_common4 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + __name(isNothing, "isNothing"); + function isObject3(subject) { + return typeof subject === "object" && subject !== null; + } + __name(isObject3, "isObject"); + function toArray2(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + __name(toArray2, "toArray"); + function extend3(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + __name(extend3, "extend"); + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; } - return { - str: head + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, - pos: position - lineStart + head.length - // relative position - }; -} -__name(getLine, "getLine"); -function padStart2(string, max) { - return common.repeat(" ", max - string.length) + string; -} -__name(padStart2, "padStart"); -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 = "", i2, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - for (i2 = 1; i2 <= options.linesBefore; i2++) { - if (foundLineNo - i2 < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i2], - lineEnds[foundLineNo - i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), - maxLineLength - ); - result = common.repeat(" ", options.indent) + padStart2((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n" + result; - } - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(" ", options.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + - "\n"; - result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; - for (i2 = 1; i2 <= options.linesAfter; i2++) { - if (foundLineNo + i2 >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i2], - lineEnds[foundLineNo + i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), - maxLineLength - ); - result += common.repeat(" ", options.indent) + padStart2((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n"; - } - return result.replace(/\n$/, ""); -} -__name(makeSnippet, "makeSnippet"); -var snippet = makeSnippet; -var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" -]; -var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" -]; -function compileStyleAliases(map2) { - var result = {}; - if (map2 !== null) { - Object.keys(map2).forEach(function(style) { - map2[style].forEach(function(alias) { + __name(repeat, "repeat"); + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + __name(isNegativeZero, "isNegativeZero"); + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject3; + module2.exports.toArray = toArray2; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend3; +})); +var require_exception = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function formatError(exception, compact) { + let where2 = ""; + const message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) where2 += 'in "' + exception.mark.name + '" '; + where2 += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) where2 += "\n\n" + exception.mark.snippet; + return message + " " + where2; + } + __name(formatError, "formatError"); + function YAMLException2(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 = (/* @__PURE__ */ new Error()).stack || ""; + } + __name(YAMLException2, "YAMLException"); + YAMLException2.prototype = Object.create(Error.prototype); + YAMLException2.prototype.constructor = YAMLException2; + YAMLException2.prototype.toString = /* @__PURE__ */ __name(function toString5(compact) { + return this.name + ": " + formatError(this, compact); + }, "toString"); + module2.exports = YAMLException2; +})); +var require_snippet = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + function getLine(buffer3, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const 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 + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + }; + } + __name(getLine, "getLine"); + function padStart2(string, max) { + return common.repeat(" ", max - string.length) + string; + } + __name(padStart2, "padStart"); + 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; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match2; + let 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; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i2 = 1; i2 <= options.linesBefore; i2++) { + if (foundLineNo - i2 < 0) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i2], lineEnds[foundLineNo - i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo - i2]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart2((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n" + result; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (let i2 = 1; i2 <= options.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i2], lineEnds[foundLineNo + i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo + i2]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n"; + } + return result.replace(/\n$/, ""); + } + __name(makeSnippet, "makeSnippet"); + module2.exports = makeSnippet; +})); +var require_type2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { result[String(alias)] = style; }); }); + return result; } - return result; -} -__name(compileStyleAliases, "compileStyleAliases"); -function Type$1(tag, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('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 exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} -__name(Type$1, "Type$1"); -var type = Type$1; -function compileList(schema2, name) { - var result = []; - schema2[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; - } + __name(compileStyleAliases, "compileStyleAliases"); + function Type2(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException2('Unknown option "' + name + '" is met \ +in definition of "' + tag + '" YAML type.'); }); - result[newIndex] = currentType; - }); - return result; -} -__name(compileList, "compileList"); -function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type2) { - if (type2.multi) { - result.multi[type2.kind].push(type2); - result.multi["fallback"].push(type2); - } else { - result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; - } + 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 YAMLException2('Unknown kind "' + this.kind + '" is specifi\ +ed for "' + tag + '" YAML type.'); + } + __name(Type2, "Type"); + module2.exports = Type2; +})); +var require_schema = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var Type2 = require_type2(); + function compileList(schema, name) { + const result = []; + schema[name].forEach(function(currentType) { + let 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; } - __name(collectType, "collectType"); - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); + __name(compileList, "compileList"); + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + 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; + } + __name(collectType, "collectType"); + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; } - return result; -} -__name(compileMap, "compileMap"); -function Schema$1(definition) { - return this.extend(definition); -} -__name(Schema$1, "Schema$1"); -Schema$1.prototype.extend = /* @__PURE__ */ __name(function extend4(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 exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], e\ -xplicit: [...] })"); + __name(compileMap, "compileMap"); + function Schema2(definition) { + return this.extend(definition); + } + __name(Schema2, "Schema"); + Schema2.prototype.extend = /* @__PURE__ */ __name(function extend3(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type2) 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 YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implic\ +it: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException2("There is a non-scalar type in the impli\ +cit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can o\ +nly be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + }); + const result = Object.create(Schema2.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; + }, "extend"); + module2.exports = Schema2; +})); +var require_str = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : ""; + }, "construct") + }); +})); +var require_seq = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : []; + }, "construct") + }); +})); +var require_map = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : {}; + }, "construct") + }); +})); +var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_schema())({ explicit: [ + require_str(), + require_seq(), + require_map() + ] }); +})); +var require_null = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + __name(resolveYamlNull, "resolveYamlNull"); + function constructYamlNull() { + return null; } - implicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type$1.loadKind && type$1.loadKind !== "scalar") { - throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types\ - is not supported."); - } - if (type$1.multi) { - throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as expl\ -icit."); - } + __name(constructYamlNull, "constructYamlNull"); + function isNull(object) { + return object === null; + } + __name(isNull, "isNull"); + module2.exports = new Type2("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: /* @__PURE__ */ __name(function() { + return "~"; + }, "canonical"), + lowercase: /* @__PURE__ */ __name(function() { + return "null"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function() { + return "NULL"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function() { + return "Null"; + }, "camelcase"), + empty: /* @__PURE__ */ __name(function() { + return ""; + }, "empty") + }, + defaultStyle: "lowercase" }); - explicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } +})); +var require_bool = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === + "False" || data === "FALSE"); + } + __name(resolveYamlBoolean, "resolveYamlBoolean"); + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + __name(constructYamlBoolean, "constructYamlBoolean"); + function isBoolean2(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + __name(isBoolean2, "isBoolean"); + module2.exports = new Type2("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean2, + represent: { + lowercase: /* @__PURE__ */ __name(function(object) { + return object ? "true" : "false"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function(object) { + return object ? "TRUE" : "FALSE"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function(object) { + return object ? "True" : "False"; + }, "camelcase") + }, + defaultStyle: "lowercase" }); - var result = Object.create(Schema$1.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; -}, "extend"); -var schema = Schema$1; -var str = new type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : ""; - }, "construct") -}); -var seq = new type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : []; - }, "construct") -}); -var map = new type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : {}; - }, "construct") -}); -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); -function resolveYamlNull(data) { - if (data === null) return true; - var max = data.length; - return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); -} -__name(resolveYamlNull, "resolveYamlNull"); -function constructYamlNull() { - return null; -} -__name(constructYamlNull, "constructYamlNull"); -function isNull(object) { - return object === null; -} -__name(isNull, "isNull"); -var _null = new type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: /* @__PURE__ */ __name(function() { - return "~"; - }, "canonical"), - lowercase: /* @__PURE__ */ __name(function() { - return "null"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function() { - return "NULL"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function() { - return "Null"; - }, "camelcase"), - empty: /* @__PURE__ */ __name(function() { - return ""; - }, "empty") - }, - defaultStyle: "lowercase" -}); -function resolveYamlBoolean(data) { - if (data === null) return false; - var max = data.length; - return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === - "False" || data === "FALSE"); -} -__name(resolveYamlBoolean, "resolveYamlBoolean"); -function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; -} -__name(constructYamlBoolean, "constructYamlBoolean"); -function isBoolean2(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; -} -__name(isBoolean2, "isBoolean"); -var bool = new type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean2, - represent: { - lowercase: /* @__PURE__ */ __name(function(object) { - return object ? "true" : "false"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function(object) { - return object ? "TRUE" : "FALSE"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function(object) { - return object ? "True" : "False"; - }, "camelcase") - }, - defaultStyle: "lowercase" -}); -function isHexCode(c3) { - return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102; -} -__name(isHexCode, "isHexCode"); -function isOctCode(c3) { - return 48 <= c3 && c3 <= 55; -} -__name(isOctCode, "isOctCode"); -function isDecCode(c3) { - return 48 <= c3 && c3 <= 57; -} -__name(isDecCode, "isDecCode"); -function resolveYamlInteger(data) { - if (data === null) return false; - var max = data.length, index = 0, hasDigits = false, ch; - if (!max) return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; - } - if (ch === "0") { - if (index + 1 === max) return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max; 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 < max; 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 < max; 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 < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; +})); +var require_int = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + function isHexCode(c3) { + return c3 >= 48 && c3 <= 57 || c3 >= 65 && c3 <= 70 || c3 >= 97 && c3 <= 102; + } + __name(isHexCode, "isHexCode"); + function isOctCode(c3) { + return c3 >= 48 && c3 <= 55; + } + __name(isOctCode, "isOctCode"); + function isDecCode(c3) { + return c3 >= 48 && c3 <= 57; + } + __name(isDecCode, "isDecCode"); + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + __name(resolveYamlInteger, "resolveYamlInteger"); + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + 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); + } + __name(parseYamlInteger, "parseYamlInteger"); + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + __name(constructYamlInteger, "constructYamlInteger"); + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + __name(isInteger, "isInteger"); + module2.exports = new Type2("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, "binary"), + octal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, "octal"), + decimal: /* @__PURE__ */ __name(function(obj) { + return obj.toString(10); + }, "decimal"), + hexadecimal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + }, "hexadecimal") + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] } - hasDigits = true; - } - if (!hasDigits || ch === "_") return false; - return true; -} -__name(resolveYamlInteger, "resolveYamlInteger"); -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); - } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") sign = -1; - value = value.slice(1); - ch = value[0]; - } - 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); -} -__name(constructYamlInteger, "constructYamlInteger"); -function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); -} -__name(isInteger, "isInteger"); -var int = new type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, "binary"), - octal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, "octal"), - decimal: /* @__PURE__ */ __name(function(obj) { - return obj.toString(10); - }, "decimal"), - /* eslint-disable max-len */ - hexadecimal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - }, "hexadecimal") - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } -}); -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; -} -__name(resolveYamlFloat, "resolveYamlFloat"); -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); -} -__name(constructYamlFloat, "constructYamlFloat"); -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; -function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { + }); +})); +var require_float = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[\ +eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + __name(resolveYamlFloat, "resolveYamlFloat"); + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const 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); + } + __name(constructYamlFloat, "constructYamlFloat"); + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { case "lowercase": return ".nan"; case "uppercase": @@ -105228,8 +105212,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".NaN"; } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { + else if (Number.POSITIVE_INFINITY === object) switch (style) { case "lowercase": return ".inf"; case "uppercase": @@ -105237,8 +105220,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".Inf"; } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { + else if (Number.NEGATIVE_INFINITY === object) switch (style) { case "lowercase": return "-.inf"; case "uppercase": @@ -105246,2201 +105228,1999 @@ function representYamlFloat(object, style) { 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; -} -__name(representYamlFloat, "representYamlFloat"); -function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); -} -__name(isFloat, "isFloat"); -var float = new type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" -}); -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); -var core = json; -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; -} -__name(resolveYamlTimestamp, "resolveYamlTimestamp"); -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; -} -__name(constructYamlTimestamp, "constructYamlTimestamp"); -function representYamlTimestamp(object) { - return object.toISOString(); -} -__name(representYamlTimestamp, "representYamlTimestamp"); -var timestamp = new type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); -function resolveYamlMerge(data) { - return data === "<<" || data === null; -} -__name(resolveYamlMerge, "resolveYamlMerge"); -var merge2 = new type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge -}); -var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; -function resolveYamlBinary(data) { - if (data === null) return false; - var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - code = map2.indexOf(data.charAt(idx)); - if (code > 64) continue; - if (code < 0) return false; - bitlen += 6; - } - return bitlen % 8 === 0; -} -__name(resolveYamlBinary, "resolveYamlBinary"); -function constructYamlBinary(data) { - var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; - for (idx = 0; idx < max; idx++) { - if (idx % 4 === 0 && idx) { + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + __name(representYamlFloat, "representYamlFloat"); + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + __name(isFloat, "isFloat"); + module2.exports = new Type2("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); +})); +var require_json = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_failsafe().extend({ implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] }); +})); +var require_core = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_json(); +})); +var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ 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; + } + __name(resolveYamlTimestamp, "resolveYamlTimestamp"); + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match2 = YAML_DATE_REGEXP.exec(data); + if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); + if (match2 === null) throw new Error("Date resolve error"); + const year = +match2[1]; + const month = +match2[2] - 1; + const day = +match2[3]; + if (!match2[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match2[4]; + const minute = +match2[5]; + const second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match2[9]) { + const tzHour = +match2[10]; + const tzMinute = +(match2[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match2[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + __name(constructYamlTimestamp, "constructYamlTimestamp"); + function representYamlTimestamp(object) { + return object.toISOString(); + } + __name(representYamlTimestamp, "representYamlTimestamp"); + module2.exports = new Type2("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); +})); +var require_merge = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + __name(resolveYamlMerge, "resolveYamlMerge"); + module2.exports = new Type2("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); +})); +var require_binary = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + __name(resolveYamlBinary, "resolveYamlBinary"); + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 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); + } + __name(constructYamlBinary, "constructYamlBinary"); + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; } - bits = bits << 6 | map2.indexOf(input.charAt(idx)); - } - tailbits = max % 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); -} -__name(constructYamlBinary, "constructYamlBinary"); -function representYamlBinary(object) { - var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - if (idx % 3 === 0 && idx) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } - bits = (bits << 8) + object[idx]; - } - tail = max % 3; - if (tail === 0) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } else if (tail === 2) { - result += map2[bits >> 10 & 63]; - result += map2[bits >> 4 & 63]; - result += map2[bits << 2 & 63]; - result += map2[64]; - } else if (tail === 1) { - result += map2[bits >> 2 & 63]; - result += map2[bits << 4 & 63]; - result += map2[64]; - result += map2[64]; + return result; } - return result; -} -__name(representYamlBinary, "representYamlBinary"); -function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; -} -__name(isBinary, "isBinary"); -var binary = new type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = 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$2.call(pair) !== "[object Object]") return false; - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - if (!pairHasKey) return false; - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; + __name(representYamlBinary, "representYamlBinary"); + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + __name(isBinary, "isBinary"); + module2.exports = new Type2("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); +})); +var require_omap = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; } - return true; -} -__name(resolveYamlOmap, "resolveYamlOmap"); -function constructYamlOmap(data) { - return data !== null ? data : []; -} -__name(constructYamlOmap, "constructYamlOmap"); -var omap = new type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); -var _toString$1 = Object.prototype.toString; -function resolveYamlPairs(data) { - if (data === null) return true; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString$1.call(pair) !== "[object Object]") return false; - keys = Object.keys(pair); - if (keys.length !== 1) return false; - result[index] = [keys[0], pair[keys[0]]]; + __name(resolveYamlOmap, "resolveYamlOmap"); + function constructYamlOmap(data) { + return data !== null ? data : []; } - return true; -} -__name(resolveYamlPairs, "resolveYamlPairs"); -function constructYamlPairs(data) { - if (data === null) return []; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys = Object.keys(pair); - result[index] = [keys[0], pair[keys[0]]]; + __name(constructYamlOmap, "constructYamlOmap"); + module2.exports = new Type2("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); +})); +var require_pairs = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; } - return result; -} -__name(constructYamlPairs, "constructYamlPairs"); -var pairs = new type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; -function resolveYamlSet(data) { - if (data === null) return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { + __name(resolveYamlPairs, "resolveYamlPairs"); + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + __name(constructYamlPairs, "constructYamlPairs"); + module2.exports = new Type2("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); +})); +var require_set = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { if (object[key] !== null) return false; } + return true; } - return true; -} -__name(resolveYamlSet, "resolveYamlSet"); -function constructYamlSet(data) { - return data !== null ? data : {}; -} -__name(constructYamlSet, "constructYamlSet"); -var set = new type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet -}); -var _default = core.extend({ - implicit: [ - timestamp, - merge2 - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); -var _hasOwnProperty$1 = 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); -} -__name(_class, "_class"); -function is_EOL(c3) { - return c3 === 10 || c3 === 13; -} -__name(is_EOL, "is_EOL"); -function is_WHITE_SPACE(c3) { - return c3 === 9 || c3 === 32; -} -__name(is_WHITE_SPACE, "is_WHITE_SPACE"); -function is_WS_OR_EOL(c3) { - return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; -} -__name(is_WS_OR_EOL, "is_WS_OR_EOL"); -function is_FLOW_INDICATOR(c3) { - return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; -} -__name(is_FLOW_INDICATOR, "is_FLOW_INDICATOR"); -function fromHexCode(c3) { - var lc; - if (48 <= c3 && c3 <= 57) { - return c3 - 48; - } - lc = c3 | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; + __name(resolveYamlSet, "resolveYamlSet"); + function constructYamlSet(data) { + return data !== null ? data : {}; } - return -1; -} -__name(fromHexCode, "fromHexCode"); -function escapedHexLen(c3) { - if (c3 === 120) { - return 2; + __name(constructYamlSet, "constructYamlSet"); + module2.exports = new Type2("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); +})); +var require_default = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_core().extend({ + implicit: [require_timestamp(), require_merge()], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); +})); +var require_loader = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA2 = 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 = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + __name(_class, "_class"); + function isEol(c3) { + return c3 === 10 || c3 === 13; + } + __name(isEol, "isEol"); + function isWhiteSpace2(c3) { + return c3 === 9 || c3 === 32; + } + __name(isWhiteSpace2, "isWhiteSpace"); + function isWsOrEol(c3) { + return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; + } + __name(isWsOrEol, "isWsOrEol"); + function isFlowIndicator(c3) { + return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; + } + __name(isFlowIndicator, "isFlowIndicator"); + function fromHexCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + const lc = c3 | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; } - if (c3 === 117) { - return 4; + __name(fromHexCode, "fromHexCode"); + function escapedHexLen(c3) { + if (c3 === 120) return 2; + if (c3 === 117) return 4; + if (c3 === 85) return 8; + return 0; } - if (c3 === 85) { - return 8; + __name(escapedHexLen, "escapedHexLen"); + function fromDecimalCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + return -1; } - return 0; -} -__name(escapedHexLen, "escapedHexLen"); -function fromDecimalCode(c3) { - if (48 <= c3 && c3 <= 57) { - return c3 - 48; + __name(fromDecimalCode, "fromDecimalCode"); + function simpleEscapeSequence(c3) { + switch (c3) { + case 48: + return "\0"; + case 97: + return "\x07"; + case 98: + return "\b"; + case 116: + return " "; + case 9: + return " "; + case 110: + return "\n"; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 101: + return "\x1B"; + case 32: + return " "; + case 34: + return '"'; + case 47: + return "/"; + case 92: + return "\\"; + case 78: + return "\x85"; + case 95: + return "\xA0"; + case 76: + return "\u2028"; + case 80: + return "\u2029"; + default: + return ""; + } } - return -1; -} -__name(fromDecimalCode, "fromDecimalCode"); -function simpleEscapeSequence(c3) { - return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : - c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === - 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "\x85" : c3 === 95 ? "\xA0" : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : ""; -} -__name(simpleEscapeSequence, "simpleEscapeSequence"); -function charFromCodepoint(c3) { - if (c3 <= 65535) { - return String.fromCharCode(c3); + __name(simpleEscapeSequence, "simpleEscapeSequence"); + function charFromCodepoint(c3) { + if (c3 <= 65535) return String.fromCharCode(c3); + return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320); } - return String.fromCharCode( - (c3 - 65536 >> 10) + 55296, - (c3 - 65536 & 1023) + 56320 - ); -} -__name(charFromCodepoint, "charFromCodepoint"); -function setProperty(object, key, value) { - if (key === "__proto__") { - Object.defineProperty(object, key, { + __name(charFromCodepoint, "charFromCodepoint"); + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { configurable: true, enumerable: true, writable: true, value }); - } else { - object[key] = value; - } -} -__name(setProperty, "setProperty"); -var simpleEscapeCheck = new Array(256); -var simpleEscapeMap = new Array(256); -for (i2 = 0; i2 < 256; i2++) { - simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; - simpleEscapeMap[i2] = simpleEscapeSequence(i2); -} -var i2; -function State$1(input, options) { - this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || _default; - 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 = []; -} -__name(State$1, "State$1"); -function generateError(state3, message) { - var mark = { - name: state3.filename, - buffer: state3.input.slice(0, -1), - // omit trailing \0 - position: state3.position, - line: state3.line, - column: state3.position - state3.lineStart - }; - mark.snippet = snippet(mark); - return new exception(message, mark); -} -__name(generateError, "generateError"); -function throwError(state3, message) { - throw generateError(state3, message); -} -__name(throwError, "throwError"); -function throwWarning(state3, message) { - if (state3.onWarning) { - state3.onWarning.call(null, generateError(state3, message)); - } -} -__name(throwWarning, "throwWarning"); -var directiveHandlers = { - YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { - var match2, major, minor; - if (state3.version !== null) { - throwError(state3, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state3, "YAML directive accepts exactly one argument"); - } - match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match2 === null) { - throwError(state3, "ill-formed argument of the YAML directive"); - } - major = parseInt(match2[1], 10); - minor = parseInt(match2[2], 10); - if (major !== 1) { - throwError(state3, "unacceptable YAML version of the document"); - } - state3.version = args[0]; - state3.checkLineBreaks = minor < 2; - if (minor !== 1 && minor !== 2) { - throwWarning(state3, "unsupported YAML version of the document"); - } - }, "handleYamlDirective"), - TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { - var handle, prefix2; - if (args.length !== 2) { - throwError(state3, "TAG directive accepts exactly two arguments"); - } - handle = args[0]; - prefix2 = args[1]; - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state3, "ill-formed tag handle (first argument) of the TAG directive"); - } - if (_hasOwnProperty$1.call(state3.tagMap, handle)) { - throwError(state3, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - if (!PATTERN_TAG_URI.test(prefix2)) { - throwError(state3, "ill-formed tag prefix (second argument) of the TAG directive"); - } - try { - prefix2 = decodeURIComponent(prefix2); - } catch (err) { - throwError(state3, "tag prefix is malformed: " + prefix2); - } - state3.tagMap[handle] = prefix2; - }, "handleTagDirective") -}; -function captureSegment(state3, start, end, checkJson) { - var _position, _length, _character, _result; - if (start < end) { - _result = state3.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(state3, "expected valid JSON character"); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state3, "the stream contains non-printable characters"); + else object[key] = value; + } + __name(setProperty, "setProperty"); + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i2 = 0; i2 < 256; i2++) { + simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; + simpleEscapeMap[i2] = simpleEscapeSequence(i2); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA2; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + 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.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + __name(State, "State"); + function generateError(state3, message) { + const mark = { + name: state3.filename, + buffer: state3.input.slice(0, -1), + position: state3.position, + line: state3.line, + column: state3.position - state3.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException2(message, mark); + } + __name(generateError, "generateError"); + function throwError(state3, message) { + throw generateError(state3, message); + } + __name(throwError, "throwError"); + function throwWarning(state3, message) { + if (state3.onWarning) state3.onWarning.call(null, generateError(state3, message)); + } + __name(throwWarning, "throwWarning"); + function storeAnchor(state3, name, value) { + const transactions = state3.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state3.anchorMap, name), + value: state3.anchorMap[name] + }; } - state3.result += _result; + state3.anchorMap[name] = value; } -} -__name(captureSegment, "captureSegment"); -function mergeMappings(state3, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - if (!common.isObject(source)) { - throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + __name(storeAnchor, "storeAnchor"); + function beginAnchorTransaction(state3) { + state3.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null)); } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty$1.call(destination, key)) { - setProperty(destination, key, source[key]); - overridableKeys[key] = true; + __name(beginAnchorTransaction, "beginAnchorTransaction"); + function commitAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const transactions = state3.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; } } -} -__name(mergeMappings, "mergeMappings"); -function storeMappingPair(state3, _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(state3, "nested arrays are not supported inside keys"); - } - if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { - keyNode[index] = "[object Object]"; - } + __name(commitAnchorTransaction, "commitAnchorTransaction"); + function rollbackAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state3.anchorMap[names[index]] = entry.value; + else delete state3.anchorMap[names[index]]; } } - 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(state3, _result, valueNode[index], overridableKeys); + __name(rollbackAnchorTransaction, "rollbackAnchorTransaction"); + function snapshotState(state3) { + return { + position: state3.position, + line: state3.line, + lineStart: state3.lineStart, + lineIndent: state3.lineIndent, + firstTabInLine: state3.firstTabInLine, + tag: state3.tag, + anchor: state3.anchor, + kind: state3.kind, + result: state3.result + }; + } + __name(snapshotState, "snapshotState"); + function restoreState(state3, snapshot2) { + state3.position = snapshot2.position; + state3.line = snapshot2.line; + state3.lineStart = snapshot2.lineStart; + state3.lineIndent = snapshot2.lineIndent; + state3.firstTabInLine = snapshot2.firstTabInLine; + state3.tag = snapshot2.tag; + state3.anchor = snapshot2.anchor; + state3.kind = snapshot2.kind; + state3.result = snapshot2.result; + } + __name(restoreState, "restoreState"); + var directiveHandlers = { + YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { + if (state3.version !== null) throwError(state3, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state3, "YAML directive accepts exactly one argument"); + const match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match2 === null) throwError(state3, "ill-formed argument of the YAML directive"); + const major = parseInt(match2[1], 10); + const minor = parseInt(match2[2], 10); + if (major !== 1) throwError(state3, "unacceptable YAML version of the document"); + state3.version = args[0]; + state3.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state3, "unsupported YAML version of the document"); + }, "handleYamlDirective"), + TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { + let prefix2; + if (args.length !== 2) throwError(state3, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix2 = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state3, "ill-formed tag handle (first argument) of the TAG direct\ +ive"); + if (_hasOwnProperty.call(state3.tagMap, handle)) throwError(state3, 'there is a previously declared suffix for "' + + handle + '" tag handle'); + if (!PATTERN_TAG_URI.test(prefix2)) throwError(state3, "ill-formed tag prefix (second argument) of the TAG directi\ +ve"); + try { + prefix2 = decodeURIComponent(prefix2); + } catch (err) { + throwError(state3, "tag prefix is malformed: " + prefix2); } - } else { - mergeMappings(state3, _result, valueNode, overridableKeys); - } - } else { - if (!state3.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { - state3.line = startLine || state3.line; - state3.lineStart = startLineStart || state3.lineStart; - state3.position = startPos || state3.position; - throwError(state3, "duplicated mapping key"); - } - setProperty(_result, keyNode, valueNode); - delete overridableKeys[keyNode]; - } - return _result; -} -__name(storeMappingPair, "storeMappingPair"); -function readLineBreak(state3) { - var ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 10) { - state3.position++; - } else if (ch === 13) { - state3.position++; - if (state3.input.charCodeAt(state3.position) === 10) { + state3.tagMap[handle] = prefix2; + }, "handleTagDirective") + }; + function captureSegment(state3, start, end, checkJson) { + if (start < end) { + const _result = state3.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state3, "expected valid JSON ch\ +aracter"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state3, "the stream contains non-printable characters"); + state3.result += _result; + } + } + __name(captureSegment, "captureSegment"); + function mergeMappings(state3, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + __name(mergeMappings, "mergeMappings"); + function storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state3, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Objec\ +t]"; + } + } + 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)) { + if (valueNode.length > state3.maxMergeSeqLength) throwError(state3, "merge sequence length exceeded maxMergeSeqLen\ +gth (" + state3.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state3, _result, src, overridableKeys); + } + } else mergeMappings(state3, _result, valueNode, overridableKeys); + else { + if (!state3.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state3.line = startLine || state3.line; + state3.lineStart = startLineStart || state3.lineStart; + state3.position = startPos || state3.position; + throwError(state3, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + __name(storeMappingPair, "storeMappingPair"); + function readLineBreak(state3) { + const ch = state3.input.charCodeAt(state3.position); + if (ch === 10) state3.position++; + else if (ch === 13) { state3.position++; - } - } else { - throwError(state3, "a line break is expected"); - } - state3.line += 1; - state3.lineStart = state3.position; - state3.firstTabInLine = -1; -} -__name(readLineBreak, "readLineBreak"); -function skipSeparationSpace(state3, allowComments, checkIndent) { - var lineBreaks = 0, ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 9 && state3.firstTabInLine === -1) { - state3.firstTabInLine = state3.position; - } - ch = state3.input.charCodeAt(++state3.position); - } - if (allowComments && ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 10 && ch !== 13 && ch !== 0); - } - if (is_EOL(ch)) { - readLineBreak(state3); - ch = state3.input.charCodeAt(state3.position); - lineBreaks++; - state3.lineIndent = 0; - while (ch === 32) { - state3.lineIndent++; + if (state3.input.charCodeAt(state3.position) === 10) state3.position++; + } else throwError(state3, "a line break is expected"); + state3.line += 1; + state3.lineStart = state3.position; + state3.firstTabInLine = -1; + } + __name(readLineBreak, "readLineBreak"); + function skipSeparationSpace(state3, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + while (isWhiteSpace2(ch)) { + if (ch === 9 && state3.firstTabInLine === -1) state3.firstTabInLine = state3.position; ch = state3.input.charCodeAt(++state3.position); } - } else { - break; + if (allowComments && ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state3); + ch = state3.input.charCodeAt(state3.position); + lineBreaks++; + state3.lineIndent = 0; + while (ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + } else break; } + if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) throwWarning(state3, "deficient inden\ +tation"); + return lineBreaks; } - if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) { - throwWarning(state3, "deficient indentation"); - } - return lineBreaks; -} -__name(skipSeparationSpace, "skipSeparationSpace"); -function testDocumentSeparator(state3) { - var _position = state3.position, ch; - ch = state3.input.charCodeAt(_position); - if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + - 2)) { - _position += 3; - ch = state3.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + __name(skipSeparationSpace, "skipSeparationSpace"); + function testDocumentSeparator(state3) { + let _position = state3.position; + let ch = state3.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + + 2)) { + _position += 3; + ch = state3.input.charCodeAt(_position); + if (ch === 0 || isWsOrEol(ch)) return true; } - } - return false; -} -__name(testDocumentSeparator, "testDocumentSeparator"); -function writeFoldedLines(state3, count) { - if (count === 1) { - state3.result += " "; - } else if (count > 1) { - state3.result += common.repeat("\n", count - 1); - } -} -__name(writeFoldedLines, "writeFoldedLines"); -function readPlainScalar(state3, nodeIndent, withinFlowCollection) { - var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state3. - kind, _result = state3.result, ch; - ch = state3.input.charCodeAt(state3.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 = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - state3.kind = "scalar"; - state3.result = ""; - captureStart = captureEnd = state3.position; - hasPendingContent = false; - while (ch !== 0) { - if (ch === 58) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - } else if (ch === 35) { - preceding = state3.input.charCodeAt(state3.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; + __name(testDocumentSeparator, "testDocumentSeparator"); + function writeFoldedLines(state3, count) { + if (count === 1) state3.result += " "; + else if (count > 1) state3.result += common.repeat("\n", count - 1); + } + __name(writeFoldedLines, "writeFoldedLines"); + function readPlainScalar(state3, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state3.kind; + const _result = state3.result; + let ch = state3.input.charCodeAt(state3.position); + if (isWsOrEol(ch) || isFlowIndicator(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) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state3.kind = "scalar"; + state3.result = ""; + captureStart = captureEnd = state3.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state3.input.charCodeAt(state3.position - 1))) break; + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && isFlowIndicator( + ch)) break; + else if (isEol(ch)) { + _line = state3.line; + _lineStart = state3.lineStart; + _lineIndent = state3.lineIndent; + skipSeparationSpace(state3, false, -1); + if (state3.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state3.input.charCodeAt(state3.position); + continue; + } else { + state3.position = captureEnd; + state3.line = _line; + state3.lineStart = _lineStart; + state3.lineIndent = _lineIndent; + break; + } } - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && is_FLOW_INDICATOR( - ch)) { - break; - } else if (is_EOL(ch)) { - _line = state3.line; - _lineStart = state3.lineStart; - _lineIndent = state3.lineIndent; - skipSeparationSpace(state3, false, -1); - if (state3.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state3.input.charCodeAt(state3.position); - continue; - } else { - state3.position = captureEnd; - state3.line = _line; - state3.lineStart = _lineStart; - state3.lineIndent = _lineIndent; - break; + if (hasPendingContent) { + captureSegment(state3, captureStart, captureEnd, false); + writeFoldedLines(state3, state3.line - _line); + captureStart = captureEnd = state3.position; + hasPendingContent = false; } + if (!isWhiteSpace2(ch)) captureEnd = state3.position + 1; + ch = state3.input.charCodeAt(++state3.position); } - if (hasPendingContent) { - captureSegment(state3, captureStart, captureEnd, false); - writeFoldedLines(state3, state3.line - _line); - captureStart = captureEnd = state3.position; - hasPendingContent = false; - } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state3.position + 1; - } - ch = state3.input.charCodeAt(++state3.position); - } - captureSegment(state3, captureStart, captureEnd, false); - if (state3.result) { - return true; - } - state3.kind = _kind; - state3.result = _result; - return false; -} -__name(readPlainScalar, "readPlainScalar"); -function readSingleQuotedScalar(state3, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 39) { + captureSegment(state3, captureStart, captureEnd, false); + if (state3.result) return true; + state3.kind = _kind; + state3.result = _result; return false; } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 39) { + __name(readPlainScalar, "readPlainScalar"); + function readSingleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 39) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 39) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); if (ch === 39) { captureStart = state3.position; state3.position++; captureEnd = state3.position; - } else { - return true; - } - } else if (is_EOL(ch)) { + } else return true; + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a single quoted scalar"); - } else { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a single quoted scalar"); + else { state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a single quoted scalar"); -} -__name(readSingleQuotedScalar, "readSingleQuotedScalar"); -function readDoubleQuotedScalar(state3, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 34) { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 34) { + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a single quoted scalar"); + } + __name(readSingleQuotedScalar, "readSingleQuotedScalar"); + function readDoubleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 34) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 34) { captureSegment(state3, captureStart, state3.position, true); state3.position++; return true; } else if (ch === 92) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); - if (is_EOL(ch)) { - skipSeparationSpace(state3, false, nodeIndent); - } else if (ch < 256 && simpleEscapeCheck[ch]) { + if (isEol(ch)) skipSeparationSpace(state3, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { state3.result += simpleEscapeMap[ch]; state3.position++; } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; + let hexLength = tmp; + let hexResult = 0; for (; hexLength > 0; hexLength--) { ch = state3.input.charCodeAt(++state3.position); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - } else { - throwError(state3, "expected hexadecimal character"); - } + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state3, "expected hexadecimal character"); } state3.result += charFromCodepoint(hexResult); state3.position++; - } else { - throwError(state3, "unknown escape sequence"); - } + } else throwError(state3, "unknown escape sequence"); captureStart = captureEnd = state3.position; - } else if (is_EOL(ch)) { + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a double quoted scalar"); - } else { - state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a double quoted scalar"); -} -__name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); -function readFlowCollection(state3, nodeIndent) { - var readNext = true, _line, _lineStart, _pos, _tag = state3.tag, _result, _anchor = state3.anchor, following, terminator, - isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 91) { - terminator = 93; - isMapping = false; - _result = []; - } else if (ch === 123) { - terminator = 125; - isMapping = true; - _result = {}; - } else { - return false; - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(++state3.position); - while (ch !== 0) { - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === terminator) { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a double quoted scalar"); + else { state3.position++; - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = isMapping ? "mapping" : "sequence"; - state3.result = _result; - return true; - } else if (!readNext) { - throwError(state3, "missed comma between flow collection entries"); - } else if (ch === 44) { - throwError(state3, "expected the node content, but found ','"); - } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - if (ch === 63) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a double quoted scalar"); + } + __name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); + function readFlowCollection(state3, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state3.tag; + let _result; + const _anchor = state3.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0) { + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if (ch === terminator) { state3.position++; + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = isMapping ? "mapping" : "sequence"; + state3.result = _result; + return true; + } else if (!readNext) throwError(state3, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state3, "expected the node content, but found ','"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + if (isWsOrEol(state3.input.charCodeAt(state3.position + 1))) { + isPair = isExplicitPair = true; + state3.position++; + skipSeparationSpace(state3, true, nodeIndent); + } + } + _line = state3.line; + _lineStart = state3.lineStart; + _pos = state3.position; + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state3.tag; + keyNode = state3.result; + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if ((isExplicitPair || state3.line === _line) && ch === 58) { + isPair = true; + ch = state3.input.charCodeAt(++state3.position); skipSeparationSpace(state3, true, nodeIndent); + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state3.result; } - } - _line = state3.line; - _lineStart = state3.lineStart; - _pos = state3.position; - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state3.tag; - keyNode = state3.result; - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if ((isExplicitPair || state3.line === _line) && ch === 58) { - isPair = true; - ch = state3.input.charCodeAt(++state3.position); + if (isMapping) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + else if (isPair) _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, + _pos)); + else _result.push(keyNode); skipSeparationSpace(state3, true, nodeIndent); - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state3.result; - } - if (isMapping) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === 44) { - readNext = true; + ch = state3.input.charCodeAt(state3.position); + if (ch === 44) { + readNext = true; + ch = state3.input.charCodeAt(++state3.position); + } else readNext = false; + } + throwError(state3, "unexpected end of the stream within a flow collection"); + } + __name(readFlowCollection, "readFlowCollection"); + function readBlockScalar(state3, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state3.kind = "scalar"; + state3.result = ""; + while (ch !== 0) { ch = state3.input.charCodeAt(++state3.position); - } else { - readNext = false; - } - } - throwError(state3, "unexpected end of the stream within a flow collection"); -} -__name(readFlowCollection, "readFlowCollection"); -function readBlockScalar(state3, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, - emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 124) { - folding = false; - } else if (ch === 62) { - folding = true; - } else { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - while (ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); - if (ch === 43 || ch === 45) { - if (CHOMPING_CLIP === chomping) { - chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state3, "repeat of a chomping mode identifier"); - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state3, "bad explicit indentation width of a block scalar; it cannot be less than one"); - } else if (!detectedIndent) { + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state3, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state3, "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(state3, "repeat of an indentation width identifier"); - } - } else { - break; + } else throwError(state3, "repeat of an indentation width identifier"); + else break; } - } - if (is_WHITE_SPACE(ch)) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (is_WHITE_SPACE(ch)); - if (ch === 35) { - do { + if (isWhiteSpace2(ch)) { + do ch = state3.input.charCodeAt(++state3.position); - } while (!is_EOL(ch) && ch !== 0); - } - } - while (ch !== 0) { - readLineBreak(state3); - state3.lineIndent = 0; - ch = state3.input.charCodeAt(state3.position); - while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { - state3.lineIndent++; - ch = state3.input.charCodeAt(++state3.position); - } - if (!detectedIndent && state3.lineIndent > textIndent) { - textIndent = state3.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; - continue; + while (isWhiteSpace2(ch)); + if (ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (!isEol(ch) && ch !== 0); } - if (state3.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { - state3.result += "\n"; + while (ch !== 0) { + readLineBreak(state3); + state3.lineIndent = 0; + ch = state3.input.charCodeAt(state3.position); + while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + if (!detectedIndent && state3.lineIndent > textIndent) textIndent = state3.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state3, "missing indentation for block scalar"); + if (state3.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state3.result += "\n"; } + break; } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { + if (folding) if (isWhiteSpace2(ch)) { atMoreIndented = true; state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (atMoreIndented) { atMoreIndented = false; state3.result += common.repeat("\n", emptyLines + 1); } else if (emptyLines === 0) { - if (didReadContent) { - state3.result += " "; - } - } else { - state3.result += common.repeat("\n", emptyLines); - } - } else { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state3.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); + if (didReadContent) state3.result += " "; + } else state3.result += common.repeat("\n", emptyLines); + else state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state3.position; + while (!isEol(ch) && ch !== 0) ch = state3.input.charCodeAt(++state3.position); + captureSegment(state3, captureStart, state3.position, false); } - captureSegment(state3, captureStart, state3.position, false); - } - return true; -} -__name(readBlockScalar, "readBlockScalar"); -function readBlockSequence(state3, nodeIndent) { - var _line, _tag = state3.tag, _anchor = state3.anchor, _result = [], following, detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; + return true; } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - if (ch !== 45) { - break; - } - following = state3.input.charCodeAt(state3.position + 1); - if (!is_WS_OR_EOL(following)) { - break; - } - detected = true; - state3.position++; - if (skipSeparationSpace(state3, true, -1)) { - if (state3.lineIndent <= nodeIndent) { - _result.push(null); - ch = state3.input.charCodeAt(state3.position); - continue; + __name(readBlockScalar, "readBlockScalar"); + function readBlockSequence(state3, nodeIndent) { + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = []; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); } + if (ch !== 45) break; + if (!isWsOrEol(state3.input.charCodeAt(state3.position + 1))) break; + detected = true; + state3.position++; + if (skipSeparationSpace(state3, true, -1)) { + if (state3.lineIndent <= nodeIndent) { + _result.push(null); + ch = state3.input.charCodeAt(state3.position); + continue; + } + } + const _line = state3.line; + composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state3.result); + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a sequence entry"); + else if (state3.lineIndent < nodeIndent) break; } - _line = state3.line; - composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state3.result); - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a sequence entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "sequence"; + state3.result = _result; + return true; } + return false; } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "sequence"; - state3.result = _result; - return true; - } - return false; -} -__name(readBlockSequence, "readBlockSequence"); -function readBlockMapping(state3, nodeIndent, flowIndent) { - var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state3.tag, _anchor = state3.anchor, _result = {}, - overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, - detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (!atExplicitKey && state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - following = state3.input.charCodeAt(state3.position + 1); - _line = state3.line; - if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { - if (ch === 63) { - if (atExplicitKey) { - storeMappingPair(state3, _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(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty\ - line"); - } - state3.position += 1; - ch = following; - } else { - _keyLine = state3.line; - _keyLineStart = state3.lineStart; - _keyPos = state3.position; - if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - break; - } - if (state3.line === _line) { - ch = state3.input.charCodeAt(state3.position); - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 58) { - ch = state3.input.charCodeAt(++state3.position); - if (!is_WS_OR_EOL(ch)) { - throwError(state3, "a whitespace character is expected after the key-value separator within a block mapping"); - } + __name(readBlockSequence, "readBlockSequence"); + function readBlockMapping(state3, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = {}; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (!atExplicitKey && state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); + } + const following = state3.input.charCodeAt(state3.position + 1); + const _line = state3.line; + if ((ch === 63 || ch === 58) && isWsOrEol(following)) { + if (ch === 63) { if (atExplicitKey) { storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { atExplicitKey = false; - allowCompact = false; - keyTag = state3.tag; - keyNode = state3.result; - } else if (detected) { - throwError(state3, "can not read an implicit mapping pair; a colon is missed"); - } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } else if (detected) { - throwError(state3, "can not read a block mapping entry; a multiline key may not be an implicit key"); + allowCompact = true; + } else throwError(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulate\ +d empty line"); + state3.position += 1; + ch = following; } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } - if (state3.line === _line || state3.lineIndent > nodeIndent) { - if (atExplicitKey) { _keyLine = state3.line; _keyLineStart = state3.lineStart; _keyPos = state3.position; + if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state3.line === _line) { + ch = state3.input.charCodeAt(state3.position); + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 58) { + ch = state3.input.charCodeAt(++state3.position); + if (!isWsOrEol(ch)) throwError(state3, "a whitespace character is expected after the key-value separator wit\ +hin a block mapping"); + if (atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state3.tag; + keyNode = state3.result; + } else if (detected) throwError(state3, "can not read an implicit mapping pair; a colon is missed"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } + } else if (detected) throwError(state3, "can not read a block mapping entry; a multiline key may not be an impli\ +cit key"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } } - if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (state3.line === _line || state3.lineIndent > nodeIndent) { if (atExplicitKey) { - keyNode = state3.result; - } else { - valueNode = state3.result; + _keyLine = state3.line; + _keyLineStart = state3.lineStart; + _keyPos = state3.position; + } + if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state3. + result; + else valueNode = state3.result; + if (!atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; } + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); } - if (!atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a mapping entry"); + else if (state3.lineIndent < nodeIndent) break; } - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a mapping entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (atExplicitKey) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, + _keyPos); + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "mapping"; + state3.result = _result; } - } - if (atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "mapping"; - state3.result = _result; - } - return detected; -} -__name(readBlockMapping, "readBlockMapping"); -function readTagProperty(state3) { - var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 33) return false; - if (state3.tag !== null) { - throwError(state3, "duplication of a tag property"); - } - ch = state3.input.charCodeAt(++state3.position); - if (ch === 60) { - isVerbatim = true; + return detected; + } + __name(readBlockMapping, "readBlockMapping"); + function readTagProperty(state3) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 33) return false; + if (state3.tag !== null) throwError(state3, "duplication of a tag property"); ch = state3.input.charCodeAt(++state3.position); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; - ch = state3.input.charCodeAt(++state3.position); - } else { - tagHandle = "!"; - } - _position = state3.position; - if (isVerbatim) { - do { + if (ch === 60) { + isVerbatim = true; ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && ch !== 62); - if (state3.position < state3.length) { - tagName = state3.input.slice(_position, state3.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; ch = state3.input.charCodeAt(++state3.position); + } else tagHandle = "!"; + let _position = state3.position; + if (isVerbatim) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && ch !== 62); + if (state3.position < state3.length) { + tagName = state3.input.slice(_position, state3.position); + ch = state3.input.charCodeAt(++state3.position); + } else throwError(state3, "unexpected end of the stream within a verbatim tag"); } else { - throwError(state3, "unexpected end of the stream within a verbatim tag"); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (ch === 33) { - if (!isNamed) { + while (ch !== 0 && !isWsOrEol(ch)) { + if (ch === 33) if (!isNamed) { tagHandle = state3.input.slice(_position - 1, state3.position + 1); - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state3, "named tag handle cannot contain such characters"); - } + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state3, "named tag handle cannot contain such characters"); isNamed = true; _position = state3.position + 1; - } else { - throwError(state3, "tag suffix cannot contain exclamation marks"); - } + } else throwError(state3, "tag suffix cannot contain exclamation marks"); + ch = state3.input.charCodeAt(++state3.position); } - ch = state3.input.charCodeAt(++state3.position); + tagName = state3.input.slice(_position, state3.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state3, "tag suffix cannot contain flow indicator characters"); } - tagName = state3.input.slice(_position, state3.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state3, "tag suffix cannot contain flow indicator characters"); + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state3, "tag name cannot contain such characters: " + tagName); + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state3, "tag name is malformed: " + tagName); } + if (isVerbatim) state3.tag = tagName; + else if (_hasOwnProperty.call(state3.tagMap, tagHandle)) state3.tag = state3.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state3.tag = "!" + tagName; + else if (tagHandle === "!!") state3.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); + return true; } - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state3, "tag name cannot contain such characters: " + tagName); - } - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state3, "tag name is malformed: " + tagName); - } - if (isVerbatim) { - state3.tag = tagName; - } else if (_hasOwnProperty$1.call(state3.tagMap, tagHandle)) { - state3.tag = state3.tagMap[tagHandle] + tagName; - } else if (tagHandle === "!") { - state3.tag = "!" + tagName; - } else if (tagHandle === "!!") { - state3.tag = "tag:yaml.org,2002:" + tagName; - } else { - throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); - } - return true; -} -__name(readTagProperty, "readTagProperty"); -function readAnchorProperty(state3) { - var _position, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 38) return false; - if (state3.anchor !== null) { - throwError(state3, "duplication of an anchor property"); - } - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readTagProperty, "readTagProperty"); + function readAnchorProperty(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 38) return false; + if (state3.anchor !== null) throwError(state3, "duplication of an anchor property"); ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an anchor node must contain at least one character"); + state3.anchor = state3.input.slice(_position, state3.position); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an anchor node must contain at least one character"); - } - state3.anchor = state3.input.slice(_position, state3.position); - return true; -} -__name(readAnchorProperty, "readAnchorProperty"); -function readAlias(state3) { - var _position, alias, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 42) return false; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readAnchorProperty, "readAnchorProperty"); + function readAlias(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 42) return false; ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an alias node must contain at least one character"); + const alias = state3.input.slice(_position, state3.position); + if (!_hasOwnProperty.call(state3.anchorMap, alias)) throwError(state3, 'unidentified alias "' + alias + '"'); + state3.result = state3.anchorMap[alias]; + skipSeparationSpace(state3, true, -1); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an alias node must contain at least one character"); - } - alias = state3.input.slice(_position, state3.position); - if (!_hasOwnProperty$1.call(state3.anchorMap, alias)) { - throwError(state3, 'unidentified alias "' + alias + '"'); + __name(readAlias, "readAlias"); + function tryReadBlockMappingFromProperty(state3, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state3); + beginAnchorTransaction(state3); + restoreState(state3, propertyStart); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + if (readBlockMapping(state3, nodeIndent, flowIndent) && state3.kind === "mapping") { + commitAnchorTransaction(state3); + return true; + } + rollbackAnchorTransaction(state3); + restoreState(state3, fallbackState); + return false; } - state3.result = state3.anchorMap[alias]; - skipSeparationSpace(state3, true, -1); - return true; -} -__name(readAlias, "readAlias"); -function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, - typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; - if (state3.listener !== null) { - state3.listener("open", state3); - } - state3.tag = null; - state3.anchor = null; - state3.kind = null; - state3.result = null; - allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === - nodeContext; - if (allowToSeek) { - if (skipSeparationSpace(state3, true, -1)) { - atNewLine = true; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - if (indentStatus === 1) { - while (readTagProperty(state3) || readAnchorProperty(state3)) { + __name(tryReadBlockMappingFromProperty, "tryReadBlockMappingFromProperty"); + function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state3.depth >= state3.maxDepth) throwError(state3, "nesting exceeded maxDepth (" + state3.maxDepth + ")"); + state3.depth += 1; + if (state3.listener !== null) state3.listener("open", state3); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === + nodeContext; + if (allowToSeek) { if (skipSeparationSpace(state3, true, -1)) { atNewLine = true; - allowBlockCollections = allowBlockStyles; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; } } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - blockIndent = state3.position - state3.lineStart; - if (indentStatus === 1) { - if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, blockIndent, flowIndent)) || - readFlowCollection(state3, flowIndent)) { - hasContent = true; - } else { - if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || readDoubleQuotedScalar( - state3, flowIndent)) { - hasContent = true; - } else if (readAlias(state3)) { + if (indentStatus === 1) while (true) { + const ch = state3.input.charCodeAt(state3.position); + const propertyState = snapshotState(state3); + if (atNewLine && (ch === 33 && state3.tag !== null || ch === 38 && state3.anchor !== null)) break; + if (!readTagProperty(state3) && !readAnchorProperty(state3)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state3, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state3.position - state3.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, + blockIndent, flowIndent)) || readFlowCollection(state3, flowIndent)) hasContent = true; + else { + const ch = state3.input.charCodeAt(state3.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty( + state3, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true; + else if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || + readDoubleQuotedScalar(state3, flowIndent)) hasContent = true; + else if (readAlias(state3)) { hasContent = true; - if (state3.tag !== null || state3.anchor !== null) { - throwError(state3, "alias node should not have any properties"); - } + if (state3.tag !== null || state3.anchor !== null) throwError(state3, "alias node should not have any properti\ +es"); } else if (readPlainScalar(state3, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; - if (state3.tag === null) { - state3.tag = "?"; - } - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } else if (indentStatus === 0) { - hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); - } - } - if (state3.tag === null) { - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } else if (state3.tag === "?") { - if (state3.result !== null && state3.kind !== "scalar") { - throwError(state3, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state3.kind + '"'); - } - for (typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type2 = state3.implicitTypes[typeIndex]; - if (type2.resolve(state3.result)) { - state3.result = type2.construct(state3.result); - state3.tag = type2.tag; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; + if (state3.tag === null) state3.tag = "?"; + } + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); + } + if (state3.tag === null) { + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } else if (state3.tag === "?") { + if (state3.result !== null && state3.kind !== "scalar") throwError(state3, 'unacceptable node kind for ! tag; i\ +t should be "scalar", not "' + state3.kind + '"'); + for (let typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state3.implicitTypes[typeIndex]; + if (type.resolve(state3.result)) { + state3.result = type.construct(state3.result); + state3.tag = type.tag; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + break; } - break; } - } - } else if (state3.tag !== "!") { - if (_hasOwnProperty$1.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) { - type2 = state3.typeMap[state3.kind || "fallback"][state3.tag]; - } else { - type2 = null; - typeList = state3.typeMap.multi[state3.kind || "fallback"]; - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state3.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type2 = typeList[typeIndex]; + } else if (state3.tag !== "!") { + if (_hasOwnProperty.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) type = state3.typeMap[state3.kind || + "fallback"][state3.tag]; + else { + type = null; + const typeList = state3.typeMap.multi[state3.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state3.tag. + slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; break; } } - } - if (!type2) { - throwError(state3, "unknown tag !<" + state3.tag + ">"); - } - if (state3.result !== null && type2.kind !== state3.kind) { - throwError(state3, "unacceptable node kind for !<" + state3.tag + '> tag; it should be "' + type2.kind + '", not "' + - state3.kind + '"'); - } - if (!type2.resolve(state3.result, state3.tag)) { - throwError(state3, "cannot resolve a node with !<" + state3.tag + "> explicit tag"); - } else { - state3.result = type2.construct(state3.result, state3.tag); - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } - if (state3.listener !== null) { - state3.listener("close", state3); - } - return state3.tag !== null || state3.anchor !== null || hasContent; -} -__name(composeNode, "composeNode"); -function readDocument(state3) { - var documentStart = state3.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; - state3.version = null; - state3.checkLineBreaks = state3.legacy; - state3.tagMap = /* @__PURE__ */ Object.create(null); - state3.anchorMap = /* @__PURE__ */ Object.create(null); - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if (state3.lineIndent > 0 || ch !== 37) { - break; - } - hasDirectives = true; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (!type) throwError(state3, "unknown tag !<" + state3.tag + ">"); + if (state3.result !== null && type.kind !== state3.kind) throwError(state3, "unacceptable node kind for !<" + state3. + tag + '> tag; it should be "' + type.kind + '", not "' + state3.kind + '"'); + if (!type.resolve(state3.result, state3.tag)) throwError(state3, "cannot resolve a node with !<" + state3.tag + ">\ + explicit tag"); + else { + state3.result = type.construct(state3.result, state3.tag); + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + } + if (state3.listener !== null) state3.listener("close", state3); + state3.depth -= 1; + return state3.tag !== null || state3.anchor !== null || hasContent; + } + __name(composeNode, "composeNode"); + function readDocument(state3) { + const documentStart = state3.position; + let hasDirectives = false; + let ch; + state3.version = null; + state3.checkLineBreaks = state3.legacy; + state3.tagMap = /* @__PURE__ */ Object.create(null); + state3.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if (state3.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; ch = state3.input.charCodeAt(++state3.position); - } - directiveName = state3.input.slice(_position, state3.position); - directiveArgs = []; - if (directiveName.length < 1) { - throwError(state3, "directive name must not be less than one character in length"); - } - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && !is_EOL(ch)); - break; - } - if (is_EOL(ch)) break; - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state3.input.charCodeAt(++state3.position); + let _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + const directiveName = state3.input.slice(_position, state3.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state3, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 35) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + directiveArgs.push(state3.input.slice(_position, state3.position)); } - directiveArgs.push(state3.input.slice(_position, state3.position)); + if (ch !== 0) readLineBreak(state3); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state3, directiveName, + directiveArgs); + else throwWarning(state3, 'unknown document directive "' + directiveName + '"'); } - if (ch !== 0) readLineBreak(state3); - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state3, directiveName, directiveArgs); - } else { - throwWarning(state3, 'unknown document directive "' + directiveName + '"'); - } - } - skipSeparationSpace(state3, true, -1); - if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + - 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { - state3.position += 3; skipSeparationSpace(state3, true, -1); - } else if (hasDirectives) { - throwError(state3, "directives end mark is expected"); - } - composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state3, true, -1); - if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) { - throwWarning(state3, "non-ASCII line breaks are interpreted as content"); - } - state3.documents.push(state3.result); - if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - if (state3.input.charCodeAt(state3.position) === 46) { + if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + + 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { state3.position += 3; skipSeparationSpace(state3, true, -1); + } else if (hasDirectives) throwError(state3, "directives end mark is expected"); + composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state3, true, -1); + if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) + throwWarning(state3, "non-ASCII line breaks are interpreted as content"); + state3.documents.push(state3.result); + if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { + if (state3.input.charCodeAt(state3.position) === 46) { + state3.position += 3; + skipSeparationSpace(state3, true, -1); + } + return; } - return; - } - if (state3.position < state3.length - 1) { - throwError(state3, "end of the stream or a document separator is expected"); - } else { - return; + if (state3.position < state3.length - 1) throwError(state3, "end of the stream or a document separator is expected"); } -} -__name(readDocument, "readDocument"); -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"; + __name(readDocument, "readDocument"); + 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"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state3 = new State(input, options); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state3.position = nullpos; + throwError(state3, "null byte is not allowed in input"); + } + state3.input += "\0"; + while (state3.input.charCodeAt(state3.position) === 32) { + state3.lineIndent += 1; + state3.position += 1; } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); + while (state3.position < state3.length - 1) readDocument(state3); + return state3.documents; + } + __name(loadDocuments, "loadDocuments"); + function loadAll2(input, iterator2, options) { + if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { + options = iterator2; + iterator2 = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator2 !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator2(documents[index]); + } + __name(loadAll2, "loadAll"); + function load2(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException2("expected a single document in the stream, but found more"); + } + __name(load2, "load"); + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; +})); +var require_dumper = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var DEFAULT_SCHEMA2 = 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, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; } + return result; } - var state3 = new State$1(input, options); - var nullpos = input.indexOf("\0"); - if (nullpos !== -1) { - state3.position = nullpos; - throwError(state3, "null byte is not allowed in input"); - } - state3.input += "\0"; - while (state3.input.charCodeAt(state3.position) === 32) { - state3.lineIndent += 1; - state3.position += 1; - } - while (state3.position < state3.length - 1) { - readDocument(state3); - } - return state3.documents; -} -__name(loadDocuments, "loadDocuments"); -function loadAll$1(input, iterator2, options) { - if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { - options = iterator2; - iterator2 = null; - } - var documents = loadDocuments(input, options); - if (typeof iterator2 !== "function") { - return documents; - } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator2(documents[index]); - } -} -__name(loadAll$1, "loadAll$1"); -function load$1(input, options) { - var documents = loadDocuments(input, options); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception("expected a single document in the stream, but found more"); -} -__name(load$1, "load$1"); -var loadAll_1 = loadAll$1; -var load_1 = load$1; -var loader = { - loadAll: loadAll_1, - load: load_1 -}; -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(schema2, map2) { - var result, keys, index, length, tag, style, type2; - if (map2 === null) return {}; - result = {}; - keys = Object.keys(map2); - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map2[tag]); - if (tag.slice(0, 2) === "!!") { - tag = "tag:yaml.org,2002:" + tag.slice(2); - } - type2 = schema2.compiledTypeMap["fallback"][tag]; - if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) { - style = type2.styleAliases[style]; - } - result[tag] = style; - } - return result; -} -__name(compileStyleMap, "compileStyleMap"); -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 exception("code point within a string may not be greater than 0xFFFFFFFF"); - } - return "\\" + handle + common.repeat("0", length - string.length) + string; -} -__name(encodeHex, "encodeHex"); -var QUOTING_TYPE_SINGLE = 1; -var QUOTING_TYPE_DOUBLE = 2; -function State(options) { - this.schema = options["schema"] || _default; - 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; -} -__name(State, "State"); -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; + __name(compileStyleMap, "compileStyleMap"); + function encodeHex(character) { + let handle; + let length; + const 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 YAMLException2("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + __name(encodeHex, "encodeHex"); + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA2; + 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; + } + __name(State, "State"); + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const 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; } - if (line.length && line !== "\n") result += ind; - result += line; + return result; } - return result; -} -__name(indentString, "indentString"); -function generateNextLine(state3, level) { - return "\n" + common.repeat(" ", state3.indent * level); -} -__name(generateNextLine, "generateNextLine"); -function testImplicitResolving(state3, str2) { - var index, length, type2; - for (index = 0, length = state3.implicitTypes.length; index < length; index += 1) { - type2 = state3.implicitTypes[index]; - if (type2.resolve(str2)) { - return true; - } + __name(indentString, "indentString"); + function generateNextLine(state3, level) { + return "\n" + common.repeat(" ", state3.indent * level); } - return false; -} -__name(testImplicitResolving, "testImplicitResolving"); -function isWhitespace(c3) { - return c3 === CHAR_SPACE || c3 === CHAR_TAB; -} -__name(isWhitespace, "isWhitespace"); -function isPrintable(c3) { - return 32 <= c3 && c3 <= 126 || 161 <= c3 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || 57344 <= c3 && c3 <= 65533 && - c3 !== CHAR_BOM || 65536 <= c3 && c3 <= 1114111; -} -__name(isPrintable, "isPrintable"); -function isNsCharOrWhitespace(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; -} -__name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); -function isPlainSafe(c3, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); - return ( - // ns-plain-safe - (inblock ? ( - // c = flow-in - cIsNsCharOrWhitespace - ) : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && - c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || - isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar - ); -} -__name(isPlainSafe, "isPlainSafe"); -function isPlainSafeFirst(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== CHAR_COLON && - c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && - c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && - c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && - c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; -} -__name(isPlainSafeFirst, "isPlainSafeFirst"); -function isPlainSafeLast(c3) { - return !isWhitespace(c3) && c3 !== CHAR_COLON; -} -__name(isPlainSafeLast, "isPlainSafeLast"); -function codePointAt(string, pos) { - var first2 = string.charCodeAt(pos), second; - if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -} -__name(codePointAt, "codePointAt"); -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} -__name(needIndentIndicator, "needIndentIndicator"); -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 i2; - 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 (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + __name(generateNextLine, "generateNextLine"); + function testImplicitResolving(state3, str) { + for (let index = 0, length = state3.implicitTypes.length; index < length; index += 1) if (state3.implicitTypes[index]. + resolve(str)) return true; + return false; + } + __name(testImplicitResolving, "testImplicitResolving"); + function isWhitespace(c3) { + return c3 === CHAR_SPACE || c3 === CHAR_TAB; + } + __name(isWhitespace, "isWhitespace"); + function isPrintable(c3) { + return c3 >= 32 && c3 <= 126 || c3 >= 161 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || c3 >= 57344 && c3 <= 65533 && + c3 !== CHAR_BOM || c3 >= 65536 && c3 <= 1114111; + } + __name(isPrintable, "isPrintable"); + function isNsCharOrWhitespace(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; + } + __name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); + function isPlainSafe(c3, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && + c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && + !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === + CHAR_COLON && cIsNsChar; + } + __name(isPlainSafe, "isPlainSafe"); + function isPlainSafeFirst(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== + CHAR_COLON && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && + c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && + c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && + c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; + } + __name(isPlainSafeFirst, "isPlainSafeFirst"); + function isPlainSafeLast(c3) { + return !isWhitespace(c3) && c3 !== CHAR_COLON; + } + __name(isPlainSafeLast, "isPlainSafeLast"); + function codePointAt(string, pos) { + const first2 = string.charCodeAt(pos); + let second; + if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first2 - 55296) * 1024 + second - 56320 + 65536; + } + return first2; + } + __name(codePointAt, "codePointAt"); + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + __name(needIndentIndicator, "needIndentIndicator"); + 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) { + let i2; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { char = codePointAt(string, i2); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. - i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; - previousLineBreak = i2; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } + if (!isPrintable(char)) return STYLE_DOUBLE; plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } - hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + - 1] !== " "); - } - if (!hasLineBreak && !hasFoldableLine) { - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } + else { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== + " "; + previousLineBreak = i2; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i2 - 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; } - 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; -} -__name(chooseScalarStyle, "chooseScalarStyle"); -function writeScalar(state3, string, level, iskey, inblock) { - state3.dump = (function() { - if (string.length === 0) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state3.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; - } - } - var indent = state3.indent * Math.max(1, level); - var lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); - var singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; - function testAmbiguity(string2) { - return testImplicitResolving(state3, string2); - } - __name(testAmbiguity, "testAmbiguity"); - switch (chooseScalarStyle( - string, - singleLineOnly, - state3.indent, - lineWidth, - testAmbiguity, - state3.quotingType, - state3.forceQuotes && !iskey, - inblock - )) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception("impossible error: invalid scalar style"); - } - })(); -} -__name(writeScalar, "writeScalar"); -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"; -} -__name(blockHeader, "blockHeader"); -function dropEndingNewline(string) { - return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; -} -__name(dropEndingNewline, "dropEndingNewline"); -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 prefix2 = match2[1], line = match2[2]; - moreIndented = line[0] === " "; - result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); - prevMoreIndented = moreIndented; + __name(chooseScalarStyle, "chooseScalarStyle"); + function writeScalar(state3, string, level, iskey, inblock) { + state3.dump = (function() { + if (string.length === 0) return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + if (!state3.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state3.quotingType === + QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + const indent = state3.indent * Math.max(1, level); + const lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); + const singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state3, string2); + } + __name(testAmbiguity, "testAmbiguity"); + switch (chooseScalarStyle(string, singleLineOnly, state3.indent, lineWidth, testAmbiguity, state3.quotingType, state3. + forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), + indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException2("impossible error: invalid scalar style"); + } + })(); } - return result; -} -__name(foldString, "foldString"); -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); -} -__name(foldLine, "foldLine"); -function escapeString(string) { - var result = ""; - var char = 0; - var escapeSeq; - for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - escapeSeq = ESCAPE_SEQUENCES[char]; - if (!escapeSeq && isPrintable(char)) { - result += string[i2]; - if (char >= 65536) result += string[i2 + 1]; - } else { - result += escapeSeq || encodeHex(char); + __name(writeScalar, "writeScalar"); + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + + "\n"; + } + __name(blockHeader, "blockHeader"); + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + __name(dropEndingNewline, "dropEndingNewline"); + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = (function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + })(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match2; + while (match2 = lineRe.exec(string)) { + const prefix2 = match2[1]; + const line = match2[2]; + moreIndented = line[0] === " "; + result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; } + return result; } - return result; -} -__name(escapeString, "escapeString"); -function writeFlowSequence(state3, level, object) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, false, - false)) { - if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); - _result += state3.dump; - } - } - state3.tag = _tag; - state3.dump = "[" + _result + "]"; -} -__name(writeFlowSequence, "writeFlowSequence"); -function writeBlockSequence(state3, level, object, compact) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, - level + 1, null, true, true, false, true)) { - if (!compact || _result !== "") { - _result += generateNextLine(state3, level); - } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - _result += "-"; - } else { - _result += "- "; - } - _result += state3.dump; + __name(foldString, "foldString"); + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match2; + let start = 0; + let end; + let curr = 0; + let next = 0; + let 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); + } + __name(foldLine, "foldLine"); + function escapeString(string) { + let result = ""; + let char = 0; + for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i2]; + if (char >= 65536) result += string[i2 + 1]; + } else result += escapeSeq || encodeHex(char); } + return result; } - state3.tag = _tag; - state3.dump = _result || "[]"; -} -__name(writeBlockSequence, "writeBlockSequence"); -function writeFlowMapping(state3, level, object) { - var _result = "", _tag = state3.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 (state3.condenseFlow) pairBuffer += '"'; - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level, objectKey, false, false)) { - continue; - } - if (state3.dump.length > 1024) pairBuffer += "? "; - pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); - if (!writeNode(state3, level, objectValue, false, false)) { - continue; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = "{" + _result + "}"; -} -__name(writeFlowMapping, "writeFlowMapping"); -function writeBlockMapping(state3, level, object, compact) { - var _result = "", _tag = state3.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, - pairBuffer; - if (state3.sortKeys === true) { - objectKeyList.sort(); - } else if (typeof state3.sortKeys === "function") { - objectKeyList.sort(state3.sortKeys); - } else if (state3.sortKeys) { - throw new exception("sortKeys must be a boolean or a function"); - } - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ""; - if (!compact || _result !== "") { - pairBuffer += generateNextLine(state3, level); - } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level + 1, objectKey, true, true, true)) { - continue; + __name(escapeString, "escapeString"); + function writeFlowSequence(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, + false, false)) { + if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); + _result += state3.dump; + } } - explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; - if (explicitPair) { - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += "?"; - } else { - pairBuffer += "? "; + state3.tag = _tag; + state3.dump = "[" + _result + "]"; + } + __name(writeFlowSequence, "writeFlowSequence"); + function writeBlockSequence(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, + level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") _result += generateNextLine(state3, level); + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state3.dump; } } - pairBuffer += state3.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state3, level); + state3.tag = _tag; + state3.dump = _result || "[]"; + } + __name(writeBlockSequence, "writeBlockSequence"); + function writeFlowMapping(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state3.condenseFlow) pairBuffer += '"'; + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level, objectKey, false, false)) continue; + if (state3.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); + if (!writeNode(state3, level, objectValue, false, false)) continue; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) { - continue; + state3.tag = _tag; + state3.dump = "{" + _result + "}"; + } + __name(writeFlowMapping, "writeFlowMapping"); + function writeBlockMapping(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + if (state3.sortKeys === true) objectKeyList.sort(); + else if (typeof state3.sortKeys === "function") objectKeyList.sort(state3.sortKeys); + else if (state3.sortKeys) throw new YAMLException2("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state3, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level + 1, objectKey, true, true, true)) continue; + const explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; + if (explicitPair) if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state3.dump; + if (explicitPair) pairBuffer += generateNextLine(state3, level); + if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) continue; + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += ":"; - } else { - pairBuffer += ": "; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = _result || "{}"; -} -__name(writeBlockMapping, "writeBlockMapping"); -function detectType(state3, object, explicit) { - var _result, typeList, index, length, type2, style; - typeList = explicit ? state3.explicitTypes : state3.implicitTypes; - for (index = 0, length = typeList.length; index < length; index += 1) { - type2 = typeList[index]; - if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2. - instanceOf) && (!type2.predicate || type2.predicate(object))) { - if (explicit) { - if (type2.multi && type2.representName) { - state3.tag = type2.representName(object); - } else { - state3.tag = type2.tag; - } - } else { - state3.tag = "?"; - } - if (type2.represent) { - style = state3.styleMap[type2.tag] || type2.defaultStyle; - if (_toString.call(type2.represent) === "[object Function]") { - _result = type2.represent(object, style); - } else if (_hasOwnProperty.call(type2.represent, style)) { - _result = type2.represent[style](object, style); - } else { - throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); + state3.tag = _tag; + state3.dump = _result || "{}"; + } + __name(writeBlockMapping, "writeBlockMapping"); + function detectType(state3, object, explicit) { + const typeList = explicit ? state3.explicitTypes : state3.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const 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) state3.tag = type.representName(object); + else state3.tag = type.tag; + else state3.tag = "?"; + if (type.represent) { + const style = state3.styleMap[type.tag] || type.defaultStyle; + let _result; + 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 YAMLException2("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + state3.dump = _result; } - state3.dump = _result; + return true; } - return true; } + return false; } - return false; -} -__name(detectType, "detectType"); -function writeNode(state3, level, object, block, compact, iskey, isblockseq) { - state3.tag = null; - state3.dump = object; - if (!detectType(state3, object, false)) { - detectType(state3, object, true); - } - var type2 = _toString.call(state3.dump); - var inblock = block; - var tagStr; - if (block) { - block = state3.flowLevel < 0 || state3.flowLevel > level; - } - var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate; - if (objectOrArray) { - duplicateIndex = state3.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) { - compact = false; - } - if (duplicate && state3.usedDuplicates[duplicateIndex]) { - state3.dump = "*ref_" + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) { - state3.usedDuplicates[duplicateIndex] = true; - } - if (type2 === "[object Object]") { - if (block && Object.keys(state3.dump).length !== 0) { + __name(detectType, "detectType"); + function writeNode(state3, level, object, block, compact, iskey, isblockseq) { + state3.tag = null; + state3.dump = object; + if (!detectType(state3, object, false)) detectType(state3, object, true); + const type = _toString.call(state3.dump); + const inblock = block; + if (block) block = state3.flowLevel < 0 || state3.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let duplicate; + if (objectOrArray) { + duplicateIndex = state3.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) compact = false; + if (duplicate && state3.usedDuplicates[duplicateIndex]) state3.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) state3.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state3.dump).length !== 0) { writeBlockMapping(state3, level, state3.dump, compact); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowMapping(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object Array]") { - if (block && state3.dump.length !== 0) { - if (state3.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state3, level - 1, state3.dump, compact); - } else { - writeBlockSequence(state3, level, state3.dump, compact); - } - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + else if (type === "[object Array]") if (block && state3.dump.length !== 0) { + if (state3.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state3, level - 1, state3.dump, compact); + else writeBlockSequence(state3, level, state3.dump, compact); + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowSequence(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object String]") { - if (state3.tag !== "?") { - writeScalar(state3, state3.dump, level, iskey, inblock); + else if (type === "[object String]") { + if (state3.tag !== "?") writeScalar(state3, state3.dump, level, iskey, inblock); + } else if (type === "[object Undefined]") return false; + else { + if (state3.skipInvalid) return false; + throw new YAMLException2("unacceptable kind of an object to dump " + type); } - } else if (type2 === "[object Undefined]") { - return false; - } else { - if (state3.skipInvalid) return false; - throw new exception("unacceptable kind of an object to dump " + type2); - } - if (state3.tag !== null && state3.tag !== "?") { - tagStr = encodeURI( - state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag - ).replace(/!/g, "%21"); - if (state3.tag[0] === "!") { - tagStr = "!" + tagStr; - } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { - tagStr = "!!" + tagStr.slice(18); - } else { - tagStr = "!<" + tagStr + ">"; + if (state3.tag !== null && state3.tag !== "?") { + let tagStr = encodeURI(state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag).replace(/!/g, "%21"); + if (state3.tag[0] === "!") tagStr = "!" + tagStr; + else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18); + else tagStr = "!<" + tagStr + ">"; + state3.dump = tagStr + " " + state3.dump; } - state3.dump = tagStr + " " + state3.dump; } + return true; } - return true; -} -__name(writeNode, "writeNode"); -function getDuplicateReferences(object, state3) { - var objects = [], duplicatesIndexes = [], index, length; - inspectNode(object, objects, duplicatesIndexes); - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state3.duplicates.push(objects[duplicatesIndexes[index]]); - } - state3.usedDuplicates = new Array(length); -} -__name(getDuplicateReferences, "getDuplicateReferences"); -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); - } + __name(writeNode, "writeNode"); + function getDuplicateReferences(object, state3) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state3.duplicates.push(objects[duplicatesIndexes[index]]); + state3.usedDuplicates = new Array(length); + } + __name(getDuplicateReferences, "getDuplicateReferences"); + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + objects.push(object); + if (Array.isArray(object)) for (let i2 = 0, length = object.length; i2 < length; i2 += 1) inspectNode(object[i2], + objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) inspectNode(object[objectKeyList[i2]], objects, + duplicatesIndexes); } } } } -} -__name(inspectNode, "inspectNode"); -function dump$1(input, options) { - options = options || {}; - var state3 = new State(options); - if (!state3.noRefs) getDuplicateReferences(input, state3); - var value = input; - if (state3.replacer) { - value = state3.replacer.call({ "": value }, "", value); + __name(inspectNode, "inspectNode"); + function dump2(input, options) { + options = options || {}; + const state3 = new State(options); + if (!state3.noRefs) getDuplicateReferences(input, state3); + let value = input; + if (state3.replacer) value = state3.replacer.call({ "": value }, "", value); + if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; + return ""; } - if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; - return ""; -} -__name(dump$1, "dump$1"); -var dump_1 = dump$1; -var dumper = { - dump: dump_1 -}; -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."); + __name(dump2, "dump"); + module2.exports.dump = dump2; +})); +var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var loader = 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 saf\ +e by default."); + }; + } + __name(renamed, "renamed"); + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.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() }; -} -__name(renamed, "renamed"); -var Type = type; -var Schema = schema; -var FAILSAFE_SCHEMA = failsafe; -var JSON_SCHEMA = json; -var CORE_SCHEMA = core; -var DEFAULT_SCHEMA = _default; -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var YAMLException = exception; -var types = { - binary, - float, - map, - null: _null, - pairs, - set, - timestamp, - bool, - int, - merge: merge2, - omap, - seq, - str -}; -var safeLoad = renamed("safeLoad", "load"); -var safeLoadAll = renamed("safeLoadAll", "loadAll"); -var safeDump = renamed("safeDump", "dump"); -var jsYaml = { - Type, - Schema, - FAILSAFE_SCHEMA, - JSON_SCHEMA, - CORE_SCHEMA, - DEFAULT_SCHEMA, - load, - loadAll, - dump, - YAMLException, - types, - safeLoad, - safeLoadAll, - safeDump -}; + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); +})))(), 1); +var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, +safeLoad, safeLoadAll, safeDump } = import_js_yaml.default; +var index_vite_proxy_tmp_default = import_js_yaml.default; // cloud-deploy/src/utils/error-handler.js var handleError = /* @__PURE__ */ __name(async (errorMessage, action6) => { @@ -107524,9 +107304,9 @@ var get_revisions_default = getRevisions; // cloud-deploy/src/utils/add-namespace.js var addNamespace = /* @__PURE__ */ __name(async (content, namespace2) => { - const json2 = jsYaml.load(content); - json2.metadata.namespace = namespace2; - return jsYaml.dump(json2); + const json = index_vite_proxy_tmp_default.load(content); + json.metadata.namespace = namespace2; + return index_vite_proxy_tmp_default.dump(json); }, "addNamespace"); // cloud-deploy/src/utils/cluster-connection.js @@ -107554,8 +107334,8 @@ var accessSecretValue = /* @__PURE__ */ __name(async (projectId, name) => execGc ], "gcloud", true -).then(JSON.parse).then((json2) => json2.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), -"accessSecretValue"); +).then(JSON.parse).then((json) => json.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), "\ +accessSecretValue"); var loadSecret = /* @__PURE__ */ __name(async (serviceAccountKey, name) => with_gcloud_default(serviceAccountKey, async (projectId) => { const value = await accessSecretValue(projectId, name).then((secret) => { setSecret(secret); @@ -108572,9 +108352,9 @@ var volumeSetup = /* @__PURE__ */ __name((opa, protocol) => { } return volumes; }, "volumeSetup"); -var userContainerVolumeMountSetup = /* @__PURE__ */ __name((opa, protocol, type2, volumes, name) => { +var userContainerVolumeMountSetup = /* @__PURE__ */ __name((opa, protocol, type, volumes, name) => { const volumeMounts2 = []; - if (volumes && type2.toLowerCase() === "statefulset") { + if (volumes && type.toLowerCase() === "statefulset") { volumeMounts2.push({ mountPath: volumes[0]["mount-path"], name }); } if (opa) { @@ -108593,13 +108373,13 @@ var getStorageClassName = /* @__PURE__ */ __name((diskType) => { if (diskType === "hdd") return "standard"; return "premium-rwo"; }, "getStorageClassName"); -var gkeManifestTemplate = /* @__PURE__ */ __name(async (name, type2, image, minInstances, maxInstances, cpuThreshold, cpuRequest, memoryRequest, environment, labels, opa, protocol, volumes, opaCpu, opaMemory, monitoring, deployEnv, availability, baseAnnotations, cors, terminationGracePeriod, securityPreviewTag) => { +var gkeManifestTemplate = /* @__PURE__ */ __name(async (name, type, image, minInstances, maxInstances, cpuThreshold, cpuRequest, memoryRequest, environment, labels, opa, protocol, volumes, opaCpu, opaMemory, monitoring, deployEnv, availability, baseAnnotations, cors, terminationGracePeriod, securityPreviewTag) => { let annotations = {}; const deploymentVolumes = volumeSetup(opa, protocol); const userVolumeMounts = userContainerVolumeMountSetup( opa, protocol, - type2, + type, volumes, name ); @@ -108667,7 +108447,7 @@ var gkeManifestTemplate = /* @__PURE__ */ __name(async (name, type2, image, minI } const deployment = { apiVersion: "apps/v1", - kind: type2, + kind: type, metadata: { name, namespace: name, @@ -108683,7 +108463,7 @@ var gkeManifestTemplate = /* @__PURE__ */ __name(async (name, type2, image, minI app: name } }, - ...volumes && type2.toLowerCase() === "statefulset" ? { + ...volumes && type.toLowerCase() === "statefulset" ? { volumeClaimTemplates: [ { metadata: { @@ -108806,7 +108586,7 @@ var gkeManifestTemplate = /* @__PURE__ */ __name(async (name, type2, image, minI spec: { scaleTargetRef: { apiVersion: "apps/v1", - kind: type2, + kind: type, name }, minReplicas: minInstances, @@ -109106,7 +108886,7 @@ var removeScalerConfiguration = /* @__PURE__ */ __name(async (service) => gcloud true, true ).catch(() => true), "removeScalerConfiguration"); -var configMapManifest = /* @__PURE__ */ __name(async (service, type2, CPU, Memory, scaling) => { +var configMapManifest = /* @__PURE__ */ __name(async (service, type, CPU, Memory, scaling) => { const { "increments-cpu": incrementsCPU, threshold, @@ -109121,7 +108901,7 @@ var configMapManifest = /* @__PURE__ */ __name(async (service, type2, CPU, Memor "configmap", "vpa-scaler-configuration", `--namespace=${service}`, - `--from-literal=type=${type2}`, + `--from-literal=type=${type}`, `--from-literal=incrementsCPU=${convertCPU(incrementsCPU)}`, `--from-literal=thresholdCPU=${threshold}%`, `--from-literal=thresholdKafkaLag=${kafkaThreshold}`, @@ -109140,7 +108920,7 @@ var configMapManifest = /* @__PURE__ */ __name(async (service, type2, CPU, Memor }, "configMapManifest"); // cloud-deploy/src/manifests/build-manifest.js -var convertToYaml = /* @__PURE__ */ __name((json2) => jsYaml.dump(json2), "convertToYaml"); +var convertToYaml = /* @__PURE__ */ __name((json) => index_vite_proxy_tmp_default.dump(json), "convertToYaml"); var createSkaffoldManifest = /* @__PURE__ */ __name(async (target) => { let apiVersion = "skaffold/v2beta16"; const kind = "Config"; @@ -109232,7 +109012,7 @@ var buildManifest = /* @__PURE__ */ __name(async (image, deployYaml, projectId, "job-trigger": `${jobTrigger}` }; const { - type: type2 = {}, + type = {}, service: name, protocol, availability = null, @@ -109326,7 +109106,7 @@ var buildManifest = /* @__PURE__ */ __name(async (image, deployYaml, projectId, const terminationGracePeriod = kubernetes["termination-grace-period"] || 90; const manifests = await gkeManifestTemplate( name, - type2, + type, image, minInstances, maxInstances, @@ -109354,7 +109134,7 @@ var buildManifest = /* @__PURE__ */ __name(async (image, deployYaml, projectId, "k8s(deploy)-configmap.yaml", await configMapManifest( name, - type2, + type, resources.cpu, resources.memory, scaling.vertical @@ -109363,7 +109143,7 @@ var buildManifest = /* @__PURE__ */ __name(async (image, deployYaml, projectId, } else { await removeScalerConfiguration(name); } - if (type2 === "StatefulSet" && volumes) { + if (type === "StatefulSet" && volumes) { await statefulset_workaround_default(name, volumes[0].size); } const convertedManifests = manifests.map((doc) => convertToYaml(doc)).join("---\n"); @@ -110073,11 +109853,11 @@ var sendScaleSetup = /* @__PURE__ */ __name(async (service, projectid, region, p }; return sendRequest2(url3, data); }, "sendScaleSetup"); -var sendDeployInfo = /* @__PURE__ */ __name(async (service, timestamp2, version3, projectid, githubrepository, githubsha, slackchannel) => { +var sendDeployInfo = /* @__PURE__ */ __name(async (service, timestamp, version3, projectid, githubrepository, githubsha, slackchannel) => { const url3 = "/deployinfo/add"; const data = { service, - timestamp: timestamp2, + timestamp, version: version3, projectid, githubrepository, @@ -111116,7 +110896,7 @@ var action5 = /* @__PURE__ */ __name(async () => { info(`Provided image ${userImage} resolved to ${image}`); const { timeout = 300, - type: type2 = "cloud-run", + type = "cloud-run", service: serviceName, protocol, "internal-traffic": internalTraffic = true, @@ -111224,7 +111004,7 @@ var action5 = /* @__PURE__ */ __name(async () => { } if (env2 === "prod") { const requests = []; - const timestamp2 = (/* @__PURE__ */ new Date()).toISOString(); + const timestamp = (/* @__PURE__ */ new Date()).toISOString(); const githubRepository = `https://github.com/${process.env.GITHUB_REPOSITORY}`; const githubSHA = process.env.GITHUB_SHA; const slackChannel = await load_credentials_default( @@ -111236,7 +111016,7 @@ var action5 = /* @__PURE__ */ __name(async () => { requests.push( sendDeployInfo( serviceName, - timestamp2, + timestamp, version3, projectID, githubRepository, @@ -111275,7 +111055,7 @@ clan_slack_channel", "CLAN_SLACK_CHANNEL").catch( serviceName, projectID, platform: platformGKE ? "kubernetes" : "cloud-run", - type: type2, + type, protocol, timeout, region: "europe-west1", @@ -111393,5 +111173,5 @@ run-parallel/index.js: (*! run-parallel. MIT License. Feross Aboukhadijeh *) js-yaml/dist/js-yaml.mjs: - (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + (*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/component-tests/dist/index.cjs b/component-tests/dist/index.cjs index c91f571aa..422c1b7f2 100644 --- a/component-tests/dist/index.cjs +++ b/component-tests/dist/index.cjs @@ -36,31 +36,31 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { + var type = typeof val; + if (type === "string" && val.length > 0) { return parse(val); - } else if (type2 === "number" && isFinite(val)) { + } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse(str2) { - str2 = String(str2); - if (str2.length > 100) { + function parse(str) { + str = String(str); + if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i. exec( - str2 + str ); if (!match) { return; } var n = parseFloat(match[1]); - var type2 = (match[2] || "ms").toLowerCase(); - switch (type2) { + var type = (match[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -217,7 +217,7 @@ var require_common = __commonJS({ debug3.namespace = namespace; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace); - debug3.extend = extend3; + debug3.extend = extend; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, @@ -242,12 +242,12 @@ var require_common = __commonJS({ return debug3; } __name(createDebug, "createDebug"); - function extend3(namespace, delimiter) { + function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } - __name(extend3, "extend"); + __name(extend, "extend"); function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; @@ -808,7 +808,7 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; @@ -863,8 +863,8 @@ var require_src2 = __commonJS({ } } __name(check, "check"); - function exists3(path, type2 = exports2.READABLE) { - return check(path, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0); + function exists3(path, type = exports2.READABLE) { + return check(path, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0); } __name(exists3, "exists"); exports2.exists = exists3; @@ -5499,12 +5499,12 @@ var require_data_url = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -5520,7 +5520,7 @@ var require_data_url = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -5657,28 +5657,28 @@ var require_data_url = __commonJS({ return char === 13 || char === 10 || char === 9 || char === 32; } __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); - function removeHTTPWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); } __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; } __name(isASCIIWhitespace, "isASCIIWhitespace"); - function removeASCIIWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isASCIIWhitespace); + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); } __name(removeASCIIWhitespace, "removeASCIIWhitespace"); - function removeChars(str2, leading, trailing, predicate) { + function removeChars(str, leading, trailing, predicate) { let lead = 0; - let trail = str2.length - 1; + let trail = str.length - 1; if (leading) { - while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; } if (trailing) { - while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; } - return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } __name(removeChars, "removeChars"); function isomorphicDecode(input) { @@ -5757,7 +5757,7 @@ var require_data_url = __commonJS({ var require_webidl = __commonJS({ "node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { "use strict"; - var { types, inspect } = require("node:util"); + var { types: types2, inspect } = require("node:util"); var { markAsUncloneable } = require("node:worker_threads"); var { toUSVString } = require_util(); var webidl = {}; @@ -5899,8 +5899,8 @@ var require_webidl = __commonJS({ return r2; }; webidl.util.Stringify = function(V) { - const type2 = webidl.util.Type(V); - switch (type2) { + const type = webidl.util.Type(V); + switch (type) { case "Symbol": return `Symbol(${V.description})`; case "Object": @@ -5920,7 +5920,7 @@ var require_webidl = __commonJS({ }); } const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq2 = []; + const seq = []; let index = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ @@ -5933,9 +5933,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq2.push(converter(value, prefix, `${argument}[${index++}]`)); + seq.push(converter(value, prefix, `${argument}[${index++}]`)); } - return seq2; + return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -5947,7 +5947,7 @@ var require_webidl = __commonJS({ }); } const result = {}; - if (!types.isProxy(O)) { + if (!types2.isProxy(O)) { const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; for (const key of keys2) { const typedKey = keyConverter(key, prefix, argument); @@ -5981,11 +5981,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix, argument) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: prefix, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -6077,14 +6077,14 @@ var require_webidl = __commonJS({ return x2; }; webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { + if (webidl.util.Type(V) !== "Object" || !types2.isAnyArrayBuffer(V)) { throw webidl.errors.conversionFailed({ prefix, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBuffer"] }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -6099,14 +6099,14 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.TypedArray = function(V, T, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { + if (webidl.util.Type(V) !== "Object" || !types2.isTypedArray(V) || V.constructor.name !== T.name) { throw webidl.errors.conversionFailed({ prefix, argument: `${name} ("${webidl.util.Stringify(V)}")`, types: [T.name] }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -6121,13 +6121,13 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.DataView = function(V, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { + if (webidl.util.Type(V) !== "Object" || !types2.isDataView(V)) { throw webidl.errors.exception({ header: prefix, message: `${name} is not a DataView.` }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -6142,13 +6142,13 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.BufferSource = function(V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { + if (types2.isAnyArrayBuffer(V)) { return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }); } - if (types.isTypedArray(V)) { + if (types2.isTypedArray(V)) { return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }); } - if (types.isDataView(V)) { + if (types2.isDataView(V)) { return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }); } throw webidl.errors.conversionFailed({ @@ -6335,8 +6335,8 @@ ption"); } } __name(appendRequestOriginHeader, "appendRequestOriginHeader"); - function coarsenTime(timestamp2, crossOriginIsolatedCapability) { - return timestamp2; + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; } __name(coarsenTime, "coarsenTime"); function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { @@ -7684,13 +7684,13 @@ var require_body = __commonJS({ let action2 = null; let source = null; let length = null; - let type2 = null; + let type = null; if (typeof object === "string") { source = object; - type2 = "text/plain;charset=UTF-8"; + type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (isArrayBuffer(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { @@ -7699,8 +7699,8 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = /* @__PURE__ */ __name((str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "\ -%22"), "escape"); + const escape2 = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%\ +22"), "escape"); const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinef\ eeds"); const blobParts = []; @@ -7746,12 +7746,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }, "action"); - type2 = `multipart/form-data; boundary=${boundary}`; + type = `multipart/form-data; boundary=${boundary}`; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { - type2 = object.type; + type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { @@ -7797,7 +7797,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } const body = { stream, source, length }; - return [body, type2]; + return [body, type]; } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { @@ -8093,14 +8093,14 @@ var require_client_h1 = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(delay2, type2) { - if (delay2 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + setTimeout(delay2, type) { + if (delay2 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { if (this.timeout) { timers.clearTimeout(this.timeout); this.timeout = null; } if (delay2) { - if (type2 & USE_FAST_TIMER) { + if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay2, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay2, new WeakRef(this)); @@ -8113,7 +8113,7 @@ var require_client_h1 = __commonJS({ this.timeout.refresh(); } } - this.timeoutType = type2; + this.timeoutType = type; } resume() { if (this.socket.destroyed || !this.paused) { @@ -9153,9 +9153,9 @@ var require_client_h2 = __commonJS({ this[kClient][kOnError](err); } __name(onHttp2SessionError, "onHttp2SessionError"); - function onHttp2FrameError(type2, code, id) { + function onHttp2FrameError(type, code, id) { if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -9347,8 +9347,8 @@ var require_client_h2 = __commonJS({ stream.once("error", function(err) { abort(err); }); - stream.once("frameError", (type2, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); return true; function writeBodyH2() { @@ -11745,7 +11745,7 @@ var require_readable = __commonJS({ return util.isDisturbed(self) || isLocked(self); } __name(isUnusable, "isUnusable"); - async function consume(stream, type2) { + async function consume(stream, type) { assert(!stream[kConsume]); return new Promise((resolve, reject) => { if (isUnusable(stream)) { @@ -11762,7 +11762,7 @@ var require_readable = __commonJS({ } else { queueMicrotask(() => { stream[kConsume] = { - type: type2, + type, stream, resolve, reject, @@ -11838,17 +11838,17 @@ var require_readable = __commonJS({ } __name(chunksConcat, "chunksConcat"); function consumeEnd(consume2) { - const { type: type2, body, resolve, stream, length } = consume2; + const { type, body, resolve, stream, length } = consume2; try { - if (type2 === "text") { + if (type === "text") { resolve(chunksDecode(body, length)); - } else if (type2 === "json") { + } else if (type === "json") { resolve(JSON.parse(chunksDecode(body, length))); - } else if (type2 === "arrayBuffer") { + } else if (type === "arrayBuffer") { resolve(chunksConcat(body, length).buffer); - } else if (type2 === "blob") { + } else if (type === "blob") { resolve(new Blob(body, { type: stream[kContentType] })); - } else if (type2 === "bytes") { + } else if (type === "bytes") { resolve(chunksConcat(body, length)); } consumeFinish(consume2); @@ -14039,10 +14039,10 @@ var require_dns = __commonJS({ return ip; } setRecords(origin, addresses) { - const timestamp2 = Date.now(); + const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; for (const record of addresses) { - record.timestamp = timestamp2; + record.timestamp = timestamp; if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); } else { @@ -14661,7 +14661,7 @@ var require_response = __commonJS({ var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); var assert = require("node:assert"); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { static { @@ -14722,8 +14722,8 @@ var require_response = __commonJS({ setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; if (body != null) { - const [extractedBody, type2] = extractBody(body); - bodyWithType = { body: extractedBody, type: type2 }; + const [extractedBody, type] = extractBody(body); + bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } @@ -14897,18 +14897,18 @@ var require_response = __commonJS({ }); } __name(makeFilteredResponse, "makeFilteredResponse"); - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -14916,7 +14916,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -14995,7 +14995,7 @@ rtError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("R if (isBlobLike(V)) { return webidl.converters.Blob(V, prefix, name, { strict: false }); } - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + if (ArrayBuffer.isView(V) || types2.isArrayBuffer(V)) { return webidl.converters.BufferSource(V, prefix, name); } if (util.isFormDataLike(V)) { @@ -16215,13 +16215,13 @@ processBodyError"); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type2 = blob.type; + const type = blob.type; if (!request.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; const rangeHeader = request.headersList.get("range", true); @@ -16241,7 +16241,7 @@ processBodyError"); rangeEnd = fullLength - 1; } } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type2); + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); const slicedBodyWithType = extractBody(slicedBlob); response.body = slicedBodyWithType[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); @@ -16249,7 +16249,7 @@ processBodyError"); response.status = 206; response.statusText = "Partial Content"; response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); response.headersList.set("content-range", contentRange, true); } return Promise.resolve(response); @@ -16918,10 +16918,10 @@ var require_progressevent = __commonJS({ static { __name(this, "ProgressEvent"); } - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2, "ProgressEvent constructor", "type"); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -17280,7 +17280,7 @@ var require_util4 = __commonJS({ var { ProgressEvent } = require_progressevent(); var { getEncoding } = require_encoding(); var { serializeAMimeType, parseMIMEType } = require_data_url(); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var { StringDecoder } = require("string_decoder"); var { btoa } = require("node:buffer"); var staticPropertyDescriptors = { @@ -17288,7 +17288,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException("Invalid state", "InvalidStateError"); } @@ -17310,7 +17310,7 @@ var require_util4 = __commonJS({ }); } isFirstChunk = false; - if (!done && types.isUint8Array(value)) { + if (!done && types2.isUint8Array(value)) { bytes.push(value); if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { fr[kLastProgressEventFired] = Date.now(); @@ -17323,7 +17323,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -17365,8 +17365,8 @@ var require_util4 = __commonJS({ reader.dispatchEvent(event); } __name(fireAProgressEvent, "fireAProgressEvent"); - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -17387,9 +17387,9 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { @@ -18808,9 +18808,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, "setCookie"); webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify(cookie); - if (str2) { - headers.append("Set-Cookie", str2); + const str = stringify(cookie); + if (str) { + headers.append("Set-Cookie", str); } } __name(setCookie, "setCookie"); @@ -18903,17 +18903,17 @@ var require_events = __commonJS({ __name(this, "MessageEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { - if (type2 === kConstruct) { + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { super(arguments[1], arguments[2]); webidl.util.markAsUncloneable(this); return; } const prefix = "MessageEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -18940,10 +18940,10 @@ var require_events = __commonJS({ } return this.#eventInit.ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -18953,8 +18953,8 @@ var require_events = __commonJS({ ports }); } - static createFastMessageEvent(type2, init) { - const messageEvent = new _MessageEvent(kConstruct, type2, init); + static createFastMessageEvent(type, init) { + const messageEvent = new _MessageEvent(kConstruct, type, init); messageEvent.#eventInit = init; messageEvent.#eventInit.data ??= null; messageEvent.#eventInit.origin ??= ""; @@ -18971,12 +18971,12 @@ var require_events = __commonJS({ __name(this, "CloseEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { const prefix = "CloseEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -18998,12 +18998,12 @@ var require_events = __commonJS({ __name(this, "ErrorEvent"); } #eventInit; - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { const prefix = "ErrorEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - super(type2, eventInitDict); + super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -19264,24 +19264,24 @@ var require_util7 = __commonJS({ return ws[kReadyState] === states.CLOSED; } __name(isClosed, "isClosed"); - function fireEvent(e, target, eventFactory = (type2, init) => new Event(type2, init), eventInitDict = {}) { + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { const event = eventFactory(e, eventInitDict); target.dispatchEvent(event); } __name(fireEvent, "fireEvent"); - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = utf8Decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -19347,7 +19347,7 @@ var require_util7 = __commonJS({ response.socket.destroy(); } if (reason) { - fireEvent("error", ws, (type2, init) => new ErrorEvent(type2, init), { + fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { error: new Error(reason), message: reason }); @@ -19669,7 +19669,7 @@ var require_connection = __commonJS({ code = 1006; } ws[kReadyState] = states.CLOSED; - fireEvent("close", ws, (type2, init) => new CloseEvent(type2, init), { + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { wasClean, code, reason @@ -20223,7 +20223,7 @@ var require_websocket = __commonJS({ var { ByteParser } = require_receiver(); var { kEnumerableProperty, isBlobLike } = require_util(); var { getGlobalDispatcher } = require_global2(); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var { ErrorEvent, CloseEvent } = require_events(); var { SendQueue } = require_sender(); var WebSocket = class _WebSocket extends EventTarget { @@ -20350,7 +20350,7 @@ ns"); this.#sendQueue.add(data, () => { this.#bufferedAmount -= length; }, sendHints.string); - } else if (types.isArrayBuffer(data)) { + } else if (types2.isArrayBuffer(data)) { this.#bufferedAmount += data.byteLength; this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.byteLength; @@ -20455,12 +20455,12 @@ ns"); webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } /** @@ -20556,7 +20556,7 @@ ns"); if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + if (ArrayBuffer.isView(V) || types2.isArrayBuffer(V)) { return webidl.converters.BufferSource(V); } } @@ -22167,8 +22167,8 @@ var require_truncate = __commonJS({ } return version.format(); }, "doTruncation"); - var isPrerelease = /* @__PURE__ */ __name((type2) => { - return type2.startsWith("pre"); + var isPrerelease = /* @__PURE__ */ __name((type) => { + return type.startsWith("pre"); }, "isPrerelease"); module2.exports = truncate; } @@ -22573,20 +22573,20 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }, "hyphenReplace"); - var testSet = /* @__PURE__ */ __name((set2, version, options) => { - for (let i2 = 0; i2 < set2.length; i2++) { - if (!set2[i2].test(version)) { + var testSet = /* @__PURE__ */ __name((set, version, options) => { + for (let i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { - for (let i2 = 0; i2 < set2.length; i2++) { - debug3(set2[i2].semver); - if (set2[i2].semver === Comparator.ANY) { + for (let i2 = 0; i2 < set.length; i2++) { + debug3(set[i2].semver); + if (set[i2].semver === Comparator.ANY) { continue; } - if (set2[i2].semver.prerelease.length > 0) { - const allowed = set2[i2].semver; + if (set[i2].semver.prerelease.length > 0) { + const allowed = set[i2].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } @@ -22986,7 +22986,7 @@ var require_simplify = __commonJS({ var satisfies3 = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { - const set2 = []; + const set = []; let first2 = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); @@ -22999,17 +22999,17 @@ var require_simplify = __commonJS({ } } else { if (prev) { - set2.push([first2, prev]); + set.push([first2, prev]); } prev = null; first2 = null; } } if (first2) { - set2.push([first2, null]); + set.push([first2, null]); } const ranges = []; - for (const [min, max] of set2) { + for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { @@ -32104,11 +32104,11 @@ var require_mime_types = __commonJS({ exports2.lookup = lookup; exports2.types = /* @__PURE__ */ Object.create(null); populateMaps(exports2.extensions, exports2.types); - function charset(type2) { - if (!type2 || typeof type2 !== "string") { + function charset(type) { + if (!type || typeof type !== "string") { return false; } - var match = EXTRACT_TYPE_REGEXP.exec(type2); + var match = EXTRACT_TYPE_REGEXP.exec(type); var mime = match && db[match[1].toLowerCase()]; if (mime && mime.charset) { return mime.charset; @@ -32119,11 +32119,11 @@ var require_mime_types = __commonJS({ return false; } __name(charset, "charset"); - function contentType(str2) { - if (!str2 || typeof str2 !== "string") { + function contentType(str) { + if (!str || typeof str !== "string") { return false; } - var mime = str2.indexOf("/") === -1 ? exports2.lookup(str2) : str2; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } @@ -32134,11 +32134,11 @@ var require_mime_types = __commonJS({ return mime; } __name(contentType, "contentType"); - function extension(type2) { - if (!type2 || typeof type2 !== "string") { + function extension(type) { + if (!type || typeof type !== "string") { return false; } - var match = EXTRACT_TYPE_REGEXP.exec(type2); + var match = EXTRACT_TYPE_REGEXP.exec(type); var exts = match && exports2.extensions[match[1].toLowerCase()]; if (!exts || !exts.length) { return false; @@ -32157,26 +32157,26 @@ var require_mime_types = __commonJS({ return exports2.types[extension2] || false; } __name(lookup, "lookup"); - function populateMaps(extensions, types) { + function populateMaps(extensions, types2) { var preference = ["nginx", "apache", void 0, "iana"]; - Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type2) { - var mime = db[type2]; + Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type) { + var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { return; } - extensions[type2] = exts; + extensions[type] = exts; for (var i2 = 0; i2 < exts.length; i2++) { var extension2 = exts[i2]; - if (types[extension2]) { - var from = preference.indexOf(db[types[extension2]].source); + if (types2[extension2]) { + var from = preference.indexOf(db[types2[extension2]].source); var to = preference.indexOf(mime.source); - if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr( + if (types2[extension2] !== "application/octet-stream" && (from > to || from === to && types2[extension2].substr( 0, 12) === "application/")) { continue; } } - types[extension2] = type2; + types2[extension2] = type; } }, "forEachMimeType")); } @@ -32705,14 +32705,14 @@ var require_implementation = __commonJS({ return arr; }, "slicy"); var joiny = /* @__PURE__ */ __name(function(arr, joiner) { - var str2 = ""; + var str = ""; for (var i2 = 0; i2 < arr.length; i2 += 1) { - str2 += arr[i2]; + str += arr[i2]; if (i2 + 1 < arr.length) { - str2 += joiner; + str += joiner; } } - return str2; + return str; }, "joiny"); module2.exports = /* @__PURE__ */ __name(function bind(that) { var target = this; @@ -33688,21 +33688,21 @@ size") : null; prototype ? function(O) { return O.__proto__; } : null); - function addNumericSeparator(num, str2) { - if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str2)) { - return str2; + function addNumericSeparator(num, str) { + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { + return str; } var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof num === "number") { - var int2 = num < 0 ? -$floor(-num) : $floor(num); - if (int2 !== num) { - var intStr = String(int2); - var dec = $slice.call(str2, intStr.length + 1); + var int = num < 0 ? -$floor(-num) : $floor(num); + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); } } - return $replace.call(str2, sepRegex, "$&_"); + return $replace.call(str, sepRegex, "$&_"); } __name(addNumericSeparator, "addNumericSeparator"); var utilInspect = require_util_inspect(); @@ -33755,8 +33755,8 @@ size") : null; if (obj === 0) { return Infinity / obj > 0 ? "0" : "-0"; } - var str2 = String(obj); - return numericSeparator ? addNumericSeparator(obj, str2) : str2; + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; } if (typeof obj === "bigint") { var bigIntStr = String(obj) + "n"; @@ -33877,7 +33877,7 @@ size") : null; if (isBigInt(obj)) { return markBoxed(inspect(bigIntValueOf.call(obj))); } - if (isBoolean2(obj)) { + if (isBoolean(obj)) { return markBoxed(booleanValueOf.call(obj)); } if (isString(obj)) { @@ -33947,10 +33947,10 @@ size") : null; return toStr(obj) === "[object Number]" && canTrustToString(obj); } __name(isNumber, "isNumber"); - function isBoolean2(obj) { + function isBoolean(obj) { return toStr(obj) === "[object Boolean]" && canTrustToString(obj); } - __name(isBoolean2, "isBoolean"); + __name(isBoolean, "isBoolean"); function isSymbol(obj) { if (hasShammedSymbols) { return obj && typeof obj === "object" && obj instanceof Symbol; @@ -34105,15 +34105,15 @@ size") : null; return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function"; } __name(isElement, "isElement"); - function inspectString(str2, opts) { - if (str2.length > opts.maxStringLength) { - var remaining = str2.length - opts.maxStringLength; + function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); - return inspectString($slice.call(str2, 0, opts.maxStringLength), opts) + trailer; + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; } var quoteRE = quoteREs[opts.quoteStyle || "single"]; quoteRE.lastIndex = 0; - var s = $replace.call($replace.call(str2, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); + var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); return wrapQuotes(s, "single", opts); } __name(inspectString, "inspectString"); @@ -34132,17 +34132,17 @@ size") : null; return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); } __name(lowbyte, "lowbyte"); - function markBoxed(str2) { - return "Object(" + str2 + ")"; + function markBoxed(str) { + return "Object(" + str + ")"; } __name(markBoxed, "markBoxed"); - function weakCollectionOf(type2) { - return type2 + " { ? }"; + function weakCollectionOf(type) { + return type + " { ? }"; } __name(weakCollectionOf, "weakCollectionOf"); - function collectionOf(type2, size, entries, indent) { + function collectionOf(type, size, entries, indent) { var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", "); - return type2 + " (" + size + ") {" + joinedEntries + "}"; + return type + " (" + size + ") {" + joinedEntries + "}"; } __name(collectionOf, "collectionOf"); function singleLineValues(xs) { @@ -34586,7 +34586,7 @@ var require_utils2 = __commonJS({ } return obj; }, "arrayToObject"); - var merge2 = /* @__PURE__ */ __name(function merge3(target, source, options) { + var merge = /* @__PURE__ */ __name(function merge2(target, source, options) { if (!source) { return target; } @@ -34637,7 +34637,7 @@ var require_utils2 = __commonJS({ if (has.call(target, i2)) { var targetItem = target[i2]; if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { - target[i2] = merge3(targetItem, item, options); + target[i2] = merge2(targetItem, item, options); } else { target[target.length] = item; } @@ -34650,7 +34650,7 @@ var require_utils2 = __commonJS({ return Object.keys(source).reduce(function(acc, key) { var value = source[key]; if (has.call(acc, key)) { - acc[key] = merge3(acc[key], value, options); + acc[key] = merge2(acc[key], value, options); } else { acc[key] = value; } @@ -34672,8 +34672,8 @@ var require_utils2 = __commonJS({ return acc; }, target); }, "assignSingleSource"); - var decode = /* @__PURE__ */ __name(function(str2, defaultDecoder, charset) { - var strWithoutPlus = str2.replace(/\+/g, " "); + var decode = /* @__PURE__ */ __name(function(str, defaultDecoder, charset) { + var strWithoutPlus = str.replace(/\+/g, " "); if (charset === "iso-8859-1") { return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); } @@ -34684,15 +34684,15 @@ var require_utils2 = __commonJS({ } }, "decode"); var limit = 1024; - var encode = /* @__PURE__ */ __name(function encode2(str2, defaultEncoder, charset, kind, format) { - if (str2.length === 0) { - return str2; + var encode = /* @__PURE__ */ __name(function encode2(str, defaultEncoder, charset, kind, format) { + if (str.length === 0) { + return str; } - var string = str2; - if (typeof str2 === "symbol") { - string = Symbol.prototype.toString.call(str2); - } else if (typeof str2 !== "string") { - string = String(str2); + var string = str; + if (typeof str === "symbol") { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== "string") { + string = String(str); } if (charset === "iso-8859-1") { return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { @@ -34794,7 +34794,7 @@ var require_utils2 = __commonJS({ isRegExp, markOverflow, maybeMap, - merge: merge2 + merge }; } }); @@ -34815,7 +34815,7 @@ var require_stringify = __commonJS({ indices: /* @__PURE__ */ __name(function indices(prefix, key) { return prefix + "[" + key + "]"; }, "indices"), - repeat: /* @__PURE__ */ __name(function repeat2(prefix) { + repeat: /* @__PURE__ */ __name(function repeat(prefix) { return prefix; }, "repeat") }; @@ -35121,8 +35121,8 @@ var require_parse3 = __commonJS({ strictNullHandling: false, throwOnLimitExceeded: false }; - var interpretNumericEntities = /* @__PURE__ */ __name(function(str2) { - return str2.replace(/&#(\d+);/g, function($0, numberStr) { + var interpretNumericEntities = /* @__PURE__ */ __name(function(str) { + return str.replace(/&#(\d+);/g, function($0, numberStr) { return String.fromCharCode(parseInt(numberStr, 10)); }); }, "interpretNumericEntities"); @@ -35138,9 +35138,9 @@ var require_parse3 = __commonJS({ }, "parseArrayValue"); var isoSentinel = "utf8=%26%2310003%3B"; var charsetSentinel = "utf8=%E2%9C%93"; - var parseValues = /* @__PURE__ */ __name(function parseQueryStringValues(str2, options) { + var parseValues = /* @__PURE__ */ __name(function parseQueryStringValues(str, options) { var obj = { __proto__: null }; - var cleanStr = options.ignoreQueryPrefix ? str2.replace(/^\?/, "") : str2; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; var parts = cleanStr.split( @@ -35395,17 +35395,17 @@ owed."); throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false }; }, "normalizeParseOptions"); - module2.exports = function(str2, opts) { + module2.exports = function(str, opts) { var options = normalizeParseOptions(opts); - if (str2 === "" || str2 === null || typeof str2 === "undefined") { + if (str === "" || str === null || typeof str === "undefined") { return options.plainObjects ? { __proto__: null } : {}; } - var tempObj = typeof str2 === "string" ? parseValues(str2, options) : str2; + var tempObj = typeof str === "string" ? parseValues(str, options) : str; var obj = options.plainObjects ? { __proto__: null } : {}; var keys = Object.keys(tempObj); for (var i2 = 0; i2 < keys.length; ++i2) { var key = keys[i2]; - var newObj = parseKeys(key, tempObj[key], options, typeof str2 === "string"); + var newObj = parseKeys(key, tempObj[key], options, typeof str === "string"); obj = utils.merge(obj, newObj, options); } if (options.allowSparse === true) { @@ -35447,11 +35447,11 @@ var require_Mime = __commonJS({ } __name(Mime, "Mime"); Mime.prototype.define = function(typeMap, force) { - for (let type2 in typeMap) { - let extensions = typeMap[type2].map(function(t2) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t2) { return t2.toLowerCase(); }); - type2 = type2.toLowerCase(); + type = type.toLowerCase(); for (let i2 = 0; i2 < extensions.length; i2++) { const ext = extensions[i2]; if (ext[0] === "*") { @@ -35459,15 +35459,15 @@ var require_Mime = __commonJS({ } if (!force && ext in this._types) { throw new Error( - 'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type2 + '".\ - Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type2 + '".' + 'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". \ +Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".' ); } - this._types[ext] = type2; + this._types[ext] = type; } - if (force || !this._extensions[type2]) { + if (force || !this._extensions[type]) { const ext = extensions[0]; - this._extensions[type2] = ext[0] !== "*" ? ext : ext.substr(1); + this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1); } } }; @@ -35479,9 +35479,9 @@ var require_Mime = __commonJS({ let hasDot = ext.length < last2.length - 1; return (hasDot || !hasPath) && this._types[ext] || null; }; - Mime.prototype.getExtension = function(type2) { - type2 = /^\s*([^;\s]*)/.test(type2) && RegExp.$1; - return type2 && this._extensions[type2.toLowerCase()] || null; + Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; }; module2.exports = Mime; } @@ -36116,10 +36116,10 @@ var require_utils3 = __commonJS({ } } __name(asyncLoop, "asyncLoop"); - function utf8ToBytes(str2) { - if (typeof str2 !== "string") + function utf8ToBytes(str) { + if (typeof str !== "string") throw new Error("string expected"); - return new Uint8Array(new TextEncoder().encode(str2)); + return new Uint8Array(new TextEncoder().encode(str)); } __name(utf8ToBytes, "utf8ToBytes"); function bytesToUtf8(bytes) { @@ -36766,7 +36766,7 @@ var require_dist3 = __commonJS({ }); } toJSON() { - const json2 = { + const json = { size: this.size, filepath: this.filepath, newFilename: this.newFilename, @@ -36776,9 +36776,9 @@ var require_dist3 = __commonJS({ originalFilename: this.originalFilename }; if (this.hash && this.hash !== "") { - json2.hash = this.hash; + json.hash = this.hash; } - return json2; + return json; } toString() { return `PersistentFile: ${this.newFilename}, Original: ${this.originalFilename}, Path: ${this.filepath}`; @@ -36842,7 +36842,7 @@ var require_dist3 = __commonJS({ this._writeStream.destroy(); } toJSON() { - const json2 = { + const json = { size: this.size, newFilename: this.newFilename, length: this.length, @@ -36850,9 +36850,9 @@ var require_dist3 = __commonJS({ mimetype: this.mimetype }; if (this.hash && this.hash !== "") { - json2.hash = this.hash; + json.hash = this.hash; } - return json2; + return json; } toString() { return `VolatileFile: ${this.originalFilename}`; @@ -37015,9 +37015,9 @@ var require_dist3 = __commonJS({ done(); } } - initWithBoundary(str2) { + initWithBoundary(str) { this.boundary = Buffer.from(`\r ---${str2}`); +--${str}`); this.lookbehind = Buffer.alloc(this.boundary.length + 8); this.state = STATE.START; this.boundaryChars = {}; @@ -38014,11 +38014,11 @@ ta`, // able to get composed extension with multiple dots // "a.b.c" -> ".b.c" // as opposed to path.extname -> ".c" - _getExtension(str2) { - if (!str2) { + _getExtension(str) { + if (!str) { return ""; } - const basename = path.basename(str2); + const basename = path.basename(str); const firstDot = basename.indexOf("."); const lastDot = basename.lastIndexOf("."); let rawExtname = path.extname(basename); @@ -38178,48 +38178,48 @@ var require_cookiejar = __commonJS({ } __name(Cookie, "Cookie"); exports2.Cookie = Cookie; - Cookie.prototype.toString = /* @__PURE__ */ __name(function toString2() { - var str2 = [this.name + "=" + this.value]; + Cookie.prototype.toString = /* @__PURE__ */ __name(function toString() { + var str = [this.name + "=" + this.value]; if (this.expiration_date !== Infinity) { - str2.push("expires=" + new Date(this.expiration_date).toGMTString()); + str.push("expires=" + new Date(this.expiration_date).toGMTString()); } if (this.domain) { - str2.push("domain=" + this.domain); + str.push("domain=" + this.domain); } if (this.path) { - str2.push("path=" + this.path); + str.push("path=" + this.path); } if (this.secure) { - str2.push("secure"); + str.push("secure"); } if (this.noscript) { - str2.push("httponly"); + str.push("httponly"); } - return str2.join("; "); + return str.join("; "); }, "toString"); Cookie.prototype.toValueString = /* @__PURE__ */ __name(function toValueString() { return this.name + "=" + this.value; }, "toValueString"); var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; - Cookie.prototype.parse = /* @__PURE__ */ __name(function parse(str2, request_domain, request_path) { + Cookie.prototype.parse = /* @__PURE__ */ __name(function parse(str, request_domain, request_path) { if (this instanceof Cookie) { - if (str2.length > 32768) { + if (str.length > 32768) { console.warn("Cookie too long for parsing (>32768 characters)"); return; } - var parts = str2.split(";").filter(function(value2) { + var parts = str.split(";").filter(function(value2) { return !!value2; }); var i2; var pair = parts[0].match(/([^=]+)=([\s\S]*)/); if (!pair) { - console.warn("Invalid cookie header encountered. Header: '" + str2 + "'"); + console.warn("Invalid cookie header encountered. Header: '" + str + "'"); return; } var key = pair[1]; var value = pair[2]; if (typeof key !== "string" || key.length === 0 || typeof value !== "string") { - console.warn("Unable to extract values from cookie header. Cookie: '" + str2 + "'"); + console.warn("Unable to extract values from cookie header. Cookie: '" + str + "'"); return; } this.name = key; @@ -38256,7 +38256,7 @@ var require_cookiejar = __commonJS({ } return this; } - return new Cookie().parse(str2, request_domain, request_path); + return new Cookie().parse(str, request_domain, request_path); }, "parse"); Cookie.prototype.matches = /* @__PURE__ */ __name(function matches(access_info) { if (access_info === CookieAccessInfo.All) { @@ -38357,7 +38357,7 @@ var require_cookiejar = __commonJS({ matches.push(cookie); } } - matches.toString = /* @__PURE__ */ __name(function toString2() { + matches.toString = /* @__PURE__ */ __name(function toString() { return matches.join(":"); }, "toString"); matches.toValueString = /* @__PURE__ */ __name(function toValueString() { @@ -38663,7 +38663,7 @@ var require_request_base = __commonJS({ "node_modules/superagent/lib/request-base.js"(exports2, module2) { "use strict"; var { - isObject: isObject2, + isObject, hasOwn } = require_utils4(); module2.exports = RequestBase; @@ -38817,7 +38817,7 @@ all .end() if you use promises"); }; RequestBase.prototype.getHeader = RequestBase.prototype.get; RequestBase.prototype.set = function(field, value) { - if (isObject2(field)) { + if (isObject(field)) { for (const key in field) { if (hasOwn(field, key)) this.set(key, field[key]); } @@ -38839,7 +38839,7 @@ all .end() if you use promises"); if (this._data) { throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"); } - if (isObject2(name)) { + if (isObject(name)) { for (const key in name) { if (hasOwn(name, key)) this.field(key, name[key]); } @@ -38916,8 +38916,8 @@ all .end() if you use promises"); }; }; RequestBase.prototype.send = function(data) { - const isObject_ = isObject2(data); - let type2 = this._header["content-type"]; + const isObject_ = isObject(data); + let type = this._header["content-type"]; if (this._formData) { throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field(\ ) & .attach()"); @@ -38931,17 +38931,17 @@ all .end() if you use promises"); } else if (data && this._data && this._isHost(this._data)) { throw new Error("Can't merge these send calls"); } - if (isObject_ && isObject2(this._data)) { + if (isObject_ && isObject(this._data)) { for (const key in data) { if (typeof data[key] == "bigint" && !data[key].toJSON) throw new Error("Cannot serialize BigInt value to json"); if (hasOwn(data, key)) this._data[key] = data[key]; } } else if (typeof data === "bigint") throw new Error("Cannot send value of type BigInt"); else if (typeof data === "string") { - if (!type2) this.type("form"); - type2 = this._header["content-type"]; - if (type2) type2 = type2.toLowerCase().trim(); - if (type2 === "application/x-www-form-urlencoded") { + if (!type) this.type("form"); + type = this._header["content-type"]; + if (type) type = type.toLowerCase().trim(); + if (type === "application/x-www-form-urlencoded") { this._data = this._data ? `${this._data}&${data}` : data; } else { this._data = (this._data || "") + data; @@ -38952,7 +38952,7 @@ all .end() if you use promises"); if (!isObject_ || this._isHost(data)) { return this; } - if (!type2) this.type("json"); + if (!type) this.type("json"); return this; }; RequestBase.prototype.sortQuery = function(sort) { @@ -39084,7 +39084,7 @@ var require_http2wrapper = __commonJS({ throw new Error("Unsupported protocol", this.protocol); } } - setNoDelay(bool2) { + setNoDelay(bool) { } getFrame() { if (this.frame) { @@ -39222,8 +39222,8 @@ var require_unzip = __commonJS({ stream.emit("error", error2); }); res.pipe(decompresser); - res.setEncoding = (type2) => { - decoder = new StringDecoder(type2); + res.setEncoding = (type) => { + decoder = new StringDecoder(type); }; decompresser.on("data", (buf) => { if (decoder) { @@ -39237,14 +39237,14 @@ var require_unzip = __commonJS({ stream.emit("end"); }); const _on = res.on; - res.on = function(type2, fn) { - if (type2 === "data" || type2 === "end") { - stream.on(type2, fn.bind(res)); - } else if (type2 === "error") { - stream.on(type2, fn.bind(res)); - _on.call(res, type2, fn); + res.on = function(type, fn) { + if (type === "data" || type === "end") { + stream.on(type, fn.bind(res)); + } else if (type === "error") { + stream.on(type, fn.bind(res)); + _on.call(res, type, fn); } else { - _on.call(res, type2, fn); + _on.call(res, type, fn); } return this; }; @@ -39280,16 +39280,16 @@ var require_response_base = __commonJS({ } }; ResponseBase.prototype._setStatusProperties = function(status) { - const type2 = Math.trunc(status / 100); + const type = Math.trunc(status / 100); this.statusCode = status; this.status = this.statusCode; - this.statusType = type2; - this.info = type2 === 1; - this.ok = type2 === 2; - this.redirect = type2 === 3; - this.clientError = type2 === 4; - this.serverError = type2 === 5; - this.error = type2 === 4 || type2 === 5 ? this.toError() : false; + this.statusType = type; + this.info = type === 1; + this.ok = type === 2; + this.redirect = type === 3; + this.clientError = type === 4; + this.serverError = type === 5; + this.error = type === 4 || type === 5 ? this.toError() : false; this.created = status === 201; this.accepted = status === 202; this.noContent = status === 204; @@ -39536,7 +39536,7 @@ var require_urlencoded = __commonJS({ }); // node_modules/superagent/lib/node/parsers/json.js -var require_json = __commonJS({ +var require_json2 = __commonJS({ "node_modules/superagent/lib/node/parsers/json.js"(exports2, module2) { "use strict"; module2.exports = function(res, fn) { @@ -39598,13 +39598,13 @@ var require_parsers = __commonJS({ "node_modules/superagent/lib/node/parsers/index.js"(exports2) { "use strict"; exports2["application/x-www-form-urlencoded"] = require_urlencoded(); - exports2["application/json"] = require_json(); + exports2["application/json"] = require_json2(); exports2.text = require_text(); exports2["application/json-seq"] = exports2.text; - var binary2 = require_image(); - exports2["application/octet-stream"] = binary2; - exports2["application/pdf"] = binary2; - exports2.image = binary2; + var binary = require_image(); + exports2["application/octet-stream"] = binary; + exports2["application/pdf"] = binary; + exports2.image = binary; } }); @@ -39715,11 +39715,11 @@ var require_node2 = __commonJS({ __name(Request, "Request"); util.inherits(Request, Stream); mixin(Request.prototype, RequestBase.prototype); - Request.prototype.http2 = function(bool2) { + Request.prototype.http2 = function(bool) { if (exports2.protocols["http2:"] === void 0) { throw new Error("superagent: this version of Node.js does not support http2"); } - this._enableHttp2 = bool2 === void 0 ? true : bool2; + this._enableHttp2 = bool === void 0 ? true : bool; return this; }; Request.prototype.attach = function(field, file, options) { @@ -39772,11 +39772,11 @@ var require_node2 = __commonJS({ this._lookup = lookup; return this; }; - Request.prototype.type = function(type2) { - return this.set("Content-Type", type2.includes("/") ? type2 : mime.getType(type2)); + Request.prototype.type = function(type) { + return this.set("Content-Type", type.includes("/") ? type : mime.getType(type)); }; - Request.prototype.accept = function(type2) { - return this.set("Accept", type2.includes("/") ? type2 : mime.getType(type2)); + Request.prototype.accept = function(type) { + return this.set("Accept", type.includes("/") ? type : mime.getType(type)); }; Request.prototype.query = function(value) { if (typeof value === "string") { @@ -40122,9 +40122,9 @@ var require_node2 = __commonJS({ } const max = this._maxRedirects; const mime2 = utils.type(res.headers["content-type"] || "") || "text/plain"; - let type2 = mime2.split("/")[0]; - if (type2) type2 = type2.toLowerCase().trim(); - const multipart = type2 === "multipart"; + let type = mime2.split("/")[0]; + if (type) type = type.toLowerCase().trim(); + const multipart = type === "multipart"; const redirect = isRedirect(res.statusCode); const responseType = this._responseType; this.res = res; @@ -40185,12 +40185,12 @@ gured. Call `req.buffer(true or false)` or set `superagent.buffer[mime] = true o }); }, "parser"); buffer = true; - } else if (isBinary2(mime2)) { + } else if (isBinary(mime2)) { parser4 = exports2.parse.image; buffer = true; } else if (exports2.parse[mime2]) { parser4 = exports2.parse[mime2]; - } else if (type2 === "text") { + } else if (type === "text") { parser4 = exports2.parse.text; buffer = buffer !== false; } else if (isJSON(mime2)) { @@ -40366,20 +40366,20 @@ gured. Call `req.buffer(true or false)` or set `superagent.buffer[mime] = true o } function isText(mime2) { const parts = mime2.split("/"); - let type2 = parts[0]; - if (type2) type2 = type2.toLowerCase().trim(); + let type = parts[0]; + if (type) type = type.toLowerCase().trim(); let subtype = parts[1]; if (subtype) subtype = subtype.toLowerCase().trim(); - return type2 === "text" || subtype === "x-www-form-urlencoded"; + return type === "text" || subtype === "x-www-form-urlencoded"; } __name(isText, "isText"); - function isBinary2(mime2) { + function isBinary(mime2) { let [registry, name] = mime2.split("/"); if (registry) registry = registry.toLowerCase().trim(); if (name) name = name.toLowerCase().trim(); return ["audio", "font", "image", "video"].includes(registry) || ["gz", "gzip"].includes(name); } - __name(isBinary2, "isBinary"); + __name(isBinary, "isBinary"); function isJSON(mime2) { return /[/+]json($|[^-\w])/i.test(mime2); } @@ -40911,11 +40911,11 @@ var require_assertion = __commonJS({ }); return cookie; }; - Assertion.parse = function(str2, options) { - if (typeof str2 !== "string") throw new TypeError("argument str must be a string"); + Assertion.parse = function(str, options) { + if (typeof str !== "string") throw new TypeError("argument str must be a string"); if (typeof options !== "object") options = {}; let decode = options.decode || decodeURIComponent; - let parts = str2.split(/; */); + let parts = str.split(/; */); let cookie = {}; parts.forEach(function(part, i2) { if (i2 === 1) cookie.options = {}; @@ -41438,8 +41438,8 @@ function asArray(source) { return Array.isArray(source) ? source : [source]; } __name(asArray, "asArray"); -function asCamelCase(str2) { - return str2.replace(/[\s-]+(.)/g, (_all, chr) => { +function asCamelCase(str) { + return str.replace(/[\s-]+(.)/g, (_all, chr) => { return chr.toUpperCase(); }); } @@ -41512,8 +41512,8 @@ function filterType(input, filter, def) { } __name(filterType, "filterType"); function filterPrimitives(input, omit) { - const type2 = r(input) ? "string" : typeof input; - return /number|string|boolean/.test(type2) && (!omit || !omit.includes(type2)); + const type = r(input) ? "string" : typeof input; + return /number|string|boolean/.test(type) && (!omit || !omit.includes(type)); } __name(filterPrimitives, "filterPrimitives"); function filterPlainObject(input) { @@ -42661,14 +42661,14 @@ var init_git_executor_chain = __esm({ return gitError; } async attemptRemoteTask(task, logger) { - const binary2 = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); + const binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); const args = this._plugins.exec("spawn.args", [...task.commands], { ...pluginContext(task, task.commands), env: { ...this.env } }); const raw = await this.gitResponse( task, - binary2, + binary, args, this.outputHandler, logger.step("SPAWN") @@ -43866,11 +43866,11 @@ function mergeTask(customArgs) { commands: ["merge", ...customArgs], format: "utf-8", parser(stdOut, stdErr) { - const merge2 = parseMergeResult(stdOut, stdErr); - if (merge2.failed) { - throw new GitResponseError(merge2); + const merge = parseMergeResult(stdOut, stdErr); + if (merge.failed) { + throw new GitResponseError(merge); } - return merge2; + return merge; } }; } @@ -43916,8 +43916,8 @@ var init_parse_push = __esm({ local }; }), - new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type2]) => { - result.pushed.push(pushResultPushedItem(local, remote, type2)); + new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); }), new LineParser( /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, @@ -44158,9 +44158,9 @@ var init_StatusSummary = __esm({ result.renamed.push(renamedFile(file)); }), parser3("R", "M", (result, file) => { - const renamed2 = renamedFile(file); - result.renamed.push(renamed2); - result.modified.push(renamed2.to); + const renamed = renamedFile(file); + result.renamed.push(renamed); + result.modified.push(renamed.to); }), parser3("!", "!", (_result, _file) => { (_result.ignored = _result.ignored || []).push(_file); @@ -46157,564 +46157,549 @@ var IS_MAC = process.platform === "darwin"; var import_promises = require("node:fs/promises"); // node_modules/js-yaml/dist/js-yaml.mjs -function isNothing(subject) { - return typeof subject === "undefined" || subject === null; -} -__name(isNothing, "isNothing"); -function isObject(subject) { - return typeof subject === "object" && subject !== null; -} -__name(isObject, "isObject"); -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - return [sequence]; -} -__name(toArray, "toArray"); -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]; - } - } - return target; -} -__name(extend, "extend"); -function repeat(string, count) { - var result = "", cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - return result; -} -__name(repeat, "repeat"); -function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; -} -__name(isNegativeZero, "isNegativeZero"); -var isNothing_1 = isNothing; -var isObject_1 = isObject; -var toArray_1 = toArray; -var repeat_1 = repeat; -var isNegativeZero_1 = isNegativeZero; -var extend_1 = extend; -var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 -}; -function formatError(exception2, compact) { - var where = "", message = exception2.reason || "(unknown reason)"; - if (!exception2.mark) return message; - if (exception2.mark.name) { - where += 'in "' + exception2.mark.name + '" '; - } - where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; - if (!compact && exception2.mark.snippet) { - where += "\n\n" + exception2.mark.snippet; - } - return message + " " + where; -} -__name(formatError, "formatError"); -function YAMLException$1(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 || ""; - } -} -__name(YAMLException$1, "YAMLException$1"); -YAMLException$1.prototype = Object.create(Error.prototype); -YAMLException$1.prototype.constructor = YAMLException$1; -YAMLException$1.prototype.toString = /* @__PURE__ */ __name(function toString(compact) { - return this.name + ": " + formatError(this, compact); -}, "toString"); -var exception = YAMLException$1; -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 - }; -} -__name(getLine, "getLine"); -function padStart(string, max) { - return common.repeat(" ", max - string.length) + string; -} -__name(padStart, "padStart"); -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 match; - var foundLineNo = -1; - while (match = re.exec(mark.buffer)) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - var result = "", i2, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - for (i2 = 1; i2 <= options.linesBefore; i2++) { - if (foundLineNo - i2 < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i2], - lineEnds[foundLineNo - i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), - maxLineLength - ); - result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 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 (i2 = 1; i2 <= options.linesAfter; i2++) { - if (foundLineNo + i2 >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i2], - lineEnds[foundLineNo + i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), - maxLineLength - ); - result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n"; +var __create2 = Object.create; +var __defProp3 = Object.defineProperty; +var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames3 = Object.getOwnPropertyNames; +var __getProtoOf2 = Object.getPrototypeOf; +var __hasOwnProp3 = Object.prototype.hasOwnProperty; +var __commonJSMin = /* @__PURE__ */ __name((cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), +mod.exports), "__commonJSMin"); +var __copyProps3 = /* @__PURE__ */ __name((to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames3(from), i2 = 0, n = keys. + length, key; i2 < n; i2++) { + key = keys[i2]; + if (!__hasOwnProp3.call(to, key) && key !== except) __defProp3(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable + }); } - return result.replace(/\n$/, ""); -} -__name(makeSnippet, "makeSnippet"); -var snippet = makeSnippet; -var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" -]; -var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" -]; -function compileStyleAliases(map2) { - var result = {}; - if (map2 !== null) { - Object.keys(map2).forEach(function(style) { - map2[style].forEach(function(alias) { + return to; +}, "__copyProps"); +var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : +{}, __copyProps3(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { + value: mod, + enumerable: true +}) : target, mod)), "__toESM"); +var require_common2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + __name(isNothing, "isNothing"); + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + __name(isObject, "isObject"); + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + __name(toArray, "toArray"); + function extend(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + __name(extend, "extend"); + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; + } + __name(repeat, "repeat"); + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + __name(isNegativeZero, "isNegativeZero"); + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; +})); +var require_exception = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function formatError(exception, compact) { + let where = ""; + const 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; + } + __name(formatError, "formatError"); + function YAMLException2(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 = (/* @__PURE__ */ new Error()).stack || ""; + } + __name(YAMLException2, "YAMLException"); + YAMLException2.prototype = Object.create(Error.prototype); + YAMLException2.prototype.constructor = YAMLException2; + YAMLException2.prototype.toString = /* @__PURE__ */ __name(function toString(compact) { + return this.name + ": " + formatError(this, compact); + }, "toString"); + module2.exports = YAMLException2; +})); +var require_snippet = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common2(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const 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 + }; + } + __name(getLine, "getLine"); + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + __name(padStart, "padStart"); + 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; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match; + let foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2; + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i2 = 1; i2 <= options.linesBefore; i2++) { + if (foundLineNo - i2 < 0) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i2], lineEnds[foundLineNo - i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo - i2]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n" + result; + } + const 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 (let i2 = 1; i2 <= options.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i2], lineEnds[foundLineNo + i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo + i2]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n"; + } + return result.replace(/\n$/, ""); + } + __name(makeSnippet, "makeSnippet"); + module2.exports = makeSnippet; +})); +var require_type2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { result[String(alias)] = style; }); }); - } - return result; -} -__name(compileStyleAliases, "compileStyleAliases"); -function Type$1(tag, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('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 exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} -__name(Type$1, "Type$1"); -var type = Type$1; -function compileList(schema2, name) { - var result = []; - schema2[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; - } + return result; + } + __name(compileStyleAliases, "compileStyleAliases"); + function Type2(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException2('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 YAMLException2('Unknown kind "' + this.kind + '" is specifi\ +ed for "' + tag + '" YAML type.'); + } + __name(Type2, "Type"); + module2.exports = Type2; +})); +var require_schema = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var Type2 = require_type2(); + function compileList(schema, name) { + const result = []; + schema[name].forEach(function(currentType) { + let 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; }); - result[newIndex] = currentType; + return result; + } + __name(compileList, "compileList"); + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + 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; + } + __name(collectType, "collectType"); + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; + } + __name(compileMap, "compileMap"); + function Schema2(definition) { + return this.extend(definition); + } + __name(Schema2, "Schema"); + Schema2.prototype.extend = /* @__PURE__ */ __name(function extend(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type2) 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 YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implic\ +it: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException2("There is a non-scalar type in the impli\ +cit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can o\ +nly be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + }); + const result = Object.create(Schema2.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; + }, "extend"); + module2.exports = Schema2; +})); +var require_str = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : ""; + }, "construct") }); - return result; -} -__name(compileList, "compileList"); -function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type2) { - if (type2.multi) { - result.multi[type2.kind].push(type2); - result.multi["fallback"].push(type2); - } else { - result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; - } - } - __name(collectType, "collectType"); - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} -__name(compileMap, "compileMap"); -function Schema$1(definition) { - return this.extend(definition); -} -__name(Schema$1, "Schema$1"); -Schema$1.prototype.extend = /* @__PURE__ */ __name(function extend2(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 exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], e\ -xplicit: [...] })"); - } - implicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type$1.loadKind && type$1.loadKind !== "scalar") { - throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types\ - is not supported."); - } - if (type$1.multi) { - throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as expl\ -icit."); - } +})); +var require_seq = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : []; + }, "construct") }); - explicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } +})); +var require_map = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : {}; + }, "construct") }); - var result = Object.create(Schema$1.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; -}, "extend"); -var schema = Schema$1; -var str = new type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : ""; - }, "construct") -}); -var seq = new type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : []; - }, "construct") -}); -var map = new type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : {}; - }, "construct") -}); -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); -function resolveYamlNull(data) { - if (data === null) return true; - var max = data.length; - return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); -} -__name(resolveYamlNull, "resolveYamlNull"); -function constructYamlNull() { - return null; -} -__name(constructYamlNull, "constructYamlNull"); -function isNull(object) { - return object === null; -} -__name(isNull, "isNull"); -var _null = new type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: /* @__PURE__ */ __name(function() { - return "~"; - }, "canonical"), - lowercase: /* @__PURE__ */ __name(function() { - return "null"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function() { - return "NULL"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function() { - return "Null"; - }, "camelcase"), - empty: /* @__PURE__ */ __name(function() { - return ""; - }, "empty") - }, - defaultStyle: "lowercase" -}); -function resolveYamlBoolean(data) { - if (data === null) return false; - var max = data.length; - return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === - "False" || data === "FALSE"); -} -__name(resolveYamlBoolean, "resolveYamlBoolean"); -function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; -} -__name(constructYamlBoolean, "constructYamlBoolean"); -function isBoolean(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; -} -__name(isBoolean, "isBoolean"); -var bool = new type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: /* @__PURE__ */ __name(function(object) { - return object ? "true" : "false"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function(object) { - return object ? "TRUE" : "FALSE"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function(object) { - return object ? "True" : "False"; - }, "camelcase") - }, - defaultStyle: "lowercase" -}); -function isHexCode(c3) { - return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102; -} -__name(isHexCode, "isHexCode"); -function isOctCode(c3) { - return 48 <= c3 && c3 <= 55; -} -__name(isOctCode, "isOctCode"); -function isDecCode(c3) { - return 48 <= c3 && c3 <= 57; -} -__name(isDecCode, "isDecCode"); -function resolveYamlInteger(data) { - if (data === null) return false; - var max = data.length, index = 0, hasDigits = false, ch; - if (!max) return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; - } - if (ch === "0") { - if (index + 1 === max) return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max; 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 < max; 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 < max; 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 < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; +})); +var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_schema())({ explicit: [ + require_str(), + require_seq(), + require_map() + ] }); +})); +var require_null = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + __name(resolveYamlNull, "resolveYamlNull"); + function constructYamlNull() { + return null; + } + __name(constructYamlNull, "constructYamlNull"); + function isNull(object) { + return object === null; + } + __name(isNull, "isNull"); + module2.exports = new Type2("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: /* @__PURE__ */ __name(function() { + return "~"; + }, "canonical"), + lowercase: /* @__PURE__ */ __name(function() { + return "null"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function() { + return "NULL"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function() { + return "Null"; + }, "camelcase"), + empty: /* @__PURE__ */ __name(function() { + return ""; + }, "empty") + }, + defaultStyle: "lowercase" + }); +})); +var require_bool = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === + "False" || data === "FALSE"); + } + __name(resolveYamlBoolean, "resolveYamlBoolean"); + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + __name(constructYamlBoolean, "constructYamlBoolean"); + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + __name(isBoolean, "isBoolean"); + module2.exports = new Type2("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: /* @__PURE__ */ __name(function(object) { + return object ? "true" : "false"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function(object) { + return object ? "TRUE" : "FALSE"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function(object) { + return object ? "True" : "False"; + }, "camelcase") + }, + defaultStyle: "lowercase" + }); +})); +var require_int = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common2(); + var Type2 = require_type2(); + function isHexCode(c3) { + return c3 >= 48 && c3 <= 57 || c3 >= 65 && c3 <= 70 || c3 >= 97 && c3 <= 102; + } + __name(isHexCode, "isHexCode"); + function isOctCode(c3) { + return c3 >= 48 && c3 <= 55; + } + __name(isOctCode, "isOctCode"); + function isDecCode(c3) { + return c3 >= 48 && c3 <= 57; + } + __name(isDecCode, "isDecCode"); + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + __name(resolveYamlInteger, "resolveYamlInteger"); + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + 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); + } + __name(parseYamlInteger, "parseYamlInteger"); + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + __name(constructYamlInteger, "constructYamlInteger"); + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + __name(isInteger, "isInteger"); + module2.exports = new Type2("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, "binary"), + octal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, "octal"), + decimal: /* @__PURE__ */ __name(function(obj) { + return obj.toString(10); + }, "decimal"), + hexadecimal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + }, "hexadecimal") + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] } - hasDigits = true; - } - if (!hasDigits || ch === "_") return false; - return true; -} -__name(resolveYamlInteger, "resolveYamlInteger"); -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); - } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") sign = -1; - value = value.slice(1); - ch = value[0]; - } - 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); -} -__name(constructYamlInteger, "constructYamlInteger"); -function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); -} -__name(isInteger, "isInteger"); -var int = new type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, "binary"), - octal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, "octal"), - decimal: /* @__PURE__ */ __name(function(obj) { - return obj.toString(10); - }, "decimal"), - /* eslint-disable max-len */ - hexadecimal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - }, "hexadecimal") - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } -}); -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; -} -__name(resolveYamlFloat, "resolveYamlFloat"); -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); -} -__name(constructYamlFloat, "constructYamlFloat"); -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; -function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { + }); +})); +var require_float = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common2(); + var Type2 = require_type2(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[\ +eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + __name(resolveYamlFloat, "resolveYamlFloat"); + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const 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); + } + __name(constructYamlFloat, "constructYamlFloat"); + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { case "lowercase": return ".nan"; case "uppercase": @@ -46722,8 +46707,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".NaN"; } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { + else if (Number.POSITIVE_INFINITY === object) switch (style) { case "lowercase": return ".inf"; case "uppercase": @@ -46731,8 +46715,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".Inf"; } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { + else if (Number.NEGATIVE_INFINITY === object) switch (style) { case "lowercase": return "-.inf"; case "uppercase": @@ -46740,2163 +46723,1996 @@ function representYamlFloat(object, style) { case "camelcase": return "-.Inf"; } - } else if (common.isNegativeZero(object)) { - return "-0.0"; + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + __name(representYamlFloat, "representYamlFloat"); + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + __name(isFloat, "isFloat"); + module2.exports = new Type2("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); +})); +var require_json = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_failsafe().extend({ implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] }); +})); +var require_core = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_json(); +})); +var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ 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; } - res = object.toString(10); - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; -} -__name(representYamlFloat, "representYamlFloat"); -function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); -} -__name(isFloat, "isFloat"); -var float = new type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" -}); -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); -var core = json; -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; -} -__name(resolveYamlTimestamp, "resolveYamlTimestamp"); -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - if (match === null) throw new Error("Date resolve error"); - year = +match[1]; - month = +match[2] - 1; - day = +match[3]; - if (!match[4]) { - return new Date(Date.UTC(year, month, day)); - } - hour = +match[4]; - minute = +match[5]; - second = +match[6]; - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { - fraction += "0"; - } - fraction = +fraction; - } - if (match[9]) { - tz_hour = +match[10]; - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 6e4; - if (match[9] === "-") delta = -delta; - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (delta) date.setTime(date.getTime() - delta); - return date; -} -__name(constructYamlTimestamp, "constructYamlTimestamp"); -function representYamlTimestamp(object) { - return object.toISOString(); -} -__name(representYamlTimestamp, "representYamlTimestamp"); -var timestamp = new type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); -function resolveYamlMerge(data) { - return data === "<<" || data === null; -} -__name(resolveYamlMerge, "resolveYamlMerge"); -var merge = new type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge -}); -var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; -function resolveYamlBinary(data) { - if (data === null) return false; - var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - code = map2.indexOf(data.charAt(idx)); - if (code > 64) continue; - if (code < 0) return false; - bitlen += 6; - } - return bitlen % 8 === 0; -} -__name(resolveYamlBinary, "resolveYamlBinary"); -function constructYamlBinary(data) { - var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; - for (idx = 0; idx < max; idx++) { - if (idx % 4 === 0 && idx) { + __name(resolveYamlTimestamp, "resolveYamlTimestamp"); + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + const year = +match[1]; + const month = +match[2] - 1; + const day = +match[3]; + if (!match[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match[4]; + const minute = +match[5]; + const second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match[9]) { + const tzHour = +match[10]; + const tzMinute = +(match[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + __name(constructYamlTimestamp, "constructYamlTimestamp"); + function representYamlTimestamp(object) { + return object.toISOString(); + } + __name(representYamlTimestamp, "representYamlTimestamp"); + module2.exports = new Type2("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); +})); +var require_merge = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + __name(resolveYamlMerge, "resolveYamlMerge"); + module2.exports = new Type2("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); +})); +var require_binary = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + __name(resolveYamlBinary, "resolveYamlBinary"); + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 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); + } + __name(constructYamlBinary, "constructYamlBinary"); + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + __name(representYamlBinary, "representYamlBinary"); + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + __name(isBinary, "isBinary"); + module2.exports = new Type2("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); +})); +var require_omap = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; } - bits = bits << 6 | map2.indexOf(input.charAt(idx)); - } - tailbits = max % 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); -} -__name(constructYamlBinary, "constructYamlBinary"); -function representYamlBinary(object) { - var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - if (idx % 3 === 0 && idx) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } - bits = (bits << 8) + object[idx]; - } - tail = max % 3; - if (tail === 0) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } else if (tail === 2) { - result += map2[bits >> 10 & 63]; - result += map2[bits >> 4 & 63]; - result += map2[bits << 2 & 63]; - result += map2[64]; - } else if (tail === 1) { - result += map2[bits >> 2 & 63]; - result += map2[bits << 4 & 63]; - result += map2[64]; - result += map2[64]; + return true; } - return result; -} -__name(representYamlBinary, "representYamlBinary"); -function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; -} -__name(isBinary, "isBinary"); -var binary = new type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = 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$2.call(pair) !== "[object Object]") return false; - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - if (!pairHasKey) return false; - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; + __name(resolveYamlOmap, "resolveYamlOmap"); + function constructYamlOmap(data) { + return data !== null ? data : []; } - return true; -} -__name(resolveYamlOmap, "resolveYamlOmap"); -function constructYamlOmap(data) { - return data !== null ? data : []; -} -__name(constructYamlOmap, "constructYamlOmap"); -var omap = new type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); -var _toString$1 = Object.prototype.toString; -function resolveYamlPairs(data) { - if (data === null) return true; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString$1.call(pair) !== "[object Object]") return false; - keys = Object.keys(pair); - if (keys.length !== 1) return false; - result[index] = [keys[0], pair[keys[0]]]; - } - return true; -} -__name(resolveYamlPairs, "resolveYamlPairs"); -function constructYamlPairs(data) { - if (data === null) return []; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys = Object.keys(pair); - result[index] = [keys[0], pair[keys[0]]]; + __name(constructYamlOmap, "constructYamlOmap"); + module2.exports = new Type2("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); +})); +var require_pairs = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; } - return result; -} -__name(constructYamlPairs, "constructYamlPairs"); -var pairs = new type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; -function resolveYamlSet(data) { - if (data === null) return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { + __name(resolveYamlPairs, "resolveYamlPairs"); + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + __name(constructYamlPairs, "constructYamlPairs"); + module2.exports = new Type2("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); +})); +var require_set = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { if (object[key] !== null) return false; } + return true; } - return true; -} -__name(resolveYamlSet, "resolveYamlSet"); -function constructYamlSet(data) { - return data !== null ? data : {}; -} -__name(constructYamlSet, "constructYamlSet"); -var set = new type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet -}); -var _default = core.extend({ - implicit: [ - timestamp, - merge - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); -var _hasOwnProperty$1 = 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); -} -__name(_class, "_class"); -function is_EOL(c3) { - return c3 === 10 || c3 === 13; -} -__name(is_EOL, "is_EOL"); -function is_WHITE_SPACE(c3) { - return c3 === 9 || c3 === 32; -} -__name(is_WHITE_SPACE, "is_WHITE_SPACE"); -function is_WS_OR_EOL(c3) { - return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; -} -__name(is_WS_OR_EOL, "is_WS_OR_EOL"); -function is_FLOW_INDICATOR(c3) { - return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; -} -__name(is_FLOW_INDICATOR, "is_FLOW_INDICATOR"); -function fromHexCode(c3) { - var lc; - if (48 <= c3 && c3 <= 57) { - return c3 - 48; - } - lc = c3 | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; - } - return -1; -} -__name(fromHexCode, "fromHexCode"); -function escapedHexLen(c3) { - if (c3 === 120) { - return 2; - } - if (c3 === 117) { - return 4; + __name(resolveYamlSet, "resolveYamlSet"); + function constructYamlSet(data) { + return data !== null ? data : {}; } - if (c3 === 85) { - return 8; + __name(constructYamlSet, "constructYamlSet"); + module2.exports = new Type2("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); +})); +var require_default = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_core().extend({ + implicit: [require_timestamp(), require_merge()], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); +})); +var require_loader = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common2(); + var YAMLException2 = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA2 = 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 = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + __name(_class, "_class"); + function isEol(c3) { + return c3 === 10 || c3 === 13; + } + __name(isEol, "isEol"); + function isWhiteSpace(c3) { + return c3 === 9 || c3 === 32; + } + __name(isWhiteSpace, "isWhiteSpace"); + function isWsOrEol(c3) { + return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; + } + __name(isWsOrEol, "isWsOrEol"); + function isFlowIndicator(c3) { + return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; + } + __name(isFlowIndicator, "isFlowIndicator"); + function fromHexCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + const lc = c3 | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; + } + __name(fromHexCode, "fromHexCode"); + function escapedHexLen(c3) { + if (c3 === 120) return 2; + if (c3 === 117) return 4; + if (c3 === 85) return 8; + return 0; + } + __name(escapedHexLen, "escapedHexLen"); + function fromDecimalCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + return -1; + } + __name(fromDecimalCode, "fromDecimalCode"); + function simpleEscapeSequence(c3) { + switch (c3) { + case 48: + return "\0"; + case 97: + return "\x07"; + case 98: + return "\b"; + case 116: + return " "; + case 9: + return " "; + case 110: + return "\n"; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 101: + return "\x1B"; + case 32: + return " "; + case 34: + return '"'; + case 47: + return "/"; + case 92: + return "\\"; + case 78: + return "\x85"; + case 95: + return "\xA0"; + case 76: + return "\u2028"; + case 80: + return "\u2029"; + default: + return ""; + } } - return 0; -} -__name(escapedHexLen, "escapedHexLen"); -function fromDecimalCode(c3) { - if (48 <= c3 && c3 <= 57) { - return c3 - 48; + __name(simpleEscapeSequence, "simpleEscapeSequence"); + function charFromCodepoint(c3) { + if (c3 <= 65535) return String.fromCharCode(c3); + return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320); } - return -1; -} -__name(fromDecimalCode, "fromDecimalCode"); -function simpleEscapeSequence(c3) { - return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : - c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === - 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "\x85" : c3 === 95 ? "\xA0" : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : ""; -} -__name(simpleEscapeSequence, "simpleEscapeSequence"); -function charFromCodepoint(c3) { - if (c3 <= 65535) { - return String.fromCharCode(c3); - } - return String.fromCharCode( - (c3 - 65536 >> 10) + 55296, - (c3 - 65536 & 1023) + 56320 - ); -} -__name(charFromCodepoint, "charFromCodepoint"); -function setProperty(object, key, value) { - if (key === "__proto__") { - Object.defineProperty(object, key, { + __name(charFromCodepoint, "charFromCodepoint"); + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { configurable: true, enumerable: true, writable: true, value }); - } else { - object[key] = value; - } -} -__name(setProperty, "setProperty"); -var simpleEscapeCheck = new Array(256); -var simpleEscapeMap = new Array(256); -for (i2 = 0; i2 < 256; i2++) { - simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; - simpleEscapeMap[i2] = simpleEscapeSequence(i2); -} -var i2; -function State$1(input, options) { - this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || _default; - 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 = []; -} -__name(State$1, "State$1"); -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 = snippet(mark); - return new exception(message, mark); -} -__name(generateError, "generateError"); -function throwError(state, message) { - throw generateError(state, message); -} -__name(throwError, "throwError"); -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} -__name(throwWarning, "throwWarning"); -var directiveHandlers = { - YAML: /* @__PURE__ */ __name(function handleYamlDirective(state, name, args) { - var match, major, minor; - if (state.version !== null) { - throwError(state, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state, "YAML directive accepts exactly one argument"); - } - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match === null) { - throwError(state, "ill-formed argument of the YAML directive"); - } - major = parseInt(match[1], 10); - minor = parseInt(match[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"); - } - }, "handleYamlDirective"), - TAG: /* @__PURE__ */ __name(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$1.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; - }, "handleTagDirective") -}; -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"); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, "the stream contains non-printable characters"); + else object[key] = value; + } + __name(setProperty, "setProperty"); + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i2 = 0; i2 < 256; i2++) { + simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; + simpleEscapeMap[i2] = simpleEscapeSequence(i2); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA2; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + 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.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + __name(State, "State"); + function generateError(state, message) { + const mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException2(message, mark); + } + __name(generateError, "generateError"); + function throwError(state, message) { + throw generateError(state, message); + } + __name(throwError, "throwError"); + function throwWarning(state, message) { + if (state.onWarning) state.onWarning.call(null, generateError(state, message)); + } + __name(throwWarning, "throwWarning"); + function storeAnchor(state, name, value) { + const transactions = state.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state.anchorMap, name), + value: state.anchorMap[name] + }; } - state.result += _result; + state.anchorMap[name] = value; } -} -__name(captureSegment, "captureSegment"); -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"); + __name(storeAnchor, "storeAnchor"); + function beginAnchorTransaction(state) { + state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null)); } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty$1.call(destination, key)) { - setProperty(destination, key, source[key]); - overridableKeys[key] = true; + __name(beginAnchorTransaction, "beginAnchorTransaction"); + function commitAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const transactions = state.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; } } -} -__name(mergeMappings, "mergeMappings"); -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]"; - } + __name(commitAnchorTransaction, "commitAnchorTransaction"); + function rollbackAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state.anchorMap[names[index]] = entry.value; + else delete state.anchorMap[names[index]]; } } - 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); + __name(rollbackAnchorTransaction, "rollbackAnchorTransaction"); + function snapshotState(state) { + return { + position: state.position, + line: state.line, + lineStart: state.lineStart, + lineIndent: state.lineIndent, + firstTabInLine: state.firstTabInLine, + tag: state.tag, + anchor: state.anchor, + kind: state.kind, + result: state.result + }; + } + __name(snapshotState, "snapshotState"); + function restoreState(state, snapshot) { + state.position = snapshot.position; + state.line = snapshot.line; + state.lineStart = snapshot.lineStart; + state.lineIndent = snapshot.lineIndent; + state.firstTabInLine = snapshot.firstTabInLine; + state.tag = snapshot.tag; + state.anchor = snapshot.anchor; + state.kind = snapshot.kind; + state.result = snapshot.result; + } + __name(restoreState, "restoreState"); + var directiveHandlers = { + YAML: /* @__PURE__ */ __name(function handleYamlDirective(state, name, args) { + if (state.version !== null) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + const major = parseInt(match[1], 10); + const minor = parseInt(match[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"); + }, "handleYamlDirective"), + TAG: /* @__PURE__ */ __name(function handleTagDirective(state, name, args) { + let prefix; + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directi\ +ve"); + 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); } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, "duplicated mapping key"); - } - setProperty(_result, keyNode, valueNode); - delete overridableKeys[keyNode]; - } - return _result; -} -__name(storeMappingPair, "storeMappingPair"); -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.tagMap[handle] = prefix; + }, "handleTagDirective") + }; + function captureSegment(state, start, end, checkJson) { + if (start < end) { + const _result = state.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state, "expected valid JSON cha\ +racter"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters"); + state.result += _result; + } + } + __name(captureSegment, "captureSegment"); + function mergeMappings(state, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + __name(mergeMappings, "mergeMappings"); + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let 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 Objec\ +t]"; + } + } + 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)) { + if (valueNode.length > state.maxMergeSeqLength) throwError(state, "merge sequence length exceeded maxMergeSeqLengt\ +h (" + state.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state, _result, src, overridableKeys); + } + } else mergeMappings(state, _result, valueNode, overridableKeys); + 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"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + __name(storeMappingPair, "storeMappingPair"); + function readLineBreak(state) { + const ch = state.input.charCodeAt(state.position); + if (ch === 10) state.position++; + else if (ch === 13) { state.position++; - } - } else { - throwError(state, "a line break is expected"); - } - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} -__name(readLineBreak, "readLineBreak"); -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; - } - ch = state.input.charCodeAt(++state.position); - } - 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++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } else throwError(state, "a line break is expected"); + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + __name(readLineBreak, "readLineBreak"); + function skipSeparationSpace(state, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (isWhiteSpace(ch)) { + if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position; ch = state.input.charCodeAt(++state.position); } - } else { - break; + if (allowComments && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else break; } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) throwWarning(state, "deficient indenta\ +tion"); + return lineBreaks; } - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, "deficient indentation"); - } - return lineBreaks; -} -__name(skipSeparationSpace, "skipSeparationSpace"); -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; + __name(skipSeparationSpace, "skipSeparationSpace"); + function testDocumentSeparator(state) { + let _position = state.position; + let 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 || isWsOrEol(ch)) return true; } - } - return false; -} -__name(testDocumentSeparator, "testDocumentSeparator"); -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += " "; - } else if (count > 1) { - state.result += common.repeat("\n", count - 1); - } -} -__name(writeFoldedLines, "writeFoldedLines"); -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; - } - } - 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)) { - break; - } - } else if (ch === 35) { - preceding = state.input.charCodeAt(state.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; + __name(testDocumentSeparator, "testDocumentSeparator"); + function writeFoldedLines(state, count) { + if (count === 1) state.result += " "; + else if (count > 1) state.result += common.repeat("\n", count - 1); + } + __name(writeFoldedLines, "writeFoldedLines"); + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state.kind; + const _result = state.result; + let ch = state.input.charCodeAt(state.position); + if (isWsOrEol(ch) || isFlowIndicator(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) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break; + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator( + ch)) break; + else if (isEol(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; + 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; - break; + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; } + if (!isWhiteSpace(ch)) captureEnd = state.position + 1; + ch = state.input.charCodeAt(++state.position); } - 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; -} -__name(readPlainScalar, "readPlainScalar"); -function readSingleQuotedScalar(state, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state.input.charCodeAt(state.position); - if (ch !== 39) { + captureSegment(state, captureStart, captureEnd, false); + if (state.result) return true; + state.kind = _kind; + state.result = _result; return false; } - state.kind = "scalar"; - state.result = ""; - state.position++; - captureStart = captureEnd = state.position; - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 39) { + __name(readPlainScalar, "readPlainScalar"); + function readSingleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let 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)) { + } else return true; + } else if (isEol(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 { + } 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"); -} -__name(readSingleQuotedScalar, "readSingleQuotedScalar"); -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) { + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + __name(readSingleQuotedScalar, "readSingleQuotedScalar"); + function readDoubleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let 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]) { + if (isEol(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; + let hexLength = tmp; + let 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"); - } + 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"); - } + } else throwError(state, "unknown escape sequence"); captureStart = captureEnd = state.position; - } else if (is_EOL(ch)) { + } else if (isEol(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"); -} -__name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); -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; - } - 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) { + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of \ +the document within a double quoted scalar"); + else { 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; + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + __name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); + function readFlowCollection(state, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state.tag; + let _result; + const _anchor = state.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let 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; + if (state.anchor !== null) storeAnchor(state, 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) { + if (isWsOrEol(state.input.charCodeAt(state.position + 1))) { + 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; } - } - _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); + 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); 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); - } - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if (ch === 44) { - readNext = true; + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + __name(readFlowCollection, "readFlowCollection"); + function readBlockScalar(state, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let 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); - } else { - readNext = false; - } - } - throwError(state, "unexpected end of the stream within a flow collection"); -} -__name(readFlowCollection, "readFlowCollection"); -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) { + 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 b\ +lock 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"); - } - } else { - break; + } else throwError(state, "repeat of an indentation width identifier"); + else break; } - } - if (is_WHITE_SPACE(ch)) { - do { - ch = state.input.charCodeAt(++state.position); - } while (is_WHITE_SPACE(ch)); - if (ch === 35) { - do { + if (isWhiteSpace(ch)) { + do ch = state.input.charCodeAt(++state.position); - } while (!is_EOL(ch) && ch !== 0); - } - } - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - ch = state.input.charCodeAt(state.position); - while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; - continue; + while (isWhiteSpace(ch)); + if (ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!isEol(ch) && ch !== 0); } - 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"; + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state, "missing indentation for block scalar"); + 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; } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { + if (folding) if (isWhiteSpace(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 += " "; - } - } else { - state.result += common.repeat("\n", emptyLines); - } - } else { - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + if (didReadContent) state.result += " "; + } else state.result += common.repeat("\n", emptyLines); + else state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state.position; + while (!isEol(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position); + captureSegment(state, captureStart, state.position, false); } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state.input.charCodeAt(++state.position); - } - captureSegment(state, captureStart, state.position, false); + return true; } - return true; -} -__name(readBlockScalar, "readBlockScalar"); -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; + __name(readBlockScalar, "readBlockScalar"); + function readBlockSequence(state, nodeIndent) { + const _tag = state.tag; + const _anchor = state.anchor; + const _result = []; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let 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; + if (!isWsOrEol(state.input.charCodeAt(state.position + 1))) break; + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } } + const _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 s\ +equence entry"); + else if (state.lineIndent < nodeIndent) break; } - _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) { - break; + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; } + return false; } - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = "sequence"; - state.result = _result; - return true; - } - return false; -} -__name(readBlockSequence, "readBlockSequence"); -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"); - } + __name(readBlockSequence, "readBlockSequence"); + function readBlockMapping(state, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state.tag; + const _anchor = state.anchor; + const _result = {}; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let 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"); + } + const following = state.input.charCodeAt(state.position + 1); + const _line = state.line; + if ((ch === 63 || ch === 58) && isWsOrEol(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 = 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"); + 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 { - 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, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!isWsOrEol(ch)) throwError(state, "a whitespace character is expected after the key-value separator with\ +in 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 implic\ +it key"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } } - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (state.line === _line || state.lineIndent > nodeIndent) { if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; + _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 (!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 m\ +apping entry"); + else if (state.lineIndent < nodeIndent) break; } - if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { - throwError(state, "bad indentation of a mapping entry"); - } else if (state.lineIndent < nodeIndent) { - break; + 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; } - } - 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; -} -__name(readBlockMapping, "readBlockMapping"); -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; + return detected; + } + __name(readBlockMapping, "readBlockMapping"); + function readTagProperty(state) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let 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); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; - ch = state.input.charCodeAt(++state.position); - } else { - tagHandle = "!"; - } - _position = state.position; - if (isVerbatim) { - do { + if (ch === 60) { + isVerbatim = true; ch = state.input.charCodeAt(++state.position); - } while (ch !== 0 && ch !== 62); - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; ch = state.input.charCodeAt(++state.position); + } else tagHandle = "!"; + let _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 { - 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) { + while (ch !== 0 && !isWsOrEol(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"); - } + 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"); - } + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); } - 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"); } - tagName = state.input.slice(_position, state.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, "tag suffix cannot contain flow indicator characters"); + 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; } - 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$1.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; -} -__name(readTagProperty, "readTagProperty"); -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)) { + __name(readTagProperty, "readTagProperty"); + function readAnchorProperty(state) { + let 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); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character"); + state.anchor = state.input.slice(_position, state.position); + return true; } - if (state.position === _position) { - throwError(state, "name of an anchor node must contain at least one character"); - } - state.anchor = state.input.slice(_position, state.position); - return true; -} -__name(readAnchorProperty, "readAnchorProperty"); -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)) { + __name(readAnchorProperty, "readAnchorProperty"); + function readAlias(state) { + let ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; ch = state.input.charCodeAt(++state.position); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an alias node must contain at least one character"); + const alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) throwError(state, 'unidentified alias "' + alias + '"'); + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; } - 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$1.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); + __name(readAlias, "readAlias"); + function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state); + beginAnchorTransaction(state); + restoreState(state, propertyStart); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") { + commitAnchorTransaction(state); + return true; + } + rollbackAnchorTransaction(state); + restoreState(state, fallbackState); + return false; } - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} -__name(readAlias, "readAlias"); -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, - typeIndex, typeQuantity, typeList, type2, 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)) { + __name(tryReadBlockMappingFromProperty, "tryReadBlockMappingFromProperty"); + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state.depth >= state.maxDepth) throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")"); + state.depth += 1; + if (state.listener !== null) state.listener("open", state); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === + nodeContext; + if (allowToSeek) { 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; - } - } else { - allowBlockCollections = false; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; } } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } 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)) { + if (indentStatus === 1) while (true) { + const ch = state.input.charCodeAt(state.position); + const propertyState = snapshotState(state); + if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) break; + if (!readTagProperty(state) && !readAnchorProperty(state)) break; + if (propertyStart === null) propertyStart = propertyState; + 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; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + 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 { + const ch = state.input.charCodeAt(state.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty( + state, propertyStart, propertyStart.position - propertyStart.lineStart, 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"); - } + 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); - } - } - 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) { - type2 = state.implicitTypes[typeIndex]; - if (type2.resolve(state.result)) { - state.result = type2.construct(state.result); - state.tag = type2.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; + if (state.tag === null) state.tag = "?"; + } + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + if (state.tag === null) { + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") throwError(state, 'unacceptable node kind for ! tag; it s\ +hould be "scalar", not "' + state.kind + '"'); + for (let 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) storeAnchor(state, state.anchor, state.result); + break; } - break; } - } - } else if (state.tag !== "!") { - if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) { - type2 = state.typeMap[state.kind || "fallback"][state.tag]; - } else { - type2 = 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) { - type2 = typeList[typeIndex]; + } 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; + const typeList = state.typeMap.multi[state.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state.tag. + slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; break; } } - } - if (!type2) { - throwError(state, "unknown tag !<" + state.tag + ">"); - } - if (state.result !== null && type2.kind !== state.kind) { - throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + - state.kind + '"'); - } - if (!type2.resolve(state.result, state.tag)) { - throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); - } else { - state.result = type2.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - if (state.listener !== null) { - state.listener("close", state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} -__name(composeNode, "composeNode"); -function readDocument(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)) { + 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 + "> exp\ +licit tag"); + else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + } + if (state.listener !== null) state.listener("close", state); + state.depth -= 1; + return state.tag !== null || state.anchor !== null || hasContent; + } + __name(composeNode, "composeNode"); + function readDocument(state) { + const documentStart = state.position; + let hasDirectives = false; + let 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); - } - 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)); - break; - } - if (is_EOL(ch)) break; - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); + let _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + const directiveName = state.input.slice(_position, state.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 35) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + directiveArgs.push(state.input.slice(_position, state.position)); } - directiveArgs.push(state.input.slice(_position, state.position)); - } - if (ch !== 0) readLineBreak(state); - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state, directiveName, + directiveArgs); + else throwWarning(state, 'unknown document directive "' + directiveName + '"'); } - } - 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) { + 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); + } + return; } - return; - } - if (state.position < state.length - 1) { - throwError(state, "end of the stream or a document separator is expected"); - } else { - return; - } -} -__name(readDocument, "readDocument"); -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"; - } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); + if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected"); + } + __name(readDocument, "readDocument"); + 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"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state = new State(input, options); + const 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; } - } - var state = new State$1(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) { - readDocument(state); - } - return state.documents; -} -__name(loadDocuments, "loadDocuments"); -function loadAll$1(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; - } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} -__name(loadAll$1, "loadAll$1"); -function load$1(input, options) { - var documents = loadDocuments(input, options); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception("expected a single document in the stream, but found more"); -} -__name(load$1, "load$1"); -var loadAll_1 = loadAll$1; -var load_1 = load$1; -var loader = { - loadAll: loadAll_1, - load: load_1 -}; -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(schema2, map2) { - var result, keys, index, length, tag, style, type2; - if (map2 === null) return {}; - result = {}; - keys = Object.keys(map2); - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map2[tag]); - if (tag.slice(0, 2) === "!!") { - tag = "tag:yaml.org,2002:" + tag.slice(2); - } - type2 = schema2.compiledTypeMap["fallback"][tag]; - if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) { - style = type2.styleAliases[style]; - } - result[tag] = style; - } - return result; -} -__name(compileStyleMap, "compileStyleMap"); -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 exception("code point within a string may not be greater than 0xFFFFFFFF"); - } - return "\\" + handle + common.repeat("0", length - string.length) + string; -} -__name(encodeHex, "encodeHex"); -var QUOTING_TYPE_SINGLE = 1; -var QUOTING_TYPE_DOUBLE = 2; -function State(options) { - this.schema = options["schema"] || _default; - 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; -} -__name(State, "State"); -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; + while (state.position < state.length - 1) readDocument(state); + return state.documents; + } + __name(loadDocuments, "loadDocuments"); + function loadAll2(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]); + } + __name(loadAll2, "loadAll"); + function load2(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException2("expected a single document in the stream, but found more"); + } + __name(load2, "load"); + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; +})); +var require_dumper = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common2(); + var YAMLException2 = require_exception(); + var DEFAULT_SCHEMA2 = 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, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; + } + return result; + } + __name(compileStyleMap, "compileStyleMap"); + function encodeHex(character) { + let handle; + let length; + const 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 YAMLException2("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + __name(encodeHex, "encodeHex"); + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA2; + 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; + } + __name(State, "State"); + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const 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; } - if (line.length && line !== "\n") result += ind; - result += line; + return result; } - return result; -} -__name(indentString, "indentString"); -function generateNextLine(state, level) { - return "\n" + common.repeat(" ", state.indent * level); -} -__name(generateNextLine, "generateNextLine"); -function testImplicitResolving(state, str2) { - var index, length, type2; - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type2 = state.implicitTypes[index]; - if (type2.resolve(str2)) { - return true; - } + __name(indentString, "indentString"); + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); } - return false; -} -__name(testImplicitResolving, "testImplicitResolving"); -function isWhitespace(c3) { - return c3 === CHAR_SPACE || c3 === CHAR_TAB; -} -__name(isWhitespace, "isWhitespace"); -function isPrintable(c3) { - return 32 <= c3 && c3 <= 126 || 161 <= c3 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || 57344 <= c3 && c3 <= 65533 && - c3 !== CHAR_BOM || 65536 <= c3 && c3 <= 1114111; -} -__name(isPrintable, "isPrintable"); -function isNsCharOrWhitespace(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; -} -__name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); -function isPlainSafe(c3, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); - return ( - // ns-plain-safe - (inblock ? ( - // c = flow-in - cIsNsCharOrWhitespace - ) : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && - c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || - isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar - ); -} -__name(isPlainSafe, "isPlainSafe"); -function isPlainSafeFirst(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== CHAR_COLON && - c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && - c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && - c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && - c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; -} -__name(isPlainSafeFirst, "isPlainSafeFirst"); -function isPlainSafeLast(c3) { - return !isWhitespace(c3) && c3 !== CHAR_COLON; -} -__name(isPlainSafeLast, "isPlainSafeLast"); -function codePointAt(string, pos) { - var first2 = string.charCodeAt(pos), second; - if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } + __name(generateNextLine, "generateNextLine"); + function testImplicitResolving(state, str) { + for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) if (state.implicitTypes[index]. + resolve(str)) return true; + return false; } - return first2; -} -__name(codePointAt, "codePointAt"); -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} -__name(needIndentIndicator, "needIndentIndicator"); -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 i2; - 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 (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + __name(testImplicitResolving, "testImplicitResolving"); + function isWhitespace(c3) { + return c3 === CHAR_SPACE || c3 === CHAR_TAB; + } + __name(isWhitespace, "isWhitespace"); + function isPrintable(c3) { + return c3 >= 32 && c3 <= 126 || c3 >= 161 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || c3 >= 57344 && c3 <= 65533 && + c3 !== CHAR_BOM || c3 >= 65536 && c3 <= 1114111; + } + __name(isPrintable, "isPrintable"); + function isNsCharOrWhitespace(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; + } + __name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); + function isPlainSafe(c3, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && + c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && + !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === + CHAR_COLON && cIsNsChar; + } + __name(isPlainSafe, "isPlainSafe"); + function isPlainSafeFirst(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== + CHAR_COLON && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && + c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && + c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && + c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; + } + __name(isPlainSafeFirst, "isPlainSafeFirst"); + function isPlainSafeLast(c3) { + return !isWhitespace(c3) && c3 !== CHAR_COLON; + } + __name(isPlainSafeLast, "isPlainSafeLast"); + function codePointAt(string, pos) { + const first2 = string.charCodeAt(pos); + let second; + if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first2 - 55296) * 1024 + second - 56320 + 65536; + } + return first2; + } + __name(codePointAt, "codePointAt"); + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + __name(needIndentIndicator, "needIndentIndicator"); + 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) { + let i2; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { char = codePointAt(string, i2); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. - i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; - previousLineBreak = i2; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } + if (!isPrintable(char)) return STYLE_DOUBLE; plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } - hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + - 1] !== " "); - } - if (!hasLineBreak && !hasFoldableLine) { - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } + else { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== + " "; + previousLineBreak = i2; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i2 - 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; } - 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; -} -__name(chooseScalarStyle, "chooseScalarStyle"); -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); - } - __name(testAmbiguity, "testAmbiguity"); - 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) + '"'; - default: - throw new exception("impossible error: invalid scalar style"); - } - })(); -} -__name(writeScalar, "writeScalar"); -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"; -} -__name(blockHeader, "blockHeader"); -function dropEndingNewline(string) { - return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; -} -__name(dropEndingNewline, "dropEndingNewline"); -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 match; - while (match = lineRe.exec(string)) { - var prefix = match[1], line = match[2]; - moreIndented = line[0] === " "; - result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); - prevMoreIndented = moreIndented; - } - return result; -} -__name(foldString, "foldString"); -function foldLine(line, width) { - if (line === "" || line[0] === " ") return line; - var breakRe = / [^ ]/g; - var match; - var start = 0, end, curr = 0, next = 0; - var result = ""; - while (match = breakRe.exec(line)) { - next = match.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); -} -__name(foldLine, "foldLine"); -function escapeString(string) { - var result = ""; - var char = 0; - var escapeSeq; - for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - escapeSeq = ESCAPE_SEQUENCES[char]; - if (!escapeSeq && isPrintable(char)) { - result += string[i2]; - if (char >= 65536) result += string[i2 + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - return result; -} -__name(escapeString, "escapeString"); -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; - } - } - state.tag = _tag; - state.dump = "[" + _result + "]"; -} -__name(writeFlowSequence, "writeFlowSequence"); -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); - } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += "-"; - } else { - _result += "- "; + __name(chooseScalarStyle, "chooseScalarStyle"); + 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 + "'"; + } + const indent = state.indent * Math.max(1, level); + const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + const singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + __name(testAmbiguity, "testAmbiguity"); + 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 YAMLException2("impossible error: invalid scalar style"); } - _result += state.dump; - } - } - state.tag = _tag; - state.dump = _result || "[]"; -} -__name(writeBlockSequence, "writeBlockSequence"); -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; - } - pairBuffer += state.dump; - _result += pairBuffer; + })(); } - state.tag = _tag; - state.dump = "{" + _result + "}"; -} -__name(writeFlowMapping, "writeFlowMapping"); -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 exception("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 += "?"; - } else { - pairBuffer += "? "; + __name(writeScalar, "writeScalar"); + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + + "\n"; + } + __name(blockHeader, "blockHeader"); + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + __name(dropEndingNewline, "dropEndingNewline"); + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = (function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + })(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match; + while (match = lineRe.exec(string)) { + const prefix = match[1]; + const line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + __name(foldString, "foldString"); + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match; + let start = 0; + let end; + let curr = 0; + let next = 0; + let result = ""; + while (match = breakRe.exec(line)) { + next = match.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); + } + __name(foldLine, "foldLine"); + function escapeString(string) { + let result = ""; + let char = 0; + for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i2]; + if (char >= 65536) result += string[i2 + 1]; + } else result += escapeSeq || encodeHex(char); + } + return result; + } + __name(escapeString, "escapeString"); + function writeFlowSequence(state, level, object) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let 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; } } - pairBuffer += state.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state, level); + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + __name(writeFlowSequence, "writeFlowSequence"); + function writeBlockSequence(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let 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); + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state.dump; + } } - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; + state.tag = _tag; + state.dump = _result || "[]"; + } + __name(writeBlockSequence, "writeBlockSequence"); + function writeFlowMapping(state, level, object) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += '"'; + const objectKey = objectKeyList[index]; + let 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; + pairBuffer += state.dump; + _result += pairBuffer; } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ":"; - } else { - pairBuffer += ": "; + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + __name(writeFlowMapping, "writeFlowMapping"); + function writeBlockMapping(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + if (state.sortKeys === true) objectKeyList.sort(); + else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys); + else if (state.sortKeys) throw new YAMLException2("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue); + if (!writeNode(state, level + 1, objectKey, true, true, true)) continue; + const 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 += "?"; + else pairBuffer += "? "; + 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 += ":"; + else pairBuffer += ": "; + pairBuffer += state.dump; + _result += pairBuffer; } - pairBuffer += state.dump; - _result += pairBuffer; - } - state.tag = _tag; - state.dump = _result || "{}"; -} -__name(writeBlockMapping, "writeBlockMapping"); -function detectType(state, object, explicit) { - var _result, typeList, index, length, type2, style; - typeList = explicit ? state.explicitTypes : state.implicitTypes; - for (index = 0, length = typeList.length; index < length; index += 1) { - type2 = typeList[index]; - if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2. - instanceOf) && (!type2.predicate || type2.predicate(object))) { - if (explicit) { - if (type2.multi && type2.representName) { - state.tag = type2.representName(object); - } else { - state.tag = type2.tag; - } - } else { - state.tag = "?"; - } - if (type2.represent) { - style = state.styleMap[type2.tag] || type2.defaultStyle; - if (_toString.call(type2.represent) === "[object Function]") { - _result = type2.represent(object, style); - } else if (_hasOwnProperty.call(type2.represent, style)) { - _result = type2.represent[style](object, style); - } else { - throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); + state.tag = _tag; + state.dump = _result || "{}"; + } + __name(writeBlockMapping, "writeBlockMapping"); + function detectType(state, object, explicit) { + const typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const 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) { + const style = state.styleMap[type.tag] || type.defaultStyle; + let _result; + 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 YAMLException2("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + state.dump = _result; } - state.dump = _result; + return true; } - return true; } + return false; } - return false; -} -__name(detectType, "detectType"); -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 type2 = _toString.call(state.dump); - var inblock = block; - var tagStr; - if (block) { - block = state.flowLevel < 0 || state.flowLevel > level; - } - var objectOrArray = type2 === "[object Object]" || type2 === "[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 (type2 === "[object Object]") { - if (block && Object.keys(state.dump).length !== 0) { + __name(detectType, "detectType"); + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) detectType(state, object, true); + const type = _toString.call(state.dump); + const inblock = block; + if (block) block = state.flowLevel < 0 || state.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let 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; - } + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; } else { writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + " " + state.dump; - } + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; } - } else if (type2 === "[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; - } + 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; } else { writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = "&ref_" + duplicateIndex + " " + state.dump; - } + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; } - } else if (type2 === "[object String]") { - if (state.tag !== "?") { - writeScalar(state, state.dump, level, iskey, inblock); + 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 YAMLException2("unacceptable kind of an object to dump " + type); } - } else if (type2 === "[object Undefined]") { - return false; - } else { - if (state.skipInvalid) return false; - throw new exception("unacceptable kind of an object to dump " + type2); - } - 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 (state.tag !== null && state.tag !== "?") { + let 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 + ">"; + state.dump = tagStr + " " + state.dump; } - state.dump = tagStr + " " + state.dump; } + return true; } - return true; -} -__name(writeNode, "writeNode"); -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]]); - } - state.usedDuplicates = new Array(length); -} -__name(getDuplicateReferences, "getDuplicateReferences"); -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); - } + __name(writeNode, "writeNode"); + function getDuplicateReferences(object, state) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]); + state.usedDuplicates = new Array(length); + } + __name(getDuplicateReferences, "getDuplicateReferences"); + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + objects.push(object); + if (Array.isArray(object)) for (let i2 = 0, length = object.length; i2 < length; i2 += 1) inspectNode(object[i2], + objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) inspectNode(object[objectKeyList[i2]], objects, + duplicatesIndexes); } } } } -} -__name(inspectNode, "inspectNode"); -function dump$1(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 ""; -} -__name(dump$1, "dump$1"); -var dump_1 = dump$1; -var dumper = { - dump: dump_1 -}; -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."); + __name(inspectNode, "inspectNode"); + function dump2(input, options) { + options = options || {}; + const state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + let value = input; + if (state.replacer) value = state.replacer.call({ "": value }, "", value); + if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; + return ""; + } + __name(dump2, "dump"); + module2.exports.dump = dump2; +})); +var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var loader = 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 saf\ +e by default."); + }; + } + __name(renamed, "renamed"); + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.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() }; -} -__name(renamed, "renamed"); -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var safeLoad = renamed("safeLoad", "load"); -var safeLoadAll = renamed("safeLoadAll", "loadAll"); -var safeDump = renamed("safeDump", "dump"); + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); +})))(), 1); +var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, +safeLoad, safeLoadAll, safeDump } = import_js_yaml.default; +var index_vite_proxy_tmp_default = import_js_yaml.default; // component-tests/src/create-api-test.js var import_supertest = __toESM(require_supertest(), 1); @@ -48991,5 +48807,5 @@ methods/index.js: (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) js-yaml/dist/js-yaml.mjs: - (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + (*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/customer-config/dist/index.cjs b/customer-config/dist/index.cjs index 89b478e53..a2eb31e51 100644 --- a/customer-config/dist/index.cjs +++ b/customer-config/dist/index.cjs @@ -40,31 +40,31 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { + var type = typeof val; + if (type === "string" && val.length > 0) { return parse2(val); - } else if (type2 === "number" && isFinite(val)) { + } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse2(str2) { - str2 = String(str2); - if (str2.length > 100) { + function parse2(str) { + str = String(str); + if (str.length > 100) { return; } var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i. exec( - str2 + str ); if (!match2) { return; } var n = parseFloat(match2[1]); - var type2 = (match2[2] || "ms").toLowerCase(); - switch (type2) { + var type = (match2[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -221,7 +221,7 @@ var require_common = __commonJS({ debug3.namespace = namespace; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace); - debug3.extend = extend5; + debug3.extend = extend3; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, @@ -246,12 +246,12 @@ var require_common = __commonJS({ return debug3; } __name(createDebug, "createDebug"); - function extend5(namespace, delimiter4) { + function extend3(namespace, delimiter4) { const newDebug = createDebug(this.namespace + (typeof delimiter4 === "undefined" ? ":" : delimiter4) + namespace); newDebug.log = this.log; return newDebug; } - __name(extend5, "extend"); + __name(extend3, "extend"); function enable2(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; @@ -812,7 +812,7 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util8.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util8.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; @@ -867,8 +867,8 @@ var require_src2 = __commonJS({ } } __name(check, "check"); - function exists3(path17, type2 = exports2.READABLE) { - return check(path17, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0); + function exists3(path17, type = exports2.READABLE) { + return check(path17, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0); } __name(exists3, "exists"); exports2.exists = exists3; @@ -5503,12 +5503,12 @@ var require_data_url = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -5524,7 +5524,7 @@ var require_data_url = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -5661,28 +5661,28 @@ var require_data_url = __commonJS({ return char === 13 || char === 10 || char === 9 || char === 32; } __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); - function removeHTTPWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); } __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; } __name(isASCIIWhitespace, "isASCIIWhitespace"); - function removeASCIIWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isASCIIWhitespace); + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); } __name(removeASCIIWhitespace, "removeASCIIWhitespace"); - function removeChars(str2, leading, trailing, predicate) { + function removeChars(str, leading, trailing, predicate) { let lead = 0; - let trail = str2.length - 1; + let trail = str.length - 1; if (leading) { - while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; } if (trailing) { - while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; } - return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } __name(removeChars, "removeChars"); function isomorphicDecode(input) { @@ -5903,8 +5903,8 @@ var require_webidl = __commonJS({ return r2; }; webidl.util.Stringify = function(V) { - const type2 = webidl.util.Type(V); - switch (type2) { + const type = webidl.util.Type(V); + switch (type) { case "Symbol": return `Symbol(${V.description})`; case "Object": @@ -5924,7 +5924,7 @@ var require_webidl = __commonJS({ }); } const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq2 = []; + const seq = []; let index = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ @@ -5937,9 +5937,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq2.push(converter(value, prefix2, `${argument}[${index++}]`)); + seq.push(converter(value, prefix2, `${argument}[${index++}]`)); } - return seq2; + return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -5985,11 +5985,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix2, argument) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: prefix2, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -6339,8 +6339,8 @@ ption"); } } __name(appendRequestOriginHeader, "appendRequestOriginHeader"); - function coarsenTime(timestamp2, crossOriginIsolatedCapability) { - return timestamp2; + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; } __name(coarsenTime, "coarsenTime"); function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { @@ -7689,13 +7689,13 @@ var require_body = __commonJS({ let action6 = null; let source = null; let length = null; - let type2 = null; + let type = null; if (typeof object === "string") { source = object; - type2 = "text/plain;charset=UTF-8"; + type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (isArrayBuffer3(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { @@ -7704,8 +7704,8 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix2 = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = /* @__PURE__ */ __name((str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "\ -%22"), "escape"); + const escape2 = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%\ +22"), "escape"); const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinef\ eeds"); const blobParts = []; @@ -7751,12 +7751,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }, "action"); - type2 = `multipart/form-data; boundary=${boundary}`; + type = `multipart/form-data; boundary=${boundary}`; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { - type2 = object.type; + type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { @@ -7802,7 +7802,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } const body2 = { stream: stream6, source, length }; - return [body2, type2]; + return [body2, type]; } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { @@ -8098,14 +8098,14 @@ var require_client_h1 = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(delay5, type2) { - if (delay5 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + setTimeout(delay5, type) { + if (delay5 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { if (this.timeout) { timers.clearTimeout(this.timeout); this.timeout = null; } if (delay5) { - if (type2 & USE_FAST_TIMER) { + if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay5, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay5, new WeakRef(this)); @@ -8118,7 +8118,7 @@ var require_client_h1 = __commonJS({ this.timeout.refresh(); } } - this.timeoutType = type2; + this.timeoutType = type; } resume() { if (this.socket.destroyed || !this.paused) { @@ -9158,9 +9158,9 @@ var require_client_h2 = __commonJS({ this[kClient][kOnError](err); } __name(onHttp2SessionError, "onHttp2SessionError"); - function onHttp2FrameError(type2, code, id) { + function onHttp2FrameError(type, code, id) { if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -9352,8 +9352,8 @@ var require_client_h2 = __commonJS({ stream6.once("error", function(err) { abort(err); }); - stream6.once("frameError", (type2, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + stream6.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); return true; function writeBodyH2() { @@ -11750,7 +11750,7 @@ var require_readable = __commonJS({ return util8.isDisturbed(self2) || isLocked(self2); } __name(isUnusable, "isUnusable"); - async function consume(stream6, type2) { + async function consume(stream6, type) { assert4(!stream6[kConsume]); return new Promise((resolve2, reject) => { if (isUnusable(stream6)) { @@ -11767,7 +11767,7 @@ var require_readable = __commonJS({ } else { queueMicrotask(() => { stream6[kConsume] = { - type: type2, + type, stream: stream6, resolve: resolve2, reject, @@ -11843,17 +11843,17 @@ var require_readable = __commonJS({ } __name(chunksConcat, "chunksConcat"); function consumeEnd(consume2) { - const { type: type2, body: body2, resolve: resolve2, stream: stream6, length } = consume2; + const { type, body: body2, resolve: resolve2, stream: stream6, length } = consume2; try { - if (type2 === "text") { + if (type === "text") { resolve2(chunksDecode(body2, length)); - } else if (type2 === "json") { + } else if (type === "json") { resolve2(JSON.parse(chunksDecode(body2, length))); - } else if (type2 === "arrayBuffer") { + } else if (type === "arrayBuffer") { resolve2(chunksConcat(body2, length).buffer); - } else if (type2 === "blob") { + } else if (type === "blob") { resolve2(new Blob(body2, { type: stream6[kContentType] })); - } else if (type2 === "bytes") { + } else if (type === "bytes") { resolve2(chunksConcat(body2, length)); } consumeFinish(consume2); @@ -14045,10 +14045,10 @@ var require_dns = __commonJS({ return ip; } setRecords(origin2, addresses) { - const timestamp2 = Date.now(); + const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; for (const record of addresses) { - record.timestamp = timestamp2; + record.timestamp = timestamp; if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); } else { @@ -14728,8 +14728,8 @@ var require_response = __commonJS({ setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; if (body2 != null) { - const [extractedBody, type2] = extractBody(body2); - bodyWithType = { body: extractedBody, type: type2 }; + const [extractedBody, type] = extractBody(body2); + bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } @@ -14903,18 +14903,18 @@ var require_response = __commonJS({ }); } __name(makeFilteredResponse, "makeFilteredResponse"); - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -14922,7 +14922,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -16221,13 +16221,13 @@ processBodyError"); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type2 = blob.type; + const type = blob.type; if (!request.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; const rangeHeader = request.headersList.get("range", true); @@ -16247,7 +16247,7 @@ processBodyError"); rangeEnd = fullLength - 1; } } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type2); + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); const slicedBodyWithType = extractBody(slicedBlob); response.body = slicedBodyWithType[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); @@ -16255,7 +16255,7 @@ processBodyError"); response.status = 206; response.statusText = "Partial Content"; response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); response.headersList.set("content-range", contentRange, true); } return Promise.resolve(response); @@ -16924,10 +16924,10 @@ var require_progressevent = __commonJS({ static { __name(this, "ProgressEvent"); } - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2, "ProgressEvent constructor", "type"); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -17294,7 +17294,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException("Invalid state", "InvalidStateError"); } @@ -17329,7 +17329,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -17371,8 +17371,8 @@ var require_util4 = __commonJS({ reader.dispatchEvent(event); } __name(fireAProgressEvent, "fireAProgressEvent"); - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -17393,9 +17393,9 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { @@ -18814,9 +18814,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, "setCookie"); webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify(cookie); - if (str2) { - headers.append("Set-Cookie", str2); + const str = stringify(cookie); + if (str) { + headers.append("Set-Cookie", str); } } __name(setCookie, "setCookie"); @@ -18909,17 +18909,17 @@ var require_events = __commonJS({ __name(this, "MessageEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { - if (type2 === kConstruct) { + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { super(arguments[1], arguments[2]); webidl.util.markAsUncloneable(this); return; } const prefix2 = "MessageEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix2, "eventInitDict"); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -18946,10 +18946,10 @@ var require_events = __commonJS({ } return this.#eventInit.ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -18959,8 +18959,8 @@ var require_events = __commonJS({ ports }); } - static createFastMessageEvent(type2, init) { - const messageEvent = new _MessageEvent(kConstruct, type2, init); + static createFastMessageEvent(type, init) { + const messageEvent = new _MessageEvent(kConstruct, type, init); messageEvent.#eventInit = init; messageEvent.#eventInit.data ??= null; messageEvent.#eventInit.origin ??= ""; @@ -18977,12 +18977,12 @@ var require_events = __commonJS({ __name(this, "CloseEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { const prefix2 = "CloseEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -19004,12 +19004,12 @@ var require_events = __commonJS({ __name(this, "ErrorEvent"); } #eventInit; - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { const prefix2 = "ErrorEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - super(type2, eventInitDict); + super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -19270,24 +19270,24 @@ var require_util7 = __commonJS({ return ws[kReadyState] === states.CLOSED; } __name(isClosed, "isClosed"); - function fireEvent(e, target, eventFactory = (type2, init) => new Event(type2, init), eventInitDict = {}) { + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { const event = eventFactory(e, eventInitDict); target.dispatchEvent(event); } __name(fireEvent, "fireEvent"); - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = utf8Decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -19353,7 +19353,7 @@ var require_util7 = __commonJS({ response.socket.destroy(); } if (reason) { - fireEvent("error", ws, (type2, init) => new ErrorEvent(type2, init), { + fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { error: new Error(reason), message: reason }); @@ -19675,7 +19675,7 @@ var require_connection = __commonJS({ code = 1006; } ws[kReadyState] = states.CLOSED; - fireEvent("close", ws, (type2, init) => new CloseEvent(type2, init), { + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { wasClean, code, reason @@ -20461,12 +20461,12 @@ ons"); webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } /** @@ -22173,8 +22173,8 @@ var require_truncate = __commonJS({ } return version3.format(); }, "doTruncation"); - var isPrerelease = /* @__PURE__ */ __name((type2) => { - return type2.startsWith("pre"); + var isPrerelease = /* @__PURE__ */ __name((type) => { + return type.startsWith("pre"); }, "isPrerelease"); module2.exports = truncate; } @@ -22579,20 +22579,20 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }, "hyphenReplace"); - var testSet = /* @__PURE__ */ __name((set2, version3, options) => { - for (let i2 = 0; i2 < set2.length; i2++) { - if (!set2[i2].test(version3)) { + var testSet = /* @__PURE__ */ __name((set, version3, options) => { + for (let i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version3)) { return false; } } if (version3.prerelease.length && !options.includePrerelease) { - for (let i2 = 0; i2 < set2.length; i2++) { - debug3(set2[i2].semver); - if (set2[i2].semver === Comparator.ANY) { + for (let i2 = 0; i2 < set.length; i2++) { + debug3(set[i2].semver); + if (set[i2].semver === Comparator.ANY) { continue; } - if (set2[i2].semver.prerelease.length > 0) { - const allowed = set2[i2].semver; + if (set[i2].semver.prerelease.length > 0) { + const allowed = set[i2].semver; if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } @@ -22994,7 +22994,7 @@ var require_simplify = __commonJS({ var satisfies3 = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range2, options) => { - const set2 = []; + const set = []; let first2 = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); @@ -23007,17 +23007,17 @@ var require_simplify = __commonJS({ } } else { if (prev) { - set2.push([first2, prev]); + set.push([first2, prev]); } prev = null; first2 = null; } } if (first2) { - set2.push([first2, null]); + set.push([first2, null]); } const ranges = []; - for (const [min, max] of set2) { + for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { @@ -32112,11 +32112,11 @@ var require_mime_types = __commonJS({ exports2.lookup = lookup; exports2.types = /* @__PURE__ */ Object.create(null); populateMaps(exports2.extensions, exports2.types); - function charset(type2) { - if (!type2 || typeof type2 !== "string") { + function charset(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var mime = match2 && db[match2[1].toLowerCase()]; if (mime && mime.charset) { return mime.charset; @@ -32127,11 +32127,11 @@ var require_mime_types = __commonJS({ return false; } __name(charset, "charset"); - function contentType2(str2) { - if (!str2 || typeof str2 !== "string") { + function contentType2(str) { + if (!str || typeof str !== "string") { return false; } - var mime = str2.indexOf("/") === -1 ? exports2.lookup(str2) : str2; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } @@ -32142,11 +32142,11 @@ var require_mime_types = __commonJS({ return mime; } __name(contentType2, "contentType"); - function extension(type2) { - if (!type2 || typeof type2 !== "string") { + function extension(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var exts = match2 && exports2.extensions[match2[1].toLowerCase()]; if (!exts || !exts.length) { return false; @@ -32167,13 +32167,13 @@ var require_mime_types = __commonJS({ __name(lookup, "lookup"); function populateMaps(extensions, types2) { var preference = ["nginx", "apache", void 0, "iana"]; - Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type2) { - var mime = db[type2]; + Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type) { + var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { return; } - extensions[type2] = exts; + extensions[type] = exts; for (var i2 = 0; i2 < exts.length; i2++) { var extension2 = exts[i2]; if (types2[extension2]) { @@ -32184,7 +32184,7 @@ var require_mime_types = __commonJS({ continue; } } - types2[extension2] = type2; + types2[extension2] = type; } }, "forEachMimeType")); } @@ -32713,14 +32713,14 @@ var require_implementation = __commonJS({ return arr; }, "slicy"); var joiny = /* @__PURE__ */ __name(function(arr, joiner) { - var str2 = ""; + var str = ""; for (var i2 = 0; i2 < arr.length; i2 += 1) { - str2 += arr[i2]; + str += arr[i2]; if (i2 + 1 < arr.length) { - str2 += joiner; + str += joiner; } } - return str2; + return str; }, "joiny"); module2.exports = /* @__PURE__ */ __name(function bind2(that) { var target = this; @@ -34770,14 +34770,14 @@ var require_path = __commonJS({ // node_modules/is-extglob/index.js var require_is_extglob = __commonJS({ "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = /* @__PURE__ */ __name(function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isExtglob(str) { + if (typeof str !== "string" || str === "") { return false; } var match2; - while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { + while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { if (match2[2]) return true; - str2 = str2.slice(match2.index + match2[0].length); + str = str.slice(match2.index + match2[0].length); } return false; }, "isExtglob"); @@ -34789,8 +34789,8 @@ var require_is_glob = __commonJS({ "node_modules/is-glob/index.js"(exports2, module2) { var isExtglob = require_is_extglob(); var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var strictCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; @@ -34799,71 +34799,71 @@ var require_is_glob = __commonJS({ var closeCurlyIndex = -2; var closeParenIndex = -2; var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { + while (index < str.length) { + if (str[index] === "*") { return true; } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) { return true; } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); + closeSquareIndex = str.indexOf("]", index); } if (closeSquareIndex > index) { if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } } } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { return true; } } } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && - str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); + pipeIndex = str.indexOf("|", index); } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); + backSlashIndex = str.indexOf("\\", pipeIndex); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -34872,26 +34872,26 @@ var require_is_glob = __commonJS({ } return false; }, "strictCheck"); - var relaxedCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var relaxedCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { return true; } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -34900,18 +34900,18 @@ var require_is_glob = __commonJS({ } return false; }, "relaxedCheck"); - module2.exports = /* @__PURE__ */ __name(function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isGlob(str, options) { + if (typeof str !== "string" || str === "") { return false; } - if (isExtglob(str2)) { + if (isExtglob(str)) { return true; } var check = strictCheck; if (options && options.strict === false) { check = relaxedCheck; } - return check(str2); + return check(str); }, "isGlob"); } }); @@ -34928,19 +34928,19 @@ var require_glob_parent = __commonJS({ var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = /* @__PURE__ */ __name(function globParent(str2, opts) { + module2.exports = /* @__PURE__ */ __name(function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); } - if (enclosure.test(str2)) { - str2 += slash; + if (enclosure.test(str)) { + str += slash; } - str2 += "a"; + str += "a"; do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); }, "globParent"); } }); @@ -34958,16 +34958,16 @@ var require_utils2 = __commonJS({ } return false; }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); + exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type); exports2.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; return (Number(max) - Number(min)) / Number(step) >= limit; }; - exports2.escapeNode = (block, n = 0, type2) => { + exports2.escapeNode = (block, n = 0, type) => { const node = block.nodes[n]; if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { + if (type && node.type === type || node.type === "open" || node.type === "close") { if (node.escaped !== true) { node.value = "\\" + node.value; node.escaped = true; @@ -35270,8 +35270,8 @@ var require_to_regex_range = __commonJS({ return `[${a}${b - a === 1 ? "" : "-"}${b}]`; } __name(toCharacterClass, "toCharacterClass"); - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); + function hasPadding(str) { + return /^-?(0+)\d/.test(str); } __name(hasPadding, "hasPadding"); function padZeros(value, tok, options) { @@ -35305,7 +35305,7 @@ var require_fill_range = __commonJS({ "use strict"; var util8 = require("util"); var toRegexRange = require_to_regex_range(); - var isObject6 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ + var isObject5 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ bject"); var transform2 = /* @__PURE__ */ __name((toNumber3) => { return (value) => toNumber3 === true ? Number(value) : String(value); @@ -35475,14 +35475,14 @@ bject"); if (typeof step === "function") { return fill(start, end, 1, { transform: step }); } - if (isObject6(step)) { + if (isObject5(step)) { return fill(start, end, 0, step); } let opts = { ...options }; if (opts.capture === true) opts.wrap = true; step = step || opts.step || 1; if (!isNumber2(step)) { - if (step != null && !isObject6(step)) return invalidStep(step, opts); + if (step != null && !isObject5(step)) return invalidStep(step, opts); return fill(start, end, 1, step); } if (isNumber2(start) && isNumber2(end)) { @@ -35753,7 +35753,7 @@ var require_parse3 = __commonJS({ /* \ */ CHAR_BACKTICK, /* ` */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -35765,13 +35765,13 @@ var require_parse3 = __commonJS({ /* { */ CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, + CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, + CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE @@ -35820,16 +35820,16 @@ var require_parse3 = __commonJS({ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); continue; } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { + if (value === CHAR_RIGHT_SQUARE_BRACKET) { push({ type: "text", value: "\\" + value }); continue; } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { + if (value === CHAR_LEFT_SQUARE_BRACKET) { brackets++; let next; while (index < length && (next = advance())) { value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { + if (next === CHAR_LEFT_SQUARE_BRACKET) { brackets++; continue; } @@ -35837,7 +35837,7 @@ var require_parse3 = __commonJS({ value += advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { brackets--; if (brackets === 0) { break; @@ -35863,7 +35863,7 @@ var require_parse3 = __commonJS({ block = stack[stack.length - 1]; continue; } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { const open2 = value; let next; if (options.keepQuotes !== true) { @@ -35906,15 +35906,15 @@ var require_parse3 = __commonJS({ push({ type: "text", value }); continue; } - const type2 = "close"; + const type = "close"; block = stack.pop(); block.close = true; - push({ type: type2, value }); + push({ type, value }); depth--; block = stack[stack.length - 1]; continue; } - if (value === CHAR_COMMA2 && depth > 0) { + if (value === CHAR_COMMA && depth > 0) { if (block.ranges > 0) { block.ranges = 0; const open2 = block.nodes.shift(); @@ -36257,12 +36257,12 @@ var require_utils3 = __commonJS({ REGEX_SPECIAL_CHARS_GLOBAL } = require_constants8(); exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match2) => { + exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str); + exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports2.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => { return match2 === "\\" ? "" : match2; }); }; @@ -36311,13 +36311,13 @@ var require_scan = __commonJS({ "use strict"; var utils = require_utils3(); var { - CHAR_ASTERISK: CHAR_ASTERISK2, + CHAR_ASTERISK, /* * */ CHAR_AT, /* @ */ CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -36329,7 +36329,7 @@ var require_scan = __commonJS({ /* { */ CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ CHAR_PLUS, /* + */ @@ -36339,7 +36339,7 @@ var require_scan = __commonJS({ /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 + CHAR_RIGHT_SQUARE_BRACKET /* ] */ } = require_constants8(); var isPathSeparator = /* @__PURE__ */ __name((code) => { @@ -36357,7 +36357,7 @@ var require_scan = __commonJS({ const slashes = []; const tokens = []; const parts = []; - let str2 = input; + let str = input; let index = -1; let start = 0; let lastIndex = 0; @@ -36376,10 +36376,10 @@ var require_scan = __commonJS({ let code; let token = { value: "", depth: 0, isGlob: false }; const eos = /* @__PURE__ */ __name(() => index >= length, "eos"); - const peek = /* @__PURE__ */ __name(() => str2.charCodeAt(index + 1), "peek"); + const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek"); const advance = /* @__PURE__ */ __name(() => { prev = code; - return str2.charCodeAt(++index); + return str.charCodeAt(++index); }, "advance"); while (index < length) { code = advance(); @@ -36413,7 +36413,7 @@ var require_scan = __commonJS({ } break; } - if (braceEscaped !== true && code === CHAR_COMMA2) { + if (braceEscaped !== true && code === CHAR_COMMA) { isBrace = token.isBrace = true; isGlob = token.isGlob = true; finished = true; @@ -36450,7 +36450,7 @@ var require_scan = __commonJS({ continue; } if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { isGlob = token.isGlob = true; @@ -36477,8 +36477,8 @@ var require_scan = __commonJS({ break; } } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; isGlob = token.isGlob = true; finished = true; if (scanToEnd === true) { @@ -36494,14 +36494,14 @@ var require_scan = __commonJS({ } break; } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { + if (code === CHAR_LEFT_SQUARE_BRACKET) { while (eos() !== true && (next = advance())) { if (next === CHAR_BACKWARD_SLASH) { backslashes = token.backslashes = true; advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { isBracket = token.isBracket = true; isGlob = token.isGlob = true; finished = true; @@ -36548,24 +36548,24 @@ var require_scan = __commonJS({ isExtglob = false; isGlob = false; } - let base = str2; + let base = str; let prefix2 = ""; let glob2 = ""; if (start > 0) { - prefix2 = str2.slice(0, start); - str2 = str2.slice(start); + prefix2 = str.slice(0, start); + str = str.slice(start); lastIndex -= start; } if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); + base = str.slice(0, lastIndex); + glob2 = str.slice(lastIndex); } else if (isGlob === true) { base = ""; - glob2 = str2; + glob2 = str; } else { - base = str2; + base = str; } - if (base && base !== "" && base !== "/" && base !== str2) { + if (base && base !== "" && base !== "/" && base !== str) { if (isPathSeparator(base.charCodeAt(base.length - 1))) { base = base.slice(0, -1); } @@ -36662,8 +36662,8 @@ var require_parse4 = __commonJS({ } return value; }, "expandRange"); - var syntaxError = /* @__PURE__ */ __name((type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + var syntaxError = /* @__PURE__ */ __name((type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; }, "syntaxError"); var splitTopLevel = /* @__PURE__ */ __name((input) => { const parts = []; @@ -36967,12 +36967,12 @@ var require_parse4 = __commonJS({ state3.start++; return true; }, "negate"); - const increment = /* @__PURE__ */ __name((type2) => { - state3[type2]++; - stack.push(type2); + const increment = /* @__PURE__ */ __name((type) => { + state3[type]++; + stack.push(type); }, "increment"); - const decrement = /* @__PURE__ */ __name((type2) => { - state3[type2]--; + const decrement = /* @__PURE__ */ __name((type) => { + state3[type]--; stack.pop(); }, "decrement"); const push = /* @__PURE__ */ __name((tok) => { @@ -37000,7 +37000,7 @@ var require_parse4 = __commonJS({ tokens.push(tok); prev = tok; }, "push"); - const extglobOpen = /* @__PURE__ */ __name((type2, value2) => { + const extglobOpen = /* @__PURE__ */ __name((type, value2) => { const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; token.prev = prev; token.parens = state3.parens; @@ -37009,7 +37009,7 @@ var require_parse4 = __commonJS({ token.tokensIndex = tokens.length; const output = (opts.capture ? "(" : "") + token.open; increment("parens"); - push({ type: type2, value: value2, output: state3.output ? "" : ONE_CHAR }); + push({ type, value: value2, output: state3.output ? "" : ONE_CHAR }); push({ type: "paren", extglob: true, value: advance(), output }); extglobs.push(token); }, "extglobOpen"); @@ -37603,8 +37603,8 @@ var require_parse4 = __commonJS({ if (opts2.noglobstar === true) return star; return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }, "globstar"); - const create3 = /* @__PURE__ */ __name((str2) => { - switch (str2) { + const create3 = /* @__PURE__ */ __name((str) => { + switch (str) { case "*": return `${nodot}${ONE_CHAR}${star}`; case ".*": @@ -37622,7 +37622,7 @@ var require_parse4 = __commonJS({ case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; default: { - const match2 = /^(.*?)\.(\w+)$/.exec(str2); + const match2 = /^(.*?)\.(\w+)$/.exec(str); if (!match2) return; const source2 = create3(match2[1]); if (!source2) return; @@ -37650,20 +37650,20 @@ var require_picomatch = __commonJS({ var parse2 = require_parse4(); var utils = require_utils3(); var constants4 = require_constants8(); - var isObject6 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); + var isObject5 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); var picomatch = /* @__PURE__ */ __name((glob2, options, returnState = false) => { if (Array.isArray(glob2)) { const fns = glob2.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = /* @__PURE__ */ __name((str2) => { + const arrayMatcher = /* @__PURE__ */ __name((str) => { for (const isMatch of fns) { - const state4 = isMatch(str2); + const state4 = isMatch(str); if (state4) return state4; } return false; }, "arrayMatcher"); return arrayMatcher; } - const isState = isObject6(glob2) && glob2.tokens && glob2.input; + const isState = isObject5(glob2) && glob2.tokens && glob2.input; if (glob2 === "" || typeof glob2 !== "string" && !isState) { throw new TypeError("Expected pattern to be a non-empty string"); } @@ -37732,7 +37732,7 @@ var require_picomatch = __commonJS({ const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); return regex.test(path17.basename(input)); }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + 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 parse2(pattern, { ...options, fastpaths: false }); @@ -37846,7 +37846,7 @@ var require_micromatch = __commonJS({ }, "micromatch"); micromatch.match = micromatch; micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); micromatch.any = micromatch.isMatch; micromatch.not = (list, patterns, options = {}) => { patterns = [].concat(patterns).map(String); @@ -37864,22 +37864,22 @@ var require_micromatch = __commonJS({ } return [...result]; }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); + return pattern.some((p) => micromatch.contains(str, p, options)); } if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { + if (isEmptyString(str) || isEmptyString(pattern)) { return false; } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { return true; } } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); + return micromatch.isMatch(str, pattern, { ...options, contains: true }); }; micromatch.matchKeys = (obj, patterns, options) => { if (!utils.isObject(obj)) { @@ -37910,11 +37910,11 @@ var require_micromatch = __commonJS({ } return true; }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); + return [].concat(patterns).every((p) => picomatch(p, options)(str)); }; micromatch.capture = (glob2, input, options) => { let posix = utils.isWindows(options); @@ -37929,8 +37929,8 @@ var require_micromatch = __commonJS({ micromatch.parse = (patterns, options) => { let res = []; for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); } } return res; @@ -38155,8 +38155,8 @@ var require_merge2 = __commonJS({ var Stream = require("stream"); var PassThrough = Stream.PassThrough; var slice = Array.prototype.slice; - module2.exports = merge22; - function merge22() { + module2.exports = merge2; + function merge2() { const streamsQueue = []; const args = slice.call(arguments); let merging = false; @@ -38255,7 +38255,7 @@ var require_merge2 = __commonJS({ } return mergedStream; } - __name(merge22, "merge2"); + __name(merge2, "merge2"); function pauseStreams(streams, options) { if (!Array.isArray(streams)) { if (!streams._readableState && streams.pipe) { @@ -38282,9 +38282,9 @@ var require_stream = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.merge = void 0; - var merge22 = require_merge2(); + var merge2 = require_merge2(); function merge3(streams) { - const mergedStream = merge22(streams); + const mergedStream = merge2(streams); streams.forEach((stream6) => { stream6.once("error", (error2) => mergedStream.emit("error", error2)); }); @@ -38760,7 +38760,7 @@ var require_async3 = __commonJS({ var rpl = require_run_parallel(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); @@ -38779,7 +38779,7 @@ var require_async3 = __commonJS({ const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { callSuccessCallback(callback, entries); @@ -38825,7 +38825,7 @@ var require_async3 = __commonJS({ return; } const tasks = names.map((name) => { - const path17 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path17 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { fsStat2.stat(path17, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { @@ -38875,7 +38875,7 @@ var require_sync2 = __commonJS({ var fsStat2 = require_out(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); @@ -38890,7 +38890,7 @@ var require_sync2 = __commonJS({ const entry = { dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { try { @@ -38910,7 +38910,7 @@ var require_sync2 = __commonJS({ function readdir2(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); const stats = fsStat2.statSync(entryPath, settings.fsStatSettings); const entry = { name, @@ -39405,7 +39405,7 @@ var require_reader = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common3(); + var common = require_common3(); var Reader = class { static { __name(this, "Reader"); @@ -39413,7 +39413,7 @@ var require_reader = __commonJS({ constructor(_root, _settings) { this._root = _root; this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } }; exports2.default = Reader; @@ -39428,7 +39428,7 @@ var require_async4 = __commonJS({ var events_1 = require("events"); var fsScandir = require_out2(); var fastq = require_queue(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var AsyncReader = class extends reader_1.default { static { @@ -39496,7 +39496,7 @@ var require_async4 = __commonJS({ }); } _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { + if (this._isDestroyed || !common.isFatalError(this._settings, error2)) { return; } this._isFatalError = true; @@ -39509,12 +39509,12 @@ var require_async4 = __commonJS({ } const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -39617,7 +39617,7 @@ var require_sync3 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var fsScandir = require_out2(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var SyncReader = class extends reader_1.default { static { @@ -39653,7 +39653,7 @@ var require_sync3 = __commonJS({ } } _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { + if (!common.isFatalError(this._settings, error2)) { return; } throw error2; @@ -39661,12 +39661,12 @@ var require_sync3 = __commonJS({ _handleEntry(entry, base) { const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -41194,8 +41194,8 @@ var require_Node = __commonJS({ static { __name(this, "NodeBase"); } - constructor(type2) { - Object.defineProperty(this, identity.NODE_TYPE, { value: type2 }); + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); } /** Create a copy of this node. */ clone() { @@ -41406,15 +41406,15 @@ var require_createNode = __commonJS({ if (identity.isNode(value)) return value; if (identity.isPair(value)) { - const map2 = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); - map2.items.push(value); - return map2; + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; } if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) { value = value.valueOf(); } - const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema3, sourceObjects } = ctx; + const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema2, sourceObjects } = ctx; let ref = void 0; if (aliasDuplicateObjects && value && typeof value === "object") { ref = sourceObjects.get(value); @@ -41428,7 +41428,7 @@ var require_createNode = __commonJS({ } if (tagName?.startsWith("!!")) tagName = defaultTagPrefix + tagName.slice(2); - let tagObj = findTagObject(value, tagName, schema3.tags); + let tagObj = findTagObject(value, tagName, schema2.tags); if (!tagObj) { if (value && typeof value.toJSON === "function") { value = value.toJSON(); @@ -41439,8 +41439,8 @@ var require_createNode = __commonJS({ ref.node = node2; return node2; } - tagObj = value instanceof Map ? schema3[identity.MAP] : Symbol.iterator in Object(value) ? schema3[identity.SEQ] : - schema3[identity.MAP]; + tagObj = value instanceof Map ? schema2[identity.MAP] : Symbol.iterator in Object(value) ? schema2[identity.SEQ] : + schema2[identity.MAP]; } if (onTagObj) { onTagObj(tagObj); @@ -41468,7 +41468,7 @@ var require_Collection = __commonJS({ var createNode = require_createNode(); var identity = require_identity(); var Node = require_Node(); - function collectionFromPath(schema3, path17, value) { + function collectionFromPath(schema2, path17, value) { let v = value; for (let i2 = path17.length - 1; i2 >= 0; --i2) { const k = path17[i2]; @@ -41486,7 +41486,7 @@ var require_Collection = __commonJS({ onAnchor: /* @__PURE__ */ __name(() => { throw new Error("This should not happen, please report a bug."); }, "onAnchor"), - schema: schema3, + schema: schema2, sourceObjects: /* @__PURE__ */ new Map() }); } @@ -41497,10 +41497,10 @@ var require_Collection = __commonJS({ static { __name(this, "Collection"); } - constructor(type2, schema3) { - super(type2); + constructor(type, schema2) { + super(type); Object.defineProperty(this, "schema", { - value: schema3, + value: schema2, configurable: true, enumerable: false, writable: true @@ -41511,11 +41511,11 @@ var require_Collection = __commonJS({ * * @param schema - If defined, overwrites the original's schema */ - clone(schema3) { + clone(schema2) { const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); - if (schema3) - copy.schema = schema3; - copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema3) : it); + if (schema2) + copy.schema = schema2; + copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema2) : it); if (this.range) copy.range = this.range.slice(); return copy; @@ -41614,16 +41614,16 @@ var require_Collection = __commonJS({ var require_stringifyComment = __commonJS({ "node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) { "use strict"; - var stringifyComment = /* @__PURE__ */ __name((str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); + var stringifyComment = /* @__PURE__ */ __name((str) => str.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); function indentComment(comment, indent) { if (/^\n+$/.test(comment)) return comment.substring(1); return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; } __name(indentComment, "indentComment"); - var lineComment = /* @__PURE__ */ __name((str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : - comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment, "lineCom\ -ment"); + var lineComment = /* @__PURE__ */ __name((str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : + comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment, "lineComm\ +ent"); exports2.indentComment = indentComment; exports2.lineComment = lineComment; exports2.stringifyComment = stringifyComment; @@ -41779,16 +41779,16 @@ var require_stringifyString = __commonJS({ lineWidth: ctx.options.lineWidth, minContentWidth: ctx.options.minContentWidth }), "getFoldOptions"); - var containsDocumentMarker = /* @__PURE__ */ __name((str2) => /^(%|---|\.\.\.)/m.test(str2), "containsDocumentMarker"); - function lineLengthOverLimit(str2, lineWidth, indentLength) { + var containsDocumentMarker = /* @__PURE__ */ __name((str) => /^(%|---|\.\.\.)/m.test(str), "containsDocumentMarker"); + function lineLengthOverLimit(str, lineWidth, indentLength) { if (!lineWidth || lineWidth < 0) return false; const limit = lineWidth - indentLength; - const strLen = str2.length; + const strLen = str.length; if (strLen <= limit) return false; for (let i2 = 0, start = 0; i2 < strLen; ++i2) { - if (str2[i2] === "\n") { + if (str[i2] === "\n") { if (i2 - start > limit) return true; start = i2 + 1; @@ -41800,74 +41800,74 @@ var require_stringifyString = __commonJS({ } __name(lineLengthOverLimit, "lineLengthOverLimit"); function doubleQuotedString(value, ctx) { - const json2 = JSON.stringify(value); + const json = JSON.stringify(value); if (ctx.options.doubleQuotedAsJSON) - return json2; + return json; const { implicitKey } = ctx; const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); - let str2 = ""; + let str = ""; let start = 0; - for (let i2 = 0, ch = json2[i2]; ch; ch = json2[++i2]) { - if (ch === " " && json2[i2 + 1] === "\\" && json2[i2 + 2] === "n") { - str2 += json2.slice(start, i2) + "\\ "; + for (let i2 = 0, ch = json[i2]; ch; ch = json[++i2]) { + if (ch === " " && json[i2 + 1] === "\\" && json[i2 + 2] === "n") { + str += json.slice(start, i2) + "\\ "; i2 += 1; start = i2; ch = "\\"; } if (ch === "\\") - switch (json2[i2 + 1]) { + switch (json[i2 + 1]) { case "u": { - str2 += json2.slice(start, i2); - const code = json2.substr(i2 + 2, 4); + str += json.slice(start, i2); + const code = json.substr(i2 + 2, 4); switch (code) { case "0000": - str2 += "\\0"; + str += "\\0"; break; case "0007": - str2 += "\\a"; + str += "\\a"; break; case "000b": - str2 += "\\v"; + str += "\\v"; break; case "001b": - str2 += "\\e"; + str += "\\e"; break; case "0085": - str2 += "\\N"; + str += "\\N"; break; case "00a0": - str2 += "\\_"; + str += "\\_"; break; case "2028": - str2 += "\\L"; + str += "\\L"; break; case "2029": - str2 += "\\P"; + str += "\\P"; break; default: if (code.substr(0, 2) === "00") - str2 += "\\x" + code.substr(2); + str += "\\x" + code.substr(2); else - str2 += json2.substr(i2, 6); + str += json.substr(i2, 6); } i2 += 5; start = i2 + 1; } break; case "n": - if (implicitKey || json2[i2 + 2] === '"' || json2.length < minMultiLineLength) { + if (implicitKey || json[i2 + 2] === '"' || json.length < minMultiLineLength) { i2 += 1; } else { - str2 += json2.slice(start, i2) + "\n\n"; - while (json2[i2 + 2] === "\\" && json2[i2 + 3] === "n" && json2[i2 + 4] !== '"') { - str2 += "\n"; + str += json.slice(start, i2) + "\n\n"; + while (json[i2 + 2] === "\\" && json[i2 + 3] === "n" && json[i2 + 4] !== '"') { + str += "\n"; i2 += 2; } - str2 += indent; - if (json2[i2 + 2] === " ") - str2 += "\\"; + str += indent; + if (json[i2 + 2] === " ") + str += "\\"; i2 += 1; start = i2 + 1; } @@ -41876,8 +41876,8 @@ var require_stringifyString = __commonJS({ i2 += 1; } } - str2 = start ? str2 + json2.slice(start) : json2; - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); } __name(doubleQuotedString, "doubleQuotedString"); @@ -41915,14 +41915,14 @@ ${indent}`) + "'"; } catch { blockEndNewlines = /\n+(?!\n|$)/g; } - function blockString({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + function blockString({ comment, type, value }, ctx, onComment, onChompKeep) { const { blockQuote, commentString, lineWidth } = ctx.options; if (!blockQuote || /\n[\t ]+$/.test(value)) { return quotedString(value, ctx); } const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); - const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type2 === Scalar.Scalar.BLOCK_FOLDED ? - false : type2 === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); + const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.Scalar.BLOCK_FOLDED ? + false : type === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); if (!value) return literal ? "|\n" : ">\n"; let chomp; @@ -41978,7 +41978,7 @@ ${indent}`) + "'"; 2").replace(/\n+/g, `$&${indent}`); let literalFallback = false; const foldOptions = getFoldOptions(ctx, true); - if (blockQuote !== "folded" && type2 !== Scalar.Scalar.BLOCK_FOLDED) { + if (blockQuote !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) { foldOptions.onOverflow = () => { literalFallback = true; }; @@ -41994,7 +41994,7 @@ ${indent}${start}${value}${end}`; } __name(blockString, "blockString"); function plainString(item, ctx, onComment, onChompKeep) { - const { type: type2, value } = item; + const { type, value } = item; const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { return quotedString(value, ctx); @@ -42003,7 +42003,7 @@ ${indent}${start}${value}${end}`; return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); } - if (!implicitKey && !inFlow && type2 !== Scalar.Scalar.PLAIN && value.includes("\n")) { + if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) { return blockString(item, ctx, onComment, onChompKeep); } if (containsDocumentMarker(value)) { @@ -42014,26 +42014,25 @@ ${indent}${start}${value}${end}`; return quotedString(value, ctx); } } - const str2 = value.replace(/\n+/g, `$& + const str = value.replace(/\n+/g, `$& ${indent}`); if (actualString) { const test2 = /* @__PURE__ */ __name((tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test( - str2), "test"); + str), "test"); const { compat, tags: tags2 } = ctx.doc.schema; if (tags2.some(test2) || compat?.some(test2)) return quotedString(value, ctx); } - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, - false)); + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } __name(plainString, "plainString"); 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: type2 } = item; - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) - type2 = Scalar.Scalar.QUOTE_DOUBLE; + type = Scalar.Scalar.QUOTE_DOUBLE; } const _stringify = /* @__PURE__ */ __name((_type) => { switch (_type) { @@ -42050,7 +42049,7 @@ ${indent}`); return null; } }, "_stringify"); - let res = _stringify(type2); + let res = _stringify(type); if (res === null) { const { defaultKeyType, defaultStringType } = ctx.options; const t2 = implicitKey && defaultKeyType || defaultStringType; @@ -42182,13 +42181,13 @@ var require_stringify2 = __commonJS({ const props = stringifyProps(node, tagObj, ctx); if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; - const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity. + 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 str2; - return identity.isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} -${ctx.indent}${str2}`; + return str; + return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; } __name(stringify, "stringify"); exports2.createStringifyContext = createStringifyContext; @@ -42226,8 +42225,8 @@ var require_stringifyPair = __commonJS({ }); let keyCommentDone = false; let chompKeep = false; - let str2 = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); - if (!explicitKey && !ctx.inFlow && str2.length > 1024) { + let str = stringify.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; @@ -42236,27 +42235,27 @@ var require_stringifyPair = __commonJS({ if (allNullValues || value == null) { if (keyCommentDone && onComment) onComment(); - return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; + return str === "" ? "?" : explicitKey ? `? ${str}` : str; } } else if (allNullValues && !simpleKeys || value == null && explicitKey) { - str2 = `? ${str2}`; + str = `? ${str}`; if (keyComment && !keyCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } if (keyCommentDone) keyComment = null; if (explicitKey) { if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); - str2 = `? ${str2} + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str} ${indent}:`; } else { - str2 = `${str2}:`; + str = `${str}:`; if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } let vsb, vcb, valueComment; if (identity.isNode(value)) { @@ -42272,7 +42271,7 @@ ${indent}:`; } ctx.implicitKey = false; if (!explicitKey && !keyComment && identity.isScalar(value)) - ctx.indentAtStart = str2.length + 1; + ctx.indentAtStart = str.length + 1; chompKeep = false; if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) { @@ -42317,16 +42316,16 @@ ${ctx.indent}`; } else if (valueStr === "" || valueStr[0] === "\n") { ws = ""; } - str2 += ws + valueStr; + str += ws + valueStr; if (ctx.inFlow) { if (valueCommentDone && onComment) onComment(); } else if (valueComment && !valueCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); } else if (chompKeep && onChompKeep) { onChompKeep(); } - return str2; + return str; } __name(stringifyPair, "stringifyPair"); exports2.stringifyPair = stringifyPair; @@ -42358,13 +42357,13 @@ var require_log = __commonJS({ }); // node_modules/yaml/dist/schema/yaml-1.1/merge.js -var require_merge = __commonJS({ +var require_merge3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) { "use strict"; var identity = require_identity(); var Scalar = require_Scalar(); var MERGE_KEY = "<<"; - var merge3 = { + var merge2 = { identify: /* @__PURE__ */ __name((value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY, "identify"), default: "key", @@ -42375,34 +42374,34 @@ var require_merge = __commonJS({ }), "resolve"), stringify: /* @__PURE__ */ __name(() => MERGE_KEY, "stringify") }; - var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || - key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3. + var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || + key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2. tag && tag.default), "isMergeKey"); - function addMergeToJSMap(ctx, map2, value) { + function addMergeToJSMap(ctx, map, value) { const source = resolveAliasValue(ctx, value); if (identity.isSeq(source)) for (const it of source.items) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else if (Array.isArray(source)) for (const it of source) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else - mergeValue(ctx, map2, source); + mergeValue(ctx, map, source); } __name(addMergeToJSMap, "addMergeToJSMap"); - function mergeValue(ctx, map2, value) { + function mergeValue(ctx, map, value) { const source = resolveAliasValue(ctx, 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 (map2 instanceof Map) { - if (!map2.has(key)) - map2.set(key, value2); - } else if (map2 instanceof Set) { - map2.add(key); - } else if (!Object.prototype.hasOwnProperty.call(map2, key)) { - Object.defineProperty(map2, key, { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value2); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { value: value2, writable: true, enumerable: true, @@ -42410,7 +42409,7 @@ var require_merge = __commonJS({ }); } } - return map2; + return map; } __name(mergeValue, "mergeValue"); function resolveAliasValue(ctx, value) { @@ -42419,7 +42418,7 @@ var require_merge = __commonJS({ __name(resolveAliasValue, "resolveAliasValue"); exports2.addMergeToJSMap = addMergeToJSMap; exports2.isMergeKey = isMergeKey; - exports2.merge = merge3; + exports2.merge = merge2; } }); @@ -42428,36 +42427,36 @@ var require_addPairToJSMap = __commonJS({ "node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) { "use strict"; var log2 = require_log(); - var merge3 = require_merge(); + var merge2 = require_merge3(); var stringify = require_stringify2(); var identity = require_identity(); var toJS = require_toJS(); - function addPairToJSMap(ctx, map2, { key, value }) { + function addPairToJSMap(ctx, map, { key, value }) { if (identity.isNode(key) && key.addToJSMap) - key.addToJSMap(ctx, map2, value); - else if (merge3.isMergeKey(ctx, key)) - merge3.addMergeToJSMap(ctx, map2, value); + key.addToJSMap(ctx, map, value); + else if (merge2.isMergeKey(ctx, key)) + merge2.addMergeToJSMap(ctx, map, value); else { const jsKey = toJS.toJS(key, "", ctx); - if (map2 instanceof Map) { - map2.set(jsKey, toJS.toJS(value, jsKey, ctx)); - } else if (map2 instanceof Set) { - map2.add(jsKey); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map instanceof Set) { + map.add(jsKey); } else { const stringKey = stringifyKey(key, jsKey, ctx); const jsValue = toJS.toJS(value, stringKey, ctx); - if (stringKey in map2) - Object.defineProperty(map2, stringKey, { + if (stringKey in map) + Object.defineProperty(map, stringKey, { value: jsValue, writable: true, enumerable: true, configurable: true }); else - map2[stringKey] = jsValue; + map[stringKey] = jsValue; } } - return map2; + return map; } __name(addPairToJSMap, "addPairToJSMap"); function stringifyKey(key, jsKey, ctx) { @@ -42513,12 +42512,12 @@ var require_Pair = __commonJS({ this.key = key; this.value = value; } - clone(schema3) { + clone(schema2) { let { key, value } = this; if (identity.isNode(key)) - key = key.clone(schema3); + key = key.clone(schema2); if (identity.isNode(value)) - value = value.clone(schema3); + value = value.clone(schema2); return new _Pair(key, value); } toJSON(_, ctx) { @@ -42570,31 +42569,31 @@ var require_stringifyCollection = __commonJS({ } } chompKeep = false; - let str3 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); if (comment2) - str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2)); + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); if (chompKeep && comment2) chompKeep = false; - lines.push(blockItemPrefix + str3); + lines.push(blockItemPrefix + str2); } - let str2; + let str; if (lines.length === 0) { - str2 = flowChars.start + flowChars.end; + str = flowChars.start + flowChars.end; } else { - str2 = lines[0]; + str = lines[0]; for (let i2 = 1; i2 < lines.length; ++i2) { const line = lines[i2]; - str2 += line ? ` + str += line ? ` ${indent}${line}` : "\n"; } } if (comment) { - str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent); + str += "\n" + stringifyComment.indentComment(commentString(comment), indent); if (onComment) onComment(); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } __name(stringifyBlockCollection, "stringifyBlockCollection"); function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { @@ -42638,22 +42637,22 @@ ${indent}${line}` : "\n"; } if (comment) reqNewline = true; - let str2 = stringify.stringify(item, itemCtx, () => comment = null); - reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n")); + let str = stringify.stringify(item, itemCtx, () => comment = null); + reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n")); if (i2 < items.length - 1) { - str2 += ","; + str += ","; } else if (ctx.options.trailingComma) { if (ctx.options.lineWidth > 0) { - reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx. - options.lineWidth); + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options. + lineWidth); } if (reqNewline) { - str2 += ","; + str += ","; } } if (comment) - str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment)); - lines.push(str2); + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + lines.push(str); linesAtValue = lines.length; } const { start, end } = flowChars; @@ -42665,11 +42664,11 @@ ${indent}${line}` : "\n"; reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - let str2 = start; + let str = start; for (const line of lines) - str2 += line ? ` + str += line ? ` ${indentStep}${indent}${line}` : "\n"; - return `${str2} + return `${str} ${indent}${end}`; } else { return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; @@ -42720,24 +42719,24 @@ var require_YAMLMap = __commonJS({ static get tagName() { return "tag:yaml.org,2002:map"; } - constructor(schema3) { - super(identity.MAP, schema3); + constructor(schema2) { + super(identity.MAP, schema2); this.items = []; } /** * A generic collection parsing method that can be extended * to other node classes that inherit from YAMLMap */ - static from(schema3, obj, ctx) { + static from(schema2, obj, ctx) { const { keepUndefined, replacer } = ctx; - const map2 = new this(schema3); + const map = new this(schema2); const add = /* @__PURE__ */ __name((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) - map2.items.push(Pair.createPair(key, value, ctx)); + map.items.push(Pair.createPair(key, value, ctx)); }, "add"); if (obj instanceof Map) { for (const [key, value] of obj) @@ -42746,10 +42745,10 @@ var require_YAMLMap = __commonJS({ for (const key of Object.keys(obj)) add(key, obj[key]); } - if (typeof schema3.sortMapEntries === "function") { - map2.items.sort(schema3.sortMapEntries); + if (typeof schema2.sortMapEntries === "function") { + map.items.sort(schema2.sortMapEntries); } - return map2; + return map; } /** * Adds a value to the collection. @@ -42808,12 +42807,12 @@ var require_YAMLMap = __commonJS({ * @returns Instance of Type, Map, or Object */ toJSON(_, ctx, Type2) { - const map2 = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + const map = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const item of this.items) - addPairToJSMap.addPairToJSMap(ctx, map2, item); - return map2; + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -42839,24 +42838,24 @@ var require_YAMLMap = __commonJS({ }); // node_modules/yaml/dist/schema/common/map.js -var require_map = __commonJS({ +var require_map2 = __commonJS({ "node_modules/yaml/dist/schema/common/map.js"(exports2) { "use strict"; var identity = require_identity(); var YAMLMap = require_YAMLMap(); - var map2 = { + var map = { collection: "map", default: true, nodeClass: YAMLMap.YAMLMap, tag: "tag:yaml.org,2002:map", - resolve(map3, onError2) { - if (!identity.isMap(map3)) + resolve(map2, onError2) { + if (!identity.isMap(map2)) onError2("Expected a mapping for this tag"); - return map3; + return map2; }, - createNode: /* @__PURE__ */ __name((schema3, obj, ctx) => YAMLMap.YAMLMap.from(schema3, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLMap.YAMLMap.from(schema2, obj, ctx), "createNode") }; - exports2.map = map2; + exports2.map = map; } }); @@ -42877,8 +42876,8 @@ var require_YAMLSeq = __commonJS({ static get tagName() { return "tag:yaml.org,2002:seq"; } - constructor(schema3) { - super(identity.SEQ, schema3); + constructor(schema2) { + super(identity.SEQ, schema2); this.items = []; } add(value) { @@ -42934,13 +42933,13 @@ var require_YAMLSeq = __commonJS({ this.items[idx] = value; } toJSON(_, ctx) { - const seq2 = []; + const seq = []; if (ctx?.onCreate) - ctx.onCreate(seq2); + ctx.onCreate(seq); let i2 = 0; for (const item of this.items) - seq2.push(toJS.toJS(item, String(i2++), ctx)); - return seq2; + seq.push(toJS.toJS(item, String(i2++), ctx)); + return seq; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -42953,9 +42952,9 @@ var require_YAMLSeq = __commonJS({ onComment }); } - static from(schema3, obj, ctx) { + static from(schema2, obj, ctx) { const { replacer } = ctx; - const seq2 = new this(schema3); + const seq = new this(schema2); if (obj && Symbol.iterator in Object(obj)) { let i2 = 0; for (let it of obj) { @@ -42963,10 +42962,10 @@ var require_YAMLSeq = __commonJS({ const key = obj instanceof Set ? it : String(i2++); it = replacer.call(obj, key, it); } - seq2.items.push(createNode.createNode(it, void 0, ctx)); + seq.items.push(createNode.createNode(it, void 0, ctx)); } } - return seq2; + return seq; } }; function asItemIndex(key) { @@ -42981,24 +42980,24 @@ var require_YAMLSeq = __commonJS({ }); // node_modules/yaml/dist/schema/common/seq.js -var require_seq = __commonJS({ +var require_seq2 = __commonJS({ "node_modules/yaml/dist/schema/common/seq.js"(exports2) { "use strict"; var identity = require_identity(); var YAMLSeq = require_YAMLSeq(); - var seq2 = { + var seq = { collection: "seq", default: true, nodeClass: YAMLSeq.YAMLSeq, tag: "tag:yaml.org,2002:seq", - resolve(seq3, onError2) { - if (!identity.isSeq(seq3)) + resolve(seq2, onError2) { + if (!identity.isSeq(seq2)) onError2("Expected a sequence for this tag"); - return seq3; + return seq2; }, - createNode: /* @__PURE__ */ __name((schema3, obj, ctx) => YAMLSeq.YAMLSeq.from(schema3, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLSeq.YAMLSeq.from(schema2, obj, ctx), "createNode") }; - exports2.seq = seq2; + exports2.seq = seq; } }); @@ -43011,7 +43010,7 @@ var require_string2 = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify(item, ctx, onComment, onChompKeep) { ctx = Object.assign({ actualString: true }, ctx); return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); @@ -43022,7 +43021,7 @@ var require_string2 = __commonJS({ }); // node_modules/yaml/dist/schema/common/null.js -var require_null = __commonJS({ +var require_null2 = __commonJS({ "node_modules/yaml/dist/schema/common/null.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -43041,7 +43040,7 @@ var require_null = __commonJS({ }); // node_modules/yaml/dist/schema/core/bool.js -var require_bool = __commonJS({ +var require_bool2 = __commonJS({ "node_modules/yaml/dist/schema/core/bool.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -43050,7 +43049,7 @@ var require_bool = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, - resolve: /* @__PURE__ */ __name((str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"), "resolve"), + resolve: /* @__PURE__ */ __name((str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"), "resolve"), stringify({ source, value }, ctx) { if (source && boolTag.test.test(source)) { const sv = source[0] === "t" || source[0] === "T"; @@ -43094,7 +43093,7 @@ var require_stringifyNumber = __commonJS({ }); // node_modules/yaml/dist/schema/core/float.js -var require_float = __commonJS({ +var require_float2 = __commonJS({ "node_modules/yaml/dist/schema/core/float.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -43104,8 +43103,8 @@ var require_float = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -43114,41 +43113,41 @@ var require_float = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2)); - const dot = str2.indexOf("."); - if (dot !== -1 && str2[str2.length - 1] === "0") - node.minFractionDigits = str2.length - dot - 1; + 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 }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } }); // node_modules/yaml/dist/schema/core/int.js -var require_int = __commonJS({ +var require_int2 = __commonJS({ "node_modules/yaml/dist/schema/core/int.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - var intResolve = /* @__PURE__ */ __name((str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt( - str2.substring(offset), radix), "intResolve"); + var intResolve = /* @__PURE__ */ __name((str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt( + str.substring(offset), radix), "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value) && value >= 0) @@ -43162,15 +43161,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o[0-7]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0o"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -43179,50 +43178,50 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x[0-9a-fA-F]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intHex = intHex; exports2.intOct = intOct; } }); // node_modules/yaml/dist/schema/core/schema.js -var require_schema = __commonJS({ +var require_schema2 = __commonJS({ "node_modules/yaml/dist/schema/core/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema3 = [ - map2.map, - seq2.seq, + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema2 = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.boolTag, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float ]; - exports2.schema = schema3; + exports2.schema = schema2; } }); // node_modules/yaml/dist/schema/json/schema.js -var require_schema2 = __commonJS({ +var require_schema3 = __commonJS({ "node_modules/yaml/dist/schema/json/schema.js"(exports2) { "use strict"; var Scalar = require_Scalar(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map2(); + var seq = require_seq2(); function intIdentify(value) { return typeof value === "bigint" || Number.isInteger(value); } @@ -43233,7 +43232,7 @@ var require_schema2 = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify: stringifyJSON }, { @@ -43250,7 +43249,7 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^true$|^false$/, - resolve: /* @__PURE__ */ __name((str2) => str2 === "true", "resolve"), + resolve: /* @__PURE__ */ __name((str) => str === "true", "resolve"), stringify: stringifyJSON }, { @@ -43258,8 +43257,8 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, - 10), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + "resolve"), stringify: /* @__PURE__ */ __name(({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value), "\ stringify") }, @@ -43268,7 +43267,7 @@ stringify") default: true, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify: stringifyJSON } ]; @@ -43276,24 +43275,24 @@ stringify") default: true, tag: "", test: /^/, - resolve(str2, onError2) { - onError2(`Unresolved plain scalar ${JSON.stringify(str2)}`); - return str2; + resolve(str, onError2) { + onError2(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; } }; - var schema3 = [map2.map, seq2.seq].concat(jsonScalars, jsonError); - exports2.schema = schema3; + var schema2 = [map.map, seq.seq].concat(jsonScalars, jsonError); + exports2.schema = schema2; } }); // node_modules/yaml/dist/schema/yaml-1.1/binary.js -var require_binary = __commonJS({ +var require_binary2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) { "use strict"; var node_buffer = require("buffer"); var Scalar = require_Scalar(); var stringifyString = require_stringifyString(); - var binary2 = { + var binary = { identify: /* @__PURE__ */ __name((value) => value instanceof Uint8Array, "identify"), // Buffer inherits from Uint8Array default: false, @@ -43310,61 +43309,61 @@ var require_binary = __commonJS({ if (typeof node_buffer.Buffer === "function") { return node_buffer.Buffer.from(src, "base64"); } else if (typeof atob === "function") { - const str2 = atob(src.replace(/[\n\r]/g, "")); - const buffer3 = new Uint8Array(str2.length); - for (let i2 = 0; i2 < str2.length; ++i2) - buffer3[i2] = str2.charCodeAt(i2); + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer3 = new Uint8Array(str.length); + for (let i2 = 0; i2 < str.length; ++i2) + buffer3[i2] = str.charCodeAt(i2); return buffer3; } else { onError2("This environment does not support reading binary tags; either Buffer or atob is required"); return src; } }, - stringify({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { if (!value) return ""; const buf = value; - let str2; + let str; if (typeof node_buffer.Buffer === "function") { - str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( + str = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( "base64"); } else if (typeof btoa === "function") { let s = ""; for (let i2 = 0; i2 < buf.length; ++i2) s += String.fromCharCode(buf[i2]); - str2 = btoa(s); + str = btoa(s); } else { throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); } - type2 ?? (type2 = Scalar.Scalar.BLOCK_LITERAL); - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + 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(str2.length / lineWidth); + const n = Math.ceil(str.length / lineWidth); const lines = new Array(n); for (let i2 = 0, o2 = 0; i2 < n; ++i2, o2 += lineWidth) { - lines[i2] = str2.substr(o2, lineWidth); + lines[i2] = str.substr(o2, lineWidth); } - str2 = lines.join(type2 === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); } - return stringifyString.stringifyString({ comment, type: type2, value: str2 }, ctx, onComment, onChompKeep); + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); } }; - exports2.binary = binary2; + exports2.binary = binary; } }); // node_modules/yaml/dist/schema/yaml-1.1/pairs.js -var require_pairs = __commonJS({ +var require_pairs2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) { "use strict"; var identity = require_identity(); var Pair = require_Pair(); var Scalar = require_Scalar(); var YAMLSeq = require_YAMLSeq(); - function resolvePairs(seq2, onError2) { - if (identity.isSeq(seq2)) { - for (let i2 = 0; i2 < seq2.items.length; ++i2) { - let item = seq2.items[i2]; + function resolvePairs(seq, onError2) { + if (identity.isSeq(seq)) { + for (let i2 = 0; i2 < seq.items.length; ++i2) { + let item = seq.items[i2]; if (identity.isPair(item)) continue; else if (identity.isMap(item)) { @@ -43381,17 +43380,17 @@ ${cn.comment}` : item.comment; } item = pair; } - seq2.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); + seq.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); } } else onError2("Expected a sequence for this tag"); - return seq2; + return seq; } __name(resolvePairs, "resolvePairs"); - function createPairs(schema3, iterable, ctx) { + function createPairs(schema2, iterable, ctx) { const { replacer } = ctx; - const pairs3 = new YAMLSeq.YAMLSeq(schema3); - pairs3.tag = "tag:yaml.org,2002:pairs"; + const pairs2 = new YAMLSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; let i2 = 0; if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) { @@ -43415,12 +43414,12 @@ ${cn.comment}` : item.comment; } else { key = it; } - pairs3.items.push(Pair.createPair(key, value, ctx)); + pairs2.items.push(Pair.createPair(key, value, ctx)); } - return pairs3; + return pairs2; } __name(createPairs, "createPairs"); - var pairs2 = { + var pairs = { collection: "seq", default: false, tag: "tag:yaml.org,2002:pairs", @@ -43428,20 +43427,20 @@ ${cn.comment}` : item.comment; createNode: createPairs }; exports2.createPairs = createPairs; - exports2.pairs = pairs2; + exports2.pairs = pairs; exports2.resolvePairs = resolvePairs; } }); // node_modules/yaml/dist/schema/yaml-1.1/omap.js -var require_omap = __commonJS({ +var require_omap2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) { "use strict"; var identity = require_identity(); var toJS = require_toJS(); var YAMLMap = require_YAMLMap(); var YAMLSeq = require_YAMLSeq(); - var pairs2 = require_pairs(); + var pairs = require_pairs2(); var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq { static { __name(this, "YAMLOMap"); @@ -43462,9 +43461,9 @@ var require_omap = __commonJS({ toJSON(_, ctx) { if (!ctx) return super.toJSON(_); - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const pair of this.items) { let key, value; if (identity.isPair(pair)) { @@ -43473,28 +43472,28 @@ var require_omap = __commonJS({ } else { key = toJS.toJS(pair, "", ctx); } - if (map2.has(key)) + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); - map2.set(key, value); + map.set(key, value); } - return map2; + return map; } - static from(schema3, iterable, ctx) { - const pairs$1 = pairs2.createPairs(schema3, iterable, ctx); - const omap3 = new this(); - omap3.items = pairs$1.items; - return omap3; + static from(schema2, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema2, iterable, ctx); + const omap2 = new this(); + omap2.items = pairs$1.items; + return omap2; } }; YAMLOMap.tag = "tag:yaml.org,2002:omap"; - var omap2 = { + var omap = { collection: "seq", identify: /* @__PURE__ */ __name((value) => value instanceof Map, "identify"), nodeClass: YAMLOMap, default: false, tag: "tag:yaml.org,2002:omap", - resolve(seq2, onError2) { - const pairs$1 = pairs2.resolvePairs(seq2, onError2); + resolve(seq, onError2) { + const pairs$1 = pairs.resolvePairs(seq, onError2); const seenKeys = []; for (const { key } of pairs$1.items) { if (identity.isScalar(key)) { @@ -43507,15 +43506,15 @@ var require_omap = __commonJS({ } return Object.assign(new YAMLOMap(), pairs$1); }, - createNode: /* @__PURE__ */ __name((schema3, iterable, ctx) => YAMLOMap.from(schema3, iterable, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLOMap.from(schema2, iterable, ctx), "createNode") }; exports2.YAMLOMap = YAMLOMap; - exports2.omap = omap2; + exports2.omap = omap; } }); // node_modules/yaml/dist/schema/yaml-1.1/bool.js -var require_bool2 = __commonJS({ +var require_bool3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -43548,7 +43547,7 @@ var require_bool2 = __commonJS({ }); // node_modules/yaml/dist/schema/yaml-1.1/float.js -var require_float2 = __commonJS({ +var require_float3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) { "use strict"; var Scalar = require_Scalar(); @@ -43558,8 +43557,8 @@ var require_float2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -43568,22 +43567,22 @@ var require_float2 = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2.replace(/_/g, "")), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str.replace(/_/g, "")), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2.replace(/_/g, ""))); - const dot = str2.indexOf("."); + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ""))); + const dot = str.indexOf("."); if (dot !== -1) { - const f = str2.substring(dot + 1).replace(/_/g, ""); + const f = str.substring(dot + 1).replace(/_/g, ""); if (f[f.length - 1] === "0") node.minFractionDigits = f.length; } @@ -43591,48 +43590,48 @@ var require_float2 = __commonJS({ }, stringify: stringifyNumber.stringifyNumber }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } }); // node_modules/yaml/dist/schema/yaml-1.1/int.js -var require_int2 = __commonJS({ +var require_int3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - function intResolve(str2, offset, radix, { intAsBigInt }) { - const sign = str2[0]; + function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; if (sign === "-" || sign === "+") offset += 1; - str2 = str2.substring(offset).replace(/_/g, ""); + str = str.substring(offset).replace(/_/g, ""); if (intAsBigInt) { switch (radix) { case 2: - str2 = `0b${str2}`; + str = `0b${str}`; break; case 8: - str2 = `0o${str2}`; + str = `0o${str}`; break; case 16: - str2 = `0x${str2}`; + str = `0x${str}`; break; } - const n2 = BigInt(str2); + const n2 = BigInt(str); return sign === "-" ? BigInt(-1) * n2 : n2; } - const n = parseInt(str2, radix); + const n = parseInt(str, radix); return sign === "-" ? -1 * n : n; } __name(intResolve, "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value)) { - const str2 = value.toString(radix); - return value < 0 ? "-" + prefix2 + str2.substr(1) : prefix2 + str2; + const str = value.toString(radix); + return value < 0 ? "-" + prefix2 + str.substr(1) : prefix2 + str; } return stringifyNumber.stringifyNumber(node); } @@ -43643,7 +43642,7 @@ fy"); tag: "tag:yaml.org,2002:int", format: "BIN", test: /^[-+]?0b[0-1_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 2, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 2, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 2, "0b"), "stringify") }; var intOct = { @@ -43652,15 +43651,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^[-+]?0[0-7_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 1, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 1, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9][0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -43669,10 +43668,10 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^[-+]?0x[0-9a-fA-F_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intBin = intBin; exports2.intHex = intHex; exports2.intOct = intOct; @@ -43680,7 +43679,7 @@ fy"); }); // node_modules/yaml/dist/schema/yaml-1.1/set.js -var require_set = __commonJS({ +var require_set2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) { "use strict"; var identity = require_identity(); @@ -43690,8 +43689,8 @@ var require_set = __commonJS({ static { __name(this, "YAMLSet"); } - constructor(schema3) { - super(schema3); + constructor(schema2) { + super(schema2); this.tag = _YAMLSet.tag; } add(key) { @@ -43735,50 +43734,50 @@ var require_set = __commonJS({ else throw new Error("Set items must all have null values"); } - static from(schema3, iterable, ctx) { + static from(schema2, iterable, ctx) { const { replacer } = ctx; - const set3 = new this(schema3); + const set2 = new this(schema2); if (iterable && Symbol.iterator in Object(iterable)) for (let value of iterable) { if (typeof replacer === "function") value = replacer.call(iterable, value, value); - set3.items.push(Pair.createPair(value, null, ctx)); + set2.items.push(Pair.createPair(value, null, ctx)); } - return set3; + return set2; } }; YAMLSet.tag = "tag:yaml.org,2002:set"; - var set2 = { + var set = { collection: "map", identify: /* @__PURE__ */ __name((value) => value instanceof Set, "identify"), nodeClass: YAMLSet, default: false, tag: "tag:yaml.org,2002:set", - createNode: /* @__PURE__ */ __name((schema3, iterable, ctx) => YAMLSet.from(schema3, iterable, ctx), "createNode"), - resolve(map2, onError2) { - if (identity.isMap(map2)) { - if (map2.hasAllNullValues(true)) - return Object.assign(new YAMLSet(), map2); + createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLSet.from(schema2, iterable, ctx), "createNode"), + resolve(map, onError2) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); else onError2("Set items must all have null values"); } else onError2("Expected a mapping for this tag"); - return map2; + return map; } }; exports2.YAMLSet = YAMLSet; - exports2.set = set2; + exports2.set = set; } }); // node_modules/yaml/dist/schema/yaml-1.1/timestamp.js -var require_timestamp = __commonJS({ +var require_timestamp2 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); - function parseSexagesimal(str2, asBigInt) { - const sign = str2[0]; - const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; + function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === "-" || sign === "+" ? str.substring(1) : str; const num = /* @__PURE__ */ __name((n) => asBigInt ? BigInt(n) : Number(n), "num"); const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0)); return sign === "-" ? num(-1) * res : res; @@ -43817,7 +43816,7 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:int", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), "resolve"), stringify: stringifySexagesimal }; var floatTime = { @@ -43826,10 +43825,10 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:float", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2) => parseSexagesimal(str2, false), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseSexagesimal(str, false), "resolve"), stringify: stringifySexagesimal }; - var timestamp2 = { + var timestamp = { identify: /* @__PURE__ */ __name((value) => value instanceof Date, "identify"), default: true, tag: "tag:yaml.org,2002:timestamp", @@ -43838,8 +43837,8 @@ var require_timestamp = __commonJS({ // assumed to be 00:00:00Z (start of day, UTC). test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+\ )?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), - resolve(str2) { - const match2 = str2.match(timestamp2.test); + 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); @@ -43859,51 +43858,51 @@ tringify") }; exports2.floatTime = floatTime; exports2.intTime = intTime; - exports2.timestamp = timestamp2; + exports2.timestamp = timestamp; } }); // node_modules/yaml/dist/schema/yaml-1.1/schema.js -var require_schema3 = __commonJS({ +var require_schema4 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var binary2 = require_binary(); - var bool2 = require_bool2(); - var float2 = require_float2(); - var int2 = require_int2(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); - var schema3 = [ - map2.map, - seq2.seq, + var binary = require_binary2(); + var bool = require_bool3(); + var float = require_float3(); + var int = require_int3(); + var merge2 = require_merge3(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var set = require_set2(); + var timestamp = require_timestamp2(); + var schema2 = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.trueTag, - bool2.falseTag, - int2.intBin, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float, - binary2.binary, - merge3.merge, - omap2.omap, - pairs2.pairs, - set2.set, - timestamp2.intTime, - timestamp2.floatTime, - timestamp2.timestamp + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + merge2.merge, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp ]; - exports2.schema = schema3; + exports2.schema = schema2; } }); @@ -43911,61 +43910,61 @@ var require_schema3 = __commonJS({ var require_tags = __commonJS({ "node_modules/yaml/dist/schema/tags.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); var string = require_string2(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema3 = require_schema(); - var schema$1 = require_schema2(); - var binary2 = require_binary(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); - var schema$2 = require_schema3(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema2 = require_schema2(); + var schema$1 = require_schema3(); + var binary = require_binary2(); + var merge2 = require_merge3(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var schema$2 = require_schema4(); + var set = require_set2(); + var timestamp = require_timestamp2(); var schemas = /* @__PURE__ */ new Map([ - ["core", schema3.schema], - ["failsafe", [map2.map, seq2.seq, string.string]], + ["core", schema2.schema], + ["failsafe", [map.map, seq.seq, string.string]], ["json", schema$1.schema], ["yaml11", schema$2.schema], ["yaml-1.1", schema$2.schema] ]); var tagsByName = { - binary: binary2.binary, - bool: bool2.boolTag, - float: float2.float, - floatExp: float2.floatExp, - floatNaN: float2.floatNaN, - floatTime: timestamp2.floatTime, - int: int2.int, - intHex: int2.intHex, - intOct: int2.intOct, - intTime: timestamp2.intTime, - map: map2.map, - merge: merge3.merge, - null: _null2.nullTag, - omap: omap2.omap, - pairs: pairs2.pairs, - seq: seq2.seq, - set: set2.set, - timestamp: timestamp2.timestamp + 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: map.map, + merge: merge2.merge, + 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": binary2.binary, - "tag:yaml.org,2002:merge": merge3.merge, - "tag:yaml.org,2002:omap": omap2.omap, - "tag:yaml.org,2002:pairs": pairs2.pairs, - "tag:yaml.org,2002:set": set2.set, - "tag:yaml.org,2002:timestamp": timestamp2.timestamp + "tag:yaml.org,2002:binary": binary.binary, + "tag:yaml.org,2002:merge": merge2.merge, + "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, addMergeTag) { const schemaTags = schemas.get(schemaName); if (schemaTags && !customTags) { - return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice(); + return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice(); } let tags2 = schemaTags; if (!tags2) { @@ -43984,7 +43983,7 @@ var require_tags = __commonJS({ tags2 = customTags(tags2.slice()); } if (addMergeTag) - tags2 = tags2.concat(merge3.merge); + tags2 = tags2.concat(merge2.merge); return tags2.reduce((tags3, tag) => { const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; if (!tagObj) { @@ -44008,8 +44007,8 @@ var require_Schema = __commonJS({ "node_modules/yaml/dist/schema/Schema.js"(exports2) { "use strict"; var identity = require_identity(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map2(); + var seq = require_seq2(); var string = require_string2(); var tags2 = require_tags(); var sortMapEntriesByKey = /* @__PURE__ */ __name((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0, "sortMapEntri\ @@ -44018,15 +44017,15 @@ esByKey"); static { __name(this, "Schema"); } - constructor({ compat, customTags, merge: merge3, resolveKnownTags, schema: schema3, sortMapEntries, toStringDefaults }) { + constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema: schema2, sortMapEntries, toStringDefaults }) { this.compat = Array.isArray(compat) ? tags2.getTags(compat, "compat") : compat ? tags2.getTags(null, compat) : null; - this.name = typeof schema3 === "string" && schema3 || "core"; + this.name = typeof schema2 === "string" && schema2 || "core"; this.knownTags = resolveKnownTags ? tags2.coreKnownTags : {}; - this.tags = tags2.getTags(customTags, this.name, merge3); + this.tags = tags2.getTags(customTags, this.name, merge2); this.toStringOptions = toStringDefaults ?? null; - Object.defineProperty(this, identity.MAP, { value: map2.map }); + Object.defineProperty(this, identity.MAP, { value: map.map }); Object.defineProperty(this, identity.SCALAR, { value: string.string }); - Object.defineProperty(this, identity.SEQ, { value: seq2.seq }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; } @@ -44390,11 +44389,11 @@ var require_Document = __commonJS({ throw new Error(`With a null YAML version, the { schema: Schema } option is required`); } // json & jsonArg are only used from toJSON() - toJS({ json: json2, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { const ctx = { anchors: /* @__PURE__ */ new Map(), doc: this, - keep: !json2, + keep: !json, mapAsMap: mapAsMap === true, mapKeyWarned: false, maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 @@ -44737,9 +44736,9 @@ var require_resolve_block_map = __commonJS({ 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: composeNode2, composeEmptyNode }, ctx, bm, onError2, tag) { + function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; - const map2 = new NodeClass(ctx.schema); + const map = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; let offset = bm.offset; @@ -44765,10 +44764,10 @@ var require_resolve_block_map = __commonJS({ if (!keyProps.anchor && !keyProps.tag && !sep7) { commentEnd = keyProps.end; if (keyProps.comment) { - if (map2.comment) - map2.comment += "\n" + keyProps.comment; + if (map.comment) + map.comment += "\n" + keyProps.comment; else - map2.comment = keyProps.comment; + map.comment = keyProps.comment; } continue; } @@ -44781,12 +44780,12 @@ e"); } ctx.atKey = true; const keyStart = keyProps.end; - const keyNode = key ? composeNode2(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, + const keyNode = key ? composeNode(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError2); ctx.atKey = false; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); const valueProps = resolveProps.resolveProps(sep7 ?? [], { indicator: "map-value-ind", @@ -44805,15 +44804,15 @@ e"); onError2(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 ? composeNode2(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, - null, valueProps, onError2); + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, null, + valueProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError2); offset = valueNode.range[2]; const pair = new Pair.Pair(keyNode, valueNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } else { if (implicitKey) onError2(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); @@ -44826,13 +44825,13 @@ e"); const pair = new Pair.Pair(keyNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } } if (commentEnd && commentEnd < offset) onError2(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); - map2.range = [bm.offset, offset, commentEnd ?? offset]; - return map2; + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; } __name(resolveBlockMap, "resolveBlockMap"); exports2.resolveBlockMap = resolveBlockMap; @@ -44846,9 +44845,9 @@ var require_resolve_block_seq = __commonJS({ var YAMLSeq = require_YAMLSeq(); var resolveProps = require_resolve_props(); var utilFlowIndentCheck = require_util_flow_indent_check(); - function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode }, ctx, bs, onError2, tag) { + function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; - const seq2 = new NodeClass(ctx.schema); + const seq = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; if (ctx.atKey) @@ -44873,19 +44872,19 @@ var require_resolve_block_seq = __commonJS({ } else { commentEnd = props.end; if (props.comment) - seq2.comment = props.comment; + seq.comment = props.comment; continue; } } - const node = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, + const node = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError2); offset = node.range[2]; - seq2.items.push(node); + seq.items.push(node); } - seq2.range = [bs.offset, offset, commentEnd ?? offset]; - return seq2; + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; } __name(resolveBlockSeq, "resolveBlockSeq"); exports2.resolveBlockSeq = resolveBlockSeq; @@ -44902,8 +44901,8 @@ var require_resolve_end = __commonJS({ let hasSpace = false; let sep7 = ""; for (const token of end) { - const { source, type: type2 } = token; - switch (type2) { + const { source, type } = token; + switch (type) { case "space": hasSpace = true; break; @@ -44924,7 +44923,7 @@ var require_resolve_end = __commonJS({ hasSpace = true; break; default: - onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type2} at node end`); + onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); } offset += source.length; } @@ -44951,7 +44950,7 @@ var require_resolve_flow_collection = __commonJS({ var blockMsg = "Block collections are not allowed within flow collections"; var isBlock = /* @__PURE__ */ __name((token) => token && (token.type === "block-map" || token.type === "block-seq"), "isBlock"); - function resolveFlowCollection({ composeNode: composeNode2, composeEmptyNode }, ctx, fc, onError2, tag) { + function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError2, tag) { const isMap = fc.start.source === "{"; const fcName = isMap ? "flow map" : "flow sequence"; const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq); @@ -45031,7 +45030,7 @@ var require_resolve_flow_collection = __commonJS({ } } if (!isMap && !sep7 && !props.found) { - const valueNode = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, + const valueNode = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, props, onError2); coll.items.push(valueNode); offset = valueNode.range[2]; @@ -45040,7 +45039,7 @@ var require_resolve_flow_collection = __commonJS({ } else { ctx.atKey = true; const keyStart = props.end; - const keyNode = key ? composeNode2(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, + const keyNode = key ? composeNode(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, onError2); if (isBlock(key)) onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg); @@ -45076,7 +45075,7 @@ start of an implicit flow sequence key"); else onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); } - const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( ctx, valueProps.end, sep7, null, valueProps, onError2) : null; if (valueNode) { if (isBlock(value)) @@ -45091,17 +45090,17 @@ start of an implicit flow sequence key"); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; if (isMap) { - const map2 = coll; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); - map2.items.push(pair); + map.items.push(pair); } else { - const map2 = new YAMLMap.YAMLMap(ctx.schema); - map2.flow = true; - map2.items.push(pair); + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); const endRange = (valueNode ?? keyNode).range; - map2.range = [keyNode.range[0], endRange[1], endRange[2]]; - coll.items.push(map2); + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); } offset = valueNode ? valueNode.range[2] : valueProps.end; } @@ -45221,7 +45220,7 @@ var require_resolve_block_scalar = __commonJS({ const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError2); if (!header) return { value: "", type: null, comment: "", range: [start, start, start] }; - const type2 = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + 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 i2 = lines.length - 1; i2 >= 0; --i2) { @@ -45236,7 +45235,7 @@ var require_resolve_block_scalar = __commonJS({ let end2 = start + header.length; if (scalar.source) end2 += scalar.source.length; - return { value: value2, type: type2, comment: header.comment, range: [start, end2, end2] }; + return { value: value2, type, comment: header.comment, range: [start, end2, end2] }; } let trimIndent = scalar.indent + header.indent; let offset = scalar.offset + header.length; @@ -45284,7 +45283,7 @@ ator"; onError2(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); indent = ""; } - if (type2 === Scalar.Scalar.BLOCK_LITERAL) { + if (type === Scalar.Scalar.BLOCK_LITERAL) { value += sep7 + indent.slice(trimIndent) + content; sep7 = "\n"; } else if (indent.length > trimIndent || content[0] === " ") { @@ -45319,7 +45318,7 @@ ator"; value += "\n"; } const end = start + header.length + scalar.source.length; - return { value, type: type2, comment: header.comment, range: [start, end, end] }; + return { value, type, comment: header.comment, range: [start, end, end] }; } __name(resolveBlockScalar, "resolveBlockScalar"); function parseBlockScalarHeader({ offset, props }, strict, onError2) { @@ -45405,11 +45404,11 @@ var require_resolve_flow_scalar = __commonJS({ var Scalar = require_Scalar(); var resolveEnd = require_resolve_end(); function resolveFlowScalar(scalar, strict, onError2) { - const { offset, type: type2, source, end } = scalar; + const { offset, type, source, end } = scalar; let _type; let value; const _onError = /* @__PURE__ */ __name((rel, code, msg) => onError2(offset + rel, code, msg), "_onError"); - switch (type2) { + switch (type) { case "scalar": _type = Scalar.Scalar.PLAIN; value = plainValue(source, _onError); @@ -45424,7 +45423,7 @@ var require_resolve_flow_scalar = __commonJS({ break; /* istanbul ignore next should not happen */ default: - onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type2}`); + onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); return { value: "", type: null, @@ -45634,7 +45633,7 @@ var require_compose_scalar = __commonJS({ var resolveBlockScalar = require_resolve_block_scalar(); var resolveFlowScalar = require_resolve_flow_scalar(); function composeScalar(ctx, token, tagToken, onError2) { - const { value, type: type2, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( + const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( ctx, token, onError2) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError2); const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError2(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; @@ -45658,8 +45657,8 @@ var require_compose_scalar = __commonJS({ } scalar.range = range2; scalar.source = value; - if (type2) - scalar.type = type2; + if (type) + scalar.type = type; if (tagName) scalar.tag = tagName; if (tag.format) @@ -45669,11 +45668,11 @@ var require_compose_scalar = __commonJS({ return scalar; } __name(composeScalar, "composeScalar"); - function findScalarTagByName(schema3, value, tagName, tagToken, onError2) { + function findScalarTagByName(schema2, value, tagName, tagToken, onError2) { if (tagName === "!") - return schema3[identity.SCALAR]; + return schema2[identity.SCALAR]; const matchWithTest = []; - for (const tag of schema3.tags) { + for (const tag of schema2.tags) { if (!tag.collection && tag.tag === tagName) { if (tag.default && tag.test) matchWithTest.push(tag); @@ -45684,20 +45683,20 @@ var require_compose_scalar = __commonJS({ for (const tag of matchWithTest) if (tag.test?.test(value)) return tag; - const kt = schema3.knownTags[tagName]; + const kt = schema2.knownTags[tagName]; if (kt && !kt.collection) { - schema3.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + schema2.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); return kt; } onError2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); - return schema3[identity.SCALAR]; + return schema2[identity.SCALAR]; } __name(findScalarTagByName, "findScalarTagByName"); - function findScalarTagByTest({ atKey, directives, schema: schema3 }, value, token, onError2) { - const tag = schema3.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test( - value)) || schema3[identity.SCALAR]; - if (schema3.compat) { - const compat = schema3.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema3[identity.SCALAR]; + function findScalarTagByTest({ atKey, directives, schema: schema2 }, value, token, onError2) { + const tag = schema2.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test( + value)) || schema2[identity.SCALAR]; + if (schema2.compat) { + const compat = schema2.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema2[identity.SCALAR]; if (tag.tag !== compat.tag) { const ts = directives.tagString(tag.tag); const cs = directives.tagString(compat.tag); @@ -45753,8 +45752,8 @@ var require_compose_node = __commonJS({ var composeScalar = require_compose_scalar(); var resolveEnd = require_resolve_end(); var utilEmptyScalarPosition = require_util_empty_scalar_position(); - var CN = { composeNode: composeNode2, composeEmptyNode }; - function composeNode2(ctx, token, props, onError2) { + var CN = { composeNode, composeEmptyNode }; + function composeNode(ctx, token, props, onError2) { const atKey = ctx.atKey; const { spaceBefore, comment, anchor, tag } = props; let node; @@ -45811,7 +45810,7 @@ var require_compose_node = __commonJS({ node.srcToken = token; return node; } - __name(composeNode2, "composeNode"); + __name(composeNode, "composeNode"); function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError2) { const token = { type: "scalar", @@ -45849,7 +45848,7 @@ var require_compose_node = __commonJS({ } __name(composeAlias, "composeAlias"); exports2.composeEmptyNode = composeEmptyNode; - exports2.composeNode = composeNode2; + exports2.composeNode = composeNode; } }); @@ -45858,7 +45857,7 @@ var require_compose_doc = __commonJS({ "node_modules/yaml/dist/compose/compose-doc.js"(exports2) { "use strict"; var Document = require_Document(); - var composeNode2 = require_compose_node(); + var composeNode = require_compose_node(); var resolveEnd = require_resolve_end(); var resolveProps = require_resolve_props(); function composeDoc(options, directives, { offset, start, value, end }, onError2) { @@ -45884,7 +45883,7 @@ var require_compose_doc = __commonJS({ if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) onError2(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); } - doc.contents = value ? composeNode2.composeNode(ctx, value, props, onError2) : composeNode2.composeEmptyNode(ctx, props. + doc.contents = value ? composeNode.composeNode(ctx, value, props, onError2) : composeNode.composeEmptyNode(ctx, props. end, start, null, props, onError2); const contentEnd = doc.contents.range[2]; const re = resolveEnd.resolveEnd(end, contentEnd, false, onError2); @@ -46143,8 +46142,8 @@ var require_cst_scalar = __commonJS({ } __name(resolveAsScalar, "resolveAsScalar"); function createScalarToken(value, context3) { - const { implicitKey = false, indent, inFlow = false, offset = -1, type: type2 = "PLAIN" } = context3; - const source = stringifyString.stringifyString({ type: type2, value }, { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = "PLAIN" } = context3; + const source = stringifyString.stringifyString({ type, value }, { implicitKey, indent: indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -46176,29 +46175,29 @@ var require_cst_scalar = __commonJS({ } __name(createScalarToken, "createScalarToken"); function setScalarValue(token, value, context3 = {}) { - let { afterKey = false, implicitKey = false, inFlow = false, type: type2 } = context3; + let { afterKey = false, implicitKey = false, inFlow = false, type } = context3; let indent = "indent" in token ? token.indent : null; if (afterKey && typeof indent === "number") indent += 2; - if (!type2) + if (!type) switch (token.type) { case "single-quoted-scalar": - type2 = "QUOTE_SINGLE"; + type = "QUOTE_SINGLE"; break; case "double-quoted-scalar": - type2 = "QUOTE_DOUBLE"; + 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"); - type2 = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; + type = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; break; } default: - type2 = "PLAIN"; + type = "PLAIN"; } - const source = stringifyString.stringifyString({ type: type2, value }, { + const source = stringifyString.stringifyString({ type, value }, { implicitKey: implicitKey || indent === null, indent: indent !== null && indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -46260,12 +46259,12 @@ var require_cst_scalar = __commonJS({ return false; } __name(addEndtoBlockProps, "addEndtoBlockProps"); - function setFlowScalarValue(token, source, type2) { + function setFlowScalarValue(token, source, type) { switch (token.type) { case "scalar": case "double-quoted-scalar": case "single-quoted-scalar": - token.type = type2; + token.type = type; token.source = source; break; case "block-scalar": { @@ -46276,7 +46275,7 @@ var require_cst_scalar = __commonJS({ for (const tok of end) tok.offset += oa; delete token.props; - Object.assign(token, { type: type2, source, end }); + Object.assign(token, { type, source, end }); break; } case "block-map": @@ -46284,7 +46283,7 @@ var require_cst_scalar = __commonJS({ const offset = token.offset + source.length; const nl = { type: "newline", offset, indent: token.indent, source: "\n" }; delete token.items; - Object.assign(token, { type: type2, source, end: [nl] }); + Object.assign(token, { type, source, end: [nl] }); break; } default: { @@ -46294,7 +46293,7 @@ var require_cst_scalar = __commonJS({ for (const key of Object.keys(token)) if (key !== "type" && key !== "offset") delete token[key]; - Object.assign(token, { type: type2, indent, source, end }); + Object.assign(token, { type, indent, source, end }); } } } @@ -47173,9 +47172,9 @@ var require_parser = __commonJS({ var node_process = require("process"); var cst = require_cst(); var lexer = require_lexer(); - function includesToken(list, type2) { + function includesToken(list, type) { for (let i2 = 0; i2 < list.length; ++i2) - if (list[i2].type === type2) + if (list[i2].type === type) return true; return false; } @@ -47320,19 +47319,19 @@ nd")) { this.offset += source.length; return; } - const type2 = cst.tokenType(source); - if (!type2) { + 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 (type2 === "scalar") { + } else if (type === "scalar") { this.atNewLine = false; this.atScalar = true; this.type = "scalar"; } else { - this.type = type2; + this.type = type; yield* this.step(); - switch (type2) { + switch (type) { case "newline": this.atNewLine = true; this.indent = 0; @@ -47559,14 +47558,14 @@ k-map" || token.type === "block-seq")) { delete scalar.end; } else sep7 = [this.sourceToken]; - const map2 = { + const map = { type: "block-map", offset: scalar.offset, indent: scalar.indent, items: [{ start, key: scalar, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else yield* this.lineEnd(scalar); } @@ -47596,8 +47595,8 @@ k-map" || token.type === "block-seq")) { yield* this.step(); } } - *blockMap(map2) { - const it = map2.items[map2.items.length - 1]; + *blockMap(map) { + const it = map.items[map.items.length - 1]; switch (this.type) { case "newline": this.onKeyLine = false; @@ -47607,7 +47606,7 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { @@ -47617,17 +47616,17 @@ k-map" || token.type === "block-seq")) { case "space": case "comment": if (it.value) { - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { - if (this.atIndentedComment(it.start, map2.indent)) { - const prev = map2.items[map2.items.length - 2]; + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - map2.items.pop(); + map.items.pop(); return; } } @@ -47635,8 +47634,8 @@ k-map" || token.type === "block-seq")) { } return; } - if (this.indent >= map2.indent) { - const atMapIndent = !this.onKeyLine && this.indent === map2.indent; + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind"; let start = []; if (atNextItem && it.sep && !it.value) { @@ -47650,7 +47649,7 @@ k-map" || token.type === "block-seq")) { case "space": break; case "comment": - if (st.indent > map2.indent) + if (st.indent > map.indent) nl.length = 0; break; default: @@ -47665,7 +47664,7 @@ k-map" || token.type === "block-seq")) { case "tag": if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start }); + map.items.push({ start }); this.onKeyLine = true; } else if (it.sep) { it.sep.push(this.sourceToken); @@ -47679,7 +47678,7 @@ k-map" || token.type === "block-seq")) { it.explicitKey = true; } else if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start, explicitKey: true }); + map.items.push({ start, explicitKey: true }); } else { this.stack.push({ type: "block-map", @@ -47705,7 +47704,7 @@ k-map" || token.type === "block-seq")) { }); } } else if (it.value) { - map2.items.push({ start: [], key: null, sep: [this.sourceToken] }); + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -47735,7 +47734,7 @@ k-map" || token.type === "block-seq")) { if (!it.sep) { Object.assign(it, { key: null, sep: [this.sourceToken] }); } else if (it.value || atNextItem) { - map2.items.push({ start, key: null, sep: [this.sourceToken] }); + map.items.push({ start, key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -47755,7 +47754,7 @@ k-map" || token.type === "block-seq")) { case "double-quoted-scalar": { const fs15 = this.flowScalar(this.type); if (atNextItem || it.value) { - map2.items.push({ start, key: fs15, sep: [] }); + map.items.push({ start, key: fs15, sep: [] }); this.onKeyLine = true; } else if (it.sep) { this.stack.push(fs15); @@ -47766,7 +47765,7 @@ k-map" || token.type === "block-seq")) { return; } default: { - const bv = this.startBlockValue(map2); + const bv = this.startBlockValue(map); if (bv) { if (bv.type === "block-seq") { if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) { @@ -47779,7 +47778,7 @@ k-map" || token.type === "block-seq")) { return; } } else if (atMapIndent) { - map2.items.push({ start }); + map.items.push({ start }); } this.stack.push(bv); return; @@ -47790,8 +47789,8 @@ k-map" || token.type === "block-seq")) { yield* this.pop(); yield* this.step(); } - *blockSequence(seq2) { - const it = seq2.items[seq2.items.length - 1]; + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; switch (this.type) { case "newline": if (it.value) { @@ -47800,22 +47799,22 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); } else it.start.push(this.sourceToken); return; case "space": case "comment": if (it.value) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else { - if (this.atIndentedComment(it.start, seq2.indent)) { - const prev = seq2.items[seq2.items.length - 2]; + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - seq2.items.pop(); + seq.items.pop(); return; } } @@ -47824,21 +47823,21 @@ k-map" || token.type === "block-seq")) { return; case "anchor": case "tag": - if (it.value || this.indent <= seq2.indent) + if (it.value || this.indent <= seq.indent) break; it.start.push(this.sourceToken); return; case "seq-item-ind": - if (this.indent !== seq2.indent) + if (this.indent !== seq.indent) break; if (it.value || includesToken(it.start, "seq-item-ind")) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else it.start.push(this.sourceToken); return; } - if (this.indent > seq2.indent) { - const bv = this.startBlockValue(seq2); + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); if (bv) { this.stack.push(bv); return; @@ -47921,20 +47920,20 @@ k-map" || token.type === "block-seq")) { fixFlowSeqItems(fc); const sep7 = fc.end.splice(1, fc.end.length); sep7.push(this.sourceToken); - const map2 = { + const map = { type: "block-map", offset: fc.offset, indent: fc.indent, items: [{ start, key: fc, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else { yield* this.lineEnd(fc); } } } - flowScalar(type2) { + flowScalar(type) { if (this.onNewLine) { let nl = this.source.indexOf("\n") + 1; while (nl !== 0) { @@ -47943,7 +47942,7 @@ k-map" || token.type === "block-seq")) { } } return { - type: type2, + type, offset: this.offset, indent: this.indent, source: this.source @@ -48232,40 +48231,40 @@ var require_balanced_match = __commonJS({ "node_modules/@actions/glob/node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r2 = range2(a, b, str2); + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r2 = range2(a, b, str); return r2 && { start: r2[0], end: r2[1], - pre: str2.slice(0, r2[0]), - body: str2.slice(r2[0] + a.length, r2[1]), - post: str2.slice(r2[1] + b.length) + pre: str.slice(0, r2[0]), + body: str.slice(r2[0] + a.length, r2[1]), + post: str.slice(r2[1] + b.length) }; } __name(balanced, "balanced"); - function maybeMatch(reg, str2) { - var m = str2.match(reg); + function maybeMatch(reg, str) { + var m = str.match(reg); return m ? m[0] : null; } __name(maybeMatch, "maybeMatch"); balanced.range = range2; - function range2(a, b, str2) { + function range2(a, b, str) { var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); var i2 = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; - left = str2.length; + left = str.length; while (i2 >= 0 && !result) { if (i2 == ai) { begs.push(i2); - ai = str2.indexOf(a, i2 + 1); + ai = str.indexOf(a, i2 + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { @@ -48274,7 +48273,7 @@ var require_balanced_match = __commonJS({ left = beg; right = bi; } - bi = str2.indexOf(b, i2 + 1); + bi = str.indexOf(b, i2 + 1); } i2 = ai < bi && ai >= 0 ? ai : bi; } @@ -48299,27 +48298,27 @@ var require_brace_expansion = __commonJS({ var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } __name(numeric, "numeric"); - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join( - escComma).split("\\.").join(escPeriod); + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma). + split("\\.").join(escPeriod); } __name(escapeBraces, "escapeBraces"); - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). split(escPeriod).join("."); } __name(unescapeBraces, "unescapeBraces"); - function parseCommaParts(str2) { - if (!str2) + function parseCommaParts(str) { + if (!str) return [""]; var parts = []; - var m = balanced("{", "}", str2); + var m = balanced("{", "}", str); if (!m) - return str2.split(","); + return str.split(","); var pre = m.pre; var body2 = m.body; var post = m.post; @@ -48334,19 +48333,19 @@ var require_brace_expansion = __commonJS({ return parts; } __name(parseCommaParts, "parseCommaParts"); - function expandTop(str2, options) { - if (!str2) + function expandTop(str, options) { + if (!str) return []; options = options || {}; var max = options.max == null ? Infinity : options.max; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); } - return expand(escapeBraces(str2), max, true).map(unescapeBraces); + return expand(escapeBraces(str), max, true).map(unescapeBraces); } __name(expandTop, "expandTop"); - function embrace(str2) { - return "{" + str2 + "}"; + function embrace(str) { + return "{" + str + "}"; } __name(embrace, "embrace"); function isPadded(el) { @@ -48361,20 +48360,20 @@ var require_brace_expansion = __commonJS({ return i2 >= y; } __name(gte, "gte"); - function expand(str2, max, isTop) { + function expand(str, max, isTop) { var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2, max, true); + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str, max, true); } - return [str2]; + return [str]; } var n; if (isSequence) { @@ -48475,9 +48474,9 @@ var require_minimatch = __commonJS({ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { - return s.split("").reduce(function(set2, c3) { - set2[c3] = true; - return set2; + return s.split("").reduce(function(set, c3) { + set[c3] = true; + return set; }, {}); } __name(charSet, "charSet"); @@ -48582,24 +48581,24 @@ var require_minimatch = __commonJS({ return; } this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); + var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = /* @__PURE__ */ __name(function debug3() { console.error.apply(console, arguments); }, "debug"); - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { + this.debug(this.pattern, set); + set = set.filter(function(s) { return s.indexOf(false) === -1; }); - this.debug(this.pattern, set2); - this.set = set2; + this.debug(this.pattern, set); + this.set = set; } __name(make, "make"); Minimatch2.prototype.parseNegate = parseNegate; @@ -48890,15 +48889,15 @@ var require_minimatch = __commonJS({ Minimatch2.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { + var set = this.set; + if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { + var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); @@ -48936,16 +48935,16 @@ var require_minimatch = __commonJS({ } f = f.split(slashSplit); this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); + var set = this.set; + this.debug(this.pattern, "set", set); var filename; var i2; for (i2 = f.length - 1; i2 >= 0; i2--) { filename = f[i2]; if (filename) break; } - for (i2 = 0; i2 < set2.length; i2++) { - var pattern = set2[i2]; + for (i2 = 0; i2 < set.length; i2++) { + var pattern = set[i2]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; @@ -49178,19 +49177,19 @@ var require_helpers = __commonJS({ } __name(toBuffer, "toBuffer"); exports2.toBuffer = toBuffer; - async function json2(stream6) { + async function json(stream6) { const buf = await toBuffer(stream6); - const str2 = buf.toString("utf8"); + const str = buf.toString("utf8"); try { - return JSON.parse(str2); + return JSON.parse(str); } catch (_err) { const err = _err; - err.message += ` (input: ${str2})`; + err.message += ` (input: ${str})`; throw err; } } - __name(json2, "json"); - exports2.json = json2; + __name(json, "json"); + exports2.json = json; function req(url3, opts = {}) { const href = typeof url3 === "string" ? url3 : url3.href; const req2 = (href.startsWith("https:") ? https4 : http4).request(url3, opts); @@ -50808,8 +50807,8 @@ var require_binary_writer = __commonJS({ * * Generated code should compute the tag ahead of time and call `uint32()`. */ - tag(fieldNo, type2) { - return this.uint32((fieldNo << 3 | type2) >>> 0); + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } /** * Write a chunk of raw bytes. @@ -51338,31 +51337,31 @@ var require_reflection_type_check = __commonJS({ } return true; } - message(arg, type2, allowExcessProperties, depth) { + message(arg, type, allowExcessProperties, depth) { if (allowExcessProperties) { - return type2.isAssignable(arg, depth); + return type.isAssignable(arg, depth); } - return type2.is(arg, depth); + return type.is(arg, depth); } - messages(arg, type2, allowExcessProperties, depth) { + messages(arg, type, allowExcessProperties, depth) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (allowExcessProperties) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.isAssignable(arg[i2], depth - 1)) + if (!type.isAssignable(arg[i2], depth - 1)) return false; } else { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.is(arg[i2], depth - 1)) + if (!type.is(arg[i2], depth - 1)) return false; } return true; } - scalar(arg, type2, longType) { + scalar(arg, type, longType) { let argType = typeof arg; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.UINT64: case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.INT64: @@ -51389,31 +51388,31 @@ var require_reflection_type_check = __commonJS({ return argType == "number" && Number.isInteger(arg); } } - scalars(arg, type2, depth, longType) { + scalars(arg, type, depth, longType) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (Array.isArray(arg)) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!this.scalar(arg[i2], type2, longType)) + if (!this.scalar(arg[i2], type, longType)) return false; } return true; } - mapKeys(map2, type2, depth) { - let keys = Object.keys(map2); - switch (type2) { + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); case reflection_info_1.ScalarType.BOOL: - return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); default: - return this.scalars(keys, type2, depth, reflection_info_1.LongType.STRING); + return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING); } } }; @@ -51428,8 +51427,8 @@ var require_reflection_long_convert = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionLongConvert = void 0; var reflection_info_1 = require_reflection_info(); - function reflectionLongConvert(long, type2) { - switch (type2) { + function reflectionLongConvert(long, type) { + switch (type) { case reflection_info_1.LongType.BIGINT: return long.toBigInt(); case reflection_info_1.LongType.NUMBER: @@ -51602,93 +51601,93 @@ var require_reflection_json_reader = __commonJS({ * * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - enum(type2, json2, fieldName, ignoreUnknownFields) { - if (type2[0] == "google.protobuf.NullValue") - assert_1.assert(json2 === null || json2 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ -, enum ${type2[0]} only accepts null.`); - if (json2 === null) + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") + assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ +, enum ${type[0]} only accepts null.`); + if (json === null) return 0; - switch (typeof json2) { + switch (typeof json) { case "number": - assert_1.assert(Number.isInteger(json2), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can\ - only be integral number, got ${json2}.`); - return json2; + assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can \ +only be integral number, got ${json}.`); + return json; case "string": - let localEnumName = json2; - if (type2[2] && json2.substring(0, type2[2].length) === type2[2]) - localEnumName = json2.substring(type2[2].length); - let enumNumber = type2[1][localEnumName]; + let localEnumName = json; + if (type[2] && json.substring(0, type[2].length) === type[2]) + localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; if (typeof enumNumber === "undefined" && ignoreUnknownFields) { return false; } assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, en\ -um ${type2[0]} has no value for "${json2}".`); +um ${type[0]} has no value for "${json}".`); return enumNumber; } - assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json2}\ + assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}\ ".`); } - scalar(json2, type2, longType, fieldName) { + scalar(json, type, longType, fieldName) { let e; try { - switch (type2) { + switch (type) { // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity". // Either numbers or strings are accepted. Exponent notation is also accepted. case reflection_info_1.ScalarType.DOUBLE: case reflection_info_1.ScalarType.FLOAT: - if (json2 === null) + if (json === null) return 0; - if (json2 === "NaN") + if (json === "NaN") return Number.NaN; - if (json2 === "Infinity") + if (json === "Infinity") return Number.POSITIVE_INFINITY; - if (json2 === "-Infinity") + if (json === "-Infinity") return Number.NEGATIVE_INFINITY; - if (json2 === "") { + if (json === "") { e = "empty string"; break; } - if (typeof json2 == "string" && json2.trim().length !== json2.length) { + if (typeof json == "string" && json.trim().length !== json.length) { e = "extra whitespace"; break; } - if (typeof json2 != "string" && typeof json2 != "number") { + if (typeof json != "string" && typeof json != "number") { break; } - let float2 = Number(json2); - if (Number.isNaN(float2)) { + let float = Number(json); + if (Number.isNaN(float)) { e = "not a number"; break; } - if (!Number.isFinite(float2)) { + if (!Number.isFinite(float)) { e = "too large or small"; break; } - if (type2 == reflection_info_1.ScalarType.FLOAT) - assert_1.assertFloat32(float2); - return float2; + if (type == reflection_info_1.ScalarType.FLOAT) + assert_1.assertFloat32(float); + return float; // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - if (json2 === null) + if (json === null) return 0; let int32; - if (typeof json2 == "number") - int32 = json2; - else if (json2 === "") + if (typeof json == "number") + int32 = json; + else if (json === "") e = "empty string"; - else if (typeof json2 == "string") { - if (json2.trim().length !== json2.length) + else if (typeof json == "string") { + if (json.trim().length !== json.length) e = "extra whitespace"; else - int32 = Number(json2); + int32 = Number(json); } if (int32 === void 0) break; - if (type2 == reflection_info_1.ScalarType.UINT32) + if (type == reflection_info_1.ScalarType.UINT32) assert_1.assertUInt32(int32); else assert_1.assertInt32(int32); @@ -51697,53 +51696,53 @@ um ${type2[0]} has no value for "${json2}".`); case reflection_info_1.ScalarType.INT64: case reflection_info_1.ScalarType.SFIXED64: case reflection_info_1.ScalarType.SINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType); case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.UINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType); // bool: case reflection_info_1.ScalarType.BOOL: - if (json2 === null) + if (json === null) return false; - if (typeof json2 !== "boolean") + if (typeof json !== "boolean") break; - return json2; + return json; // string: case reflection_info_1.ScalarType.STRING: - if (json2 === null) + if (json === null) return ""; - if (typeof json2 !== "string") { + if (typeof json !== "string") { e = "extra whitespace"; break; } try { - encodeURIComponent(json2); + encodeURIComponent(json); } catch (e2) { e2 = "invalid UTF8"; break; } - return json2; + return json; // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. // Either standard or URL-safe base64 encoding with/without paddings are accepted. case reflection_info_1.ScalarType.BYTES: - if (json2 === null || json2 === "") + if (json === null || json === "") return new Uint8Array(0); - if (typeof json2 !== "string") + if (typeof json !== "string") break; - return base64_1.base64decode(json2); + return base64_1.base64decode(json); } } catch (error2) { e = error2.message; } - this.assert(false, fieldName + (e ? " - " + e : ""), json2); + this.assert(false, fieldName + (e ? " - " + e : ""), json); } }; exports2.ReflectionJsonReader = ReflectionJsonReader; @@ -51772,12 +51771,12 @@ var require_reflection_json_writer = __commonJS({ * Converts the message to a JSON object, based on the field descriptors. */ write(message, options) { - const json2 = {}, source = message; + const json = {}, source = message; for (const field of this.fields) { if (!field.oneof) { let jsonValue2 = this.field(field, source[field.localName], options); if (jsonValue2 !== void 0) - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; continue; } const group = source[field.oneof]; @@ -51787,9 +51786,9 @@ var require_reflection_json_writer = __commonJS({ options; let jsonValue = this.field(field, group[field.localName], opt); assert_1.assert(jsonValue !== void 0); - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; } - return json2; + return json; } field(field, value, options) { let jsonValue = void 0; @@ -51873,8 +51872,8 @@ var require_reflection_json_writer = __commonJS({ /** * Returns `null` as the default for google.protobuf.NullValue. */ - enum(type2, value, fieldName, optional, emitDefaultValues, enumAsInteger) { - if (type2[0] == "google.protobuf.NullValue") + enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; if (value === void 0) { assert_1.assert(optional); @@ -51884,24 +51883,24 @@ var require_reflection_json_writer = __commonJS({ return void 0; assert_1.assert(typeof value == "number"); assert_1.assert(Number.isInteger(value)); - if (enumAsInteger || !type2[1].hasOwnProperty(value)) + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type2[2]) - return type2[2] + type2[1][value]; - return type2[1][value]; + if (type[2]) + return type[2] + type[1][value]; + return type[1][value]; } - message(type2, value, fieldName, options) { + message(type, value, fieldName, options) { if (value === void 0) return options.emitDefaultValues ? null : void 0; - return type2.internalJsonWrite(value, options); + return type.internalJsonWrite(value, options); } - scalar(type2, value, fieldName, optional, emitDefaultValues) { + scalar(type, value, fieldName, optional, emitDefaultValues) { if (value === void 0) { assert_1.assert(optional); return void 0; } const ed = emitDefaultValues || optional; - switch (type2) { + switch (type) { // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.SFIXED32: @@ -51983,8 +51982,8 @@ var require_reflection_scalar_default = __commonJS({ var reflection_info_1 = require_reflection_info(); var reflection_long_convert_1 = require_reflection_long_convert(); var pb_long_1 = require_pb_long(); - function reflectionScalarDefault(type2, longType = reflection_info_1.LongType.STRING) { - switch (type2) { + function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) { + switch (type) { case reflection_info_1.ScalarType.BOOL: return false; case reflection_info_1.ScalarType.UINT64: @@ -52151,8 +52150,8 @@ var require_reflection_binary_reader = __commonJS({ } return [key, val]; } - scalar(reader, type2, longType) { - switch (type2) { + scalar(reader, type, longType) { + switch (type) { case reflection_info_1.ScalarType.INT32: return reader.int32(); case reflection_info_1.ScalarType.STRING: @@ -52307,8 +52306,8 @@ var require_reflection_binary_writer = __commonJS({ /** * Write a single scalar value. */ - scalar(writer, type2, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type2, value); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); if (!isDefault || emitDefault) { writer.tag(fieldNo, wireType); writer[method](value); @@ -52317,13 +52316,13 @@ var require_reflection_binary_writer = __commonJS({ /** * Write an array of scalar values in packed format. */ - packed(writer, type2, fieldNo, value) { + packed(writer, type, fieldNo, value) { if (!value.length) return; - assert_1.assert(type2 !== reflection_info_1.ScalarType.BYTES && type2 !== reflection_info_1.ScalarType.STRING); + assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING); writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited); writer.fork(); - let [, method] = this.scalarInfo(type2); + let [, method] = this.scalarInfo(type); for (let i2 = 0; i2 < value.length; i2++) writer[method](value[i2]); writer.join(); @@ -52338,12 +52337,12 @@ var require_reflection_binary_writer = __commonJS({ * * If argument `value` is omitted, [2] is always false. */ - scalarInfo(type2, value) { + scalarInfo(type, value) { let t2 = binary_format_contract_1.WireType.Varint; let m; let i2 = value === void 0; let d = value === 0; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.INT32: m = "int32"; break; @@ -52421,10 +52420,10 @@ var require_reflection_create = __commonJS({ exports2.reflectionCreate = void 0; var reflection_scalar_default_1 = require_reflection_scalar_default(); var message_type_contract_1 = require_message_type_contract(); - function reflectionCreate(type2) { - const msg = type2.messagePrototype ? Object.create(type2.messagePrototype) : Object.defineProperty({}, message_type_contract_1. - MESSAGE_TYPE, { value: type2 }); - for (let field of type2.fields) { + function reflectionCreate(type) { + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1. + MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { let name = field.localName; if (field.opt) continue; @@ -52563,10 +52562,10 @@ var require_reflection_equals = __commonJS({ __name(reflectionEquals, "reflectionEquals"); exports2.reflectionEquals = reflectionEquals; var objectValues = Object.values; - function primitiveEq(type2, a, b) { + function primitiveEq(type, a, b) { if (a === b) return true; - if (type2 !== reflection_info_1.ScalarType.BYTES) + if (type !== reflection_info_1.ScalarType.BYTES) return false; let ba = a; let bb = b; @@ -52578,20 +52577,20 @@ var require_reflection_equals = __commonJS({ return true; } __name(primitiveEq, "primitiveEq"); - function repeatedPrimitiveEq(type2, a, b) { + function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!primitiveEq(type2, a[i2], b[i2])) + if (!primitiveEq(type, a[i2], b[i2])) return false; return true; } __name(repeatedPrimitiveEq, "repeatedPrimitiveEq"); - function repeatedMsgEq(type2, a, b) { + function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!type2.equals(a[i2], b[i2])) + if (!type.equals(a[i2], b[i2])) return false; return true; } @@ -52694,15 +52693,15 @@ var require_message_type = __commonJS({ /** * Read a new message from a JSON value. */ - fromJson(json2, options) { - return this.internalJsonRead(json2, json_format_contract_1.jsonReadOptions(options)); + fromJson(json, options) { + return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options)); } /** * Read a new message from a JSON string. * This is equivalent to `T.fromJson(JSON.parse(json))`. */ - fromJsonString(json2, options) { - let value = JSON.parse(json2); + fromJsonString(json, options) { + let value = JSON.parse(json); return this.fromJson(value, options); } /** @@ -52736,13 +52735,13 @@ var require_message_type = __commonJS({ * according to protobuf rules. If the target is omitted, * a new instance is created first. */ - internalJsonRead(json2, options, target) { - if (json2 !== null && typeof json2 == "object" && !Array.isArray(json2)) { + internalJsonRead(json, options, target) { + if (json !== null && typeof json == "object" && !Array.isArray(json)) { let message = target !== null && target !== void 0 ? target : this.create(); - this.refJsonReader.read(json2, message, options); + this.refJsonReader.read(json, message, options); return message; } - throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json2)}.`); + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`); } /** * This is an internal method. If you just want to write a message @@ -54371,24 +54370,24 @@ var require_reach = __commonJS({ let ref = obj; for (let i2 = 0; i2 < path17.length; ++i2) { let key = path17[i2]; - const type2 = options.iterables && internals.iterables(ref); - if (Array.isArray(ref) || type2 === "set") { + const type = options.iterables && internals.iterables(ref); + if (Array.isArray(ref) || type === "set") { const number = Number(key); if (Number.isInteger(number)) { key = number < 0 ? ref.length + number : number; } } if (!ref || typeof ref === "function" && options.functions === false || // Defaults to true - !type2 && ref[key] === void 0) { + !type && ref[key] === void 0) { Assert(!options.strict || i2 + 1 === path17.length, "Missing segment", key, "in reach path ", chain); Assert(typeof ref === "object" || options.functions === true || typeof ref !== "function", "Invalid segment", key, "in reach path ", chain); ref = options.default; break; } - if (!type2) { + if (!type) { ref = ref[key]; - } else if (type2 === "set") { + } else if (type === "set") { ref = [...ref][key]; } else { ref = ref.get(key); @@ -54608,7 +54607,7 @@ var require_clone = __commonJS({ }); // node_modules/@hapi/hoek/lib/merge.js -var require_merge3 = __commonJS({ +var require_merge4 = __commonJS({ "node_modules/@hapi/hoek/lib/merge.js"(exports2, module2) { "use strict"; var Assert = require_assert2(); @@ -54670,7 +54669,7 @@ var require_applyToDefaults = __commonJS({ "use strict"; var Assert = require_assert2(); var Clone = require_clone(); - var Merge = require_merge3(); + var Merge = require_merge4(); var Reach = require_reach(); var internals = {}; module2.exports = function(defaults2, source, options = {}) { @@ -54695,21 +54694,21 @@ object"); const keys = options.shallow; Assert(Array.isArray(keys), "Invalid keys"); const seen = /* @__PURE__ */ new Map(); - const merge3 = source === true ? null : /* @__PURE__ */ new Set(); + const merge2 = source === true ? null : /* @__PURE__ */ new Set(); for (let key of keys) { key = Array.isArray(key) ? key : key.split("."); const ref = Reach(defaults2, key); if (ref && typeof ref === "object") { - seen.set(ref, merge3 && Reach(source, key) || ref); - } else if (merge3) { - merge3.add(key); + seen.set(ref, merge2 && Reach(source, key) || ref); + } else if (merge2) { + merge2.add(key); } } const copy = Clone(defaults2, {}, seen); - if (!merge3) { + if (!merge2) { return copy; } - for (const key of merge3) { + for (const key of merge2) { internals.reachCopy(copy, source, key); } const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false; @@ -54800,18 +54799,18 @@ var require_deepEqual = __commonJS({ if (obj === ref) { return obj !== 0 || 1 / obj === 1 / ref; } - const type2 = typeof obj; - if (type2 !== typeof ref) { + const type = typeof obj; + if (type !== typeof ref) { return false; } if (obj === null || ref === null) { return false; } - if (type2 === "function") { + if (type === "function") { if (!options.deepFunction || obj.toString() !== ref.toString()) { return false; } - } else if (type2 !== "object") { + } else if (type !== "object") { return obj !== obj && ref !== ref; } const instanceType = internals.getSharedType(obj, ref, !!options.prototype); @@ -54846,11 +54845,11 @@ var require_deepEqual = __commonJS({ } return Types.getInternalProto(obj); } - const type2 = Types.getInternalProto(obj); - if (type2 !== Types.getInternalProto(ref)) { + const type = Types.getInternalProto(obj); + if (type !== Types.getInternalProto(ref)) { return internals.mismatched; } - return type2; + return type; }; internals.valueOf = function(obj) { const objValueOf = obj.valueOf; @@ -55046,19 +55045,19 @@ var require_contain = __commonJS({ return false; } let compare; - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); for (const value of values) { if (!options.deep || !value || typeof value !== "object") { - const existing = map2.get(value); + const existing = map.get(value); if (existing) { ++existing.allowed; } else { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); } } else { compare = compare ?? internals.compare(options); let found = false; - for (const [key, existing] of map2.entries()) { + for (const [key, existing] of map.entries()) { if (compare(key, value)) { ++existing.allowed; found = true; @@ -55066,7 +55065,7 @@ var require_contain = __commonJS({ } } if (!found) { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); } } } @@ -55074,10 +55073,10 @@ var require_contain = __commonJS({ for (const item of ref) { let match2; if (!options.deep || !item || typeof item !== "object") { - match2 = map2.get(item); + match2 = map.get(item); } else { compare = compare ?? internals.compare(options); - for (const [key, existing] of map2.entries()) { + for (const [key, existing] of map.entries()) { if (compare(key, item)) { match2 = existing; break; @@ -55095,7 +55094,7 @@ var require_contain = __commonJS({ if (options.only && hits !== ref.length) { return false; } - for (const match2 of map2.values()) { + for (const match2 of map.values()) { if (match2.hits === match2.allowed) { continue; } @@ -55117,9 +55116,9 @@ var require_contain = __commonJS({ const symbols = Object.getOwnPropertySymbols(values).filter((sym) => values.propertyIsEnumerable(sym)); const targets = [...Object.keys(values), ...symbols]; const compare = internals.compare(options); - const set2 = new Set(targets); + const set = new Set(targets); for (const key of keys) { - if (!set2.has(key)) { + if (!set.has(key)) { if (options.only) { return false; } @@ -55128,10 +55127,10 @@ var require_contain = __commonJS({ if (!compare(values[key], ref[key])) { return false; } - set2.delete(key); + set.delete(key); } - if (set2.size) { - return options.part ? set2.size < targets.length : false; + if (set.size) { + return options.part ? set.size < targets.length : false; } return true; }; @@ -55140,16 +55139,16 @@ var require_contain = __commonJS({ return values.length === 1 && values[0] === "" || // '' contains '' !options.once && !values.some((v) => v !== ""); } - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); const patterns = []; for (const value of values) { Assert(typeof value === "string", "Cannot compare string reference to non-string value"); if (value) { - const existing = map2.get(value); + const existing = map.get(value); if (existing) { ++existing.allowed; } else { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); patterns.push(EscapeRegex(value)); } } else if (options.once || options.only) { @@ -55161,14 +55160,14 @@ var require_contain = __commonJS({ } const regex = new RegExp(`(${patterns.join("|")})`, "g"); const leftovers = ref.replace(regex, ($0, $1) => { - ++map2.get($1).hits; + ++map.get($1).hits; return ""; }); if (options.only && leftovers) { return false; } let any = false; - for (const match2 of map2.values()) { + for (const match2 of map.values()) { if (match2.hits) { any = true; } @@ -55333,7 +55332,7 @@ var require_intersect = __commonJS({ if (!array1 || !array2) { return options.first ? null : []; } - const common2 = []; + const common = []; const hash = Array.isArray(array1) ? new Set(array1) : array1; const found = /* @__PURE__ */ new Set(); for (const value of array2) { @@ -55341,11 +55340,11 @@ var require_intersect = __commonJS({ if (options.first) { return value; } - common2.push(value); + common.push(value); found.add(value); } } - return options.first ? null : common2; + return options.first ? null : common; }; internals.has = function(ref, key) { if (typeof ref.has === "function") { @@ -55457,7 +55456,7 @@ var require_lib = __commonJS({ exports2.ignore = require_ignore(); exports2.intersect = require_intersect(); exports2.isPromise = require_isPromise(); - exports2.merge = require_merge3(); + exports2.merge = require_merge4(); exports2.once = require_once(); exports2.reach = require_reach(); exports2.reachTemplate = require_reachTemplate(); @@ -55997,9 +55996,9 @@ var require_lib2 = __commonJS({ parts[i2] = internals.single(part.value, value); } } - internals.operatorsOrder.forEach((set2) => { + internals.operatorsOrder.forEach((set) => { for (let i2 = 1; i2 < parts.length - 1; ) { - if (set2.includes(parts[i2])) { + if (set.includes(parts[i2])) { const operator = parts[i2]; const left = internals.evaluate(parts[i2 - 1], context3); const right = internals.evaluate(parts[i2 + 1], context3); @@ -56099,7 +56098,7 @@ var require_annotate = __commonJS({ "node_modules/joi/lib/annotate.js"(exports2) { "use strict"; var { clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { annotations: /* @__PURE__ */ Symbol("annotations") }; @@ -56225,7 +56224,7 @@ var require_errors3 = __commonJS({ "node_modules/joi/lib/errors.js"(exports2) { "use strict"; var Annotate = require_annotate(); - var Common = require_common4(); + var Common = require_common5(); var Template = require_template(); exports2.Report = class { constructor(code, value, local, flags, messages, state3, prefs) { @@ -56410,7 +56409,7 @@ var require_ref2 = __commonJS({ "node_modules/joi/lib/ref.js"(exports2) { "use strict"; var { assert: assert4, clone, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Template; var internals = { symbol: /* @__PURE__ */ Symbol("ref"), @@ -56701,7 +56700,7 @@ var require_template = __commonJS({ "use strict"; var { assert: assert4, clone, escapeHtml } = require_lib(); var Formula = require_lib2(); - var Common = require_common4(); + var Common = require_common5(); var Errors = require_errors3(); var Ref = require_ref2(); var internals = { @@ -56941,7 +56940,7 @@ functions"); return `${ends[0]}${value}${ends[1]}`; }; internals.stringify = function(value, original, state3, prefs, local, options = {}) { - const type2 = typeof value; + const type = typeof value; const wrap = prefs && prefs.errors && prefs.errors.wrap || {}; let skipWrap = false; if (Ref.isRef(value) && value.render) { @@ -56951,24 +56950,24 @@ functions"); if (value === null) { return "null"; } - if (type2 === "string") { + if (type === "string") { return internals.wrap(value, options.arrayItems && wrap.string); } - if (type2 === "number" || type2 === "function" || type2 === "symbol") { + if (type === "number" || type === "function" || type === "symbol") { return value.toString(); } - if (type2 !== "object") { + if (type !== "object") { return JSON.stringify(value); } if (value instanceof Date) { return internals.Template.date(value, prefs); } if (value instanceof Map) { - const pairs2 = []; + const pairs = []; for (const [key, sym] of value.entries()) { - pairs2.push(`${key.toString()} -> ${sym.toString()}`); + pairs.push(`${key.toString()} -> ${sym.toString()}`); } - value = pairs2; + value = pairs; } if (!Array.isArray(value)) { return value.toString(); @@ -57146,7 +57145,7 @@ var require_messages = __commonJS({ }); // node_modules/joi/lib/common.js -var require_common4 = __commonJS({ +var require_common5 = __commonJS({ "node_modules/joi/lib/common.js"(exports2) { "use strict"; var { assert: Assert, AssertError } = require_lib(); @@ -57228,12 +57227,12 @@ var require_common4 = __commonJS({ exports2.default = function(value, defaultValue) { return value === void 0 ? defaultValue : value; }; - exports2.intersect = function(set2, other) { - if (typeof set2.intersection === "function") { - return set2.intersection(other); + exports2.intersect = function(set, other) { + if (typeof set.intersection === "function") { + return set.intersection(other); } const result = /* @__PURE__ */ new Set(); - for (const item of set2) { + for (const item of set) { if (other.has(item)) { result.add(item); } @@ -57252,8 +57251,8 @@ var require_common4 = __commonJS({ } return obj[exports2.symbols.ref] || obj[exports2.symbols.template]; }; - exports2.isSchema = function(schema3, options = {}) { - const any = schema3 && schema3[exports2.symbols.any]; + exports2.isSchema = function(schema2, options = {}) { + const any = schema2 && schema2[exports2.symbols.any]; if (!any) { return false; } @@ -57320,7 +57319,7 @@ var require_cache2 = __commonJS({ "node_modules/joi/lib/cache.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { max: 1e3, supported: /* @__PURE__ */ new Set(["undefined", "boolean", "number", "string"]) @@ -57419,7 +57418,7 @@ var require_compile2 = __commonJS({ "node_modules/joi/lib/compile.js"(exports2) { "use strict"; var { assert: assert4 } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Ref = require_ref2(); var internals = {}; exports2.schema = function(Joi, config, options = {}) { @@ -57480,29 +57479,29 @@ var require_compile2 = __commonJS({ exports2.ref = function(id, options) { return Ref.isRef(id) ? id : Ref.create(id, options); }; - exports2.compile = function(root, schema3, options = {}) { + exports2.compile = function(root, schema2, options = {}) { Common.assertOptions(options, ["legacy"]); - const any = schema3 && schema3[Common.symbols.any]; + const any = schema2 && schema2[Common.symbols.any]; if (any) { assert4(options.legacy || any.version === Common.version, "Cannot mix different versions of joi schemas:", any.version, Common.version); - return schema3; + return schema2; } - if (typeof schema3 !== "object" || !options.legacy) { - return exports2.schema(root, schema3, { appendPath: true }); + if (typeof schema2 !== "object" || !options.legacy) { + return exports2.schema(root, schema2, { appendPath: true }); } - const compiler = internals.walk(schema3); + const compiler = internals.walk(schema2); if (!compiler) { - return exports2.schema(root, schema3, { appendPath: true }); + return exports2.schema(root, schema2, { appendPath: true }); } - return compiler.compile(compiler.root, schema3); + return compiler.compile(compiler.root, schema2); }; - internals.walk = function(schema3) { - if (typeof schema3 !== "object") { + internals.walk = function(schema2) { + if (typeof schema2 !== "object") { return null; } - if (Array.isArray(schema3)) { - for (const item of schema3) { + if (Array.isArray(schema2)) { + for (const item of schema2) { const compiler = internals.walk(item); if (compiler) { return compiler; @@ -57510,13 +57509,13 @@ var require_compile2 = __commonJS({ } return null; } - const any = schema3[Common.symbols.any]; + const any = schema2[Common.symbols.any]; if (any) { - return { root: schema3[any.root], compile: any.compile }; + return { root: schema2[any.root], compile: any.compile }; } - assert4(Object.getPrototypeOf(schema3) === Object.getPrototypeOf({}), "Schema can only contain plain objects"); - for (const key in schema3) { - const compiler = internals.walk(schema3[key]); + assert4(Object.getPrototypeOf(schema2) === Object.getPrototypeOf({}), "Schema can only contain plain objects"); + for (const key in schema2) { + const compiler = internals.walk(schema2[key]); if (compiler) { return compiler; } @@ -57526,7 +57525,7 @@ var require_compile2 = __commonJS({ internals.simple = function(value) { return value === null || ["boolean", "string", "number"].includes(typeof value); }; - exports2.when = function(schema3, condition, options) { + exports2.when = function(schema2, condition, options) { if (options === void 0) { assert4(condition && typeof condition === "object", "Missing options"); options = condition; @@ -57540,7 +57539,7 @@ var require_compile2 = __commonJS({ assert4(options.is === void 0, '"is" can not be used with a schema condition'); assert4(options.not === void 0, '"not" can not be used with a schema condition'); assert4(options.switch === void 0, '"switch" can not be used with a schema condition'); - return internals.condition(schema3, { is: condition, then: options.then, otherwise: options.otherwise, break: options. + return internals.condition(schema2, { is: condition, then: options.then, otherwise: options.otherwise, break: options. break }); } assert4(Ref.isRef(condition) || typeof condition === "string", "Invalid condition:", condition); @@ -57550,7 +57549,7 @@ var require_compile2 = __commonJS({ if (options.not !== void 0) { rule2 = { is: options.not, then: options.otherwise, otherwise: options.then, break: options.break }; } - let is = rule2.is !== void 0 ? schema3.$_compile(rule2.is) : schema3.$_root.invalid(null, false, 0, "").required(); + let is = rule2.is !== void 0 ? schema2.$_compile(rule2.is) : schema2.$_root.invalid(null, false, 0, "").required(); assert4(rule2.then !== void 0 || rule2.otherwise !== void 0, 'options must have at least one of "then", "otherwi\ se", or "switch"'); assert4(rule2.break === void 0 || rule2.then === void 0 || rule2.otherwise === void 0, "Cannot specify then, oth\ @@ -57558,7 +57557,7 @@ erwise, and break all together"); if (options.is !== void 0 && !Ref.isRef(options.is) && !Common.isSchema(options.is)) { is = is.required(); } - return internals.condition(schema3, { ref: exports2.ref(condition), is, then: rule2.then, otherwise: rule2.otherwise, + return internals.condition(schema2, { ref: exports2.ref(condition), is, then: rule2.then, otherwise: rule2.otherwise, break: rule2.break }); } assert4(Array.isArray(options.switch), '"switch" must be an array'); @@ -57577,8 +57576,8 @@ erwise, and break all together"); assert4(test2.is !== void 0, 'Switch statement missing "is"'); assert4(test2.then !== void 0, 'Switch statement missing "then"'); const item = { - is: schema3.$_compile(test2.is), - then: schema3.$_compile(test2.then) + is: schema2.$_compile(test2.is), + then: schema2.$_compile(test2.then) }; if (!Ref.isRef(test2.is) && !Common.isSchema(test2.is)) { item.is = item.is.required(); @@ -57589,19 +57588,19 @@ side a "switch"'); const otherwise = options.otherwise !== void 0 ? options.otherwise : test2.otherwise; if (otherwise !== void 0) { assert4(rule.break === void 0, "Cannot specify both otherwise and break"); - item.otherwise = schema3.$_compile(otherwise); + item.otherwise = schema2.$_compile(otherwise); } } rule.switch.push(item); } return rule; }; - internals.condition = function(schema3, condition) { + internals.condition = function(schema2, condition) { for (const key of ["then", "otherwise"]) { if (condition[key] === void 0) { delete condition[key]; } else { - condition[key] = schema3.$_compile(condition[key]); + condition[key] = schema2.$_compile(condition[key]); } } return condition; @@ -57614,27 +57613,27 @@ var require_extend = __commonJS({ "node_modules/joi/lib/extend.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); var internals = {}; exports2.type = function(from, options) { const base = Object.getPrototypeOf(from); const prototype2 = clone(base); - const schema3 = from._assign(Object.create(prototype2)); + const schema2 = from._assign(Object.create(prototype2)); const def = Object.assign({}, options); delete def.base; prototype2._definition = def; const parent = base._definition || {}; def.messages = Messages.merge(parent.messages, def.messages); def.properties = Object.assign({}, parent.properties, def.properties); - schema3.type = def.type; + schema2.type = def.type; def.flags = Object.assign({}, parent.flags, def.flags); const terms = Object.assign({}, parent.terms); if (def.terms) { for (const name in def.terms) { const term = def.terms[name]; - assert4(schema3.$_terms[name] === void 0, "Invalid term override for", def.type, name); - schema3.$_terms[name] = term.init; + assert4(schema2.$_terms[name] === void 0, "Invalid term override for", def.type, name); + schema2.$_terms[name] = term.init; terms[name] = term; } } @@ -57712,11 +57711,11 @@ var require_extend = __commonJS({ def.modifiers = modifiers; if (def.overrides) { prototype2._super = base; - schema3.$_super = {}; + schema2.$_super = {}; for (const override in def.overrides) { assert4(base[override], "Cannot override missing", override); def.overrides[override][Common.symbols.parent] = base[override]; - schema3.$_super[override] = base[override].bind(schema3); + schema2.$_super[override] = base[override].bind(schema2); } Object.assign(prototype2, def.overrides); } @@ -57725,7 +57724,7 @@ var require_extend = __commonJS({ manifest.build = internals.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build); def.manifest = manifest; def.rebuild = internals.rebuild(def.rebuild, parent.rebuild); - return schema3; + return schema2; }; internals.build = function(child2, parent) { if (!child2 || !parent) { @@ -57781,9 +57780,9 @@ var require_extend = __commonJS({ if (!child2 || !parent) { return child2 || parent; } - return function(schema3) { - parent(schema3); - child2(schema3); + return function(schema2) { + parent(schema2); + child2(schema2); }; }; internals.validate = function(child2, parent) { @@ -57809,41 +57808,41 @@ var require_manifest = __commonJS({ "node_modules/joi/lib/manifest.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); var Ref = require_ref2(); var Template = require_template(); var Schemas; var internals = {}; - exports2.describe = function(schema3) { - const def = schema3._definition; + exports2.describe = function(schema2) { + const def = schema2._definition; const desc = { - type: schema3.type, + type: schema2.type, flags: {}, rules: [] }; - for (const flag in schema3._flags) { + for (const flag in schema2._flags) { if (flag[0] !== "_") { - desc.flags[flag] = internals.describe(schema3._flags[flag]); + desc.flags[flag] = internals.describe(schema2._flags[flag]); } } if (!Object.keys(desc.flags).length) { delete desc.flags; } - if (schema3._preferences) { - desc.preferences = clone(schema3._preferences, { shallow: ["messages"] }); + if (schema2._preferences) { + desc.preferences = clone(schema2._preferences, { shallow: ["messages"] }); delete desc.preferences[Common.symbols.prefs]; if (desc.preferences.messages) { desc.preferences.messages = Messages.decompile(desc.preferences.messages); } } - if (schema3._valids) { - desc.allow = schema3._valids.describe(); + if (schema2._valids) { + desc.allow = schema2._valids.describe(); } - if (schema3._invalids) { - desc.invalid = schema3._invalids.describe(); + if (schema2._invalids) { + desc.invalid = schema2._invalids.describe(); } - for (const rule of schema3._rules) { + for (const rule of schema2._rules) { const ruleDef = def.rules[rule.name]; if (ruleDef.manifest === false) { continue; @@ -57872,12 +57871,12 @@ var require_manifest = __commonJS({ if (!desc.rules.length) { delete desc.rules; } - for (const term in schema3.$_terms) { + for (const term in schema2.$_terms) { if (term[0] === "_") { continue; } assert4(!desc[term], "Cannot describe schema due to internal name conflict with", term); - const items = schema3.$_terms[term]; + const items = schema2.$_terms[term]; if (!items) { continue; } @@ -57916,7 +57915,7 @@ var require_manifest = __commonJS({ } desc[term] = normalized; } - internals.validate(schema3.$_root, desc); + internals.validate(schema2.$_root, desc); return desc; }; internals.describe = function(item, options = {}) { @@ -57976,27 +57975,27 @@ var require_manifest = __commonJS({ } parse(desc) { internals.validate(this.joi, desc); - let schema3 = this.joi[desc.type]()._bare(); - const def = schema3._definition; + let schema2 = this.joi[desc.type]()._bare(); + const def = schema2._definition; if (desc.flags) { for (const flag in desc.flags) { const setter = def.flags[flag] && def.flags[flag].setter || flag; - assert4(typeof schema3[setter] === "function", "Invalid flag", flag, "for type", desc.type); - schema3 = schema3[setter](this.build(desc.flags[flag])); + assert4(typeof schema2[setter] === "function", "Invalid flag", flag, "for type", desc.type); + schema2 = schema2[setter](this.build(desc.flags[flag])); } } if (desc.preferences) { - schema3 = schema3.preferences(this.build(desc.preferences)); + schema2 = schema2.preferences(this.build(desc.preferences)); } if (desc.allow) { - schema3 = schema3.allow(...this.build(desc.allow)); + schema2 = schema2.allow(...this.build(desc.allow)); } if (desc.invalid) { - schema3 = schema3.invalid(...this.build(desc.invalid)); + schema2 = schema2.invalid(...this.build(desc.invalid)); } if (desc.rules) { for (const rule of desc.rules) { - assert4(typeof schema3[rule.name] === "function", "Invalid rule", rule.name, "for type", desc.type); + assert4(typeof schema2[rule.name] === "function", "Invalid rule", rule.name, "for type", desc.type); const args = []; if (rule.args) { const built = {}; @@ -58017,7 +58016,7 @@ found", keys.length, ")"); args.push(built[keys[0]]); } } - schema3 = schema3[rule.name](...args); + schema2 = schema2[rule.name](...args); const options = {}; for (const custom2 in def.modifiers) { if (rule[custom2] !== void 0) { @@ -58025,7 +58024,7 @@ found", keys.length, ")"); } } if (Object.keys(options).length) { - schema3 = schema3.rule(options); + schema2 = schema2.rule(options); } } } @@ -58061,9 +58060,9 @@ found", keys.length, ")"); if (desc.whens) { terms.whens = desc.whens.map((when) => this.build(when)); } - schema3 = def.manifest.build(schema3, terms); - schema3.$_temp.ruleset = false; - return schema3; + schema2 = def.manifest.build(schema2, terms); + schema2.$_temp.ruleset = false; + return schema2; } build(desc, options = {}) { if (desc === null) { @@ -58187,22 +58186,22 @@ var require_trace = __commonJS({ root._tracer = null; }; }; - exports2.location = function(schema3) { - return schema3.$_setFlag("_tracerLocation", Pinpoint.location(2)); + exports2.location = function(schema2) { + return schema2.$_setFlag("_tracerLocation", Pinpoint.location(2)); }; internals.Tracer = class { constructor() { this.name = "Joi"; this._schemas = /* @__PURE__ */ new Map(); } - _register(schema3) { - const existing = this._schemas.get(schema3); + _register(schema2) { + const existing = this._schemas.get(schema2); if (existing) { return existing.store; } - const store = new internals.Store(schema3); - const { filename, line } = schema3._flags._tracerLocation || Pinpoint.location(5); - this._schemas.set(schema3, { filename, line, store }); + const store = new internals.Store(schema2); + const { filename, line } = schema2._flags._tracerLocation || Pinpoint.location(5); + this._schemas.set(schema2, { filename, line, store }); return store; } _combine(merged, sources) { @@ -58218,7 +58217,7 @@ var require_trace = __commonJS({ } const missing = []; const skipped = []; - for (const [schema3, log2] of store._sources.entries()) { + for (const [schema2, log2] of store._sources.entries()) { if (internals.sub(log2.paths, skipped)) { continue; } @@ -58230,28 +58229,28 @@ var require_trace = __commonJS({ skipped.push(...log2.paths); continue; } - for (const type2 of ["valid", "invalid"]) { - const set2 = schema3[`_${type2}s`]; - if (!set2) { + for (const type of ["valid", "invalid"]) { + const set = schema2[`_${type}s`]; + if (!set) { continue; } - const values = new Set(set2._values); - const refs = new Set(set2._refs); - for (const { value, ref } of log2[type2]) { + const values = new Set(set._values); + const refs = new Set(set._refs); + for (const { value, ref } of log2[type]) { values.delete(value); refs.delete(ref); } if (values.size || refs.size) { missing.push({ status: [...values, ...[...refs].map((ref) => ref.display)], - rule: `${type2}s` + rule: `${type}s` }); } } - const rules = schema3._rules.map((rule) => rule.name); - for (const type2 of ["default", "failover"]) { - if (schema3._flags[type2] !== void 0) { - rules.push(type2); + const rules = schema2._rules.map((rule) => rule.name); + for (const type of ["default", "failover"]) { + if (schema2._flags[type] !== void 0) { + rules.push(type); } } for (const name of rules) { @@ -58279,30 +58278,30 @@ var require_trace = __commonJS({ } }; internals.Store = class { - constructor(schema3) { + constructor(schema2) { this.active = true; this._sources = /* @__PURE__ */ new Map(); this._combos = /* @__PURE__ */ new Map(); - this._scan(schema3); + this._scan(schema2); } debug(state3, source, name, result) { state3.mainstay.debug && state3.mainstay.debug.push({ type: source, name, result, path: state3.path }); } - entry(schema3, state3) { + entry(schema2, state3) { internals.debug(state3, { type: "entry" }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2.entry = true; }); } - filter(schema3, state3, source, value) { + filter(schema2, state3, source, value) { internals.debug(state3, { type: source, ...value }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2[source].add(value); }); } - log(schema3, state3, source, name, result) { + log(schema2, state3, source, name, result) { internals.debug(state3, { type: source, name, result: result === "full" ? "pass" : result }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2[source][name] = log2[source][name] || 0; log2[source][name] |= internals.codes[result]; }); @@ -58324,20 +58323,20 @@ var require_trace = __commonJS({ } state3.mainstay.debug.push(log2); } - _record(schema3, each) { - const log2 = this._sources.get(schema3); + _record(schema2, each) { + const log2 = this._sources.get(schema2); if (log2) { each(log2); return; } - const sources = this._combos.get(schema3); + const sources = this._combos.get(schema2); for (const source of sources) { this._record(source, each); } } - _scan(schema3, _path) { + _scan(schema2, _path) { const path17 = _path || []; - let log2 = this._sources.get(schema3); + let log2 = this._sources.get(schema2); if (!log2) { log2 = { paths: /* @__PURE__ */ new Set(), @@ -58346,7 +58345,7 @@ var require_trace = __commonJS({ valid: /* @__PURE__ */ new Set(), invalid: /* @__PURE__ */ new Set() }; - this._sources.set(schema3, log2); + this._sources.set(schema2, log2); } if (path17.length) { log2.paths.add(path17); @@ -58355,7 +58354,7 @@ var require_trace = __commonJS({ const subId = internals.id(sub, source); this._scan(sub, path17.concat(subId)); }, "each"); - schema3.$_modify({ each, ref: false }); + schema2.$_modify({ each, ref: false }); } _combine(merged, sources) { this._combos.set(merged, sources); @@ -58365,9 +58364,9 @@ var require_trace = __commonJS({ const path17 = item.paths ? Errors.path(item.paths[0]) + (item.rule ? ":" : "") : ""; return `${path17}${item.rule || ""} (${item.status})`; }; - internals.id = function(schema3, { source, name, path: path17, key }) { - if (schema3._flags.id) { - return schema3._flags.id; + internals.id = function(schema2, { source, name, path: path17, key }) { + if (schema2._flags.id) { + return schema2._flags.id; } if (key) { return key; @@ -58402,7 +58401,7 @@ var require_modify = __commonJS({ "node_modules/joi/lib/modify.js"(exports2) { "use strict"; var { assert: assert4 } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Ref = require_ref2(); var internals = {}; exports2.Ids = internals.Ids = class { @@ -58465,24 +58464,24 @@ var require_modify = __commonJS({ } return node.schema._ids.reach(forward, [...behind, current]); } - register(schema3, { key } = {}) { - if (!schema3 || !Common.isSchema(schema3)) { + register(schema2, { key } = {}) { + if (!schema2 || !Common.isSchema(schema2)) { return; } - if (schema3.$_property("schemaChain") || schema3._ids._schemaChain) { + if (schema2.$_property("schemaChain") || schema2._ids._schemaChain) { this._schemaChain = true; } - const id = schema3._flags.id; + const id = schema2._flags.id; if (id) { const existing = this._byId.get(id); - assert4(!existing || existing.schema === schema3, "Cannot add different schemas with the same id:", id); + assert4(!existing || existing.schema === schema2, "Cannot add different schemas with the same id:", id); assert4(!this._byKey.has(id), "Schema id conflicts with existing key:", id); - this._byId.set(id, { schema: schema3, id }); + this._byId.set(id, { schema: schema2, id }); } if (key) { assert4(!this._byKey.has(key), "Schema already contains key:", key); assert4(!this._byId.has(key), "Schema key conflicts with existing id:", key); - this._byKey.set(key, { schema: schema3, id: key }); + this._byKey.set(key, { schema: schema2, id: key }); } } reset() { @@ -58505,32 +58504,32 @@ var require_modify = __commonJS({ return this._byId.get(id) || this._byKey.get(id); } }; - internals.fork = function(schema3, id, replacement) { + internals.fork = function(schema2, id, replacement) { const each = /* @__PURE__ */ __name((item, { key }) => { if (id === (item._flags.id || key)) { return replacement; } }, "each"); - const obj = exports2.schema(schema3, { each, ref: false }); - return obj ? obj.$_mutateRebuild() : schema3; + const obj = exports2.schema(schema2, { each, ref: false }); + return obj ? obj.$_mutateRebuild() : schema2; }; - exports2.schema = function(schema3, options) { + exports2.schema = function(schema2, options) { let obj; - for (const name in schema3._flags) { + for (const name in schema2._flags) { if (name[0] === "_") { continue; } - const result = internals.scan(schema3._flags[name], { source: "flags", name }, options); + const result = internals.scan(schema2._flags[name], { source: "flags", name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); obj._flags[name] = result; } } - for (let i2 = 0; i2 < schema3._rules.length; ++i2) { - const rule = schema3._rules[i2]; + for (let i2 = 0; i2 < schema2._rules.length; ++i2) { + const rule = schema2._rules[i2]; const result = internals.scan(rule.args, { source: "rules", name: rule.name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); const clone = Object.assign({}, rule); clone.args = result; obj._rules[i2] = clone; @@ -58540,13 +58539,13 @@ var require_modify = __commonJS({ } } } - for (const name in schema3.$_terms) { + for (const name in schema2.$_terms) { if (name[0] === "_") { continue; } - const result = internals.scan(schema3.$_terms[name], { source: "terms", name }, options); + const result = internals.scan(schema2.$_terms[name], { source: "terms", name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); obj.$_terms[name] = result; } } @@ -58596,7 +58595,7 @@ var require_state4 = __commonJS({ "node_modules/joi/lib/state.js"(exports2, module2) { "use strict"; var { clone, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { value: /* @__PURE__ */ Symbol("value") }; @@ -58608,16 +58607,16 @@ var require_state4 = __commonJS({ this.schemas = state3.schemas; this.debug = null; } - localize(path17, ancestors = null, schema3 = null) { + localize(path17, ancestors = null, schema2 = null) { const state3 = new internals.State(path17, ancestors, this); - if (schema3 && state3.schemas) { - state3.schemas = [internals.schemas(schema3), ...state3.schemas]; + if (schema2 && state3.schemas) { + state3.schemas = [internals.schemas(schema2), ...state3.schemas]; } return state3; } - nest(schema3, debug3) { + nest(schema2, debug3) { const state3 = new internals.State(this.path, this.ancestors, this); - state3.schemas = state3.schemas && [internals.schemas(schema3), ...state3.schemas]; + state3.schemas = state3.schemas && [internals.schemas(schema2), ...state3.schemas]; state3.debug = debug3; return state3; } @@ -58646,11 +58645,11 @@ var require_state4 = __commonJS({ this.mainstay.commit(); } }; - internals.schemas = function(schema3) { - if (Common.isSchema(schema3)) { - return { schema: schema3 }; + internals.schemas = function(schema2) { + if (Common.isSchema(schema2)) { + return { schema: schema2 }; } - return schema3; + return schema2; }; internals.Shadow = class { constructor() { @@ -58712,20 +58711,20 @@ var require_validator = __commonJS({ "node_modules/joi/lib/validator.js"(exports2) { "use strict"; var { assert: assert4, clone, ignore, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Errors = require_errors3(); - var State2 = require_state4(); + var State = require_state4(); var internals = { result: /* @__PURE__ */ Symbol("result") }; - exports2.entry = function(value, schema3, prefs) { + exports2.entry = function(value, schema2, prefs) { let settings = Common.defaults; if (prefs) { assert4(prefs.warnings === void 0, "Cannot override warnings preference in synchronous validation"); assert4(prefs.artifacts === void 0, "Cannot override artifacts preference in synchronous validation"); settings = Common.preferences(Common.defaults, prefs); } - const result = internals.entry(value, schema3, settings); + const result = internals.entry(value, schema2, settings); assert4(!result.mainstay.externals.length, "Schema with external rules must use validateAsync()"); const outcome = { value: result.value }; if (result.error) { @@ -58742,12 +58741,12 @@ var require_validator = __commonJS({ } return outcome; }; - exports2.entryAsync = async function(value, schema3, prefs) { + exports2.entryAsync = async function(value, schema2, prefs) { let settings = Common.defaults; if (prefs) { settings = Common.preferences(Common.defaults, prefs); } - const result = internals.entry(value, schema3, settings); + const result = internals.entry(value, schema2, settings); const mainstay = result.mainstay; if (result.error) { if (mainstay.debug) { @@ -58849,12 +58848,12 @@ var require_validator = __commonJS({ } return outcome; }; - exports2.standard = function(value, schema3, options) { + exports2.standard = function(value, schema2, options) { const prefs = options?.libraryOptions; - if (schema3.isAsync()) { - return exports2.entryAsync(value, schema3, prefs); + if (schema2.isAsync()) { + return exports2.entryAsync(value, schema2, prefs); } - return exports2.entry(value, schema3, prefs); + return exports2.entry(value, schema2, prefs); }; internals.Mainstay = class { constructor(tracer, debug3, links) { @@ -58882,60 +58881,60 @@ var require_validator = __commonJS({ this._snapshots.pop(); } }; - internals.entry = function(value, schema3, prefs) { - const { tracer, cleanup } = internals.tracer(schema3, prefs); + internals.entry = function(value, schema2, prefs) { + const { tracer, cleanup } = internals.tracer(schema2, prefs); const debug3 = prefs.debug ? [] : null; - const links = schema3._ids._schemaChain ? /* @__PURE__ */ new Map() : null; + const links = schema2._ids._schemaChain ? /* @__PURE__ */ new Map() : null; const mainstay = new internals.Mainstay(tracer, debug3, links); - const schemas = schema3._ids._schemaChain ? [{ schema: schema3 }] : null; - const state3 = new State2([], [], { mainstay, schemas }); - const result = exports2.validate(value, schema3, state3, prefs); + const schemas = schema2._ids._schemaChain ? [{ schema: schema2 }] : null; + const state3 = new State([], [], { mainstay, schemas }); + const result = exports2.validate(value, schema2, state3, prefs); if (cleanup) { - schema3.$_root.untrace(); + schema2.$_root.untrace(); } const error2 = Errors.process(result.errors, value, prefs); return { value: result.value, error: error2, mainstay }; }; - internals.tracer = function(schema3, prefs) { - if (schema3.$_root._tracer) { - return { tracer: schema3.$_root._tracer._register(schema3) }; + internals.tracer = function(schema2, prefs) { + if (schema2.$_root._tracer) { + return { tracer: schema2.$_root._tracer._register(schema2) }; } if (prefs.debug) { - assert4(schema3.$_root.trace, "Debug mode not supported"); - return { tracer: schema3.$_root.trace()._register(schema3), cleanup: true }; + assert4(schema2.$_root.trace, "Debug mode not supported"); + return { tracer: schema2.$_root.trace()._register(schema2), cleanup: true }; } return { tracer: internals.ignore }; }; - exports2.validate = function(value, schema3, state3, prefs, overrides = {}) { - if (schema3.$_terms.whens) { - schema3 = schema3._generate(value, state3, prefs).schema; + exports2.validate = function(value, schema2, state3, prefs, overrides = {}) { + if (schema2.$_terms.whens) { + schema2 = schema2._generate(value, state3, prefs).schema; } - if (schema3._preferences) { - prefs = internals.prefs(schema3, prefs); + if (schema2._preferences) { + prefs = internals.prefs(schema2, prefs); } - if (schema3._cache && prefs.cache) { - const result = schema3._cache.get(value); + if (schema2._cache && prefs.cache) { + const result = schema2._cache.get(value); state3.mainstay.tracer.debug(state3, "validate", "cached", !!result); if (result) { return result; } } - const createError = /* @__PURE__ */ __name((code, local, localState) => schema3.$_createError(code, value, local, localState || + const createError = /* @__PURE__ */ __name((code, local, localState) => schema2.$_createError(code, value, local, localState || state3, prefs), "createError"); const helpers = { original: value, prefs, - schema: schema3, + schema: schema2, state: state3, error: createError, errorsArray: internals.errorsArray, warn: /* @__PURE__ */ __name((code, local, localState) => state3.mainstay.warnings.push(createError(code, local, localState)), "warn"), - message: /* @__PURE__ */ __name((messages, local) => schema3.$_createError("custom", value, local, state3, prefs, + message: /* @__PURE__ */ __name((messages, local) => schema2.$_createError("custom", value, local, state3, prefs, { messages }), "message") }; - state3.mainstay.tracer.entry(schema3, state3); - const def = schema3._definition; + state3.mainstay.tracer.entry(schema2, state3); + const def = schema2._definition; if (def.prepare && value !== void 0 && prefs.convert) { const prepared = def.prepare(value, helpers); if (prepared) { @@ -58956,42 +58955,42 @@ var require_validator = __commonJS({ value = coerced.value; } } - const empty = schema3._flags.empty; - if (empty && empty.$_match(internals.trim(value, schema3), state3.nest(empty), Common.defaults)) { + const empty = schema2._flags.empty; + if (empty && empty.$_match(internals.trim(value, schema2), state3.nest(empty), Common.defaults)) { state3.mainstay.tracer.value(state3, "empty", value, void 0); value = void 0; } - const presence = overrides.presence || schema3._flags.presence || (schema3._flags._endedSwitch ? null : prefs.presence); + const presence = overrides.presence || schema2._flags.presence || (schema2._flags._endedSwitch ? null : prefs.presence); if (value === void 0) { if (presence === "forbidden") { return internals.finalize(value, null, helpers); } if (presence === "required") { - return internals.finalize(value, [schema3.$_createError("any.required", value, null, state3, prefs)], helpers); + return internals.finalize(value, [schema2.$_createError("any.required", value, null, state3, prefs)], helpers); } if (presence === "optional") { - if (schema3._flags.default !== Common.symbols.deepDefault) { + if (schema2._flags.default !== Common.symbols.deepDefault) { return internals.finalize(value, null, helpers); } state3.mainstay.tracer.value(state3, "default", value, {}); value = {}; } } else if (presence === "forbidden") { - return internals.finalize(value, [schema3.$_createError("any.unknown", value, null, state3, prefs)], helpers); + return internals.finalize(value, [schema2.$_createError("any.unknown", value, null, state3, prefs)], helpers); } const errors = []; - if (schema3._valids) { - const match2 = schema3._valids.get(value, state3, prefs, schema3._flags.insensitive); + if (schema2._valids) { + const match2 = schema2._valids.get(value, state3, prefs, schema2._flags.insensitive); if (match2) { if (prefs.convert) { state3.mainstay.tracer.value(state3, "valids", value, match2.value); value = match2.value; } - state3.mainstay.tracer.filter(schema3, state3, "valid", match2); + state3.mainstay.tracer.filter(schema2, state3, "valid", match2); return internals.finalize(value, null, helpers); } - if (schema3._flags.only) { - const report = schema3.$_createError("any.only", value, { valids: schema3._valids.values({ display: true }) }, + if (schema2._flags.only) { + const report = schema2.$_createError("any.only", value, { valids: schema2._valids.values({ display: true }) }, state3, prefs); if (prefs.abortEarly) { return internals.finalize(value, [report], helpers); @@ -58999,11 +58998,11 @@ var require_validator = __commonJS({ errors.push(report); } } - if (schema3._invalids) { - const match2 = schema3._invalids.get(value, state3, prefs, schema3._flags.insensitive); + if (schema2._invalids) { + const match2 = schema2._invalids.get(value, state3, prefs, schema2._flags.insensitive); if (match2) { - state3.mainstay.tracer.filter(schema3, state3, "invalid", match2); - const report = schema3.$_createError("any.invalid", value, { invalids: schema3._invalids.values({ display: true }) }, + state3.mainstay.tracer.filter(schema2, state3, "invalid", match2); + const report = schema2.$_createError("any.invalid", value, { invalids: schema2._invalids.values({ display: true }) }, state3, prefs); if (prefs.abortEarly) { return internals.finalize(value, [report], helpers); @@ -59028,17 +59027,17 @@ var require_validator = __commonJS({ } } } - if (!schema3._rules.length) { + if (!schema2._rules.length) { return internals.finalize(value, errors, helpers); } return internals.rules(value, errors, helpers); }; internals.rules = function(value, errors, helpers) { - const { schema: schema3, state: state3, prefs } = helpers; - for (const rule of schema3._rules) { - const definition = schema3._definition.rules[rule.method]; + const { schema: schema2, state: state3, prefs } = helpers; + for (const rule of schema2._rules) { + const definition = schema2._definition.rules[rule.method]; if (definition.convert && prefs.convert) { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "full"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "full"); continue; } let ret; @@ -59051,7 +59050,7 @@ var require_validator = __commonJS({ const normalized = resolver.normalize ? resolver.normalize(resolved) : resolved; const invalid = Common.validateArg(normalized, null, resolver); if (invalid) { - ret = schema3.$_createError("any.ref", resolved, { arg: key, ref: args[key], reason: invalid }, state3, prefs); + ret = schema2.$_createError("any.ref", resolved, { arg: key, ref: args[key], reason: invalid }, state3, prefs); break; } args[key] = normalized; @@ -59060,7 +59059,7 @@ var require_validator = __commonJS({ ret = ret || definition.validate(value, helpers, args, rule); const result = internals.rule(ret, rule); if (result.errors) { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "error"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "error"); if (rule.warn) { state3.mainstay.warnings.push(...result.errors); continue; @@ -59070,7 +59069,7 @@ var require_validator = __commonJS({ } errors.push(...result.errors); } else { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "pass"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "pass"); state3.mainstay.tracer.value(state3, "rule", value, result.value, rule.name); value = result.value; } @@ -59096,7 +59095,7 @@ var require_validator = __commonJS({ }; internals.finalize = function(value, errors, helpers) { errors = errors || []; - const { schema: schema3, state: state3, prefs } = helpers; + const { schema: schema2, state: state3, prefs } = helpers; if (errors.length) { const failover = internals.default("failover", void 0, errors, helpers); if (failover !== void 0) { @@ -59105,9 +59104,9 @@ var require_validator = __commonJS({ errors = []; } } - if (errors.length && schema3._flags.error) { - if (typeof schema3._flags.error === "function") { - errors = schema3._flags.error(errors); + if (errors.length && schema2._flags.error) { + if (typeof schema2._flags.error === "function") { + errors = schema2._flags.error(errors); if (!Array.isArray(errors)) { errors = [errors]; } @@ -59115,7 +59114,7 @@ var require_validator = __commonJS({ assert4(error2 instanceof Error || error2 instanceof Errors.Report, "error() must return an Error object"); } } else { - errors = [schema3._flags.error]; + errors = [schema2._flags.error]; } } if (value === void 0) { @@ -59123,59 +59122,59 @@ var require_validator = __commonJS({ state3.mainstay.tracer.value(state3, "default", value, defaulted); value = defaulted; } - if (schema3._flags.cast && value !== void 0) { - const caster = schema3._definition.cast[schema3._flags.cast]; + if (schema2._flags.cast && value !== void 0) { + const caster = schema2._definition.cast[schema2._flags.cast]; if (caster.from(value)) { const casted = caster.to(value, helpers); - state3.mainstay.tracer.value(state3, "cast", value, casted, schema3._flags.cast); + state3.mainstay.tracer.value(state3, "cast", value, casted, schema2._flags.cast); value = casted; } } - if (schema3.$_terms.externals && prefs.externals && prefs._externals !== false) { - for (const { method } of schema3.$_terms.externals) { - state3.mainstay.externals.push({ method, schema: schema3, state: state3, label: Errors.label(schema3._flags, state3, + if (schema2.$_terms.externals && prefs.externals && prefs._externals !== false) { + for (const { method } of schema2.$_terms.externals) { + state3.mainstay.externals.push({ method, schema: schema2, state: state3, label: Errors.label(schema2._flags, state3, prefs) }); } } const result = { value, errors: errors.length ? errors : null }; - if (schema3._flags.result) { - result.value = schema3._flags.result === "strip" ? void 0 : ( + if (schema2._flags.result) { + result.value = schema2._flags.result === "strip" ? void 0 : ( /* raw */ helpers.original ); - state3.mainstay.tracer.value(state3, schema3._flags.result, value, result.value); - state3.shadow(value, schema3._flags.result); + state3.mainstay.tracer.value(state3, schema2._flags.result, value, result.value); + state3.shadow(value, schema2._flags.result); } - if (schema3._cache && prefs.cache !== false && !schema3._refs.length) { - schema3._cache.set(helpers.original, result); + if (schema2._cache && prefs.cache !== false && !schema2._refs.length) { + schema2._cache.set(helpers.original, result); } - if (value !== void 0 && !result.errors && schema3._flags.artifact !== void 0) { + if (value !== void 0 && !result.errors && schema2._flags.artifact !== void 0) { state3.mainstay.artifacts = state3.mainstay.artifacts || /* @__PURE__ */ new Map(); - if (!state3.mainstay.artifacts.has(schema3._flags.artifact)) { - state3.mainstay.artifacts.set(schema3._flags.artifact, []); + if (!state3.mainstay.artifacts.has(schema2._flags.artifact)) { + state3.mainstay.artifacts.set(schema2._flags.artifact, []); } - state3.mainstay.artifacts.get(schema3._flags.artifact).push(state3.path); + state3.mainstay.artifacts.get(schema2._flags.artifact).push(state3.path); } return result; }; - internals.prefs = function(schema3, prefs) { + internals.prefs = function(schema2, prefs) { const isDefaultOptions = prefs === Common.defaults; - if (isDefaultOptions && schema3._preferences[Common.symbols.prefs]) { - return schema3._preferences[Common.symbols.prefs]; + if (isDefaultOptions && schema2._preferences[Common.symbols.prefs]) { + return schema2._preferences[Common.symbols.prefs]; } - prefs = Common.preferences(prefs, schema3._preferences); + prefs = Common.preferences(prefs, schema2._preferences); if (isDefaultOptions) { - schema3._preferences[Common.symbols.prefs] = prefs; + schema2._preferences[Common.symbols.prefs] = prefs; } return prefs; }; internals.default = function(flag, value, errors, helpers) { - const { schema: schema3, state: state3, prefs } = helpers; - const source = schema3._flags[flag]; + const { schema: schema2, state: state3, prefs } = helpers; + const source = schema2._flags[flag]; if (prefs.noDefaults || source === void 0) { return value; } - state3.mainstay.tracer.log(schema3, state3, "rule", flag, "full"); + state3.mainstay.tracer.log(schema2, state3, "rule", flag, "full"); if (!source) { return source; } @@ -59184,7 +59183,7 @@ var require_validator = __commonJS({ try { return source(...args); } catch (err) { - errors.push(schema3.$_createError(`any.${flag}`, null, { error: err }, state3, prefs)); + errors.push(schema2.$_createError(`any.${flag}`, null, { error: err }, state3, prefs)); return; } } @@ -59199,11 +59198,11 @@ var require_validator = __commonJS({ } return clone(source); }; - internals.trim = function(value, schema3) { + internals.trim = function(value, schema2) { if (typeof value !== "string") { return value; } - const trim2 = schema3.$_getRule("trim"); + const trim2 = schema2.$_getRule("trim"); if (!trim2 || !trim2.args.enabled) { return value; } @@ -59231,7 +59230,7 @@ var require_values = __commonJS({ "node_modules/joi/lib/values.js"(exports2, module2) { "use strict"; var { assert: assert4, deepEqual } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = {}; module2.exports = internals.Values = class { constructor(values, refs) { @@ -59355,15 +59354,15 @@ var require_values = __commonJS({ return Array.from([...this._values, ...this._refs]); } clone() { - const set2 = new internals.Values(this._values, this._refs); - set2._override = this._override; - return set2; + const set = new internals.Values(this._values, this._refs); + set._override = this._override; + return set; } concat(source) { assert4(!source._override, "Cannot concat override set of values"); - const set2 = new internals.Values([...this._values, ...source._values], [...this._refs, ...source._refs]); - set2._override = this._override; - return set2; + const set = new internals.Values([...this._values, ...source._values], [...this._refs, ...source._refs]); + set._override = this._override; + return set; } describe() { const normalized = []; @@ -59382,15 +59381,15 @@ var require_values = __commonJS({ internals.Values.prototype[Common.symbols.values] = true; internals.Values.prototype.slice = internals.Values.prototype.clone; internals.lowercases = function(from) { - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); if (from) { for (const value of from) { if (typeof value === "string") { - map2.set(value.toLowerCase(), value); + map.set(value.toLowerCase(), value); } } } - return map2; + return map; }; } }); @@ -59399,9 +59398,9 @@ var require_values = __commonJS({ var require_base = __commonJS({ "node_modules/joi/lib/base.js"(exports2, module2) { "use strict"; - var { assert: assert4, clone, deepEqual, merge: merge3 } = require_lib(); + var { assert: assert4, clone, deepEqual, merge: merge2 } = require_lib(); var Cache = require_cache2(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Extend = require_extend(); @@ -59419,8 +59418,8 @@ var require_base = __commonJS({ nullSchema: /* @__PURE__ */ __name(() => ({ type: "null" }), "nullSchema") }; internals.Base = class { - constructor(type2) { - this.type = type2; + constructor(type) { + this.type = type; this.$_root = null; this._definition = {}; this._reset(); @@ -59455,7 +59454,7 @@ var require_base = __commonJS({ } const rootCall = !options.$defs; const defs = options.$defs ?? {}; - let schema3 = {}; + let schema2 = {}; const isTypeAny = this.type === "any"; const isOnly = this._flags.only; const valids = this._valids && Array.from(this._valids._values).filter((v) => v !== null); @@ -59465,22 +59464,22 @@ var require_base = __commonJS({ typesOverlap = types2.has(this.type) || this.type === "date" && types2.has("object"); } if (!isTypeAny && typesOverlap && internals.standardTypes.has(this.type)) { - schema3.type = this.type; + schema2.type = this.type; } if (this._flags.description) { - schema3.description = this._flags.description; + schema2.description = this._flags.description; } if (this._flags.default !== void 0 && typeof this._flags.default !== "function") { - schema3.default = this._flags.default; + schema2.default = this._flags.default; } const subOptions = { ...options, $defs: defs }; if (this._definition.jsonSchema && typesOverlap) { - schema3 = this._definition.jsonSchema(this, schema3, mode, subOptions); + schema2 = this._definition.jsonSchema(this, schema2, mode, subOptions); } for (const rule of this._rules) { const definition = this._definition.rules[rule.name]; if (definition.jsonSchema && typesOverlap) { - schema3 = definition.jsonSchema(rule, schema3, isOnly, mode, subOptions); + schema2 = definition.jsonSchema(rule, schema2, isOnly, mode, subOptions); } } if (this.$_terms.shared) { @@ -59489,43 +59488,43 @@ var require_base = __commonJS({ } } if (rootCall && Object.keys(defs).length) { - schema3.$defs = defs; + schema2.$defs = defs; } if (this._valids) { const values = valids.filter((v) => typeof v !== "symbol"); if (values.length) { if (this._flags.only) { - schema3.enum = values; + schema2.enum = values; const list = Common.intersect(new Set(values.map((v) => typeof v)), internals.primitiveTypes); if (list.size) { const types2 = [...list]; - schema3.type = types2.length === 1 ? types2[0] : types2; + schema2.type = types2.length === 1 ? types2[0] : types2; } } else { const otherTypes = values.filter((v) => typeof v !== this.type || isTypeAny); if (otherTypes.length && !(isTypeAny && !isOnly)) { - if (!schema3.anyOf) { - schema3 = { - anyOf: [schema3] + if (!schema2.anyOf) { + schema2 = { + anyOf: [schema2] }; } - schema3.anyOf.push({ enum: otherTypes }); + schema2.anyOf.push({ enum: otherTypes }); } } } } if (this._valids && this._valids.has(null) && !(isTypeAny && !isOnly)) { if (this._valids.length === 1 && (isTypeAny || isOnly)) { - schema3.type = "null"; - } else if (schema3.type) { - schema3.type = [schema3.type, "null"]; - } else if (schema3.anyOf) { - schema3.anyOf.unshift(internals.nullSchema()); + schema2.type = "null"; + } else if (schema2.type) { + schema2.type = [schema2.type, "null"]; + } else if (schema2.anyOf) { + schema2.anyOf.unshift(internals.nullSchema()); } else { - schema3 = { + schema2 = { anyOf: [ internals.nullSchema(), - schema3 + schema2 ] }; } @@ -59557,7 +59556,7 @@ var require_base = __commonJS({ } return { anyOf: results }; } - return schema3; + return schema2; } // Rules allow(...values) { @@ -59594,12 +59593,12 @@ var require_base = __commonJS({ assert4(desc && typeof desc === "string", "Description must be a non-empty string"); return this.$_setFlag("description", desc); } - empty(schema3) { + empty(schema2) { const obj = this.clone(); - if (schema3 !== void 0) { - schema3 = obj.$_compile(schema3, { override: false }); + if (schema2 !== void 0) { + schema2 = obj.$_compile(schema2, { override: false }); } - return obj.$_setFlag("empty", schema3, { clone: false }); + return obj.$_setFlag("empty", schema2, { clone: false }); } error(err) { assert4(err, "Missing error"); @@ -59781,14 +59780,14 @@ e", obj.type, "with", item.otherwise && item.otherwise.type); obj._flags.empty = obj._flags.empty.concat(source._flags.empty); const flags = Object.assign({}, source._flags); delete flags.empty; - merge3(obj._flags, flags); + merge2(obj._flags, flags); } else if (source._flags.empty) { obj._flags.empty = source._flags.empty; const flags = Object.assign({}, source._flags); delete flags.empty; - merge3(obj._flags, flags); + merge2(obj._flags, flags); } else { - merge3(obj._flags, source._flags); + merge2(obj._flags, source._flags); } for (const key in source.$_terms) { const terms = source.$_terms[key]; @@ -59969,8 +59968,8 @@ ort rule properties"); } return obj; } - $_compile(schema3, options) { - return Compile.schema(this.$_root, schema3, options); + $_compile(schema2, options) { + return Compile.schema(this.$_root, schema2, options); } $_createError(code, value, local, state3, prefs, options = {}) { const flags = options.flags !== false ? this._flags : {}; @@ -60018,9 +60017,9 @@ ort rule properties"); this.$_temp.ruleset = false; return this; } - $_mutateRegister(schema3, { family, key } = {}) { - this._refs.register(schema3, family); - this._ids.register(schema3, { key }); + $_mutateRegister(schema2, { family, key } = {}) { + this._refs.register(schema2, family); + this._ids.register(schema2, { key }); } $_property(name) { return this._definition.properties[name]; @@ -60166,16 +60165,16 @@ ort rule properties"); this.$_temp.whens[id] = obj; return { schema: obj, id }; } - _inner(type2, values, options = {}) { - assert4(!this._inRuleset(), `Cannot set ${type2} inside a ruleset`); + _inner(type, values, options = {}) { + assert4(!this._inRuleset(), `Cannot set ${type} inside a ruleset`); const obj = this.clone(); - if (!obj.$_terms[type2] || options.override) { - obj.$_terms[type2] = []; + if (!obj.$_terms[type] || options.override) { + obj.$_terms[type] = []; } if (options.single) { - obj.$_terms[type2].push(values); + obj.$_terms[type].push(values); } else { - obj.$_terms[type2].push(...values); + obj.$_terms[type].push(...values); } obj.$_temp.ruleset = false; return obj; @@ -60300,7 +60299,7 @@ var require_any = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Base = require_base(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); module2.exports = Base.extend({ type: "any", @@ -60341,12 +60340,12 @@ var require_any = __commonJS({ } }, shared: { - method(schema3) { - assert4(Common.isSchema(schema3) && schema3._flags.id, "Schema must be a schema with an id"); + method(schema2) { + assert4(Common.isSchema(schema2) && schema2._flags.id, "Schema must be a schema with an id"); const obj = this.clone(); obj.$_terms.shared = obj.$_terms.shared || []; - obj.$_terms.shared.push(schema3); - obj.$_mutateRegister(schema3); + obj.$_terms.shared.push(schema2); + obj.$_mutateRegister(schema2); return obj; } }, @@ -60431,9 +60430,9 @@ var require_any = __commonJS({ var require_alternatives = __commonJS({ "node_modules/joi/lib/types/alternatives.js"(exports2, module2) { "use strict"; - var { assert: assert4, merge: merge3 } = require_lib(); + var { assert: assert4, merge: merge2 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Ref = require_ref2(); @@ -60447,21 +60446,21 @@ var require_alternatives = __commonJS({ terms: { matches: { init: [], register: Ref.toSibling } }, - args(schema3, ...schemas) { + args(schema2, ...schemas) { if (schemas.length === 1) { if (Array.isArray(schemas[0])) { - return schema3.try(...schemas[0]); + return schema2.try(...schemas[0]); } } - return schema3.try(...schemas); + return schema2.try(...schemas); }, validate(value, helpers) { - const { schema: schema3, error: error2, state: state3, prefs } = helpers; - if (schema3._flags.match) { + const { schema: schema2, error: error2, state: state3, prefs } = helpers; + if (schema2._flags.match) { const matched = []; const failed = []; - for (let i2 = 0; i2 < schema3.$_terms.matches.length; ++i2) { - const item = schema3.$_terms.matches[i2]; + for (let i2 = 0; i2 < schema2.$_terms.matches.length; ++i2) { + const item = schema2.$_terms.matches[i2]; const localState = state3.nest(item.schema, `match.${i2}`); localState.snapshot(); const result = item.schema.$_validate(value, localState, prefs); @@ -60479,10 +60478,10 @@ var require_alternatives = __commonJS({ }; return { errors: error2("alternatives.any", context3) }; } - if (schema3._flags.match === "one") { + if (schema2._flags.match === "one") { return matched.length === 1 ? { value: matched[0] } : { errors: error2("alternatives.one") }; } - if (matched.length !== schema3.$_terms.matches.length) { + if (matched.length !== schema2.$_terms.matches.length) { const context3 = { details: failed.map((f) => Errors.details(f, { override: false })) }; @@ -60493,12 +60492,12 @@ var require_alternatives = __commonJS({ return v.schema.type === "object" || v.schema.type === "alternatives" && isAnyObj(v.schema); }); }, "isAnyObj"); - return isAnyObj(schema3) ? { value: matched.reduce((acc, v) => merge3(acc, v, { mergeArrays: false })) } : { value: matched[matched. + return isAnyObj(schema2) ? { value: matched.reduce((acc, v) => merge2(acc, v, { mergeArrays: false })) } : { value: matched[matched. length - 1] }; } const errors = []; - for (let i2 = 0; i2 < schema3.$_terms.matches.length; ++i2) { - const item = schema3.$_terms.matches[i2]; + for (let i2 = 0; i2 < schema2.$_terms.matches.length; ++i2) { + const item = schema2.$_terms.matches[i2]; if (item.schema) { const localState = state3.nest(item.schema, `match.${i2}`); localState.snapshot(); @@ -60528,9 +60527,9 @@ var require_alternatives = __commonJS({ } return internals.errors(errors, helpers); }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { const matches = []; - for (const match2 of schema3.$_terms.matches) { + for (const match2 of schema2.$_terms.matches) { if (match2.schema) { matches.push(match2.schema.$_jsonSchema(mode, options)); } else { @@ -60547,7 +60546,7 @@ var require_alternatives = __commonJS({ } if (matches.length) { delete res.type; - const matchMode = schema3._flags.match ?? "any"; + const matchMode = schema2._flags.match ?? "any"; if (matchMode === "one") { res.oneOf = matches; } else { @@ -60592,8 +60591,8 @@ var require_alternatives = __commonJS({ Common.verifyFlat(schemas, "try"); assert4(!this._flags._endedSwitch, "Unreachable condition"); const obj = this.clone(); - for (const schema3 of schemas) { - obj.$_terms.matches.push({ schema: obj.$_compile(schema3) }); + for (const schema2 of schemas) { + obj.$_terms.matches.push({ schema: obj.$_compile(schema2) }); } return obj.$_mutateRebuild(); } @@ -60625,21 +60624,21 @@ var require_alternatives = __commonJS({ return false; } }, - rebuild(schema3) { + rebuild(schema2) { const each = /* @__PURE__ */ __name((item) => { if (Common.isSchema(item) && item.type === "array") { - schema3.$_setFlag("_arrayItems", true, { clone: false }); + schema2.$_setFlag("_arrayItems", true, { clone: false }); } }, "each"); - schema3.$_modify({ each }); + schema2.$_modify({ each }); }, manifest: { build(obj, desc) { if (desc.matches) { for (const match2 of desc.matches) { - const { schema: schema3, ref, is, not, then, otherwise } = match2; - if (schema3) { - obj = obj.try(schema3); + const { schema: schema2, ref, is, not, then, otherwise } = match2; + if (schema2) { + obj = obj.try(schema2); } else if (ref) { obj = obj.conditional(ref, { is, then, not, otherwise, switch: match2.switch }); } else { @@ -60667,7 +60666,7 @@ var require_alternatives = __commonJS({ } const valids = /* @__PURE__ */ new Set(); const complex = []; - for (const { reports, schema: schema3 } of failures) { + for (const { reports, schema: schema2 } of failures) { if (reports.length > 1) { return internals.unmatched(failures, error2); } @@ -60676,7 +60675,7 @@ var require_alternatives = __commonJS({ return internals.unmatched(failures, error2); } if (report.state.path.length !== state3.path.length) { - complex.push({ type: schema3.type, report }); + complex.push({ type: schema2.type, report }); continue; } if (report.code === "any.only") { @@ -60685,13 +60684,13 @@ var require_alternatives = __commonJS({ } continue; } - const [type2, code] = report.code.split("."); + const [type, code] = report.code.split("."); if (code !== "base") { - complex.push({ type: schema3.type, report }); + complex.push({ type: schema2.type, report }); } else if (report.code === "object.base") { valids.add(report.local.type); } else { - valids.add(type2); + valids.add(type); } } if (!complex.length) { @@ -60718,7 +60717,7 @@ var require_array2 = __commonJS({ "use strict"; var { assert: assert4, deepEqual, reach } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var internals = {}; module2.exports = Any.extend({ @@ -60736,43 +60735,43 @@ var require_array2 = __commonJS({ }, coerce: { from: "object", - method(value, { schema: schema3, state: state3, prefs }) { + method(value, { schema: schema2, state: state3, prefs }) { if (!Array.isArray(value)) { return; } - const sort = schema3.$_getRule("sort"); + const sort = schema2.$_getRule("sort"); if (!sort) { return; } - return internals.sort(schema3, value, sort.args.options, state3, prefs); + return internals.sort(schema2, value, sort.args.options, state3, prefs); } }, - validate(value, { schema: schema3, error: error2 }) { + validate(value, { schema: schema2, error: error2 }) { if (!Array.isArray(value)) { - if (schema3._flags.single) { + if (schema2._flags.single) { const single = [value]; single[Common.symbols.arraySingle] = true; return { value: single }; } return { errors: error2("array.base") }; } - if (!schema3.$_getRule("items") && !schema3.$_terms.externals) { + if (!schema2.$_getRule("items") && !schema2.$_terms.externals) { return; } return { value: value.slice() }; }, - jsonSchema(schema3, res, mode, options) { - const ordered = schema3.$_terms.ordered; + jsonSchema(schema2, res, mode, options) { + const ordered = schema2.$_terms.ordered; if (ordered.length) { res.prefixItems = ordered.map((item) => item.$_jsonSchema(mode, options)); } - if (schema3.$_terms.items.length) { + if (schema2.$_terms.items.length) { let items; - if (schema3.$_terms.items.length === 1) { - items = schema3.$_terms.items[0].$_jsonSchema(mode, options); + if (schema2.$_terms.items.length === 1) { + items = schema2.$_terms.items[0].$_jsonSchema(mode, options); } else { items = { - anyOf: schema3.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) + anyOf: schema2.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) }; } if (ordered.length) { @@ -60787,7 +60786,7 @@ var require_array2 = __commonJS({ res.maxItems = ordered.length; } const contains = []; - for (const rule of schema3._rules) { + for (const rule of schema2._rules) { if (rule.name === "has") { contains.push(rule.args.schema.$_jsonSchema(mode, options)); } @@ -60799,13 +60798,13 @@ var require_array2 = __commonJS({ res.allOf = contains.map((item) => ({ contains: item })); } } - if (schema3._flags.single && schema3.$_terms.items.length) { + if (schema2._flags.single && schema2.$_terms.items.length) { let items; - if (schema3.$_terms.items.length === 1) { - items = schema3.$_terms.items[0].$_jsonSchema(mode, options); + if (schema2.$_terms.items.length === 1) { + items = schema2.$_terms.items[0].$_jsonSchema(mode, options); } else { items = { - anyOf: schema3.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) + anyOf: schema2.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) }; } res = { @@ -60819,10 +60818,10 @@ var require_array2 = __commonJS({ }, rules: { has: { - method(schema3) { - schema3 = this.$_compile(schema3, { appendPath: true }); - const obj = this.$_addRule({ name: "has", args: { schema: schema3 } }); - obj.$_mutateRegister(schema3); + method(schema2) { + schema2 = this.$_compile(schema2, { appendPath: true }); + const obj = this.$_addRule({ name: "has", args: { schema: schema2 } }); + obj.$_mutateRegister(schema2); return obj; }, validate(value, { state: state3, prefs, error: error2 }, { schema: has2 }) { @@ -60846,15 +60845,15 @@ var require_array2 = __commonJS({ Common.verifyFlat(schemas, "items"); const obj = this.$_addRule("items"); for (let i2 = 0; i2 < schemas.length; ++i2) { - const type2 = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); - obj.$_terms.items.push(type2); + const type = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); + obj.$_terms.items.push(type); } return obj.$_mutateRebuild(); }, - validate(value, { schema: schema3, error: error2, state: state3, prefs, errorsArray }) { - const requireds = schema3.$_terms._requireds.slice(); - const ordereds = schema3.$_terms.ordered.slice(); - const inclusions = [...schema3.$_terms._inclusions, ...requireds]; + validate(value, { schema: schema2, error: error2, state: state3, prefs, errorsArray }) { + const requireds = schema2.$_terms._requireds.slice(); + const ordereds = schema2.$_terms.ordered.slice(); + const inclusions = [...schema2.$_terms._inclusions, ...requireds]; const wasArray = !value[Common.symbols.arraySingle]; delete value[Common.symbols.arraySingle]; const errors = errorsArray(); @@ -60865,7 +60864,7 @@ var require_array2 = __commonJS({ let isValid = false; const key = wasArray ? i2 : new Number(i2); const path17 = [...state3.path, key]; - if (!schema3._flags.sparse && item === void 0) { + if (!schema2._flags.sparse && item === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize(path17))); if (prefs.abortEarly) { return errors; @@ -60874,7 +60873,7 @@ var require_array2 = __commonJS({ continue; } const ancestors = [value, ...state3.ancestors]; - for (const exclusion of schema3.$_terms._exclusions) { + for (const exclusion of schema2.$_terms._exclusions) { if (!exclusion.$_match(item, state3.localize(path17, ancestors, exclusion), prefs, { presence: "ignore" })) { continue; } @@ -60889,7 +60888,7 @@ var require_array2 = __commonJS({ if (errored) { continue; } - if (schema3.$_terms.ordered.length) { + if (schema2.$_terms.ordered.length) { if (ordereds.length) { const ordered = ordereds.shift(); const res = ordered.$_validate(item, state3.localize(path17, ancestors, ordered), prefs); @@ -60898,7 +60897,7 @@ var require_array2 = __commonJS({ internals.fastSplice(value, i2); --i2; --il; - } else if (!schema3._flags.sparse && res.value === void 0) { + } else if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize( path17))); if (prefs.abortEarly) { @@ -60915,8 +60914,8 @@ var require_array2 = __commonJS({ } } continue; - } else if (!schema3.$_terms.items.length) { - errors.push(error2("array.orderedLength", { pos: i2, limit: schema3.$_terms.ordered.length })); + } else if (!schema2.$_terms.items.length) { + errors.push(error2("array.orderedLength", { pos: i2, limit: schema2.$_terms.ordered.length })); if (prefs.abortEarly) { return errors; } @@ -60937,7 +60936,7 @@ var require_array2 = __commonJS({ internals.fastSplice(requireds, j); --j; --jl; - if (!schema3._flags.sparse && res.value === void 0) { + if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize(path17))); if (prefs.abortEarly) { return errors; @@ -60967,7 +60966,7 @@ var require_array2 = __commonJS({ internals.fastSplice(value, i2); --i2; --il; - } else if (!schema3._flags.sparse && res.value === void 0) { + } else if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize( path17))); errored = true; @@ -60998,7 +60997,7 @@ var require_array2 = __commonJS({ if (errored) { continue; } - if ((schema3.$_terms._inclusions.length || schema3.$_terms._requireds.length) && !isValid) { + if ((schema2.$_terms._inclusions.length || schema2.$_terms._requireds.length) && !isValid) { if (stripUnknown) { internals.fastSplice(value, i2); --i2; @@ -61012,10 +61011,10 @@ var require_array2 = __commonJS({ } } if (requireds.length) { - internals.fillMissedErrors(schema3, errors, requireds, value, state3, prefs); + internals.fillMissedErrors(schema2, errors, requireds, value, state3, prefs); } if (ordereds.length) { - internals.fillOrderedErrors(schema3, errors, ordereds, value, state3, prefs); + internals.fillOrderedErrors(schema2, errors, ordereds, value, state3, prefs); if (!errors.length) { internals.fillDefault(ordereds, value, state3, prefs); } @@ -61072,10 +61071,10 @@ var require_array2 = __commonJS({ Common.verifyFlat(schemas, "ordered"); const obj = this.$_addRule("items"); for (let i2 = 0; i2 < schemas.length; ++i2) { - const type2 = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); - internals.validateSingle(type2, obj); - obj.$_mutateRegister(type2); - obj.$_terms.ordered.push(type2); + const type = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); + internals.validateSingle(type, obj); + obj.$_mutateRegister(type); + obj.$_terms.ordered.push(type); } return obj.$_mutateRebuild(); } @@ -61099,8 +61098,8 @@ var require_array2 = __commonJS({ } return this.$_addRule({ name: "sort", args: { options: settings } }); }, - validate(value, { error: error2, state: state3, prefs, schema: schema3 }, { options }) { - const { value: sorted2, errors } = internals.sort(schema3, value, options, state3, prefs); + validate(value, { error: error2, state: state3, prefs, schema: schema2 }, { options }) { + const { value: sorted2, errors } = internals.sort(schema2, value, options, state3, prefs); if (errors) { return errors; } @@ -61139,7 +61138,7 @@ be a function or a string"); } return this.$_addRule(rule); }, - validate(value, { state: state3, error: error2, schema: schema3 }, { comparator: raw, options }, { comparator, + validate(value, { state: state3, error: error2, schema: schema2 }, { comparator: raw, options }, { comparator, path: path17 }) { const found = { string: /* @__PURE__ */ Object.create(null), @@ -61229,22 +61228,22 @@ be a function or a string"); } } }, - rebuild(schema3) { - schema3.$_terms._inclusions = []; - schema3.$_terms._exclusions = []; - schema3.$_terms._requireds = []; - for (const type2 of schema3.$_terms.items) { - internals.validateSingle(type2, schema3); - if (type2._flags.presence === "required") { - schema3.$_terms._requireds.push(type2); - } else if (type2._flags.presence === "forbidden") { - schema3.$_terms._exclusions.push(type2); + rebuild(schema2) { + schema2.$_terms._inclusions = []; + schema2.$_terms._exclusions = []; + schema2.$_terms._requireds = []; + for (const type of schema2.$_terms.items) { + internals.validateSingle(type, schema2); + if (type._flags.presence === "required") { + schema2.$_terms._requireds.push(type); + } else if (type._flags.presence === "forbidden") { + schema2.$_terms._exclusions.push(type); } else { - schema3.$_terms._inclusions.push(type2); + schema2.$_terms._inclusions.push(type); } } - for (const type2 of schema3.$_terms.ordered) { - internals.validateSingle(type2, schema3); + for (const type of schema2.$_terms.ordered) { + internals.validateSingle(type, schema2); } }, manifest: { @@ -61279,7 +61278,7 @@ d value(s)", "array.unique": "{{#label}} contains a duplicate value" } }); - internals.fillMissedErrors = function(schema3, errors, requireds, value, state3, prefs) { + internals.fillMissedErrors = function(schema2, errors, requireds, value, state3, prefs) { const knownMisses = []; let unknownMisses = 0; for (const required of requireds) { @@ -61292,16 +61291,16 @@ d value(s)", } if (knownMisses.length) { if (unknownMisses) { - errors.push(schema3.$_createError("array.includesRequiredBoth", value, { knownMisses, unknownMisses }, state3, + errors.push(schema2.$_createError("array.includesRequiredBoth", value, { knownMisses, unknownMisses }, state3, prefs)); } else { - errors.push(schema3.$_createError("array.includesRequiredKnowns", value, { knownMisses }, state3, prefs)); + errors.push(schema2.$_createError("array.includesRequiredKnowns", value, { knownMisses }, state3, prefs)); } } else { - errors.push(schema3.$_createError("array.includesRequiredUnknowns", value, { unknownMisses }, state3, prefs)); + errors.push(schema2.$_createError("array.includesRequiredUnknowns", value, { unknownMisses }, state3, prefs)); } }; - internals.fillOrderedErrors = function(schema3, errors, ordereds, value, state3, prefs) { + internals.fillOrderedErrors = function(schema2, errors, ordereds, value, state3, prefs) { const requiredOrdereds = []; for (const ordered of ordereds) { if (ordered._flags.presence === "required") { @@ -61309,7 +61308,7 @@ d value(s)", } } if (requiredOrdereds.length) { - internals.fillMissedErrors(schema3, errors, requiredOrdereds, value, state3, prefs); + internals.fillMissedErrors(schema2, errors, requiredOrdereds, value, state3, prefs); } }; internals.fillDefault = function(ordereds, value, state3, prefs) { @@ -61338,13 +61337,13 @@ d value(s)", } --arr.length; }; - internals.validateSingle = function(type2, obj) { - if (type2.type === "array" || type2._flags._arrayItems) { + internals.validateSingle = function(type, obj) { + if (type.type === "array" || type._flags._arrayItems) { assert4(!obj._flags.single, "Cannot specify array item with single rule enabled"); obj.$_setFlag("_arrayItems", true, { clone: false }); } }; - internals.sort = function(schema3, value, settings, state3, prefs) { + internals.sort = function(schema2, value, settings, state3, prefs) { const order = settings.order === "ascending" ? 1 : -1; const aFirst = -1 * order; const bFirst = order; @@ -61361,14 +61360,14 @@ d value(s)", if (compare !== null) { return compare; } - const type2 = typeof a; - if (type2 !== typeof b) { - throw schema3.$_createError("array.sort.mismatching", value, null, state3, prefs); + const type = typeof a; + if (type !== typeof b) { + throw schema2.$_createError("array.sort.mismatching", value, null, state3, prefs); } - if (type2 !== "number" && type2 !== "string") { - throw schema3.$_createError("array.sort.unsupported", value, { type: type2 }, state3, prefs); + if (type !== "number" && type !== "string") { + throw schema2.$_createError("array.sort.unsupported", value, { type }, state3, prefs); } - if (type2 === "number") { + if (type === "number") { return (a - b) * order; } return a < b ? aFirst : bFirst; @@ -61406,7 +61405,7 @@ var require_boolean = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Values = require_values(); var internals = {}; internals.isBool = function(value) { @@ -61427,18 +61426,18 @@ var require_boolean = __commonJS({ manifest: "values" } }, - coerce(value, { schema: schema3 }) { + coerce(value, { schema: schema2 }) { if (typeof value === "boolean") { return; } if (typeof value === "string") { const trimmedValue = value.trim(); - const normalized = schema3._flags.sensitive ? trimmedValue : trimmedValue.toLowerCase(); + const normalized = schema2._flags.sensitive ? trimmedValue : trimmedValue.toLowerCase(); value = normalized === "true" ? true : normalized === "false" ? false : value; } if (typeof value !== "boolean") { - value = schema3.$_terms.truthy && schema3.$_terms.truthy.has(value, null, null, !schema3._flags.sensitive) || (schema3. - $_terms.falsy && schema3.$_terms.falsy.has(value, null, null, !schema3._flags.sensitive) ? false : value); + value = schema2.$_terms.truthy && schema2.$_terms.truthy.has(value, null, null, !schema2._flags.sensitive) || (schema2. + $_terms.falsy && schema2.$_terms.falsy.has(value, null, null, !schema2._flags.sensitive) ? false : value); } return { value }; }, @@ -61518,7 +61517,7 @@ var require_date = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Template = require_template(); var internals = { formats: ["iso", "javascript", "unix"] @@ -61530,21 +61529,21 @@ var require_date = __commonJS({ type: "date", coerce: { from: ["number", "string"], - method(value, { schema: schema3 }) { - return { value: internals.parse(value, schema3._flags.format) || value }; + method(value, { schema: schema2 }) { + return { value: internals.parse(value, schema2._flags.format) || value }; } }, - validate(value, { schema: schema3, error: error2, prefs }) { + validate(value, { schema: schema2, error: error2, prefs }) { if (value instanceof Date && !isNaN(value.getTime())) { return; } - const format = schema3._flags.format; + const format = schema2._flags.format; if (!prefs.convert || !format || typeof value !== "string") { return { value, errors: error2("date.base") }; } return { value, errors: error2("date.format", { format }) }; }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "string"; res.format = "date-time"; return res; @@ -61631,9 +61630,9 @@ var require_date = __commonJS({ } }, timestamp: { - method(type2 = "javascript") { - assert4(["javascript", "unix"].includes(type2), '"type" must be one of "javascript, unix"'); - return this.format(type2); + method(type = "javascript") { + assert4(["javascript", "unix"].includes(type), '"type" must be one of "javascript, unix"'); + return this.format(type); } } }, @@ -61777,14 +61776,14 @@ var require_lib4 = __commonJS({ const graphAfters = /* @__PURE__ */ Object.create(null); const groups = /* @__PURE__ */ Object.create(null); for (const item of this._items) { - const seq2 = item.seq; + const seq = item.seq; const group = item.group; groups[group] = groups[group] ?? []; - groups[group].push(seq2); - graph[seq2] = item.before; + groups[group].push(seq); + graph[seq] = item.before; for (const after of item.after) { graphAfters[after] = graphAfters[after] ?? []; - graphAfters[after].push(seq2); + graphAfters[after].push(seq); } } for (const node in graph) { @@ -61872,7 +61871,7 @@ var require_keys = __commonJS({ var { applyToDefaults, assert: assert4, clone: Clone } = require_lib(); var Topo = require_lib4(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Ref = require_ref2(); @@ -61901,15 +61900,15 @@ var require_keys = __commonJS({ patterns: { init: null }, renames: { init: null } }, - args(schema3, keys) { - return schema3.keys(keys); + args(schema2, keys) { + return schema2.keys(keys); }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "object"; - if (schema3.$_terms.keys) { + if (schema2.$_terms.keys) { res.properties = {}; const required = []; - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { const jsonSchema = child2.schema.$_jsonSchema(mode, options); res.properties[child2.key] = jsonSchema; if (child2.schema._flags.presence === "required" || mode === "output" && child2.schema._flags.default !== void 0) { @@ -61920,9 +61919,9 @@ var require_keys = __commonJS({ res.required = required.sort(); } } - if (schema3.$_terms.patterns) { + if (schema2.$_terms.patterns) { const patternProperties = {}; - for (const pattern of schema3.$_terms.patterns) { + for (const pattern of schema2.$_terms.patterns) { if (pattern.regex) { patternProperties[pattern.regex.source] = pattern.rule.$_jsonSchema(mode, options); } else { @@ -61939,35 +61938,35 @@ var require_keys = __commonJS({ } } if (res.additionalProperties === void 0) { - const additionalProperties = schema3._flags.unknown === true || schema3._flags.unknown === void 0 && !schema3. - $_terms.keys && !schema3.$_terms.patterns && !schema3._flags.only; + const additionalProperties = schema2._flags.unknown === true || schema2._flags.unknown === void 0 && !schema2. + $_terms.keys && !schema2.$_terms.patterns && !schema2._flags.only; if (additionalProperties === false) { res.additionalProperties = false; } } return res; }, - validate(value, { schema: schema3, error: error2, state: state3, prefs }) { - if (!value || typeof value !== schema3.$_property("typeof") || Array.isArray(value)) { - return { value, errors: error2("object.base", { type: schema3.$_property("typeof") }) }; + validate(value, { schema: schema2, error: error2, state: state3, prefs }) { + if (!value || typeof value !== schema2.$_property("typeof") || Array.isArray(value)) { + return { value, errors: error2("object.base", { type: schema2.$_property("typeof") }) }; } - if (!schema3.$_terms.renames && !schema3.$_terms.dependencies && !schema3.$_terms.keys && // null allows any keys - !schema3.$_terms.patterns && !schema3.$_terms.externals) { + if (!schema2.$_terms.renames && !schema2.$_terms.dependencies && !schema2.$_terms.keys && // null allows any keys + !schema2.$_terms.patterns && !schema2.$_terms.externals) { return; } value = internals.clone(value, prefs); const errors = []; - if (schema3.$_terms.renames && !internals.rename(schema3, value, state3, prefs, errors)) { + if (schema2.$_terms.renames && !internals.rename(schema2, value, state3, prefs, errors)) { return { value, errors }; } - if (!schema3.$_terms.keys && // null allows any keys - !schema3.$_terms.patterns && !schema3.$_terms.dependencies) { + if (!schema2.$_terms.keys && // null allows any keys + !schema2.$_terms.patterns && !schema2.$_terms.dependencies) { return { value, errors }; } const unprocessed = new Set(Object.keys(value)); - if (schema3.$_terms.keys) { + if (schema2.$_terms.keys) { const ancestors = [value, ...state3.ancestors]; - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { const key = child2.key; const item = value[key]; unprocessed.delete(key); @@ -61988,21 +61987,21 @@ var require_keys = __commonJS({ } } } - if (unprocessed.size || schema3._flags._hasPatternMatch) { - const early = internals.unknown(schema3, value, unprocessed, errors, state3, prefs); + if (unprocessed.size || schema2._flags._hasPatternMatch) { + const early = internals.unknown(schema2, value, unprocessed, errors, state3, prefs); if (early) { return early; } } - if (schema3.$_terms.dependencies) { - for (const dep of schema3.$_terms.dependencies) { + if (schema2.$_terms.dependencies) { + for (const dep of schema2.$_terms.dependencies) { if (dep.key !== null && internals.isPresent(dep.options)(dep.key.resolve(value, state3, prefs, null, { shadow: false })) === false) { continue; } - const failed = internals.dependencies[dep.rel](schema3, dep, value, state3, prefs); + const failed = internals.dependencies[dep.rel](schema2, dep, value, state3, prefs); if (failed) { - const report = schema3.$_createError(failed.code, value, failed.context, state3, prefs); + const report = schema2.$_createError(failed.code, value, failed.context, state3, prefs); if (prefs.abortEarly) { return { value, errors: report }; } @@ -62020,29 +62019,29 @@ var require_keys = __commonJS({ } }, append: { - method(schema3) { - if (schema3 === null || schema3 === void 0 || Object.keys(schema3).length === 0) { + method(schema2) { + if (schema2 === null || schema2 === void 0 || Object.keys(schema2).length === 0) { return this; } - return this.keys(schema3); + return this.keys(schema2); } }, assert: { - method(subject, schema3, message) { + method(subject, schema2, message) { if (!Template.isTemplate(subject)) { subject = Compile.ref(subject); } assert4(message === void 0 || typeof message === "string", "Message must be a string"); - schema3 = this.$_compile(schema3, { appendPath: true }); - const obj = this.$_addRule({ name: "assert", args: { subject, schema: schema3, message } }); + schema2 = this.$_compile(schema2, { appendPath: true }); + const obj = this.$_addRule({ name: "assert", args: { subject, schema: schema2, message } }); obj.$_mutateRegister(subject); - obj.$_mutateRegister(schema3); + obj.$_mutateRegister(schema2); return obj; }, - validate(value, { error: error2, prefs, state: state3 }, { subject, schema: schema3, message }) { + validate(value, { error: error2, prefs, state: state3 }, { subject, schema: schema2, message }) { const about = subject.resolve(value, state3, prefs); const path17 = Ref.isRef(subject) ? subject.absolute(state3) : []; - if (schema3.$_match(about, state3.localize(path17, [value, ...state3.ancestors], schema3), prefs)) { + if (schema2.$_match(about, state3.localize(path17, [value, ...state3.ancestors], schema2), prefs)) { return value; } return error2("object.assert", { subject, message }); @@ -62065,19 +62064,19 @@ var require_keys = __commonJS({ args: ["constructor", "name"] }, keys: { - method(schema3) { - assert4(schema3 === void 0 || typeof schema3 === "object", "Object schema must be a valid object"); - assert4(!Common.isSchema(schema3), "Object schema cannot be a joi schema"); + method(schema2) { + assert4(schema2 === void 0 || typeof schema2 === "object", "Object schema must be a valid object"); + assert4(!Common.isSchema(schema2), "Object schema cannot be a joi schema"); const obj = this.clone(); - if (!schema3) { + if (!schema2) { obj.$_terms.keys = null; - } else if (!Object.keys(schema3).length) { + } else if (!Object.keys(schema2).length) { obj.$_terms.keys = new internals.Keys(); } else { - obj.$_terms.keys = obj.$_terms.keys ? obj.$_terms.keys.filter((child2) => !schema3.hasOwnProperty(child2.key)) : + obj.$_terms.keys = obj.$_terms.keys ? obj.$_terms.keys.filter((child2) => !schema2.hasOwnProperty(child2.key)) : new internals.Keys(); - for (const key in schema3) { - Common.tryWithPath(() => obj.$_terms.keys.push({ key, schema: this.$_compile(schema3[key]) }), key); + for (const key in schema2) { + Common.tryWithPath(() => obj.$_terms.keys.push({ key, schema: this.$_compile(schema2[key]) }), key); } } return obj.$_mutateRebuild(); @@ -62143,21 +62142,21 @@ var require_keys = __commonJS({ } }, pattern: { - method(pattern, schema3, options = {}) { + method(pattern, schema2, options = {}) { const isRegExp2 = pattern instanceof RegExp; if (!isRegExp2) { pattern = this.$_compile(pattern, { appendPath: true }); } - assert4(schema3 !== void 0, "Invalid rule"); + assert4(schema2 !== void 0, "Invalid rule"); Common.assertOptions(options, ["fallthrough", "matches"]); if (isRegExp2) { assert4(!pattern.flags.includes("g") && !pattern.flags.includes("y"), "pattern should not use global or st\ icky mode"); } - schema3 = this.$_compile(schema3, { appendPath: true }); + schema2 = this.$_compile(schema2, { appendPath: true }); const obj = this.clone(); obj.$_terms.patterns = obj.$_terms.patterns || []; - const config = { [isRegExp2 ? "regex" : "schema"]: pattern, rule: schema3 }; + const config = { [isRegExp2 ? "regex" : "schema"]: pattern, rule: schema2 }; if (options.matches) { config.matches = this.$_compile(options.matches); if (config.matches.type !== "array") { @@ -62170,7 +62169,7 @@ icky mode"); config.fallthrough = true; } obj.$_terms.patterns.push(config); - obj.$_mutateRegister(schema3); + obj.$_mutateRegister(schema2); return obj; } }, @@ -62219,14 +62218,14 @@ icky mode"); } }, schema: { - method(type2 = "any") { - return this.$_addRule({ name: "schema", args: { type: type2 } }); + method(type = "any") { + return this.$_addRule({ name: "schema", args: { type } }); }, - validate(value, helpers, { type: type2 }) { - if (Common.isSchema(value) && (type2 === "any" || value.type === type2)) { + validate(value, helpers, { type }) { + if (Common.isSchema(value) && (type === "any" || value.type === type)) { return value; } - return helpers.error("object.schema", { type: type2 }); + return helpers.error("object.schema", { type }); } }, unknown: { @@ -62279,14 +62278,14 @@ icky mode"); return false; } }, - rebuild(schema3) { - if (schema3.$_terms.keys) { + rebuild(schema2) { + if (schema2.$_terms.keys) { const topo = new Topo.Sorter(); - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { Common.tryWithPath(() => topo.add(child2, { after: child2.schema.$_rootReferences(), group: child2.key }), child2. key); } - schema3.$_terms.keys = new internals.Keys(...topo.nodes); + schema2.$_terms.keys = new internals.Keys(...topo.nodes); } }, manifest: { @@ -62300,8 +62299,8 @@ icky mode"); } } if (desc.patterns) { - for (const { regex, schema: schema3, rule, fallthrough, matches } of desc.patterns) { - obj = obj.pattern(regex || schema3, rule, { fallthrough, matches }); + for (const { regex, schema: schema2, rule, fallthrough, matches } of desc.patterns) { + obj = obj.pattern(regex || schema2, rule, { fallthrough, matches }); } } if (desc.renames) { @@ -62356,7 +62355,7 @@ exists", Object.assign(clone, value); return clone; }; - internals.dependency = function(schema3, rel, key, peers, options) { + internals.dependency = function(schema2, rel, key, peers, options) { assert4(key === null || typeof key === "string", rel, "key must be a strings"); if (!options) { options = peers.length > 1 && typeof peers[peers.length - 1] === "object" ? peers.pop() : {}; @@ -62372,13 +62371,13 @@ exists", if (key !== null) { key = Compile.ref(key, { separator, ancestor: 0, prefix: false }); } - const obj = schema3.clone(); + const obj = schema2.clone(); obj.$_terms.dependencies = obj.$_terms.dependencies || []; obj.$_terms.dependencies.push(new internals.Dependency(rel, key, paths, peers, options)); return obj; }; internals.dependencies = { - and(schema3, dep, value, state3, prefs) { + and(schema2, dep, value, state3, prefs) { const missing = []; const present = []; const count = dep.peers.length; @@ -62395,14 +62394,14 @@ exists", code: "object.and", context: { present, - presentWithLabels: internals.keysToLabels(schema3, present), + presentWithLabels: internals.keysToLabels(schema2, present), missing, - missingWithLabels: internals.keysToLabels(schema3, missing) + missingWithLabels: internals.keysToLabels(schema2, missing) } }; } }, - nand(schema3, dep, value, state3, prefs) { + nand(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62419,13 +62418,13 @@ exists", code: "object.nand", context: { main, - mainWithLabel: internals.keysToLabels(schema3, main), + mainWithLabel: internals.keysToLabels(schema2, main), peers: values, - peersWithLabels: internals.keysToLabels(schema3, values) + peersWithLabels: internals.keysToLabels(schema2, values) } }; }, - or(schema3, dep, value, state3, prefs) { + or(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false }))) { @@ -62436,11 +62435,11 @@ exists", code: "object.missing", context: { peers: dep.paths, - peersWithLabels: internals.keysToLabels(schema3, dep.paths) + peersWithLabels: internals.keysToLabels(schema2, dep.paths) } }; }, - oxor(schema3, dep, value, state3, prefs) { + oxor(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62451,12 +62450,12 @@ exists", if (!present.length || present.length === 1) { return; } - const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema3, dep.paths) }; + const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema2, dep.paths) }; context3.present = present; - context3.presentWithLabels = internals.keysToLabels(schema3, present); + context3.presentWithLabels = internals.keysToLabels(schema2, present); return { code: "object.oxor", context: context3 }; }, - with(schema3, dep, value, state3, prefs) { + with(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false })) === false) { @@ -62464,15 +62463,15 @@ exists", code: "object.with", context: { main: dep.key.key, - mainWithLabel: internals.keysToLabels(schema3, dep.key.key), + mainWithLabel: internals.keysToLabels(schema2, dep.key.key), peer: peer.key, - peerWithLabel: internals.keysToLabels(schema3, peer.key) + peerWithLabel: internals.keysToLabels(schema2, peer.key) } }; } } }, - without(schema3, dep, value, state3, prefs) { + without(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false }))) { @@ -62480,15 +62479,15 @@ exists", code: "object.without", context: { main: dep.key.key, - mainWithLabel: internals.keysToLabels(schema3, dep.key.key), + mainWithLabel: internals.keysToLabels(schema2, dep.key.key), peer: peer.key, - peerWithLabel: internals.keysToLabels(schema3, peer.key) + peerWithLabel: internals.keysToLabels(schema2, peer.key) } }; } } }, - xor(schema3, dep, value, state3, prefs) { + xor(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62499,27 +62498,27 @@ exists", if (present.length === 1) { return; } - const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema3, dep.paths) }; + const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema2, dep.paths) }; if (present.length === 0) { return { code: "object.missing", context: context3 }; } context3.present = present; - context3.presentWithLabels = internals.keysToLabels(schema3, present); + context3.presentWithLabels = internals.keysToLabels(schema2, present); return { code: "object.xor", context: context3 }; } }; - internals.keysToLabels = function(schema3, keys) { + internals.keysToLabels = function(schema2, keys) { if (Array.isArray(keys)) { - return keys.map((key) => schema3.$_mapLabels(key)); + return keys.map((key) => schema2.$_mapLabels(key)); } - return schema3.$_mapLabels(keys); + return schema2.$_mapLabels(keys); }; internals.isPresent = function(options) { return typeof options.isPresent === "function" ? options.isPresent : (resolved) => resolved !== void 0; }; - internals.rename = function(schema3, value, state3, prefs, errors) { - const renamed2 = {}; - for (const rename2 of schema3.$_terms.renames) { + internals.rename = function(schema2, value, state3, prefs, errors) { + const renamed = {}; + for (const rename2 of schema2.$_terms.renames) { const matches = []; const pattern = typeof rename2.from !== "string"; if (!pattern) { @@ -62551,14 +62550,14 @@ exists", if (from === to) { continue; } - if (!rename2.options.multiple && renamed2[to]) { - errors.push(schema3.$_createError("object.rename.multiple", value, { from, to, pattern }, state3, prefs)); + if (!rename2.options.multiple && renamed[to]) { + errors.push(schema2.$_createError("object.rename.multiple", value, { from, to, pattern }, state3, prefs)); if (prefs.abortEarly) { return false; } } - if (Object.prototype.hasOwnProperty.call(value, to) && !rename2.options.override && !renamed2[to]) { - errors.push(schema3.$_createError("object.rename.override", value, { from, to, pattern }, state3, prefs)); + if (Object.prototype.hasOwnProperty.call(value, to) && !rename2.options.override && !renamed[to]) { + errors.push(schema2.$_createError("object.rename.override", value, { from, to, pattern }, state3, prefs)); if (prefs.abortEarly) { return false; } @@ -62568,7 +62567,7 @@ exists", } else { value[to] = value[from]; } - renamed2[to] = true; + renamed[to] = true; if (!rename2.options.alias) { delete value[from]; } @@ -62576,10 +62575,10 @@ exists", } return true; }; - internals.unknown = function(schema3, value, unprocessed, errors, state3, prefs) { - if (schema3.$_terms.patterns) { + internals.unknown = function(schema2, value, unprocessed, errors, state3, prefs) { + if (schema2.$_terms.patterns) { let hasMatches = false; - const matches = schema3.$_terms.patterns.map((pattern) => { + const matches = schema2.$_terms.patterns.map((pattern) => { if (pattern.matches) { hasMatches = true; return []; @@ -62589,8 +62588,8 @@ exists", for (const key of unprocessed) { const item = value[key]; const path17 = [...state3.path, key]; - for (let i2 = 0; i2 < schema3.$_terms.patterns.length; ++i2) { - const pattern = schema3.$_terms.patterns[i2]; + for (let i2 = 0; i2 < schema2.$_terms.patterns.length; ++i2) { + const pattern = schema2.$_terms.patterns[i2]; if (pattern.regex) { const match2 = pattern.regex.test(key); state3.mainstay.tracer.debug(state3, "rule", `pattern.${i2}`, match2 ? "pass" : "error"); @@ -62626,13 +62625,13 @@ exists", if (!match2) { continue; } - const stpm = schema3.$_terms.patterns[i2].matches; + const stpm = schema2.$_terms.patterns[i2].matches; const localState = state3.localize(state3.path, ancestors, stpm); const result = stpm.$_validate(match2, localState, prefs); if (result.errors) { const details = Errors.details(result.errors, { override: false }); details.matches = match2; - const report = schema3.$_createError("object.pattern.match", value, details, state3, prefs); + const report = schema2.$_createError("object.pattern.match", value, details, state3, prefs); if (prefs.abortEarly) { return { value, errors: report }; } @@ -62641,10 +62640,10 @@ exists", } } } - if (!unprocessed.size || !schema3.$_terms.keys && !schema3.$_terms.patterns) { + if (!unprocessed.size || !schema2.$_terms.keys && !schema2.$_terms.patterns) { return; } - if (prefs.stripUnknown && typeof schema3._flags.unknown === "undefined" || prefs.skipFunctions) { + if (prefs.stripUnknown && typeof schema2._flags.unknown === "undefined" || prefs.skipFunctions) { const stripUnknown = prefs.stripUnknown ? prefs.stripUnknown === true ? true : !!prefs.stripUnknown.objects : false; for (const key of unprocessed) { if (stripUnknown) { @@ -62655,11 +62654,11 @@ exists", } } } - const forbidUnknown = !Common.default(schema3._flags.unknown, prefs.allowUnknown); + const forbidUnknown = !Common.default(schema2._flags.unknown, prefs.allowUnknown); if (forbidUnknown) { for (const unprocessedKey of unprocessed) { const localState = state3.localize([...state3.path, unprocessedKey], []); - const report = schema3.$_createError("object.unknown", value[unprocessedKey], { child: unprocessedKey }, localState, + const report = schema2.$_createError("object.unknown", value[unprocessedKey], { child: unprocessedKey }, localState, prefs, { flags: false }); if (prefs.abortEarly) { return { value, errors: report }; @@ -62791,7 +62790,7 @@ var require_link = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var internals = {}; @@ -62803,14 +62802,14 @@ var require_link = __commonJS({ terms: { link: { init: null, manifest: "single", register: false } }, - args(schema3, ref) { - return schema3.ref(ref); + args(schema2, ref) { + return schema2.ref(ref); }, - jsonSchema(schema3, res, mode, options) { - if (!schema3.$_terms.link) { + jsonSchema(schema2, res, mode, options) { + if (!schema2.$_terms.link) { return res; } - const { ref } = schema3.$_terms.link[0]; + const { ref } = schema2.$_terms.link[0]; if (ref.ancestor === "root" || ref.ancestor > 0) { res.$ref = `#/${ref.path.map((p) => `properties/${p}`).join("/")}`; return res; @@ -62822,14 +62821,14 @@ var require_link = __commonJS({ } return res; }, - validate(value, { schema: schema3, state: state3, prefs, error: error2 }) { - assert4(schema3.$_terms.link, "Uninitialized link schema"); - const limit = schema3._flags.maxRecursion; - if (limit !== void 0 && state3.schemas.filter((entry) => entry.schema === schema3).length > limit) { + validate(value, { schema: schema2, state: state3, prefs, error: error2 }) { + assert4(schema2.$_terms.link, "Uninitialized link schema"); + const limit = schema2._flags.maxRecursion; + if (limit !== void 0 && state3.schemas.filter((entry) => entry.schema === schema2).length > limit) { return { value, errors: error2("link.maxRecursion", { limit }) }; } - const linked = internals.generate(schema3, value, state3, prefs); - const ref = schema3.$_terms.link[0].ref; + const linked = internals.generate(schema2, value, state3, prefs); + const ref = schema2.$_terms.link[0].ref; try { return linked.$_validate(value, state3.nest(linked, `link:${ref.display}:${linked.type}`), prefs); } catch (err) { @@ -62839,8 +62838,8 @@ var require_link = __commonJS({ return { value, errors: error2("link.depth") }; } }, - generate(schema3, value, state3, prefs) { - return internals.generate(schema3, value, state3, prefs); + generate(schema2, value, state3, prefs) { + return internals.generate(schema2, value, state3, prefs); }, rules: { ref: { @@ -62890,34 +62889,34 @@ var require_link = __commonJS({ } } }); - internals.generate = function(schema3, value, state3, prefs) { - let linked = state3.mainstay.links.get(schema3); + internals.generate = function(schema2, value, state3, prefs) { + let linked = state3.mainstay.links.get(schema2); if (linked) { return linked._generate(value, state3, prefs).schema; } - const ref = schema3.$_terms.link[0].ref; + const ref = schema2.$_terms.link[0].ref; const { perspective, path: path17 } = internals.perspective(ref, state3); - internals.assert(perspective, "which is outside of schema boundaries", ref, schema3, state3, prefs); + internals.assert(perspective, "which is outside of schema boundaries", ref, schema2, state3, prefs); try { linked = path17.length ? perspective.$_reach(path17) : perspective; } catch { - internals.assert(false, "to non-existing schema", ref, schema3, state3, prefs); + internals.assert(false, "to non-existing schema", ref, schema2, state3, prefs); } - internals.assert(linked.type !== "link", "which is another link", ref, schema3, state3, prefs); - if (!schema3._flags.relative) { - state3.mainstay.links.set(schema3, linked); + internals.assert(linked.type !== "link", "which is another link", ref, schema2, state3, prefs); + if (!schema2._flags.relative) { + state3.mainstay.links.set(schema2, linked); } return linked._generate(value, state3, prefs).schema; }; internals.perspective = function(ref, state3) { if (ref.type === "local") { - for (const { schema: schema3, key } of state3.schemas) { - const id = schema3._flags.id || key; + for (const { schema: schema2, key } of state3.schemas) { + const id = schema2._flags.id || key; if (id === ref.path[0]) { - return { perspective: schema3, path: ref.path.slice(1) }; + return { perspective: schema2, path: ref.path.slice(1) }; } - if (schema3.$_terms.shared) { - for (const shared of schema3.$_terms.shared) { + if (schema2.$_terms.shared) { + for (const shared of schema2.$_terms.shared) { if (shared._flags.id === ref.path[0]) { return { perspective: shared, path: ref.path.slice(1) }; } @@ -62931,11 +62930,11 @@ var require_link = __commonJS({ } return { perspective: state3.schemas[ref.ancestor] && state3.schemas[ref.ancestor].schema, path: ref.path }; }; - internals.assert = function(condition, message, ref, schema3, state3, prefs) { + internals.assert = function(condition, message, ref, schema2, state3, prefs) { if (condition) { return; } - assert4(false, `"${Errors.label(schema3._flags, state3, prefs)}" contains link reference "${ref.display}" ${message}`); + assert4(false, `"${Errors.label(schema2._flags, state3, prefs)}" contains link reference "${ref.display}" ${message}`); }; } }); @@ -62946,7 +62945,7 @@ var require_number = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var internals = { numberRx: /^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i, precisionRx: /(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/, @@ -62955,11 +62954,11 @@ var require_number = __commonJS({ dotRegex: /\./, trailingZerosRegex: /0+$/, decimalPlaces(value) { - const str2 = value.toString(); - const dindex = str2.indexOf("."); - const eindex = str2.indexOf("e"); - return (dindex < 0 ? 0 : (eindex < 0 ? str2.length : eindex) - dindex - 1) + (eindex < 0 ? 0 : Math.max(0, -parseInt( - str2.slice(eindex + 1)))); + const str = value.toString(); + const dindex = str.indexOf("."); + const eindex = str.indexOf("e"); + return (dindex < 0 ? 0 : (eindex < 0 ? str.length : eindex) - dindex - 1) + (eindex < 0 ? 0 : Math.max(0, -parseInt( + str.slice(eindex + 1)))); } }; module2.exports = Any.extend({ @@ -62969,7 +62968,7 @@ var require_number = __commonJS({ }, coerce: { from: "string", - method(value, { schema: schema3, error: error2 }) { + method(value, { schema: schema2, error: error2 }) { const matches = value.match(internals.numberRx); if (!matches) { return; @@ -62979,7 +62978,7 @@ var require_number = __commonJS({ if (result.value === 0) { result.value = 0; } - if (!schema3._flags.unsafe) { + if (!schema2._flags.unsafe) { if (value.match(/e/i)) { if (internals.extractSignificantDigits(value) !== internals.extractSignificantDigits(String(result.value))) { result.errors = error2("number.unsafe"); @@ -62999,7 +62998,7 @@ var require_number = __commonJS({ return result; } }, - validate(value, { schema: schema3, error: error2, prefs }) { + validate(value, { schema: schema2, error: error2, prefs }) { if (value === Infinity || value === -Infinity) { return { value, errors: error2("number.infinity") }; } @@ -63008,7 +63007,7 @@ var require_number = __commonJS({ } const result = { value }; if (prefs.convert) { - const rule = schema3.$_getRule("precision"); + const rule = schema2.$_getRule("precision"); if (rule) { const precision = Math.pow(10, rule.args.limit); result.value = Math.round(result.value * precision) / precision; @@ -63017,7 +63016,7 @@ var require_number = __commonJS({ if (result.value === 0) { result.value = 0; } - if (!schema3._flags.unsafe && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER)) { + if (!schema2._flags.unsafe && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER)) { result.errors = error2("number.unsafe"); } return result; @@ -63226,16 +63225,16 @@ rt"), return value.replace(internals.exponentialPartRegex, "").replace(internals.dotRegex, "").replace(internals.trailingZerosRegex, "").replace(internals.leadingSignAndZerosRegex, ""); }; - internals.normalizeDecimal = function(str2) { - str2 = str2.replace(/^\+/, "").replace(/\.0*$/, "").replace(/^(-?)\.([^\.]*)$/, "$10.$2").replace(/^(-?)0+([0-9])/, - "$1$2"); - if (str2.includes(".") && str2.endsWith("0")) { - str2 = str2.replace(/0+$/, ""); + internals.normalizeDecimal = function(str) { + str = str.replace(/^\+/, "").replace(/\.0*$/, "").replace(/^(-?)\.([^\.]*)$/, "$10.$2").replace(/^(-?)0+([0-9])/, "\ +$1$2"); + if (str.includes(".") && str.endsWith("0")) { + str = str.replace(/0+$/, ""); } - if (str2 === "-0") { + if (str === "-0") { return "0"; } - return str2; + return str; }; } }); @@ -63497,8 +63496,8 @@ var require_email = __commonJS({ if (ATEXT_RX.test(char)) { continue; } - const binary2 = toBinary(char); - if (!ATOM_RX.test(binary2)) { + const binary = toBinary(char); + if (!ATOM_RX.test(binary)) { return (0, errors_1.errorCode)("INVALID_LOCAL_CHARS"); } } @@ -64127,9 +64126,9 @@ var require_decode = __commonJS({ const high = resolveHex(string[percentPos + 1], 4); const low = resolveHex(string[percentPos + 2], 0); const byte = high | low; - const type2 = UTF8.data[byte]; - state3 = UTF8.data[256 + state3 + type2]; - codepoint = codepoint << 6 | byte & UTF8.data[364 + type2]; + const type = UTF8.data[byte]; + state3 = UTF8.data[256 + state3 + type]; + codepoint = codepoint << 6 | byte & UTF8.data[364 + type]; if (state3 === UTF8.accept) { decoded += string.slice(last2, startOfOctets); decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), @@ -65670,7 +65669,7 @@ var require_string3 = __commonJS({ var { isDomainValid, isEmailValid, ipRegex, uriRegex } = require_dist8(); var Tlds = require_commonjs3(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var internals = { tlds: Tlds.tlds instanceof Set ? { tlds: { allow: Tlds.tlds, deny: null } } : false, // $lab:coverage:ignore$ @@ -65724,42 +65723,42 @@ var require_string3 = __commonJS({ }, coerce: { from: "string", - method(value, { schema: schema3, state: state3, prefs }) { - const normalize2 = schema3.$_getRule("normalize"); + method(value, { schema: schema2, state: state3, prefs }) { + const normalize2 = schema2.$_getRule("normalize"); if (normalize2) { value = value.normalize(normalize2.args.form); } - const casing = schema3.$_getRule("case"); + const casing = schema2.$_getRule("case"); if (casing) { value = casing.args.direction === "upper" ? value.toLocaleUpperCase() : value.toLocaleLowerCase(); } - const trim2 = schema3.$_getRule("trim"); + const trim2 = schema2.$_getRule("trim"); if (trim2 && trim2.args.enabled) { value = value.trim(); } - if (schema3.$_terms.replacements) { - for (const replacement of schema3.$_terms.replacements) { + if (schema2.$_terms.replacements) { + for (const replacement of schema2.$_terms.replacements) { value = value.replace(replacement.pattern, replacement.replacement); } } - const hex = schema3.$_getRule("hex"); + const hex = schema2.$_getRule("hex"); if (hex && hex.args.options.byteAligned && value.length % 2 !== 0) { value = `0${value}`; } - if (schema3.$_getRule("isoDate")) { + if (schema2.$_getRule("isoDate")) { const iso = internals.isoDate(value); if (iso) { value = iso; } } - if (schema3._flags.truncate) { - const rule = schema3.$_getRule("max"); + if (schema2._flags.truncate) { + const rule = schema2.$_getRule("max"); if (rule) { let limit = rule.args.limit; if (Common.isResolvable(limit)) { limit = limit.resolve(value, state3, prefs); if (!Common.limit(limit)) { - return { value, errors: schema3.$_createError("any.ref", limit, { ref: rule.args.limit, arg: "limit", reason: "\ + return { value, errors: schema2.$_createError("any.ref", limit, { ref: rule.args.limit, arg: "limit", reason: "\ must be a positive integer" }, state3, prefs) }; } } @@ -65769,23 +65768,23 @@ must be a positive integer" }, state3, prefs) }; return { value }; } }, - validate(value, { schema: schema3, error: error2 }) { + validate(value, { schema: schema2, error: error2 }) { if (typeof value !== "string") { return { value, errors: error2("string.base") }; } if (value === "") { - const min = schema3.$_getRule("min"); + const min = schema2.$_getRule("min"); if (min && min.args.limit === 0) { return; } return { value, errors: error2("string.empty") }; } }, - jsonSchema(schema3, res, mode, options) { - const noEmpty = !schema3._valids?.has("") && !schema3._flags.only; + jsonSchema(schema2, res, mode, options) { + const noEmpty = !schema2._valids?.has("") && !schema2._flags.only; if (noEmpty) { - const min = schema3.$_getRule("min"); - const length = schema3.$_getRule("length"); + const min = schema2.$_getRule("min"); + const length = schema2.$_getRule("length"); if ((!min || min.args.limit > 0) && (!length || length.args.limit > 0)) { res.minLength = 1; } @@ -65943,16 +65942,16 @@ olean"); if (options.version) { const versions = [].concat(options.version); assert4(versions.length >= 1, "version must have at least 1 valid version specified"); - const set2 = /* @__PURE__ */ new Set(); + const set = /* @__PURE__ */ new Set(); for (let i2 = 0; i2 < versions.length; ++i2) { const version3 = versions[i2]; assert4(typeof version3 === "string", "version at position " + i2 + " must be a string"); const versionNumber = internals.guidVersions[version3.toLowerCase()]; assert4(versionNumber, "version at position " + i2 + " must be one of " + Object.keys(internals.guidVersions). join(", ")); - assert4(!set2.has(versionNumber), "version at position " + i2 + " must not be a duplicate"); + assert4(!set.has(versionNumber), "version at position " + i2 + " must not be a duplicate"); versionNumbers += versionNumber; - set2.add(versionNumber); + set.add(versionNumber); } } assert4(internals.guidSeparators.has(options.separator), 'separator must be one of true, false, "-", or ":"'); @@ -66378,8 +66377,8 @@ inSegments", "tlds"]); internals.validateTlds(options.tlds.allow, "tlds.allow"); return options; }; - internals.validateTlds = function(set2, source) { - for (const tld of set2) { + internals.validateTlds = function(set, source) { + for (const tld of set) { assert4(isDomainValid(tld, { minDomainSegments: 1, maxDomainSegments: 1 }), `${source} must contain valid top le\ vel domain names`); } @@ -66397,9 +66396,9 @@ vel domain names`); } return date.toISOString(); }; - internals.length = function(schema3, name, limit, operator, encoding) { + internals.length = function(schema2, name, limit, operator, encoding) { assert4(!encoding || Buffer && Buffer.isEncoding(encoding), "Invalid encoding:", encoding); - return schema3.$_addRule({ name, method: "length", args: { limit, encoding }, operator }); + return schema2.$_addRule({ name, method: "length", args: { limit, encoding }, operator }); }; } }); @@ -66422,15 +66421,15 @@ var require_symbol = __commonJS({ map: { init: new internals.Map() } }, coerce: { - method(value, { schema: schema3, error: error2 }) { - const lookup = schema3.$_terms.map.get(value); + method(value, { schema: schema2, error: error2 }) { + const lookup = schema2.$_terms.map.get(value); if (lookup) { value = lookup; } - if (!schema3._flags.only || typeof value === "symbol") { + if (!schema2._flags.only || typeof value === "symbol") { return { value }; } - return { value, errors: error2("symbol.map", { map: schema3.$_terms.map }) }; + return { value, errors: error2("symbol.map", { map: schema2.$_terms.map }) }; } }, validate(value, { error: error2 }) { @@ -66468,13 +66467,13 @@ of type object, function, or Symbol"); return obj; } }, - jsonSchema(schema3, json2, mode, options) { - const map2 = schema3.$_terms.map; - if (!map2.size) { + jsonSchema(schema2, json, mode, options) { + const map = schema2.$_terms.map; + if (!map.size) { return {}; } return { - anyOf: Array.from(map2.keys()).map((key) => ({ const: key })) + anyOf: Array.from(map.keys()).map((key) => ({ const: key })) }; }, messages: { @@ -66486,20 +66485,20 @@ of type object, function, or Symbol"); }); // node_modules/joi/lib/types/binary.js -var require_binary2 = __commonJS({ +var require_binary3 = __commonJS({ "node_modules/joi/lib/types/binary.js"(exports2, module2) { "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); module2.exports = Any.extend({ type: "binary", coerce: { from: ["string", "object"], - method(value, { schema: schema3 }) { + method(value, { schema: schema2 }) { if (typeof value === "string" || value !== null && value.type === "Buffer") { try { - return { value: Buffer.from(value, schema3._flags.encoding) }; + return { value: Buffer.from(value, schema2._flags.encoding) }; } catch { } } @@ -66510,7 +66509,7 @@ var require_binary2 = __commonJS({ return { value, errors: error2("binary.base") }; } }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "string"; res.format = "binary"; return res; @@ -66589,7 +66588,7 @@ var require_lib5 = __commonJS({ "use strict"; var { assert: assert4, clone } = require_lib(); var Cache = require_cache2(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Extend = require_extend(); @@ -66619,17 +66618,17 @@ var require_lib5 = __commonJS({ } }; if (Buffer) { - internals.types.binary = require_binary2(); + internals.types.binary = require_binary3(); } internals.root = function() { const root = { _types: new Set(Object.keys(internals.types)) }; - for (const type2 of root._types) { - root[type2] = function(...args) { - assert4(!args.length || ["alternatives", "link", "object"].includes(type2), "The", type2, "type does not allow\ - arguments"); - return internals.generate(this, internals.types[type2], args); + for (const type of root._types) { + root[type] = function(...args) { + assert4(!args.length || ["alternatives", "link", "object"].includes(type), "The", type, "type does not allow a\ +rguments"); + return internals.generate(this, internals.types[type], args); }; } for (const method of ["allow", "custom", "disallow", "equal", "exist", "forbidden", "invalid", "not", "only", "opt\ @@ -66653,11 +66652,11 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] ValidationError: Errors.ValidationError, version: Common.version, cache: Cache.provider, - assert(value, schema3, ...args) { - internals.assert(value, schema3, true, args); + assert(value, schema2, ...args) { + internals.assert(value, schema2, true, args); }, - attempt(value, schema3, ...args) { - return internals.assert(value, schema3, false, args); + attempt(value, schema2, ...args) { + return internals.assert(value, schema2, false, args); }, build(desc) { assert4(typeof Manifest.build === "function", "Manifest functionality disabled"); @@ -66666,17 +66665,17 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] checkPreferences(prefs) { Common.checkPreferences(prefs); }, - compile(schema3, options) { - return Compile.compile(this, schema3, options); + compile(schema2, options) { + return Compile.compile(this, schema2, options); }, defaults(modifier) { assert4(typeof modifier === "function", "modifier must be a function"); const joi2 = Object.assign({}, this); - for (const type2 of joi2._types) { - const schema3 = modifier(joi2[type2]()); - assert4(Common.isSchema(schema3), "modifier must return a valid schema object"); - joi2[type2] = function(...args) { - return internals.generate(this, schema3, args); + for (const type of joi2._types) { + const schema2 = modifier(joi2[type]()); + assert4(Common.isSchema(schema2), "modifier must return a valid schema object"); + joi2[type] = function(...args) { + return internals.generate(this, schema2, args); }; } return joi2; @@ -66700,10 +66699,10 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] for (const item of expanded) { assert4(joi2[item.type] === void 0 || joi2._types.has(item.type), "Cannot override name", item.type); const base = item.base || this.any(); - const schema3 = Extend.type(base, item); + const schema2 = Extend.type(base, item); joi2._types.add(item.type); joi2[item.type] = function(...args) { - return internals.generate(this, schema3, args); + return internals.generate(this, schema2, args); }; } } @@ -66722,8 +66721,8 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] }, types() { const types2 = {}; - for (const type2 of this._types) { - types2[type2] = this[type2](); + for (const type of this._types) { + types2[type] = this[type](); } for (const target in internals.aliases) { types2[target] = this[target](); @@ -66731,10 +66730,10 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] return types2; } }; - internals.assert = function(value, schema3, annotate, args) { + internals.assert = function(value, schema2, annotate, args) { const message = args[0] instanceof Error || typeof args[0] === "string" ? args[0] : null; const options = message !== null ? args[1] : args[0]; - const result = schema3.validate(value, Common.preferences({ errors: { stack: true } }, options || {})); + const result = schema2.validate(value, Common.preferences({ errors: { stack: true } }, options || {})); let error2 = result.error; if (!error2) { return result.value; @@ -66749,24 +66748,24 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] error2.message = message ? `${message} ${display}` : display; throw error2; }; - internals.generate = function(root, schema3, args) { + internals.generate = function(root, schema2, args) { assert4(root, "Must be invoked on a Joi instance."); - schema3.$_root = root; - if (!schema3._definition.args || !args.length) { - return schema3; + schema2.$_root = root; + if (!schema2._definition.args || !args.length) { + return schema2; } - return schema3._definition.args(schema3, ...args); + return schema2._definition.args(schema2, ...args); }; internals.expandExtension = function(extension, joi2) { if (typeof extension.type === "string") { return [extension]; } const extended = []; - for (const type2 of joi2._types) { - if (extension.type.test(type2)) { + for (const type of joi2._types) { + if (extension.type.test(type)) { const item = Object.assign({}, extension); - item.type = type2; - item.base = joi2[type2](); + item.type = type; + item.base = joi2[type](); extended.push(item); } } @@ -67054,8 +67053,8 @@ function asArray(source) { return Array.isArray(source) ? source : [source]; } __name(asArray, "asArray"); -function asCamelCase(str2) { - return str2.replace(/[\s-]+(.)/g, (_all, chr) => { +function asCamelCase(str) { + return str.replace(/[\s-]+(.)/g, (_all, chr) => { return chr.toUpperCase(); }); } @@ -67128,8 +67127,8 @@ function filterType(input, filter2, def) { } __name(filterType, "filterType"); function filterPrimitives(input, omit) { - const type2 = r(input) ? "string" : typeof input; - return /number|string|boolean/.test(type2) && (!omit || !omit.includes(type2)); + const type = r(input) ? "string" : typeof input; + return /number|string|boolean/.test(type) && (!omit || !omit.includes(type)); } __name(filterPrimitives, "filterPrimitives"); function filterPlainObject(input) { @@ -68277,14 +68276,14 @@ var init_git_executor_chain = __esm({ return gitError; } async attemptRemoteTask(task, logger7) { - const binary2 = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); + const binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); const args = this._plugins.exec("spawn.args", [...task.commands], { ...pluginContext(task, task.commands), env: { ...this.env } }); const raw = await this.gitResponse( task, - binary2, + binary, args, this.outputHandler, logger7.step("SPAWN") @@ -69482,11 +69481,11 @@ function mergeTask(customArgs) { commands: ["merge", ...customArgs], format: "utf-8", parser(stdOut, stdErr) { - const merge3 = parseMergeResult(stdOut, stdErr); - if (merge3.failed) { - throw new GitResponseError(merge3); + const merge2 = parseMergeResult(stdOut, stdErr); + if (merge2.failed) { + throw new GitResponseError(merge2); } - return merge3; + return merge2; } }; } @@ -69532,8 +69531,8 @@ var init_parse_push = __esm({ local }; }), - new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type2]) => { - result.pushed.push(pushResultPushedItem(local, remote, type2)); + new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); }), new LineParser( /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, @@ -69774,9 +69773,9 @@ var init_StatusSummary = __esm({ result.renamed.push(renamedFile(file)); }), parser3("R", "M", (result, file) => { - const renamed2 = renamedFile(file); - result.renamed.push(renamed2); - result.modified.push(renamed2.to); + const renamed = renamedFile(file); + result.renamed.push(renamed); + result.modified.push(renamed.to); }), parser3("!", "!", (_result, _file) => { (_result.ignored = _result.ignored || []).push(_file); @@ -71933,7 +71932,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * For headers that must always be a single string (like Content-Type), use the * specialized _getExistingOrDefaultContentTypeHeader method instead. */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; @@ -71948,7 +71947,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } /** * Specialized version of _getExistingOrDefaultHeader for Content-Type header. @@ -71957,7 +71956,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; @@ -71984,7 +71983,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } _getAgent(parsedUrl) { let agent; @@ -73062,8 +73061,8 @@ var ToolRunner = class extends events.EventEmitter { } return this.args; } - _endsWith(str2, end) { - return str2.endsWith(end); + _endsWith(str, end) { + return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); @@ -74186,14 +74185,14 @@ var { toString } = Object.prototype; var { getPrototypeOf } = Object; var { iterator, toStringTag } = Symbol; var kindOf = /* @__PURE__ */ ((cache2) => (thing) => { - const str2 = toString.call(thing); - return cache2[str2] || (cache2[str2] = str2.slice(8, -1).toLowerCase()); + const str = toString.call(thing); + return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); -var kindOfTest = /* @__PURE__ */ __name((type2) => { - type2 = type2.toLowerCase(); - return (thing) => kindOf(thing) === type2; +var kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; }, "kindOfTest"); -var typeOfTest = /* @__PURE__ */ __name((type2) => (thing) => typeof thing === type2, "typeOfTest"); +var typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); var { isArray } = Array; var isUndefined = typeOfTest("undefined"); function isBuffer(val) { @@ -74272,8 +74271,8 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [ "Response", "Headers" ].map(kindOfTest); -var trim = /* @__PURE__ */ __name((str2) => { - return str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +var trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); }, "trim"); function forEach2(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") { @@ -74420,13 +74419,13 @@ var toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilt } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }, "toFlatObject"); -var endsWith = /* @__PURE__ */ __name((str2, searchString, position) => { - str2 = String(str2); - if (position === void 0 || position > str2.length) { - position = str2.length; +var endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; } position -= searchString.length; - const lastIndex = str2.indexOf(searchString, position); + const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }, "endsWith"); var toArray = /* @__PURE__ */ __name((thing) => { @@ -74454,17 +74453,17 @@ var forEachEntry = /* @__PURE__ */ __name((obj, fn) => { fn.call(obj, pair[0], pair[1]); } }, "forEachEntry"); -var matchAll = /* @__PURE__ */ __name((regExp, str2) => { +var matchAll = /* @__PURE__ */ __name((regExp, str) => { let matches; const arr = []; - while ((matches = regExp.exec(str2)) !== null) { + while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; }, "matchAll"); var isHTMLForm = kindOfTest("HTMLFormElement"); -var toCamelCase = /* @__PURE__ */ __name((str2) => { - return str2.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { +var toCamelCase = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { return p1.toUpperCase() + p2; }, "replacer")); }, "toCamelCase"); @@ -74679,24 +74678,24 @@ var parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { }, "default"); // node_modules/axios/lib/helpers/sanitizeHeaderValue.js -function trimSPorHTAB(str2) { +function trimSPorHTAB(str) { let start = 0; - let end = str2.length; + let end = str.length; while (start < end) { - const code = str2.charCodeAt(start); + const code = str.charCodeAt(start); if (code !== 9 && code !== 32) { break; } start += 1; } while (end > start) { - const code = str2.charCodeAt(end - 1); + const code = str.charCodeAt(end - 1); if (code !== 9 && code !== 32) { break; } end -= 1; } - return start === 0 && end === str2.length ? str2 : str2.slice(start, end); + return start === 0 && end === str.length ? str : str.slice(start, end); } __name(trimSPorHTAB, "trimSPorHTAB"); var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"); @@ -74734,18 +74733,18 @@ function normalizeValue(value) { return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); } __name(normalizeValue, "normalizeValue"); -function parseTokens(str2) { +function parseTokens(str) { const tokens = /* @__PURE__ */ Object.create(null); const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let match2; - while (match2 = tokensRE.exec(str2)) { + while (match2 = tokensRE.exec(str)) { tokens[match2[1]] = match2[2]; } return tokens; } __name(parseTokens, "parseTokens"); -var isValidHeaderName = /* @__PURE__ */ __name((str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim()), "isValidHea\ -derName"); +var isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeade\ +rName"); function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -74763,8 +74762,8 @@ function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) } __name(matchHeaderValue, "matchHeaderValue"); function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str2) => { - return char.toUpperCase() + str2; + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); } __name(formatHeader, "formatHeader"); @@ -75256,7 +75255,7 @@ __name(toFormData, "toFormData"); var toFormData_default = toFormData; // node_modules/axios/lib/helpers/AxiosURLSearchParams.js -function encode(str2) { +function encode(str) { const charMap = { "!": "%21", "'": "%27", @@ -75265,7 +75264,7 @@ function encode(str2) { "~": "%7E", "%20": "+" }; - return encodeURIComponent(str2).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { + return encodeURIComponent(str).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { return charMap[match2]; }, "replacer")); } @@ -75413,14 +75412,14 @@ var ALPHABET = { ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT }; var generateString = /* @__PURE__ */ __name((size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str2 = ""; + let str = ""; const { length } = alphabet; const randomValues = new Uint32Array(size); import_crypto.default.randomFillSync(randomValues); for (let i2 = 0; i2 < size; i2++) { - str2 += alphabet[randomValues[i2] % length]; + str += alphabet[randomValues[i2] % length]; } - return str2; + return str; }, "generateString"); var node_default = { isNode: true, @@ -75840,13 +75839,13 @@ function fromDataURI(uri, asBlob, options) { if (!match2) { throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); } - const type2 = match2[1]; + const type = match2[1]; const params = match2[2]; const encoding = match2[3] ? "base64" : "utf8"; const body2 = match2[4]; let mime; - if (type2) { - mime = params ? type2 + params : type2; + if (type) { + mime = params ? type + params : type; } else if (params) { mime = "text/plain" + params; } @@ -76305,12 +76304,12 @@ var speedometer_default = speedometer; // node_modules/axios/lib/helpers/throttle.js function throttle(fn, freq) { - let timestamp2 = 0; + let timestamp = 0; let threshold = 1e3 / freq; let lastArgs; let timer; const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { - timestamp2 = now; + timestamp = now; lastArgs = null; if (timer) { clearTimeout(timer); @@ -76320,7 +76319,7 @@ function throttle(fn, freq) { }, "invoke"); const throttled = /* @__PURE__ */ __name((...args) => { const now = Date.now(); - const passed = now - timestamp2; + const passed = now - timestamp; if (passed >= threshold) { invoke(args, now); } else { @@ -77525,11 +77524,11 @@ function mergeConfig(config1, config2) { }; utils_default.forEach(Object.keys({ ...config1, ...config2 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; - const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0; const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0; - const configValue = merge3(a, b, prop); - utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue); + const configValue = merge2(a, b, prop); + utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue); }, "computeConfigValue")); return config; } @@ -77549,7 +77548,7 @@ function setFormDataHeaders2(headers, formHeaders, policy) { }); } __name(setFormDataHeaders2, "setFormDataHeaders"); -var encodeUTF8 = /* @__PURE__ */ __name((str2) => encodeURIComponent(str2).replace( +var encodeUTF8 = /* @__PURE__ */ __name((str) => encodeURIComponent(str).replace( /%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)) ), "encodeUTF8"); @@ -77899,8 +77898,8 @@ var factory = /* @__PURE__ */ __name((env2) => { return false; } const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); - const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str2) => encoder. - encode(str2))(new TextEncoder2()) : async (str2) => new Uint8Array(await new Request(str2).arrayBuffer())); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder. + encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { let duplexAccessed = false; const request = new Request(platform_default.origin, { @@ -77923,14 +77922,14 @@ var factory = /* @__PURE__ */ __name((env2) => { stream: supportsResponseStream && ((res) => res.body) }; isFetchSupported && (() => { - ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => { - !resolvers[type2] && (resolvers[type2] = (res, config) => { - let method = res && res[type2]; + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; if (method) { return method.call(res); } throw new AxiosError_default( - `Response type '${type2}' is not supported`, + `Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config ); @@ -78173,12 +78172,12 @@ var getFetch = /* @__PURE__ */ __name((config) => { let env2 = config && config.env || {}; const { fetch: fetch2, Request, Response } = env2; const seeds = [Request, Response, fetch2]; - let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + let len = seeds.length, i2 = len, seed, target, map = seedCache; while (i2--) { seed = seeds[i2]; - target = map2.get(seed); - target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); - map2 = target; + target = map.get(seed); + target === void 0 && map.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map = target; } return target; }, "getFetch"); @@ -78308,9 +78307,9 @@ __name(dispatchRequest, "dispatchRequest"); // node_modules/axios/lib/helpers/validator.js var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i2) => { - validators[type2] = /* @__PURE__ */ __name(function validator(thing) { - return typeof thing === type2 || "a" + (i2 < 1 ? "n " : " ") + type2; +["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; }, "validator"); }); var deprecatedWarnings = {}; @@ -78344,7 +78343,7 @@ validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) return true; }; }, "spelling"); -function assertOptions(options, schema3, allowUnknown) { +function assertOptions(options, schema2, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } @@ -78352,7 +78351,7 @@ function assertOptions(options, schema3, allowUnknown) { let i2 = keys.length; while (i2-- > 0) { const opt = keys[i2]; - const validator = Object.prototype.hasOwnProperty.call(schema3, opt) ? schema3[opt] : void 0; + const validator = Object.prototype.hasOwnProperty.call(schema2, opt) ? schema2[opt] : void 0; if (validator) { const value = options[opt]; const result = value === void 0 || validator(value, opt, options); @@ -78884,11 +78883,11 @@ __name(_v4, "_v4"); var v4_default = v4; // utils/src/load-binary.js -var find2 = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3 }) => Promise.resolve( +var find2 = /* @__PURE__ */ __name(async ({ tool, binary, version: version3 }) => Promise.resolve( find(tool, version3) /* process.arch), */ ).then( - (dir) => dir ? import_node_path2.default.join(dir, binary2) : "" + (dir) => dir ? import_node_path2.default.join(dir, binary) : "" ), "find"); var downloadToolWithAuth = /* @__PURE__ */ __name(async (url3, auth) => { const targetFile = import_node_path2.default.join(import_os3.default.tmpdir(), v4_default(), v4_default()); @@ -78916,7 +78915,7 @@ var internalDownload = /* @__PURE__ */ __name(async (url3, auth) => auth ? downl url3), "internalDownload"); var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { if (!cachedTool) { - const { tool, binary: binary2, version: version3, downloadUrl, auth } = options; + const { tool, binary, version: version3, downloadUrl, auth } = options; info(`Downloading ${tool} from ${downloadUrl}`); const downloadUuid = await internalDownload(downloadUrl, auth); const tmpDir = import_node_path2.default.dirname(downloadUuid); @@ -78927,7 +78926,7 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } else if (downloadUrl.endsWith(".7z")) { await extract7z(downloadUuid, tmpDir); } else { - const tmpFile = import_node_path2.default.join(tmpDir, binary2); + const tmpFile = import_node_path2.default.join(tmpDir, binary); await cp(downloadUuid, tmpFile); import_node_fs.default.chmodSync(tmpFile, "0777"); } @@ -78936,10 +78935,10 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } return cachedTool; }, "downloadIfMissing"); -var loadTool = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3, downloadUrl, auth }) => { +var loadTool = /* @__PURE__ */ __name(async ({ tool, binary, version: version3, downloadUrl, auth }) => { const options = { tool, - binary: binary2, + binary, version: version3, downloadUrl, auth @@ -79565,12 +79564,12 @@ function createApi({ name, url: url3, auth }) { authorization: `Bearer ${await fetchToken(auth)}` } }), "addToken"); - const formatError2 = /* @__PURE__ */ __name((err) => { + const formatError = /* @__PURE__ */ __name((err) => { const { status, data } = err.response; const msg = `${name} API call failed: [${status}] - ${data.message || data.error}`; throw new Error(msg); }, "formatError"); - instance.interceptors.request.use(addToken, formatError2); + instance.interceptors.request.use(addToken, formatError); return instance; } __name(createApi, "createApi"); @@ -79580,564 +79579,549 @@ var import_fast_glob = __toESM(require_out4(), 1); var import_fs2 = require("fs"); // node_modules/js-yaml/dist/js-yaml.mjs -function isNothing(subject) { - return typeof subject === "undefined" || subject === null; -} -__name(isNothing, "isNothing"); -function isObject4(subject) { - return typeof subject === "object" && subject !== null; -} -__name(isObject4, "isObject"); -function toArray2(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - return [sequence]; -} -__name(toArray2, "toArray"); -function extend2(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]; - } - } - return target; -} -__name(extend2, "extend"); -function repeat(string, count) { - var result = "", cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - return result; -} -__name(repeat, "repeat"); -function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; -} -__name(isNegativeZero, "isNegativeZero"); -var isNothing_1 = isNothing; -var isObject_1 = isObject4; -var toArray_1 = toArray2; -var repeat_1 = repeat; -var isNegativeZero_1 = isNegativeZero; -var extend_1 = extend2; -var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 -}; -function formatError(exception2, compact) { - var where2 = "", message = exception2.reason || "(unknown reason)"; - if (!exception2.mark) return message; - if (exception2.mark.name) { - where2 += 'in "' + exception2.mark.name + '" '; - } - where2 += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; - if (!compact && exception2.mark.snippet) { - where2 += "\n\n" + exception2.mark.snippet; - } - return message + " " + where2; -} -__name(formatError, "formatError"); -function YAMLException$1(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 || ""; +var __create2 = Object.create; +var __defProp3 = Object.defineProperty; +var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames3 = Object.getOwnPropertyNames; +var __getProtoOf2 = Object.getPrototypeOf; +var __hasOwnProp3 = Object.prototype.hasOwnProperty; +var __commonJSMin = /* @__PURE__ */ __name((cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), +mod.exports), "__commonJSMin"); +var __copyProps3 = /* @__PURE__ */ __name((to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames3(from), i2 = 0, n = keys. + length, key; i2 < n; i2++) { + key = keys[i2]; + if (!__hasOwnProp3.call(to, key) && key !== except) __defProp3(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable + }); } -} -__name(YAMLException$1, "YAMLException$1"); -YAMLException$1.prototype = Object.create(Error.prototype); -YAMLException$1.prototype.constructor = YAMLException$1; -YAMLException$1.prototype.toString = /* @__PURE__ */ __name(function toString3(compact) { - return this.name + ": " + formatError(this, compact); -}, "toString"); -var exception = YAMLException$1; -function getLine(buffer3, 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 to; +}, "__copyProps"); +var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : +{}, __copyProps3(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { + value: mod, + enumerable: true +}) : target, mod)), "__toESM"); +var require_common4 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + __name(isNothing, "isNothing"); + function isObject5(subject) { + return typeof subject === "object" && subject !== null; + } + __name(isObject5, "isObject"); + function toArray2(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + __name(toArray2, "toArray"); + function extend3(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + __name(extend3, "extend"); + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; } - return { - str: head + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, - pos: position - lineStart + head.length - // relative position - }; -} -__name(getLine, "getLine"); -function padStart(string, max) { - return common.repeat(" ", max - string.length) + string; -} -__name(padStart, "padStart"); -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 = "", i2, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - for (i2 = 1; i2 <= options.linesBefore; i2++) { - if (foundLineNo - i2 < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i2], - lineEnds[foundLineNo - i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), - maxLineLength - ); - result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 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 (i2 = 1; i2 <= options.linesAfter; i2++) { - if (foundLineNo + i2 >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i2], - lineEnds[foundLineNo + i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), - maxLineLength - ); - result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n"; - } - return result.replace(/\n$/, ""); -} -__name(makeSnippet, "makeSnippet"); -var snippet = makeSnippet; -var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" -]; -var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" -]; -function compileStyleAliases(map2) { - var result = {}; - if (map2 !== null) { - Object.keys(map2).forEach(function(style) { - map2[style].forEach(function(alias) { + __name(repeat, "repeat"); + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + __name(isNegativeZero, "isNegativeZero"); + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject5; + module2.exports.toArray = toArray2; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend3; +})); +var require_exception = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function formatError(exception, compact) { + let where2 = ""; + const message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) where2 += 'in "' + exception.mark.name + '" '; + where2 += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) where2 += "\n\n" + exception.mark.snippet; + return message + " " + where2; + } + __name(formatError, "formatError"); + function YAMLException2(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 = (/* @__PURE__ */ new Error()).stack || ""; + } + __name(YAMLException2, "YAMLException"); + YAMLException2.prototype = Object.create(Error.prototype); + YAMLException2.prototype.constructor = YAMLException2; + YAMLException2.prototype.toString = /* @__PURE__ */ __name(function toString5(compact) { + return this.name + ": " + formatError(this, compact); + }, "toString"); + module2.exports = YAMLException2; +})); +var require_snippet = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + function getLine(buffer3, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const 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 + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + }; + } + __name(getLine, "getLine"); + function padStart2(string, max) { + return common.repeat(" ", max - string.length) + string; + } + __name(padStart2, "padStart"); + 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; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match2; + let 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; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i2 = 1; i2 <= options.linesBefore; i2++) { + if (foundLineNo - i2 < 0) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i2], lineEnds[foundLineNo - i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo - i2]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart2((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n" + result; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (let i2 = 1; i2 <= options.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i2], lineEnds[foundLineNo + i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo + i2]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n"; + } + return result.replace(/\n$/, ""); + } + __name(makeSnippet, "makeSnippet"); + module2.exports = makeSnippet; +})); +var require_type2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { result[String(alias)] = style; }); }); + return result; } - return result; -} -__name(compileStyleAliases, "compileStyleAliases"); -function Type$1(tag, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('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 exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} -__name(Type$1, "Type$1"); -var type = Type$1; -function compileList(schema3, name) { - var result = []; - schema3[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; - } + __name(compileStyleAliases, "compileStyleAliases"); + function Type2(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException2('Unknown option "' + name + '" is met \ +in definition of "' + tag + '" YAML type.'); }); - result[newIndex] = currentType; - }); - return result; -} -__name(compileList, "compileList"); -function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type2) { - if (type2.multi) { - result.multi[type2.kind].push(type2); - result.multi["fallback"].push(type2); - } else { - result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; - } + 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 YAMLException2('Unknown kind "' + this.kind + '" is specifi\ +ed for "' + tag + '" YAML type.'); + } + __name(Type2, "Type"); + module2.exports = Type2; +})); +var require_schema = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var Type2 = require_type2(); + function compileList(schema2, name) { + const result = []; + schema2[name].forEach(function(currentType) { + let 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; } - __name(collectType, "collectType"); - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); + __name(compileList, "compileList"); + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + 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; + } + __name(collectType, "collectType"); + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; } - return result; -} -__name(compileMap, "compileMap"); -function Schema$1(definition) { - return this.extend(definition); -} -__name(Schema$1, "Schema$1"); -Schema$1.prototype.extend = /* @__PURE__ */ __name(function extend3(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 exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], e\ -xplicit: [...] })"); + __name(compileMap, "compileMap"); + function Schema2(definition) { + return this.extend(definition); + } + __name(Schema2, "Schema"); + Schema2.prototype.extend = /* @__PURE__ */ __name(function extend3(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type2) 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 YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implic\ +it: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException2("There is a non-scalar type in the impli\ +cit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can o\ +nly be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + }); + const result = Object.create(Schema2.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; + }, "extend"); + module2.exports = Schema2; +})); +var require_str = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : ""; + }, "construct") + }); +})); +var require_seq = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : []; + }, "construct") + }); +})); +var require_map = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : {}; + }, "construct") + }); +})); +var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_schema())({ explicit: [ + require_str(), + require_seq(), + require_map() + ] }); +})); +var require_null = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + __name(resolveYamlNull, "resolveYamlNull"); + function constructYamlNull() { + return null; } - implicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type$1.loadKind && type$1.loadKind !== "scalar") { - throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types\ - is not supported."); - } - if (type$1.multi) { - throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as expl\ -icit."); - } + __name(constructYamlNull, "constructYamlNull"); + function isNull(object) { + return object === null; + } + __name(isNull, "isNull"); + module2.exports = new Type2("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: /* @__PURE__ */ __name(function() { + return "~"; + }, "canonical"), + lowercase: /* @__PURE__ */ __name(function() { + return "null"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function() { + return "NULL"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function() { + return "Null"; + }, "camelcase"), + empty: /* @__PURE__ */ __name(function() { + return ""; + }, "empty") + }, + defaultStyle: "lowercase" }); - explicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } +})); +var require_bool = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === + "False" || data === "FALSE"); + } + __name(resolveYamlBoolean, "resolveYamlBoolean"); + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + __name(constructYamlBoolean, "constructYamlBoolean"); + function isBoolean2(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + __name(isBoolean2, "isBoolean"); + module2.exports = new Type2("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean2, + represent: { + lowercase: /* @__PURE__ */ __name(function(object) { + return object ? "true" : "false"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function(object) { + return object ? "TRUE" : "FALSE"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function(object) { + return object ? "True" : "False"; + }, "camelcase") + }, + defaultStyle: "lowercase" }); - var result = Object.create(Schema$1.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; -}, "extend"); -var schema = Schema$1; -var str = new type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : ""; - }, "construct") -}); -var seq = new type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : []; - }, "construct") -}); -var map = new type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : {}; - }, "construct") -}); -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); -function resolveYamlNull(data) { - if (data === null) return true; - var max = data.length; - return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); -} -__name(resolveYamlNull, "resolveYamlNull"); -function constructYamlNull() { - return null; -} -__name(constructYamlNull, "constructYamlNull"); -function isNull(object) { - return object === null; -} -__name(isNull, "isNull"); -var _null = new type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: /* @__PURE__ */ __name(function() { - return "~"; - }, "canonical"), - lowercase: /* @__PURE__ */ __name(function() { - return "null"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function() { - return "NULL"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function() { - return "Null"; - }, "camelcase"), - empty: /* @__PURE__ */ __name(function() { - return ""; - }, "empty") - }, - defaultStyle: "lowercase" -}); -function resolveYamlBoolean(data) { - if (data === null) return false; - var max = data.length; - return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === - "False" || data === "FALSE"); -} -__name(resolveYamlBoolean, "resolveYamlBoolean"); -function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; -} -__name(constructYamlBoolean, "constructYamlBoolean"); -function isBoolean2(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; -} -__name(isBoolean2, "isBoolean"); -var bool = new type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean2, - represent: { - lowercase: /* @__PURE__ */ __name(function(object) { - return object ? "true" : "false"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function(object) { - return object ? "TRUE" : "FALSE"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function(object) { - return object ? "True" : "False"; - }, "camelcase") - }, - defaultStyle: "lowercase" -}); -function isHexCode(c3) { - return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102; -} -__name(isHexCode, "isHexCode"); -function isOctCode(c3) { - return 48 <= c3 && c3 <= 55; -} -__name(isOctCode, "isOctCode"); -function isDecCode(c3) { - return 48 <= c3 && c3 <= 57; -} -__name(isDecCode, "isDecCode"); -function resolveYamlInteger(data) { - if (data === null) return false; - var max = data.length, index = 0, hasDigits = false, ch; - if (!max) return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; - } - if (ch === "0") { - if (index + 1 === max) return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max; 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 < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; +})); +var require_int = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + function isHexCode(c3) { + return c3 >= 48 && c3 <= 57 || c3 >= 65 && c3 <= 70 || c3 >= 97 && c3 <= 102; + } + __name(isHexCode, "isHexCode"); + function isOctCode(c3) { + return c3 >= 48 && c3 <= 55; + } + __name(isOctCode, "isOctCode"); + function isDecCode(c3) { + return c3 >= 48 && c3 <= 57; + } + __name(isDecCode, "isDecCode"); + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); } - return hasDigits && ch !== "_"; - } - if (ch === "o") { - index++; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); } - return hasDigits && ch !== "_"; - } - } - if (ch === "_") return false; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + __name(resolveYamlInteger, "resolveYamlInteger"); + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + 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); + } + __name(parseYamlInteger, "parseYamlInteger"); + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + __name(constructYamlInteger, "constructYamlInteger"); + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + __name(isInteger, "isInteger"); + module2.exports = new Type2("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, "binary"), + octal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, "octal"), + decimal: /* @__PURE__ */ __name(function(obj) { + return obj.toString(10); + }, "decimal"), + hexadecimal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + }, "hexadecimal") + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] } - hasDigits = true; - } - if (!hasDigits || ch === "_") return false; - return true; -} -__name(resolveYamlInteger, "resolveYamlInteger"); -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); - } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") sign = -1; - value = value.slice(1); - ch = value[0]; - } - 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); -} -__name(constructYamlInteger, "constructYamlInteger"); -function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); -} -__name(isInteger, "isInteger"); -var int = new type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, "binary"), - octal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, "octal"), - decimal: /* @__PURE__ */ __name(function(obj) { - return obj.toString(10); - }, "decimal"), - /* eslint-disable max-len */ - hexadecimal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - }, "hexadecimal") - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } -}); -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; -} -__name(resolveYamlFloat, "resolveYamlFloat"); -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); -} -__name(constructYamlFloat, "constructYamlFloat"); -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; -function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { + }); +})); +var require_float = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[\ +eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + __name(resolveYamlFloat, "resolveYamlFloat"); + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const 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); + } + __name(constructYamlFloat, "constructYamlFloat"); + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { case "lowercase": return ".nan"; case "uppercase": @@ -80145,8 +80129,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".NaN"; } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { + else if (Number.POSITIVE_INFINITY === object) switch (style) { case "lowercase": return ".inf"; case "uppercase": @@ -80154,8 +80137,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".Inf"; } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { + else if (Number.NEGATIVE_INFINITY === object) switch (style) { case "lowercase": return "-.inf"; case "uppercase": @@ -80163,2206 +80145,2004 @@ function representYamlFloat(object, style) { 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; -} -__name(representYamlFloat, "representYamlFloat"); -function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); -} -__name(isFloat, "isFloat"); -var float = new type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" -}); -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); -var core = json; -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; -} -__name(resolveYamlTimestamp, "resolveYamlTimestamp"); -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; -} -__name(constructYamlTimestamp, "constructYamlTimestamp"); -function representYamlTimestamp(object) { - return object.toISOString(); -} -__name(representYamlTimestamp, "representYamlTimestamp"); -var timestamp = new type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); -function resolveYamlMerge(data) { - return data === "<<" || data === null; -} -__name(resolveYamlMerge, "resolveYamlMerge"); -var merge2 = new type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge -}); -var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; -function resolveYamlBinary(data) { - if (data === null) return false; - var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - code = map2.indexOf(data.charAt(idx)); - if (code > 64) continue; - if (code < 0) return false; - bitlen += 6; - } - return bitlen % 8 === 0; -} -__name(resolveYamlBinary, "resolveYamlBinary"); -function constructYamlBinary(data) { - var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; - for (idx = 0; idx < max; idx++) { - if (idx % 4 === 0 && idx) { + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + __name(representYamlFloat, "representYamlFloat"); + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + __name(isFloat, "isFloat"); + module2.exports = new Type2("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); +})); +var require_json = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_failsafe().extend({ implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] }); +})); +var require_core = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_json(); +})); +var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ 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; + } + __name(resolveYamlTimestamp, "resolveYamlTimestamp"); + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match2 = YAML_DATE_REGEXP.exec(data); + if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); + if (match2 === null) throw new Error("Date resolve error"); + const year = +match2[1]; + const month = +match2[2] - 1; + const day = +match2[3]; + if (!match2[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match2[4]; + const minute = +match2[5]; + const second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match2[9]) { + const tzHour = +match2[10]; + const tzMinute = +(match2[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match2[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + __name(constructYamlTimestamp, "constructYamlTimestamp"); + function representYamlTimestamp(object) { + return object.toISOString(); + } + __name(representYamlTimestamp, "representYamlTimestamp"); + module2.exports = new Type2("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); +})); +var require_merge = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + __name(resolveYamlMerge, "resolveYamlMerge"); + module2.exports = new Type2("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); +})); +var require_binary = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + __name(resolveYamlBinary, "resolveYamlBinary"); + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 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); + } + __name(constructYamlBinary, "constructYamlBinary"); + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; } - bits = bits << 6 | map2.indexOf(input.charAt(idx)); - } - tailbits = max % 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); -} -__name(constructYamlBinary, "constructYamlBinary"); -function representYamlBinary(object) { - var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - if (idx % 3 === 0 && idx) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } - bits = (bits << 8) + object[idx]; - } - tail = max % 3; - if (tail === 0) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } else if (tail === 2) { - result += map2[bits >> 10 & 63]; - result += map2[bits >> 4 & 63]; - result += map2[bits << 2 & 63]; - result += map2[64]; - } else if (tail === 1) { - result += map2[bits >> 2 & 63]; - result += map2[bits << 4 & 63]; - result += map2[64]; - result += map2[64]; + return result; } - return result; -} -__name(representYamlBinary, "representYamlBinary"); -function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; -} -__name(isBinary, "isBinary"); -var binary = new type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = 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$2.call(pair) !== "[object Object]") return false; - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - if (!pairHasKey) return false; - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; + __name(representYamlBinary, "representYamlBinary"); + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + __name(isBinary, "isBinary"); + module2.exports = new Type2("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); +})); +var require_omap = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; } - return true; -} -__name(resolveYamlOmap, "resolveYamlOmap"); -function constructYamlOmap(data) { - return data !== null ? data : []; -} -__name(constructYamlOmap, "constructYamlOmap"); -var omap = new type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); -var _toString$1 = Object.prototype.toString; -function resolveYamlPairs(data) { - if (data === null) return true; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString$1.call(pair) !== "[object Object]") return false; - keys = Object.keys(pair); - if (keys.length !== 1) return false; - result[index] = [keys[0], pair[keys[0]]]; + __name(resolveYamlOmap, "resolveYamlOmap"); + function constructYamlOmap(data) { + return data !== null ? data : []; } - return true; -} -__name(resolveYamlPairs, "resolveYamlPairs"); -function constructYamlPairs(data) { - if (data === null) return []; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys = Object.keys(pair); - result[index] = [keys[0], pair[keys[0]]]; + __name(constructYamlOmap, "constructYamlOmap"); + module2.exports = new Type2("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); +})); +var require_pairs = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; } - return result; -} -__name(constructYamlPairs, "constructYamlPairs"); -var pairs = new type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; -function resolveYamlSet(data) { - if (data === null) return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { + __name(resolveYamlPairs, "resolveYamlPairs"); + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + __name(constructYamlPairs, "constructYamlPairs"); + module2.exports = new Type2("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); +})); +var require_set = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { if (object[key] !== null) return false; } + return true; } - return true; -} -__name(resolveYamlSet, "resolveYamlSet"); -function constructYamlSet(data) { - return data !== null ? data : {}; -} -__name(constructYamlSet, "constructYamlSet"); -var set = new type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet -}); -var _default = core.extend({ - implicit: [ - timestamp, - merge2 - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); -var _hasOwnProperty$1 = 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); -} -__name(_class, "_class"); -function is_EOL(c3) { - return c3 === 10 || c3 === 13; -} -__name(is_EOL, "is_EOL"); -function is_WHITE_SPACE(c3) { - return c3 === 9 || c3 === 32; -} -__name(is_WHITE_SPACE, "is_WHITE_SPACE"); -function is_WS_OR_EOL(c3) { - return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; -} -__name(is_WS_OR_EOL, "is_WS_OR_EOL"); -function is_FLOW_INDICATOR(c3) { - return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; -} -__name(is_FLOW_INDICATOR, "is_FLOW_INDICATOR"); -function fromHexCode(c3) { - var lc; - if (48 <= c3 && c3 <= 57) { - return c3 - 48; - } - lc = c3 | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; + __name(resolveYamlSet, "resolveYamlSet"); + function constructYamlSet(data) { + return data !== null ? data : {}; } - return -1; -} -__name(fromHexCode, "fromHexCode"); -function escapedHexLen(c3) { - if (c3 === 120) { - return 2; + __name(constructYamlSet, "constructYamlSet"); + module2.exports = new Type2("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); +})); +var require_default = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_core().extend({ + implicit: [require_timestamp(), require_merge()], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); +})); +var require_loader = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA2 = 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 = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + __name(_class, "_class"); + function isEol(c3) { + return c3 === 10 || c3 === 13; + } + __name(isEol, "isEol"); + function isWhiteSpace2(c3) { + return c3 === 9 || c3 === 32; + } + __name(isWhiteSpace2, "isWhiteSpace"); + function isWsOrEol(c3) { + return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; + } + __name(isWsOrEol, "isWsOrEol"); + function isFlowIndicator(c3) { + return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; + } + __name(isFlowIndicator, "isFlowIndicator"); + function fromHexCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + const lc = c3 | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; } - if (c3 === 117) { - return 4; + __name(fromHexCode, "fromHexCode"); + function escapedHexLen(c3) { + if (c3 === 120) return 2; + if (c3 === 117) return 4; + if (c3 === 85) return 8; + return 0; } - if (c3 === 85) { - return 8; + __name(escapedHexLen, "escapedHexLen"); + function fromDecimalCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + return -1; } - return 0; -} -__name(escapedHexLen, "escapedHexLen"); -function fromDecimalCode(c3) { - if (48 <= c3 && c3 <= 57) { - return c3 - 48; + __name(fromDecimalCode, "fromDecimalCode"); + function simpleEscapeSequence(c3) { + switch (c3) { + case 48: + return "\0"; + case 97: + return "\x07"; + case 98: + return "\b"; + case 116: + return " "; + case 9: + return " "; + case 110: + return "\n"; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 101: + return "\x1B"; + case 32: + return " "; + case 34: + return '"'; + case 47: + return "/"; + case 92: + return "\\"; + case 78: + return "\x85"; + case 95: + return "\xA0"; + case 76: + return "\u2028"; + case 80: + return "\u2029"; + default: + return ""; + } } - return -1; -} -__name(fromDecimalCode, "fromDecimalCode"); -function simpleEscapeSequence(c3) { - return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : - c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === - 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "\x85" : c3 === 95 ? "\xA0" : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : ""; -} -__name(simpleEscapeSequence, "simpleEscapeSequence"); -function charFromCodepoint(c3) { - if (c3 <= 65535) { - return String.fromCharCode(c3); + __name(simpleEscapeSequence, "simpleEscapeSequence"); + function charFromCodepoint(c3) { + if (c3 <= 65535) return String.fromCharCode(c3); + return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320); } - return String.fromCharCode( - (c3 - 65536 >> 10) + 55296, - (c3 - 65536 & 1023) + 56320 - ); -} -__name(charFromCodepoint, "charFromCodepoint"); -function setProperty(object, key, value) { - if (key === "__proto__") { - Object.defineProperty(object, key, { + __name(charFromCodepoint, "charFromCodepoint"); + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { configurable: true, enumerable: true, writable: true, value }); - } else { - object[key] = value; - } -} -__name(setProperty, "setProperty"); -var simpleEscapeCheck = new Array(256); -var simpleEscapeMap = new Array(256); -for (i2 = 0; i2 < 256; i2++) { - simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; - simpleEscapeMap[i2] = simpleEscapeSequence(i2); -} -var i2; -function State$1(input, options) { - this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || _default; - 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 = []; -} -__name(State$1, "State$1"); -function generateError(state3, message) { - var mark = { - name: state3.filename, - buffer: state3.input.slice(0, -1), - // omit trailing \0 - position: state3.position, - line: state3.line, - column: state3.position - state3.lineStart - }; - mark.snippet = snippet(mark); - return new exception(message, mark); -} -__name(generateError, "generateError"); -function throwError(state3, message) { - throw generateError(state3, message); -} -__name(throwError, "throwError"); -function throwWarning(state3, message) { - if (state3.onWarning) { - state3.onWarning.call(null, generateError(state3, message)); - } -} -__name(throwWarning, "throwWarning"); -var directiveHandlers = { - YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { - var match2, major, minor; - if (state3.version !== null) { - throwError(state3, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state3, "YAML directive accepts exactly one argument"); - } - match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match2 === null) { - throwError(state3, "ill-formed argument of the YAML directive"); - } - major = parseInt(match2[1], 10); - minor = parseInt(match2[2], 10); - if (major !== 1) { - throwError(state3, "unacceptable YAML version of the document"); - } - state3.version = args[0]; - state3.checkLineBreaks = minor < 2; - if (minor !== 1 && minor !== 2) { - throwWarning(state3, "unsupported YAML version of the document"); - } - }, "handleYamlDirective"), - TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { - var handle, prefix2; - if (args.length !== 2) { - throwError(state3, "TAG directive accepts exactly two arguments"); - } - handle = args[0]; - prefix2 = args[1]; - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state3, "ill-formed tag handle (first argument) of the TAG directive"); - } - if (_hasOwnProperty$1.call(state3.tagMap, handle)) { - throwError(state3, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - if (!PATTERN_TAG_URI.test(prefix2)) { - throwError(state3, "ill-formed tag prefix (second argument) of the TAG directive"); - } - try { - prefix2 = decodeURIComponent(prefix2); - } catch (err) { - throwError(state3, "tag prefix is malformed: " + prefix2); - } - state3.tagMap[handle] = prefix2; - }, "handleTagDirective") -}; -function captureSegment(state3, start, end, checkJson) { - var _position, _length, _character, _result; - if (start < end) { - _result = state3.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(state3, "expected valid JSON character"); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state3, "the stream contains non-printable characters"); + else object[key] = value; + } + __name(setProperty, "setProperty"); + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i2 = 0; i2 < 256; i2++) { + simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; + simpleEscapeMap[i2] = simpleEscapeSequence(i2); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA2; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + 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.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + __name(State, "State"); + function generateError(state3, message) { + const mark = { + name: state3.filename, + buffer: state3.input.slice(0, -1), + position: state3.position, + line: state3.line, + column: state3.position - state3.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException2(message, mark); + } + __name(generateError, "generateError"); + function throwError(state3, message) { + throw generateError(state3, message); + } + __name(throwError, "throwError"); + function throwWarning(state3, message) { + if (state3.onWarning) state3.onWarning.call(null, generateError(state3, message)); + } + __name(throwWarning, "throwWarning"); + function storeAnchor(state3, name, value) { + const transactions = state3.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state3.anchorMap, name), + value: state3.anchorMap[name] + }; } - state3.result += _result; + state3.anchorMap[name] = value; } -} -__name(captureSegment, "captureSegment"); -function mergeMappings(state3, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - if (!common.isObject(source)) { - throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + __name(storeAnchor, "storeAnchor"); + function beginAnchorTransaction(state3) { + state3.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null)); } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty$1.call(destination, key)) { - setProperty(destination, key, source[key]); - overridableKeys[key] = true; + __name(beginAnchorTransaction, "beginAnchorTransaction"); + function commitAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const transactions = state3.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; } } -} -__name(mergeMappings, "mergeMappings"); -function storeMappingPair(state3, _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(state3, "nested arrays are not supported inside keys"); - } - if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { - keyNode[index] = "[object Object]"; - } + __name(commitAnchorTransaction, "commitAnchorTransaction"); + function rollbackAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state3.anchorMap[names[index]] = entry.value; + else delete state3.anchorMap[names[index]]; } } - 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(state3, _result, valueNode[index], overridableKeys); + __name(rollbackAnchorTransaction, "rollbackAnchorTransaction"); + function snapshotState(state3) { + return { + position: state3.position, + line: state3.line, + lineStart: state3.lineStart, + lineIndent: state3.lineIndent, + firstTabInLine: state3.firstTabInLine, + tag: state3.tag, + anchor: state3.anchor, + kind: state3.kind, + result: state3.result + }; + } + __name(snapshotState, "snapshotState"); + function restoreState(state3, snapshot2) { + state3.position = snapshot2.position; + state3.line = snapshot2.line; + state3.lineStart = snapshot2.lineStart; + state3.lineIndent = snapshot2.lineIndent; + state3.firstTabInLine = snapshot2.firstTabInLine; + state3.tag = snapshot2.tag; + state3.anchor = snapshot2.anchor; + state3.kind = snapshot2.kind; + state3.result = snapshot2.result; + } + __name(restoreState, "restoreState"); + var directiveHandlers = { + YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { + if (state3.version !== null) throwError(state3, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state3, "YAML directive accepts exactly one argument"); + const match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match2 === null) throwError(state3, "ill-formed argument of the YAML directive"); + const major = parseInt(match2[1], 10); + const minor = parseInt(match2[2], 10); + if (major !== 1) throwError(state3, "unacceptable YAML version of the document"); + state3.version = args[0]; + state3.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state3, "unsupported YAML version of the document"); + }, "handleYamlDirective"), + TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { + let prefix2; + if (args.length !== 2) throwError(state3, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix2 = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state3, "ill-formed tag handle (first argument) of the TAG direct\ +ive"); + if (_hasOwnProperty.call(state3.tagMap, handle)) throwError(state3, 'there is a previously declared suffix for "' + + handle + '" tag handle'); + if (!PATTERN_TAG_URI.test(prefix2)) throwError(state3, "ill-formed tag prefix (second argument) of the TAG directi\ +ve"); + try { + prefix2 = decodeURIComponent(prefix2); + } catch (err) { + throwError(state3, "tag prefix is malformed: " + prefix2); } - } else { - mergeMappings(state3, _result, valueNode, overridableKeys); - } - } else { - if (!state3.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { - state3.line = startLine || state3.line; - state3.lineStart = startLineStart || state3.lineStart; - state3.position = startPos || state3.position; - throwError(state3, "duplicated mapping key"); - } - setProperty(_result, keyNode, valueNode); - delete overridableKeys[keyNode]; - } - return _result; -} -__name(storeMappingPair, "storeMappingPair"); -function readLineBreak(state3) { - var ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 10) { - state3.position++; - } else if (ch === 13) { - state3.position++; - if (state3.input.charCodeAt(state3.position) === 10) { + state3.tagMap[handle] = prefix2; + }, "handleTagDirective") + }; + function captureSegment(state3, start, end, checkJson) { + if (start < end) { + const _result = state3.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state3, "expected valid JSON ch\ +aracter"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state3, "the stream contains non-printable characters"); + state3.result += _result; + } + } + __name(captureSegment, "captureSegment"); + function mergeMappings(state3, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + __name(mergeMappings, "mergeMappings"); + function storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state3, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Objec\ +t]"; + } + } + 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)) { + if (valueNode.length > state3.maxMergeSeqLength) throwError(state3, "merge sequence length exceeded maxMergeSeqLen\ +gth (" + state3.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state3, _result, src, overridableKeys); + } + } else mergeMappings(state3, _result, valueNode, overridableKeys); + else { + if (!state3.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state3.line = startLine || state3.line; + state3.lineStart = startLineStart || state3.lineStart; + state3.position = startPos || state3.position; + throwError(state3, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + __name(storeMappingPair, "storeMappingPair"); + function readLineBreak(state3) { + const ch = state3.input.charCodeAt(state3.position); + if (ch === 10) state3.position++; + else if (ch === 13) { state3.position++; - } - } else { - throwError(state3, "a line break is expected"); - } - state3.line += 1; - state3.lineStart = state3.position; - state3.firstTabInLine = -1; -} -__name(readLineBreak, "readLineBreak"); -function skipSeparationSpace(state3, allowComments, checkIndent) { - var lineBreaks = 0, ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 9 && state3.firstTabInLine === -1) { - state3.firstTabInLine = state3.position; - } - ch = state3.input.charCodeAt(++state3.position); - } - if (allowComments && ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 10 && ch !== 13 && ch !== 0); - } - if (is_EOL(ch)) { - readLineBreak(state3); - ch = state3.input.charCodeAt(state3.position); - lineBreaks++; - state3.lineIndent = 0; - while (ch === 32) { - state3.lineIndent++; + if (state3.input.charCodeAt(state3.position) === 10) state3.position++; + } else throwError(state3, "a line break is expected"); + state3.line += 1; + state3.lineStart = state3.position; + state3.firstTabInLine = -1; + } + __name(readLineBreak, "readLineBreak"); + function skipSeparationSpace(state3, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + while (isWhiteSpace2(ch)) { + if (ch === 9 && state3.firstTabInLine === -1) state3.firstTabInLine = state3.position; ch = state3.input.charCodeAt(++state3.position); } - } else { - break; + if (allowComments && ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state3); + ch = state3.input.charCodeAt(state3.position); + lineBreaks++; + state3.lineIndent = 0; + while (ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + } else break; } + if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) throwWarning(state3, "deficient inden\ +tation"); + return lineBreaks; } - if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) { - throwWarning(state3, "deficient indentation"); - } - return lineBreaks; -} -__name(skipSeparationSpace, "skipSeparationSpace"); -function testDocumentSeparator(state3) { - var _position = state3.position, ch; - ch = state3.input.charCodeAt(_position); - if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + - 2)) { - _position += 3; - ch = state3.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + __name(skipSeparationSpace, "skipSeparationSpace"); + function testDocumentSeparator(state3) { + let _position = state3.position; + let ch = state3.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + + 2)) { + _position += 3; + ch = state3.input.charCodeAt(_position); + if (ch === 0 || isWsOrEol(ch)) return true; } - } - return false; -} -__name(testDocumentSeparator, "testDocumentSeparator"); -function writeFoldedLines(state3, count) { - if (count === 1) { - state3.result += " "; - } else if (count > 1) { - state3.result += common.repeat("\n", count - 1); - } -} -__name(writeFoldedLines, "writeFoldedLines"); -function readPlainScalar(state3, nodeIndent, withinFlowCollection) { - var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state3. - kind, _result = state3.result, ch; - ch = state3.input.charCodeAt(state3.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 = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - state3.kind = "scalar"; - state3.result = ""; - captureStart = captureEnd = state3.position; - hasPendingContent = false; - while (ch !== 0) { - if (ch === 58) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; + __name(testDocumentSeparator, "testDocumentSeparator"); + function writeFoldedLines(state3, count) { + if (count === 1) state3.result += " "; + else if (count > 1) state3.result += common.repeat("\n", count - 1); + } + __name(writeFoldedLines, "writeFoldedLines"); + function readPlainScalar(state3, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state3.kind; + const _result = state3.result; + let ch = state3.input.charCodeAt(state3.position); + if (isWsOrEol(ch) || isFlowIndicator(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) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state3.kind = "scalar"; + state3.result = ""; + captureStart = captureEnd = state3.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state3.input.charCodeAt(state3.position - 1))) break; + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && isFlowIndicator( + ch)) break; + else if (isEol(ch)) { + _line = state3.line; + _lineStart = state3.lineStart; + _lineIndent = state3.lineIndent; + skipSeparationSpace(state3, false, -1); + if (state3.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state3.input.charCodeAt(state3.position); + continue; + } else { + state3.position = captureEnd; + state3.line = _line; + state3.lineStart = _lineStart; + state3.lineIndent = _lineIndent; + break; + } } - } else if (ch === 35) { - preceding = state3.input.charCodeAt(state3.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; + if (hasPendingContent) { + captureSegment(state3, captureStart, captureEnd, false); + writeFoldedLines(state3, state3.line - _line); + captureStart = captureEnd = state3.position; + hasPendingContent = false; } - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && is_FLOW_INDICATOR( - ch)) { - break; - } else if (is_EOL(ch)) { - _line = state3.line; - _lineStart = state3.lineStart; - _lineIndent = state3.lineIndent; - skipSeparationSpace(state3, false, -1); - if (state3.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state3.input.charCodeAt(state3.position); - continue; - } else { - state3.position = captureEnd; - state3.line = _line; - state3.lineStart = _lineStart; - state3.lineIndent = _lineIndent; - break; - } - } - if (hasPendingContent) { - captureSegment(state3, captureStart, captureEnd, false); - writeFoldedLines(state3, state3.line - _line); - captureStart = captureEnd = state3.position; - hasPendingContent = false; - } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state3.position + 1; + if (!isWhiteSpace2(ch)) captureEnd = state3.position + 1; + ch = state3.input.charCodeAt(++state3.position); } - ch = state3.input.charCodeAt(++state3.position); - } - captureSegment(state3, captureStart, captureEnd, false); - if (state3.result) { - return true; - } - state3.kind = _kind; - state3.result = _result; - return false; -} -__name(readPlainScalar, "readPlainScalar"); -function readSingleQuotedScalar(state3, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 39) { + captureSegment(state3, captureStart, captureEnd, false); + if (state3.result) return true; + state3.kind = _kind; + state3.result = _result; return false; } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 39) { + __name(readPlainScalar, "readPlainScalar"); + function readSingleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 39) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 39) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); if (ch === 39) { captureStart = state3.position; state3.position++; captureEnd = state3.position; - } else { - return true; - } - } else if (is_EOL(ch)) { + } else return true; + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a single quoted scalar"); - } else { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a single quoted scalar"); + else { state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a single quoted scalar"); -} -__name(readSingleQuotedScalar, "readSingleQuotedScalar"); -function readDoubleQuotedScalar(state3, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 34) { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 34) { + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a single quoted scalar"); + } + __name(readSingleQuotedScalar, "readSingleQuotedScalar"); + function readDoubleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 34) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 34) { captureSegment(state3, captureStart, state3.position, true); state3.position++; return true; } else if (ch === 92) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); - if (is_EOL(ch)) { - skipSeparationSpace(state3, false, nodeIndent); - } else if (ch < 256 && simpleEscapeCheck[ch]) { + if (isEol(ch)) skipSeparationSpace(state3, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { state3.result += simpleEscapeMap[ch]; state3.position++; } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; + let hexLength = tmp; + let hexResult = 0; for (; hexLength > 0; hexLength--) { ch = state3.input.charCodeAt(++state3.position); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - } else { - throwError(state3, "expected hexadecimal character"); - } + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state3, "expected hexadecimal character"); } state3.result += charFromCodepoint(hexResult); state3.position++; - } else { - throwError(state3, "unknown escape sequence"); - } + } else throwError(state3, "unknown escape sequence"); captureStart = captureEnd = state3.position; - } else if (is_EOL(ch)) { + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a double quoted scalar"); - } else { - state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a double quoted scalar"); -} -__name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); -function readFlowCollection(state3, nodeIndent) { - var readNext = true, _line, _lineStart, _pos, _tag = state3.tag, _result, _anchor = state3.anchor, following, terminator, - isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 91) { - terminator = 93; - isMapping = false; - _result = []; - } else if (ch === 123) { - terminator = 125; - isMapping = true; - _result = {}; - } else { - return false; - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(++state3.position); - while (ch !== 0) { - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === terminator) { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a double quoted scalar"); + else { state3.position++; - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = isMapping ? "mapping" : "sequence"; - state3.result = _result; - return true; - } else if (!readNext) { - throwError(state3, "missed comma between flow collection entries"); - } else if (ch === 44) { - throwError(state3, "expected the node content, but found ','"); - } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - if (ch === 63) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a double quoted scalar"); + } + __name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); + function readFlowCollection(state3, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state3.tag; + let _result; + const _anchor = state3.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0) { + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if (ch === terminator) { state3.position++; + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = isMapping ? "mapping" : "sequence"; + state3.result = _result; + return true; + } else if (!readNext) throwError(state3, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state3, "expected the node content, but found ','"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + if (isWsOrEol(state3.input.charCodeAt(state3.position + 1))) { + isPair = isExplicitPair = true; + state3.position++; + skipSeparationSpace(state3, true, nodeIndent); + } + } + _line = state3.line; + _lineStart = state3.lineStart; + _pos = state3.position; + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state3.tag; + keyNode = state3.result; + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if ((isExplicitPair || state3.line === _line) && ch === 58) { + isPair = true; + ch = state3.input.charCodeAt(++state3.position); skipSeparationSpace(state3, true, nodeIndent); + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state3.result; } - } - _line = state3.line; - _lineStart = state3.lineStart; - _pos = state3.position; - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state3.tag; - keyNode = state3.result; - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if ((isExplicitPair || state3.line === _line) && ch === 58) { - isPair = true; - ch = state3.input.charCodeAt(++state3.position); + if (isMapping) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + else if (isPair) _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, + _pos)); + else _result.push(keyNode); skipSeparationSpace(state3, true, nodeIndent); - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state3.result; - } - if (isMapping) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === 44) { - readNext = true; + ch = state3.input.charCodeAt(state3.position); + if (ch === 44) { + readNext = true; + ch = state3.input.charCodeAt(++state3.position); + } else readNext = false; + } + throwError(state3, "unexpected end of the stream within a flow collection"); + } + __name(readFlowCollection, "readFlowCollection"); + function readBlockScalar(state3, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state3.kind = "scalar"; + state3.result = ""; + while (ch !== 0) { ch = state3.input.charCodeAt(++state3.position); - } else { - readNext = false; - } - } - throwError(state3, "unexpected end of the stream within a flow collection"); -} -__name(readFlowCollection, "readFlowCollection"); -function readBlockScalar(state3, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, - emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 124) { - folding = false; - } else if (ch === 62) { - folding = true; - } else { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - while (ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); - if (ch === 43 || ch === 45) { - if (CHOMPING_CLIP === chomping) { - chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state3, "repeat of a chomping mode identifier"); - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state3, "bad explicit indentation width of a block scalar; it cannot be less than one"); - } else if (!detectedIndent) { + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state3, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state3, "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(state3, "repeat of an indentation width identifier"); - } - } else { - break; + } else throwError(state3, "repeat of an indentation width identifier"); + else break; } - } - if (is_WHITE_SPACE(ch)) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (is_WHITE_SPACE(ch)); - if (ch === 35) { - do { + if (isWhiteSpace2(ch)) { + do ch = state3.input.charCodeAt(++state3.position); - } while (!is_EOL(ch) && ch !== 0); - } - } - while (ch !== 0) { - readLineBreak(state3); - state3.lineIndent = 0; - ch = state3.input.charCodeAt(state3.position); - while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { - state3.lineIndent++; - ch = state3.input.charCodeAt(++state3.position); - } - if (!detectedIndent && state3.lineIndent > textIndent) { - textIndent = state3.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; - continue; + while (isWhiteSpace2(ch)); + if (ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (!isEol(ch) && ch !== 0); } - if (state3.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { - state3.result += "\n"; + while (ch !== 0) { + readLineBreak(state3); + state3.lineIndent = 0; + ch = state3.input.charCodeAt(state3.position); + while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + if (!detectedIndent && state3.lineIndent > textIndent) textIndent = state3.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state3, "missing indentation for block scalar"); + if (state3.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state3.result += "\n"; } + break; } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { + if (folding) if (isWhiteSpace2(ch)) { atMoreIndented = true; state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (atMoreIndented) { atMoreIndented = false; state3.result += common.repeat("\n", emptyLines + 1); } else if (emptyLines === 0) { - if (didReadContent) { - state3.result += " "; - } - } else { - state3.result += common.repeat("\n", emptyLines); - } - } else { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + if (didReadContent) state3.result += " "; + } else state3.result += common.repeat("\n", emptyLines); + else state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state3.position; + while (!isEol(ch) && ch !== 0) ch = state3.input.charCodeAt(++state3.position); + captureSegment(state3, captureStart, state3.position, false); } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state3.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); - } - captureSegment(state3, captureStart, state3.position, false); - } - return true; -} -__name(readBlockScalar, "readBlockScalar"); -function readBlockSequence(state3, nodeIndent) { - var _line, _tag = state3.tag, _anchor = state3.anchor, _result = [], following, detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; + return true; } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - if (ch !== 45) { - break; - } - following = state3.input.charCodeAt(state3.position + 1); - if (!is_WS_OR_EOL(following)) { - break; - } - detected = true; - state3.position++; - if (skipSeparationSpace(state3, true, -1)) { - if (state3.lineIndent <= nodeIndent) { - _result.push(null); - ch = state3.input.charCodeAt(state3.position); - continue; + __name(readBlockScalar, "readBlockScalar"); + function readBlockSequence(state3, nodeIndent) { + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = []; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); + } + if (ch !== 45) break; + if (!isWsOrEol(state3.input.charCodeAt(state3.position + 1))) break; + detected = true; + state3.position++; + if (skipSeparationSpace(state3, true, -1)) { + if (state3.lineIndent <= nodeIndent) { + _result.push(null); + ch = state3.input.charCodeAt(state3.position); + continue; + } } + const _line = state3.line; + composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state3.result); + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a sequence entry"); + else if (state3.lineIndent < nodeIndent) break; } - _line = state3.line; - composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state3.result); - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a sequence entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "sequence"; + state3.result = _result; + return true; } + return false; } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "sequence"; - state3.result = _result; - return true; - } - return false; -} -__name(readBlockSequence, "readBlockSequence"); -function readBlockMapping(state3, nodeIndent, flowIndent) { - var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state3.tag, _anchor = state3.anchor, _result = {}, - overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, - detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (!atExplicitKey && state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - following = state3.input.charCodeAt(state3.position + 1); - _line = state3.line; - if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { - if (ch === 63) { - if (atExplicitKey) { - storeMappingPair(state3, _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(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty\ - line"); - } - state3.position += 1; - ch = following; - } else { - _keyLine = state3.line; - _keyLineStart = state3.lineStart; - _keyPos = state3.position; - if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - break; - } - if (state3.line === _line) { - ch = state3.input.charCodeAt(state3.position); - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 58) { - ch = state3.input.charCodeAt(++state3.position); - if (!is_WS_OR_EOL(ch)) { - throwError(state3, "a whitespace character is expected after the key-value separator within a block mapping"); - } + __name(readBlockSequence, "readBlockSequence"); + function readBlockMapping(state3, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = {}; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (!atExplicitKey && state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); + } + const following = state3.input.charCodeAt(state3.position + 1); + const _line = state3.line; + if ((ch === 63 || ch === 58) && isWsOrEol(following)) { + if (ch === 63) { if (atExplicitKey) { storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { atExplicitKey = false; - allowCompact = false; - keyTag = state3.tag; - keyNode = state3.result; - } else if (detected) { - throwError(state3, "can not read an implicit mapping pair; a colon is missed"); - } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } else if (detected) { - throwError(state3, "can not read a block mapping entry; a multiline key may not be an implicit key"); + allowCompact = true; + } else throwError(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulate\ +d empty line"); + state3.position += 1; + ch = following; } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } - if (state3.line === _line || state3.lineIndent > nodeIndent) { - if (atExplicitKey) { _keyLine = state3.line; _keyLineStart = state3.lineStart; _keyPos = state3.position; + if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state3.line === _line) { + ch = state3.input.charCodeAt(state3.position); + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 58) { + ch = state3.input.charCodeAt(++state3.position); + if (!isWsOrEol(ch)) throwError(state3, "a whitespace character is expected after the key-value separator wit\ +hin a block mapping"); + if (atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state3.tag; + keyNode = state3.result; + } else if (detected) throwError(state3, "can not read an implicit mapping pair; a colon is missed"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } + } else if (detected) throwError(state3, "can not read a block mapping entry; a multiline key may not be an impli\ +cit key"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } } - if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (state3.line === _line || state3.lineIndent > nodeIndent) { if (atExplicitKey) { - keyNode = state3.result; - } else { - valueNode = state3.result; + _keyLine = state3.line; + _keyLineStart = state3.lineStart; + _keyPos = state3.position; + } + if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state3. + result; + else valueNode = state3.result; + if (!atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; } + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); } - if (!atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a mapping entry"); + else if (state3.lineIndent < nodeIndent) break; } - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a mapping entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (atExplicitKey) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, + _keyPos); + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "mapping"; + state3.result = _result; } - } - if (atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "mapping"; - state3.result = _result; - } - return detected; -} -__name(readBlockMapping, "readBlockMapping"); -function readTagProperty(state3) { - var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 33) return false; - if (state3.tag !== null) { - throwError(state3, "duplication of a tag property"); - } - ch = state3.input.charCodeAt(++state3.position); - if (ch === 60) { - isVerbatim = true; - ch = state3.input.charCodeAt(++state3.position); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; + return detected; + } + __name(readBlockMapping, "readBlockMapping"); + function readTagProperty(state3) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 33) return false; + if (state3.tag !== null) throwError(state3, "duplication of a tag property"); ch = state3.input.charCodeAt(++state3.position); - } else { - tagHandle = "!"; - } - _position = state3.position; - if (isVerbatim) { - do { + if (ch === 60) { + isVerbatim = true; ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && ch !== 62); - if (state3.position < state3.length) { - tagName = state3.input.slice(_position, state3.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; ch = state3.input.charCodeAt(++state3.position); + } else tagHandle = "!"; + let _position = state3.position; + if (isVerbatim) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && ch !== 62); + if (state3.position < state3.length) { + tagName = state3.input.slice(_position, state3.position); + ch = state3.input.charCodeAt(++state3.position); + } else throwError(state3, "unexpected end of the stream within a verbatim tag"); } else { - throwError(state3, "unexpected end of the stream within a verbatim tag"); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (ch === 33) { - if (!isNamed) { + while (ch !== 0 && !isWsOrEol(ch)) { + if (ch === 33) if (!isNamed) { tagHandle = state3.input.slice(_position - 1, state3.position + 1); - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state3, "named tag handle cannot contain such characters"); - } + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state3, "named tag handle cannot contain such characters"); isNamed = true; _position = state3.position + 1; - } else { - throwError(state3, "tag suffix cannot contain exclamation marks"); - } + } else throwError(state3, "tag suffix cannot contain exclamation marks"); + ch = state3.input.charCodeAt(++state3.position); } - ch = state3.input.charCodeAt(++state3.position); + tagName = state3.input.slice(_position, state3.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state3, "tag suffix cannot contain flow indicator characters"); } - tagName = state3.input.slice(_position, state3.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state3, "tag suffix cannot contain flow indicator characters"); + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state3, "tag name cannot contain such characters: " + tagName); + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state3, "tag name is malformed: " + tagName); } + if (isVerbatim) state3.tag = tagName; + else if (_hasOwnProperty.call(state3.tagMap, tagHandle)) state3.tag = state3.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state3.tag = "!" + tagName; + else if (tagHandle === "!!") state3.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); + return true; } - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state3, "tag name cannot contain such characters: " + tagName); - } - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state3, "tag name is malformed: " + tagName); - } - if (isVerbatim) { - state3.tag = tagName; - } else if (_hasOwnProperty$1.call(state3.tagMap, tagHandle)) { - state3.tag = state3.tagMap[tagHandle] + tagName; - } else if (tagHandle === "!") { - state3.tag = "!" + tagName; - } else if (tagHandle === "!!") { - state3.tag = "tag:yaml.org,2002:" + tagName; - } else { - throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); - } - return true; -} -__name(readTagProperty, "readTagProperty"); -function readAnchorProperty(state3) { - var _position, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 38) return false; - if (state3.anchor !== null) { - throwError(state3, "duplication of an anchor property"); - } - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readTagProperty, "readTagProperty"); + function readAnchorProperty(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 38) return false; + if (state3.anchor !== null) throwError(state3, "duplication of an anchor property"); ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an anchor node must contain at least one character"); + state3.anchor = state3.input.slice(_position, state3.position); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an anchor node must contain at least one character"); - } - state3.anchor = state3.input.slice(_position, state3.position); - return true; -} -__name(readAnchorProperty, "readAnchorProperty"); -function readAlias(state3) { - var _position, alias, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 42) return false; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readAnchorProperty, "readAnchorProperty"); + function readAlias(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 42) return false; ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an alias node must contain at least one character"); + const alias = state3.input.slice(_position, state3.position); + if (!_hasOwnProperty.call(state3.anchorMap, alias)) throwError(state3, 'unidentified alias "' + alias + '"'); + state3.result = state3.anchorMap[alias]; + skipSeparationSpace(state3, true, -1); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an alias node must contain at least one character"); - } - alias = state3.input.slice(_position, state3.position); - if (!_hasOwnProperty$1.call(state3.anchorMap, alias)) { - throwError(state3, 'unidentified alias "' + alias + '"'); + __name(readAlias, "readAlias"); + function tryReadBlockMappingFromProperty(state3, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state3); + beginAnchorTransaction(state3); + restoreState(state3, propertyStart); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + if (readBlockMapping(state3, nodeIndent, flowIndent) && state3.kind === "mapping") { + commitAnchorTransaction(state3); + return true; + } + rollbackAnchorTransaction(state3); + restoreState(state3, fallbackState); + return false; } - state3.result = state3.anchorMap[alias]; - skipSeparationSpace(state3, true, -1); - return true; -} -__name(readAlias, "readAlias"); -function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, - typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; - if (state3.listener !== null) { - state3.listener("open", state3); - } - state3.tag = null; - state3.anchor = null; - state3.kind = null; - state3.result = null; - allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === - nodeContext; - if (allowToSeek) { - if (skipSeparationSpace(state3, true, -1)) { - atNewLine = true; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - if (indentStatus === 1) { - while (readTagProperty(state3) || readAnchorProperty(state3)) { + __name(tryReadBlockMappingFromProperty, "tryReadBlockMappingFromProperty"); + function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state3.depth >= state3.maxDepth) throwError(state3, "nesting exceeded maxDepth (" + state3.maxDepth + ")"); + state3.depth += 1; + if (state3.listener !== null) state3.listener("open", state3); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === + nodeContext; + if (allowToSeek) { if (skipSeparationSpace(state3, true, -1)) { atNewLine = true; - allowBlockCollections = allowBlockStyles; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; } } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - blockIndent = state3.position - state3.lineStart; - if (indentStatus === 1) { - if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, blockIndent, flowIndent)) || - readFlowCollection(state3, flowIndent)) { - hasContent = true; - } else { - if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || readDoubleQuotedScalar( - state3, flowIndent)) { - hasContent = true; - } else if (readAlias(state3)) { + if (indentStatus === 1) while (true) { + const ch = state3.input.charCodeAt(state3.position); + const propertyState = snapshotState(state3); + if (atNewLine && (ch === 33 && state3.tag !== null || ch === 38 && state3.anchor !== null)) break; + if (!readTagProperty(state3) && !readAnchorProperty(state3)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state3, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state3.position - state3.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, + blockIndent, flowIndent)) || readFlowCollection(state3, flowIndent)) hasContent = true; + else { + const ch = state3.input.charCodeAt(state3.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty( + state3, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true; + else if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || + readDoubleQuotedScalar(state3, flowIndent)) hasContent = true; + else if (readAlias(state3)) { hasContent = true; - if (state3.tag !== null || state3.anchor !== null) { - throwError(state3, "alias node should not have any properties"); - } + if (state3.tag !== null || state3.anchor !== null) throwError(state3, "alias node should not have any properti\ +es"); } else if (readPlainScalar(state3, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; - if (state3.tag === null) { - state3.tag = "?"; - } - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } else if (indentStatus === 0) { - hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); - } - } - if (state3.tag === null) { - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } else if (state3.tag === "?") { - if (state3.result !== null && state3.kind !== "scalar") { - throwError(state3, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state3.kind + '"'); - } - for (typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type2 = state3.implicitTypes[typeIndex]; - if (type2.resolve(state3.result)) { - state3.result = type2.construct(state3.result); - state3.tag = type2.tag; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; + if (state3.tag === null) state3.tag = "?"; + } + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); + } + if (state3.tag === null) { + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } else if (state3.tag === "?") { + if (state3.result !== null && state3.kind !== "scalar") throwError(state3, 'unacceptable node kind for ! tag; i\ +t should be "scalar", not "' + state3.kind + '"'); + for (let typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state3.implicitTypes[typeIndex]; + if (type.resolve(state3.result)) { + state3.result = type.construct(state3.result); + state3.tag = type.tag; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + break; } - break; } - } - } else if (state3.tag !== "!") { - if (_hasOwnProperty$1.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) { - type2 = state3.typeMap[state3.kind || "fallback"][state3.tag]; - } else { - type2 = null; - typeList = state3.typeMap.multi[state3.kind || "fallback"]; - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state3.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type2 = typeList[typeIndex]; + } else if (state3.tag !== "!") { + if (_hasOwnProperty.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) type = state3.typeMap[state3.kind || + "fallback"][state3.tag]; + else { + type = null; + const typeList = state3.typeMap.multi[state3.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state3.tag. + slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; break; } } - } - if (!type2) { - throwError(state3, "unknown tag !<" + state3.tag + ">"); - } - if (state3.result !== null && type2.kind !== state3.kind) { - throwError(state3, "unacceptable node kind for !<" + state3.tag + '> tag; it should be "' + type2.kind + '", not "' + - state3.kind + '"'); - } - if (!type2.resolve(state3.result, state3.tag)) { - throwError(state3, "cannot resolve a node with !<" + state3.tag + "> explicit tag"); - } else { - state3.result = type2.construct(state3.result, state3.tag); - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } - if (state3.listener !== null) { - state3.listener("close", state3); - } - return state3.tag !== null || state3.anchor !== null || hasContent; -} -__name(composeNode, "composeNode"); -function readDocument(state3) { - var documentStart = state3.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; - state3.version = null; - state3.checkLineBreaks = state3.legacy; - state3.tagMap = /* @__PURE__ */ Object.create(null); - state3.anchorMap = /* @__PURE__ */ Object.create(null); - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if (state3.lineIndent > 0 || ch !== 37) { - break; - } - hasDirectives = true; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (!type) throwError(state3, "unknown tag !<" + state3.tag + ">"); + if (state3.result !== null && type.kind !== state3.kind) throwError(state3, "unacceptable node kind for !<" + state3. + tag + '> tag; it should be "' + type.kind + '", not "' + state3.kind + '"'); + if (!type.resolve(state3.result, state3.tag)) throwError(state3, "cannot resolve a node with !<" + state3.tag + ">\ + explicit tag"); + else { + state3.result = type.construct(state3.result, state3.tag); + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + } + if (state3.listener !== null) state3.listener("close", state3); + state3.depth -= 1; + return state3.tag !== null || state3.anchor !== null || hasContent; + } + __name(composeNode, "composeNode"); + function readDocument(state3) { + const documentStart = state3.position; + let hasDirectives = false; + let ch; + state3.version = null; + state3.checkLineBreaks = state3.legacy; + state3.tagMap = /* @__PURE__ */ Object.create(null); + state3.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if (state3.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; ch = state3.input.charCodeAt(++state3.position); - } - directiveName = state3.input.slice(_position, state3.position); - directiveArgs = []; - if (directiveName.length < 1) { - throwError(state3, "directive name must not be less than one character in length"); - } - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && !is_EOL(ch)); - break; - } - if (is_EOL(ch)) break; - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state3.input.charCodeAt(++state3.position); + let _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + const directiveName = state3.input.slice(_position, state3.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state3, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 35) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + directiveArgs.push(state3.input.slice(_position, state3.position)); } - directiveArgs.push(state3.input.slice(_position, state3.position)); - } - if (ch !== 0) readLineBreak(state3); - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state3, directiveName, directiveArgs); - } else { - throwWarning(state3, 'unknown document directive "' + directiveName + '"'); + if (ch !== 0) readLineBreak(state3); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state3, directiveName, + directiveArgs); + else throwWarning(state3, 'unknown document directive "' + directiveName + '"'); } - } - skipSeparationSpace(state3, true, -1); - if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + - 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { - state3.position += 3; skipSeparationSpace(state3, true, -1); - } else if (hasDirectives) { - throwError(state3, "directives end mark is expected"); - } - composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state3, true, -1); - if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) { - throwWarning(state3, "non-ASCII line breaks are interpreted as content"); - } - state3.documents.push(state3.result); - if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - if (state3.input.charCodeAt(state3.position) === 46) { + if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + + 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { state3.position += 3; skipSeparationSpace(state3, true, -1); + } else if (hasDirectives) throwError(state3, "directives end mark is expected"); + composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state3, true, -1); + if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) + throwWarning(state3, "non-ASCII line breaks are interpreted as content"); + state3.documents.push(state3.result); + if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { + if (state3.input.charCodeAt(state3.position) === 46) { + state3.position += 3; + skipSeparationSpace(state3, true, -1); + } + return; } - return; + if (state3.position < state3.length - 1) throwError(state3, "end of the stream or a document separator is expected"); } - if (state3.position < state3.length - 1) { - throwError(state3, "end of the stream or a document separator is expected"); - } else { - return; - } -} -__name(readDocument, "readDocument"); -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"; + __name(readDocument, "readDocument"); + 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"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state3 = new State(input, options); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state3.position = nullpos; + throwError(state3, "null byte is not allowed in input"); + } + state3.input += "\0"; + while (state3.input.charCodeAt(state3.position) === 32) { + state3.lineIndent += 1; + state3.position += 1; } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); + while (state3.position < state3.length - 1) readDocument(state3); + return state3.documents; + } + __name(loadDocuments, "loadDocuments"); + function loadAll2(input, iterator2, options) { + if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { + options = iterator2; + iterator2 = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator2 !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator2(documents[index]); + } + __name(loadAll2, "loadAll"); + function load2(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException2("expected a single document in the stream, but found more"); + } + __name(load2, "load"); + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; +})); +var require_dumper = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var DEFAULT_SCHEMA2 = 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(schema2, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema2.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; } + return result; } - var state3 = new State$1(input, options); - var nullpos = input.indexOf("\0"); - if (nullpos !== -1) { - state3.position = nullpos; - throwError(state3, "null byte is not allowed in input"); - } - state3.input += "\0"; - while (state3.input.charCodeAt(state3.position) === 32) { - state3.lineIndent += 1; - state3.position += 1; - } - while (state3.position < state3.length - 1) { - readDocument(state3); - } - return state3.documents; -} -__name(loadDocuments, "loadDocuments"); -function loadAll$1(input, iterator2, options) { - if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { - options = iterator2; - iterator2 = null; - } - var documents = loadDocuments(input, options); - if (typeof iterator2 !== "function") { - return documents; - } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator2(documents[index]); - } -} -__name(loadAll$1, "loadAll$1"); -function load$1(input, options) { - var documents = loadDocuments(input, options); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception("expected a single document in the stream, but found more"); -} -__name(load$1, "load$1"); -var loadAll_1 = loadAll$1; -var load_1 = load$1; -var loader = { - loadAll: loadAll_1, - load: load_1 -}; -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(schema3, map2) { - var result, keys, index, length, tag, style, type2; - if (map2 === null) return {}; - result = {}; - keys = Object.keys(map2); - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map2[tag]); - if (tag.slice(0, 2) === "!!") { - tag = "tag:yaml.org,2002:" + tag.slice(2); - } - type2 = schema3.compiledTypeMap["fallback"][tag]; - if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) { - style = type2.styleAliases[style]; - } - result[tag] = style; - } - return result; -} -__name(compileStyleMap, "compileStyleMap"); -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 exception("code point within a string may not be greater than 0xFFFFFFFF"); - } - return "\\" + handle + common.repeat("0", length - string.length) + string; -} -__name(encodeHex, "encodeHex"); -var QUOTING_TYPE_SINGLE = 1; -var QUOTING_TYPE_DOUBLE = 2; -function State(options) { - this.schema = options["schema"] || _default; - 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; -} -__name(State, "State"); -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; + __name(compileStyleMap, "compileStyleMap"); + function encodeHex(character) { + let handle; + let length; + const 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 YAMLException2("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + __name(encodeHex, "encodeHex"); + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA2; + 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; + } + __name(State, "State"); + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const 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; } - if (line.length && line !== "\n") result += ind; - result += line; + return result; } - return result; -} -__name(indentString, "indentString"); -function generateNextLine(state3, level) { - return "\n" + common.repeat(" ", state3.indent * level); -} -__name(generateNextLine, "generateNextLine"); -function testImplicitResolving(state3, str2) { - var index, length, type2; - for (index = 0, length = state3.implicitTypes.length; index < length; index += 1) { - type2 = state3.implicitTypes[index]; - if (type2.resolve(str2)) { - return true; - } + __name(indentString, "indentString"); + function generateNextLine(state3, level) { + return "\n" + common.repeat(" ", state3.indent * level); } - return false; -} -__name(testImplicitResolving, "testImplicitResolving"); -function isWhitespace(c3) { - return c3 === CHAR_SPACE || c3 === CHAR_TAB; -} -__name(isWhitespace, "isWhitespace"); -function isPrintable(c3) { - return 32 <= c3 && c3 <= 126 || 161 <= c3 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || 57344 <= c3 && c3 <= 65533 && - c3 !== CHAR_BOM || 65536 <= c3 && c3 <= 1114111; -} -__name(isPrintable, "isPrintable"); -function isNsCharOrWhitespace(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; -} -__name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); -function isPlainSafe(c3, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); - return ( - // ns-plain-safe - (inblock ? ( - // c = flow-in - cIsNsCharOrWhitespace - ) : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && - c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || - isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar - ); -} -__name(isPlainSafe, "isPlainSafe"); -function isPlainSafeFirst(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== CHAR_COLON && - c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && - c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && - c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && - c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; -} -__name(isPlainSafeFirst, "isPlainSafeFirst"); -function isPlainSafeLast(c3) { - return !isWhitespace(c3) && c3 !== CHAR_COLON; -} -__name(isPlainSafeLast, "isPlainSafeLast"); -function codePointAt(string, pos) { - var first2 = string.charCodeAt(pos), second; - if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -} -__name(codePointAt, "codePointAt"); -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} -__name(needIndentIndicator, "needIndentIndicator"); -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 i2; - 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 (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + __name(generateNextLine, "generateNextLine"); + function testImplicitResolving(state3, str) { + for (let index = 0, length = state3.implicitTypes.length; index < length; index += 1) if (state3.implicitTypes[index]. + resolve(str)) return true; + return false; + } + __name(testImplicitResolving, "testImplicitResolving"); + function isWhitespace(c3) { + return c3 === CHAR_SPACE || c3 === CHAR_TAB; + } + __name(isWhitespace, "isWhitespace"); + function isPrintable(c3) { + return c3 >= 32 && c3 <= 126 || c3 >= 161 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || c3 >= 57344 && c3 <= 65533 && + c3 !== CHAR_BOM || c3 >= 65536 && c3 <= 1114111; + } + __name(isPrintable, "isPrintable"); + function isNsCharOrWhitespace(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; + } + __name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); + function isPlainSafe(c3, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && + c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && + !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === + CHAR_COLON && cIsNsChar; + } + __name(isPlainSafe, "isPlainSafe"); + function isPlainSafeFirst(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== + CHAR_COLON && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && + c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && + c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && + c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; + } + __name(isPlainSafeFirst, "isPlainSafeFirst"); + function isPlainSafeLast(c3) { + return !isWhitespace(c3) && c3 !== CHAR_COLON; + } + __name(isPlainSafeLast, "isPlainSafeLast"); + function codePointAt(string, pos) { + const first2 = string.charCodeAt(pos); + let second; + if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first2 - 55296) * 1024 + second - 56320 + 65536; + } + return first2; + } + __name(codePointAt, "codePointAt"); + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + __name(needIndentIndicator, "needIndentIndicator"); + 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) { + let i2; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { char = codePointAt(string, i2); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. - i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; - previousLineBreak = i2; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } + if (!isPrintable(char)) return STYLE_DOUBLE; plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } - hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + - 1] !== " "); - } - if (!hasLineBreak && !hasFoldableLine) { - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } + else { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== + " "; + previousLineBreak = i2; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i2 - 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; } - 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; -} -__name(chooseScalarStyle, "chooseScalarStyle"); -function writeScalar(state3, string, level, iskey, inblock) { - state3.dump = (function() { - if (string.length === 0) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state3.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; - } - } - var indent = state3.indent * Math.max(1, level); - var lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); - var singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; - function testAmbiguity(string2) { - return testImplicitResolving(state3, string2); - } - __name(testAmbiguity, "testAmbiguity"); - switch (chooseScalarStyle( - string, - singleLineOnly, - state3.indent, - lineWidth, - testAmbiguity, - state3.quotingType, - state3.forceQuotes && !iskey, - inblock - )) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception("impossible error: invalid scalar style"); - } - })(); -} -__name(writeScalar, "writeScalar"); -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"; -} -__name(blockHeader, "blockHeader"); -function dropEndingNewline(string) { - return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; -} -__name(dropEndingNewline, "dropEndingNewline"); -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 prefix2 = match2[1], line = match2[2]; - moreIndented = line[0] === " "; - result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); - prevMoreIndented = moreIndented; + __name(chooseScalarStyle, "chooseScalarStyle"); + function writeScalar(state3, string, level, iskey, inblock) { + state3.dump = (function() { + if (string.length === 0) return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + if (!state3.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state3.quotingType === + QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + const indent = state3.indent * Math.max(1, level); + const lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); + const singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state3, string2); + } + __name(testAmbiguity, "testAmbiguity"); + switch (chooseScalarStyle(string, singleLineOnly, state3.indent, lineWidth, testAmbiguity, state3.quotingType, state3. + forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), + indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException2("impossible error: invalid scalar style"); + } + })(); } - return result; -} -__name(foldString, "foldString"); -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); -} -__name(foldLine, "foldLine"); -function escapeString(string) { - var result = ""; - var char = 0; - var escapeSeq; - for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - escapeSeq = ESCAPE_SEQUENCES[char]; - if (!escapeSeq && isPrintable(char)) { - result += string[i2]; - if (char >= 65536) result += string[i2 + 1]; - } else { - result += escapeSeq || encodeHex(char); + __name(writeScalar, "writeScalar"); + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + + "\n"; + } + __name(blockHeader, "blockHeader"); + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + __name(dropEndingNewline, "dropEndingNewline"); + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = (function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + })(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match2; + while (match2 = lineRe.exec(string)) { + const prefix2 = match2[1]; + const line = match2[2]; + moreIndented = line[0] === " "; + result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; } + return result; } - return result; -} -__name(escapeString, "escapeString"); -function writeFlowSequence(state3, level, object) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, false, - false)) { - if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); - _result += state3.dump; - } - } - state3.tag = _tag; - state3.dump = "[" + _result + "]"; -} -__name(writeFlowSequence, "writeFlowSequence"); -function writeBlockSequence(state3, level, object, compact) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, - level + 1, null, true, true, false, true)) { - if (!compact || _result !== "") { - _result += generateNextLine(state3, level); - } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - _result += "-"; - } else { - _result += "- "; - } - _result += state3.dump; + __name(foldString, "foldString"); + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match2; + let start = 0; + let end; + let curr = 0; + let next = 0; + let 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); + } + __name(foldLine, "foldLine"); + function escapeString(string) { + let result = ""; + let char = 0; + for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i2]; + if (char >= 65536) result += string[i2 + 1]; + } else result += escapeSeq || encodeHex(char); } + return result; } - state3.tag = _tag; - state3.dump = _result || "[]"; -} -__name(writeBlockSequence, "writeBlockSequence"); -function writeFlowMapping(state3, level, object) { - var _result = "", _tag = state3.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 (state3.condenseFlow) pairBuffer += '"'; - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level, objectKey, false, false)) { - continue; - } - if (state3.dump.length > 1024) pairBuffer += "? "; - pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); - if (!writeNode(state3, level, objectValue, false, false)) { - continue; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = "{" + _result + "}"; -} -__name(writeFlowMapping, "writeFlowMapping"); -function writeBlockMapping(state3, level, object, compact) { - var _result = "", _tag = state3.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, - pairBuffer; - if (state3.sortKeys === true) { - objectKeyList.sort(); - } else if (typeof state3.sortKeys === "function") { - objectKeyList.sort(state3.sortKeys); - } else if (state3.sortKeys) { - throw new exception("sortKeys must be a boolean or a function"); - } - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ""; - if (!compact || _result !== "") { - pairBuffer += generateNextLine(state3, level); - } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level + 1, objectKey, true, true, true)) { - continue; + __name(escapeString, "escapeString"); + function writeFlowSequence(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, + false, false)) { + if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); + _result += state3.dump; + } } - explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; - if (explicitPair) { - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += "?"; - } else { - pairBuffer += "? "; + state3.tag = _tag; + state3.dump = "[" + _result + "]"; + } + __name(writeFlowSequence, "writeFlowSequence"); + function writeBlockSequence(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, + level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") _result += generateNextLine(state3, level); + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state3.dump; } } - pairBuffer += state3.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state3, level); + state3.tag = _tag; + state3.dump = _result || "[]"; + } + __name(writeBlockSequence, "writeBlockSequence"); + function writeFlowMapping(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state3.condenseFlow) pairBuffer += '"'; + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level, objectKey, false, false)) continue; + if (state3.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); + if (!writeNode(state3, level, objectValue, false, false)) continue; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) { - continue; + state3.tag = _tag; + state3.dump = "{" + _result + "}"; + } + __name(writeFlowMapping, "writeFlowMapping"); + function writeBlockMapping(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + if (state3.sortKeys === true) objectKeyList.sort(); + else if (typeof state3.sortKeys === "function") objectKeyList.sort(state3.sortKeys); + else if (state3.sortKeys) throw new YAMLException2("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state3, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level + 1, objectKey, true, true, true)) continue; + const explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; + if (explicitPair) if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state3.dump; + if (explicitPair) pairBuffer += generateNextLine(state3, level); + if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) continue; + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += ":"; - } else { - pairBuffer += ": "; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = _result || "{}"; -} -__name(writeBlockMapping, "writeBlockMapping"); -function detectType(state3, object, explicit) { - var _result, typeList, index, length, type2, style; - typeList = explicit ? state3.explicitTypes : state3.implicitTypes; - for (index = 0, length = typeList.length; index < length; index += 1) { - type2 = typeList[index]; - if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2. - instanceOf) && (!type2.predicate || type2.predicate(object))) { - if (explicit) { - if (type2.multi && type2.representName) { - state3.tag = type2.representName(object); - } else { - state3.tag = type2.tag; - } - } else { - state3.tag = "?"; - } - if (type2.represent) { - style = state3.styleMap[type2.tag] || type2.defaultStyle; - if (_toString.call(type2.represent) === "[object Function]") { - _result = type2.represent(object, style); - } else if (_hasOwnProperty.call(type2.represent, style)) { - _result = type2.represent[style](object, style); - } else { - throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); + state3.tag = _tag; + state3.dump = _result || "{}"; + } + __name(writeBlockMapping, "writeBlockMapping"); + function detectType(state3, object, explicit) { + const typeList = explicit ? state3.explicitTypes : state3.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const 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) state3.tag = type.representName(object); + else state3.tag = type.tag; + else state3.tag = "?"; + if (type.represent) { + const style = state3.styleMap[type.tag] || type.defaultStyle; + let _result; + 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 YAMLException2("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + state3.dump = _result; } - state3.dump = _result; + return true; } - return true; } + return false; } - return false; -} -__name(detectType, "detectType"); -function writeNode(state3, level, object, block, compact, iskey, isblockseq) { - state3.tag = null; - state3.dump = object; - if (!detectType(state3, object, false)) { - detectType(state3, object, true); - } - var type2 = _toString.call(state3.dump); - var inblock = block; - var tagStr; - if (block) { - block = state3.flowLevel < 0 || state3.flowLevel > level; - } - var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate; - if (objectOrArray) { - duplicateIndex = state3.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) { - compact = false; - } - if (duplicate && state3.usedDuplicates[duplicateIndex]) { - state3.dump = "*ref_" + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) { - state3.usedDuplicates[duplicateIndex] = true; - } - if (type2 === "[object Object]") { - if (block && Object.keys(state3.dump).length !== 0) { + __name(detectType, "detectType"); + function writeNode(state3, level, object, block, compact, iskey, isblockseq) { + state3.tag = null; + state3.dump = object; + if (!detectType(state3, object, false)) detectType(state3, object, true); + const type = _toString.call(state3.dump); + const inblock = block; + if (block) block = state3.flowLevel < 0 || state3.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let duplicate; + if (objectOrArray) { + duplicateIndex = state3.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) compact = false; + if (duplicate && state3.usedDuplicates[duplicateIndex]) state3.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) state3.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state3.dump).length !== 0) { writeBlockMapping(state3, level, state3.dump, compact); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowMapping(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object Array]") { - if (block && state3.dump.length !== 0) { - if (state3.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state3, level - 1, state3.dump, compact); - } else { - writeBlockSequence(state3, level, state3.dump, compact); - } - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + else if (type === "[object Array]") if (block && state3.dump.length !== 0) { + if (state3.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state3, level - 1, state3.dump, compact); + else writeBlockSequence(state3, level, state3.dump, compact); + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowSequence(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object String]") { - if (state3.tag !== "?") { - writeScalar(state3, state3.dump, level, iskey, inblock); + else if (type === "[object String]") { + if (state3.tag !== "?") writeScalar(state3, state3.dump, level, iskey, inblock); + } else if (type === "[object Undefined]") return false; + else { + if (state3.skipInvalid) return false; + throw new YAMLException2("unacceptable kind of an object to dump " + type); } - } else if (type2 === "[object Undefined]") { - return false; - } else { - if (state3.skipInvalid) return false; - throw new exception("unacceptable kind of an object to dump " + type2); - } - if (state3.tag !== null && state3.tag !== "?") { - tagStr = encodeURI( - state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag - ).replace(/!/g, "%21"); - if (state3.tag[0] === "!") { - tagStr = "!" + tagStr; - } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { - tagStr = "!!" + tagStr.slice(18); - } else { - tagStr = "!<" + tagStr + ">"; + if (state3.tag !== null && state3.tag !== "?") { + let tagStr = encodeURI(state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag).replace(/!/g, "%21"); + if (state3.tag[0] === "!") tagStr = "!" + tagStr; + else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18); + else tagStr = "!<" + tagStr + ">"; + state3.dump = tagStr + " " + state3.dump; } - state3.dump = tagStr + " " + state3.dump; } + return true; } - return true; -} -__name(writeNode, "writeNode"); -function getDuplicateReferences(object, state3) { - var objects = [], duplicatesIndexes = [], index, length; - inspectNode(object, objects, duplicatesIndexes); - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state3.duplicates.push(objects[duplicatesIndexes[index]]); - } - state3.usedDuplicates = new Array(length); -} -__name(getDuplicateReferences, "getDuplicateReferences"); -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); - } + __name(writeNode, "writeNode"); + function getDuplicateReferences(object, state3) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state3.duplicates.push(objects[duplicatesIndexes[index]]); + state3.usedDuplicates = new Array(length); + } + __name(getDuplicateReferences, "getDuplicateReferences"); + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + objects.push(object); + if (Array.isArray(object)) for (let i2 = 0, length = object.length; i2 < length; i2 += 1) inspectNode(object[i2], + objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) inspectNode(object[objectKeyList[i2]], objects, + duplicatesIndexes); } } } } -} -__name(inspectNode, "inspectNode"); -function dump$1(input, options) { - options = options || {}; - var state3 = new State(options); - if (!state3.noRefs) getDuplicateReferences(input, state3); - var value = input; - if (state3.replacer) { - value = state3.replacer.call({ "": value }, "", value); + __name(inspectNode, "inspectNode"); + function dump2(input, options) { + options = options || {}; + const state3 = new State(options); + if (!state3.noRefs) getDuplicateReferences(input, state3); + let value = input; + if (state3.replacer) value = state3.replacer.call({ "": value }, "", value); + if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; + return ""; } - if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; - return ""; -} -__name(dump$1, "dump$1"); -var dump_1 = dump$1; -var dumper = { - dump: dump_1 -}; -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."); + __name(dump2, "dump"); + module2.exports.dump = dump2; +})); +var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var loader = 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 saf\ +e by default."); + }; + } + __name(renamed, "renamed"); + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.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() }; -} -__name(renamed, "renamed"); -var Type = type; -var Schema = schema; -var FAILSAFE_SCHEMA = failsafe; -var JSON_SCHEMA = json; -var CORE_SCHEMA = core; -var DEFAULT_SCHEMA = _default; -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var YAMLException = exception; -var types = { - binary, - float, - map, - null: _null, - pairs, - set, - timestamp, - bool, - int, - merge: merge2, - omap, - seq, - str -}; -var safeLoad = renamed("safeLoad", "load"); -var safeLoadAll = renamed("safeLoadAll", "loadAll"); -var safeDump = renamed("safeDump", "dump"); -var jsYaml = { - Type, - Schema, - FAILSAFE_SCHEMA, - JSON_SCHEMA, - CORE_SCHEMA, - DEFAULT_SCHEMA, - load, - loadAll, - dump, - YAMLException, - types, - safeLoad, - safeLoadAll, - safeDump -}; + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); +})))(), 1); +var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, +safeLoad, safeLoadAll, safeDump } = import_js_yaml.default; +var index_vite_proxy_tmp_default = import_js_yaml.default; // external-events/src/utils/load-sync-definitions.js function loadDefinition(path17) { info(`Loading ${path17} config file`); - return jsYaml.load((0, import_fs2.readFileSync)(path17, "utf-8"), { filename: path17 }); + return index_vite_proxy_tmp_default.load((0, import_fs2.readFileSync)(path17, "utf-8"), { filename: path17 }); } __name(loadDefinition, "loadDefinition"); function validateSystemPrefixUnique(defs) { @@ -82686,10 +82466,10 @@ __name(getServiceAccountEmailAndProject, "getServiceAccountEmailAndProject"); async function authenticateGcloud(credentials, exportCredentials) { setSecret(credentials); const jsonCredentials = parseCredentials(credentials); - const { type: type2, email } = validateCredentialsShape(jsonCredentials); + const { type, email } = validateCredentialsShape(jsonCredentials); const { project_id: projectId } = jsonCredentials; const authEntry = { - type: type2, + type, email, projectId, exportCredentials, @@ -83185,26 +82965,26 @@ t not contain globs.`); } else if (c3 === "*" || c3 === "?") { return ""; } else if (c3 === "[" && i2 + 1 < segment.length) { - let set2 = ""; + let set = ""; let closed = -1; for (let i22 = i2 + 1; i22 < segment.length; i22++) { const c22 = segment[i22]; if (c22 === "\\" && !IS_WINDOWS7 && i22 + 1 < segment.length) { - set2 += segment[++i22]; + set += segment[++i22]; continue; } else if (c22 === "]") { closed = i22; break; } else { - set2 += c22; + set += c22; } } if (closed >= 0) { - if (set2.length > 1) { + if (set.length > 1) { return ""; } - if (set2) { - literal += set2; + if (set) { + literal += set; i2 = closed; continue; } @@ -83923,7 +83703,7 @@ function createDebugger(namespace) { destroy, log: debugObj.log, namespace, - extend: extend4 + extend: extend2 }); function debug3(...args) { if (!newDebugger.enabled) { @@ -83948,12 +83728,12 @@ function destroy() { return false; } __name(destroy, "destroy"); -function extend4(namespace) { +function extend2(namespace) { const newDebugger = createDebugger(`${this.namespace}:${namespace}`); newDebugger.log = this.log; return newDebugger; } -__name(extend4, "extend"); +__name(extend2, "extend"); var debug_default = debugObj; // node_modules/@typespec/ts-http-runtime/dist/esm/logger/logger.js @@ -84059,8 +83839,8 @@ function normalizeName(name) { return name.toLowerCase(); } __name(normalizeName, "normalizeName"); -function* headerIterator(map2) { - for (const entry of map2.values()) { +function* headerIterator(map) { + for (const entry of map.values()) { yield [entry.name, entry.value]; } } @@ -84391,15 +84171,15 @@ function createEmptyPipeline() { __name(createEmptyPipeline, "createEmptyPipeline"); // node_modules/@typespec/ts-http-runtime/dist/esm/util/object.js -function isObject5(input) { +function isObject4(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } -__name(isObject5, "isObject"); +__name(isObject4, "isObject"); // node_modules/@typespec/ts-http-runtime/dist/esm/util/error.js function isError(e) { - if (isObject5(e)) { + if (isObject4(e)) { const hasName = typeof e.name === "string"; const hasMessage = typeof e.message === "string"; return hasName && hasMessage; @@ -84495,7 +84275,7 @@ var Sanitizer = class { return void 0; } else if (key === "operationSpec") { return void 0; - } else if (Array.isArray(value) || isObject5(value)) { + } else if (Array.isArray(value) || isObject4(value)) { if (seen.has(value)) { return "[Circular]"; } @@ -85469,9 +85249,9 @@ function getDefaultProxySettings(proxyUrl) { } } const parsedUrl = new URL(proxyUrl); - const schema3 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + const schema2 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { - host: schema3 + parsedUrl.hostname, + host: schema2 + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password @@ -85788,16 +85568,16 @@ function getHeaderName2() { return "User-Agent"; } __name(getHeaderName2, "getHeaderName"); -async function setPlatformSpecificData2(map2) { +async function setPlatformSpecificData2(map) { if (import_node_process2.default && import_node_process2.default.versions) { const osInfo = `${import_node_os3.default.type()} ${import_node_os3.default.release()}; ${import_node_os3.default.arch()}`; const versions = import_node_process2.default.versions; if (versions.bun) { - map2.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { - map2.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { - map2.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", `${versions.node} (${osInfo})`); } } } @@ -87026,12 +86806,12 @@ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } __name(createSerializer, "createSerializer"); -function trimEnd(str2, ch) { - let len = str2.length; - while (len - 1 >= 0 && str2[len - 1] === ch) { +function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { --len; } - return str2.substr(0, len); + return str.substr(0, len); } __name(trimEnd, "trimEnd"); function bufferToBase64Url(buffer3) { @@ -87041,19 +86821,19 @@ function bufferToBase64Url(buffer3) { if (!(buffer3 instanceof Uint8Array)) { throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); } - const str2 = encodeByteArray(buffer3); - return trimEnd(str2, "=").replace(/\+/g, "-").replace(/\//g, "_"); + const str = encodeByteArray(buffer3); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } __name(bufferToBase64Url, "bufferToBase64Url"); -function base64UrlToByteArray(str2) { - if (!str2) { +function base64UrlToByteArray(str) { + if (!str) { return void 0; } - if (str2 && typeof str2.valueOf() !== "string") { + if (str && typeof str.valueOf() !== "string") { throw new Error("Please provide an input of type string for converting to Uint8Array"); } - str2 = str2.replace(/-/g, "+").replace(/_/g, "/"); - return decodeString(str2); + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return decodeString(str); } __name(base64UrlToByteArray, "base64UrlToByteArray"); function splitSerializeName(prop) { @@ -88207,8 +87987,8 @@ function simpleParseQueryParams(queryString) { return result; } queryString = queryString.slice(1); - const pairs2 = queryString.split("&"); - for (const pair of pairs2) { + const pairs = queryString.split("&"); + for (const pair of pairs) { const [name, value] = pair.split("=", 2); const existingValue = result.get(name); if (existingValue) { @@ -90411,10 +90191,10 @@ function validateEntityName(name) { __name(validateEntityName, "validateEntityName"); function mergeEntityMaps(...maps) { const out = /* @__PURE__ */ Object.create(null); - for (const map2 of maps) { - if (!map2) continue; - for (const key of Object.keys(map2)) { - const raw = map2[key]; + for (const map of maps) { + if (!map) continue; + for (const key of Object.keys(map)) { + const raw = map[key]; if (typeof raw === "string") { out[key] = raw; } else if (raw && typeof raw === "object" && raw.val !== void 0) { @@ -90510,13 +90290,13 @@ var EntityDecoder = class { * All keys are validated — throws on invalid characters. * @param {Record} map */ - setExternalEntities(map2) { - if (map2) { - for (const key of Object.keys(map2)) { + setExternalEntities(map) { + if (map) { + for (const key of Object.keys(map)) { validateEntityName(key); } } - this._externalMap = mergeEntityMaps(map2); + this._externalMap = mergeEntityMaps(map); } /** * Add a single persistent external entity. @@ -90537,10 +90317,10 @@ var EntityDecoder = class { * Also resets per-document expansion counters. * @param {Record} map */ - addInputEntities(map2) { + addInputEntities(map) { this._totalExpansions = 0; this._expandedLength = 0; - this._inputMap = mergeEntityMaps(map2); + this._inputMap = mergeEntityMaps(map); } // ------------------------------------------------------------------------- // Per-document reset @@ -90576,28 +90356,28 @@ var EntityDecoder = class { * @param {string} str * @returns {string} */ - decode(str2) { - if (typeof str2 !== "string" || str2.length === 0) return str2; - const original = str2; + decode(str) { + if (typeof str !== "string" || str.length === 0) return str; + const original = str; const chunks = []; - const len = str2.length; + const len = str.length; let last2 = 0; let i2 = 0; const limitExpansions = this._maxTotalExpansions > 0; const limitLength = this._maxExpandedLength > 0; const checkLimits = limitExpansions || limitLength; while (i2 < len) { - if (str2.charCodeAt(i2) !== 38) { + if (str.charCodeAt(i2) !== 38) { i2++; continue; } let j = i2 + 1; - while (j < len && str2.charCodeAt(j) !== 59 && j - i2 <= 32) j++; - if (j >= len || str2.charCodeAt(j) !== 59) { + while (j < len && str.charCodeAt(j) !== 59 && j - i2 <= 32) j++; + if (j >= len || str.charCodeAt(j) !== 59) { i2++; continue; } - const token = str2.slice(i2 + 1, j); + const token = str.slice(i2 + 1, j); if (token.length === 0) { i2++; continue; @@ -90629,7 +90409,7 @@ var EntityDecoder = class { i2++; continue; } - if (i2 > last2) chunks.push(str2.slice(last2, i2)); + if (i2 > last2) chunks.push(str.slice(last2, i2)); chunks.push(replacement); last2 = j + 1; i2 = last2; @@ -90655,8 +90435,8 @@ var EntityDecoder = class { } } } - if (last2 < len) chunks.push(str2.slice(last2)); - const result = chunks.length === 0 ? str2 : chunks.join(""); + if (last2 < len) chunks.push(str.slice(last2)); + const result = chunks.length === 0 ? str : chunks.join(""); return this._postCheck(result, original); } // ------------------------------------------------------------------------- @@ -91078,7 +90858,7 @@ var DocTypeReader = class { } return { notationName, publicIdentifier, systemIdentifier, index: --i2 }; } - readIdentifierVal(xmlData, i2, type2) { + readIdentifierVal(xmlData, i2, type) { let identifierVal = ""; const startChar = xmlData[i2]; if (startChar !== '"' && startChar !== "'") { @@ -91091,7 +90871,7 @@ var DocTypeReader = class { } identifierVal = xmlData.substring(startIndex, i2); if (xmlData[i2] !== startChar) { - throw new Error(`Unterminated ${type2} value`); + throw new Error(`Unterminated ${type} value`); } i2++; return [i2, identifierVal]; @@ -91215,9 +90995,9 @@ var skipWhitespace = /* @__PURE__ */ __name((data, index) => { } return index; }, "skipWhitespace"); -function hasSeq(data, seq2, i2) { - for (let j = 0; j < seq2.length; j++) { - if (seq2[j] !== data[i2 + j + 1]) return false; +function hasSeq(data, seq, i2) { + for (let j = 0; j < seq.length; j++) { + if (seq[j] !== data[i2 + j + 1]) return false; } return true; } @@ -91243,19 +91023,19 @@ var consider = { infinity: "original" // "null", "infinity" (Infinity type), "string" ("Infinity" (the string literal)) }; -function toNumber2(str2, options = {}) { +function toNumber2(str, options = {}) { options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (trimmedStr.length === 0) return str2; - else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; + if (!str || typeof str !== "string") return str; + let trimmedStr = str.trim(); + if (trimmedStr.length === 0) return str; + else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; else if (trimmedStr === "0") return 0; else if (options.hex && hexRegex.test(trimmedStr)) { return parse_int(trimmedStr, 16); } else if (!isFinite(trimmedStr)) { - return handleInfinity(str2, Number(trimmedStr), options); + return handleInfinity(str, Number(trimmedStr), options); } else if (trimmedStr.includes("e") || trimmedStr.includes("E")) { - return resolveEnotation(str2, trimmedStr, options); + return resolveEnotation(str, trimmedStr, options); } else { const match2 = numRegex.exec(trimmedStr); if (match2) { @@ -91264,39 +91044,39 @@ function toNumber2(str2, options = {}) { let numTrimmedByZeros = trimZeros(match2[3]); const decimalAdjacentToLeadingZeros = sign ? ( // 0., -00., 000. - str2[leadingZeros.length + 1] === "." - ) : str2[leadingZeros.length] === "."; + str[leadingZeros.length + 1] === "." + ) : str[leadingZeros.length] === "."; if (!options.leadingZeros && (leadingZeros.length > 1 || leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros)) { - return str2; + return str; } else { const num = Number(trimmedStr); const parsedStr = String(num); if (num === 0) return num; if (parsedStr.search(/[eE]/) !== -1) { if (options.eNotation) return num; - else return str2; + else return str; } else if (trimmedStr.indexOf(".") !== -1) { if (parsedStr === "0") return num; else if (parsedStr === numTrimmedByZeros) return num; else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num; - else return str2; + else return str; } let n = leadingZeros ? numTrimmedByZeros : trimmedStr; if (leadingZeros) { - return n === parsedStr || sign + n === parsedStr ? num : str2; + return n === parsedStr || sign + n === parsedStr ? num : str; } else { - return n === parsedStr || n === sign + parsedStr ? num : str2; + return n === parsedStr || n === sign + parsedStr ? num : str; } } } else { - return str2; + return str; } } } __name(toNumber2, "toNumber"); var eNotationRegx = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; -function resolveEnotation(str2, trimmedStr, options) { - if (!options.eNotation) return str2; +function resolveEnotation(str, trimmedStr, options) { + if (!options.eNotation) return str; const notation = trimmedStr.match(eNotationRegx); if (notation) { let sign = notation[1] || ""; @@ -91304,21 +91084,21 @@ function resolveEnotation(str2, trimmedStr, options) { const leadingZeros = notation[2]; const eAdjacentToLeadingZeros = sign ? ( // 0E. - str2[leadingZeros.length + 1] === eChar - ) : str2[leadingZeros.length] === eChar; - if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str2; + str[leadingZeros.length + 1] === eChar + ) : str[leadingZeros.length] === eChar; + if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str; else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) { return Number(trimmedStr); } else if (leadingZeros.length > 0) { if (options.leadingZeros && !eAdjacentToLeadingZeros) { trimmedStr = (notation[1] || "") + notation[3]; return Number(trimmedStr); - } else return str2; + } else return str; } else { return Number(trimmedStr); } } else { - return str2; + return str; } } __name(resolveEnotation, "resolveEnotation"); @@ -91340,7 +91120,7 @@ function parse_int(numStr, base) { else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); } __name(parse_int, "parse_int"); -function handleInfinity(str2, num, options) { +function handleInfinity(str, num, options) { const isPositive = num === Infinity; switch (options.infinity.toLowerCase()) { case "null": @@ -91352,7 +91132,7 @@ function handleInfinity(str2, num, options) { return isPositive ? "Infinity" : "-Infinity"; case "original": default: - return str2; + return str; } } __name(handleInfinity, "handleInfinity"); @@ -92125,7 +91905,7 @@ var Matcher = class { snapshot() { return { path: this.path.map((node) => ({ ...node })), - siblingStacks: this.siblingStacks.map((map2) => new Map(map2)) + siblingStacks: this.siblingStacks.map((map) => new Map(map)) }; } /** @@ -92135,7 +91915,7 @@ var Matcher = class { restore(snapshot2) { this._pathStringCache = null; this.path = snapshot2.path.map((node) => ({ ...node })); - this.siblingStacks = snapshot2.siblingStacks.map((map2) => new Map(map2)); + this.siblingStacks = snapshot2.siblingStacks.map((map) => new Map(map)); } /** * Return the read-only {@link MatcherView} for this matcher. @@ -92636,12 +92416,12 @@ function tagExpWithClosingIndex(xmlData, i2, closingChar = ">") { } } __name(tagExpWithClosingIndex, "tagExpWithClosingIndex"); -function findClosingIndex(xmlData, str2, i2, errMsg) { - const closingIndex = xmlData.indexOf(str2, i2); +function findClosingIndex(xmlData, str, i2, errMsg) { + const closingIndex = xmlData.indexOf(str, i2); if (closingIndex === -1) { throw new Error(errMsg); } else { - return closingIndex + str2.length - 1; + return closingIndex + str.length - 1; } } __name(findClosingIndex, "findClosingIndex"); @@ -93677,16 +93457,16 @@ function stringifyXML(obj, opts = {}) { return `${xmlData}`.replace(/\n/g, ""); } __name(stringifyXML, "stringifyXML"); -async function parseXML(str2, opts = {}) { - if (!str2) { +async function parseXML(str, opts = {}) { + if (!str) { throw new Error("Document is empty"); } - const validation = XMLValidator.validate(str2); + const validation = XMLValidator.validate(str); if (validation !== true) { throw validation; } const parser4 = new XMLParser(getParserOptions(opts)); - const parsedXml = parser4.parse(str2); + const parsedXml = parser4.parse(str); if (parsedXml["?xml"]) { delete parsedXml["?xml"]; } @@ -109631,11 +109411,11 @@ function generateBlockID(blockIDPrefix, blockIndex) { if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } - const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); return base64encode(res); } __name(generateBlockID, "generateBlockID"); -function padStart2(currentString, targetLength, padString = " ") { +function padStart(currentString, targetLength, padString = " ") { if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } @@ -109650,7 +109430,7 @@ function padStart2(currentString, targetLength, padString = " ") { return padString.slice(0, targetLength) + currentString; } } -__name(padStart2, "padStart"); +__name(padStart, "padStart"); function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } @@ -110764,14 +110544,14 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -110792,7 +110572,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -110816,14 +110596,14 @@ function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -110844,7 +110624,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", @@ -110870,14 +110650,14 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -110906,7 +110686,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -110931,14 +110711,14 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -110971,7 +110751,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -110996,14 +110776,14 @@ function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -111036,7 +110816,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -111063,14 +110843,14 @@ function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -111106,7 +110886,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -112049,9 +111829,9 @@ var AvroParser = class _AvroParser { const readPairMethod = /* @__PURE__ */ __name((s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }, "readPairMethod"); - const pairs2 = await _AvroParser.readArray(stream6, readPairMethod, options); + const pairs = await _AvroParser.readArray(stream6, readPairMethod, options); const dict = {}; - for (const pair of pairs2) { + for (const pair of pairs) { dict[pair.key] = pair.value; } return dict; @@ -112100,17 +111880,17 @@ var AvroType = class _AvroType { * Determines the AvroType from the Avro Schema. */ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema3) { - if (typeof schema3 === "string") { - return _AvroType.fromStringSchema(schema3); - } else if (Array.isArray(schema3)) { - return _AvroType.fromArraySchema(schema3); + static fromSchema(schema2) { + if (typeof schema2 === "string") { + return _AvroType.fromStringSchema(schema2); + } else if (Array.isArray(schema2)) { + return _AvroType.fromArraySchema(schema2); } else { - return _AvroType.fromObjectSchema(schema3); + return _AvroType.fromObjectSchema(schema2); } } - static fromStringSchema(schema3) { - switch (schema3) { + static fromStringSchema(schema2) { + switch (schema2) { case AvroPrimitive.NULL: case AvroPrimitive.BOOLEAN: case AvroPrimitive.INT: @@ -112119,55 +111899,55 @@ var AvroType = class _AvroType { case AvroPrimitive.DOUBLE: case AvroPrimitive.BYTES: case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema3); + return new AvroPrimitiveType(schema2); default: - throw new Error(`Unexpected Avro type ${schema3}`); + throw new Error(`Unexpected Avro type ${schema2}`); } } - static fromArraySchema(schema3) { - return new AvroUnionType(schema3.map(_AvroType.fromSchema)); + static fromArraySchema(schema2) { + return new AvroUnionType(schema2.map(_AvroType.fromSchema)); } - static fromObjectSchema(schema3) { - const type2 = schema3.type; + static fromObjectSchema(schema2) { + const type = schema2.type; try { - return _AvroType.fromStringSchema(type2); + return _AvroType.fromStringSchema(type); } catch { } - switch (type2) { + switch (type) { case AvroComplex.RECORD: - if (schema3.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema3}`); + if (schema2.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema2}`); } - if (!schema3.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema3}`); + if (!schema2.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema2}`); } const fields = {}; - if (!schema3.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema3}`); + if (!schema2.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema2}`); } - for (const field of schema3.fields) { + for (const field of schema2.fields) { fields[field.name] = _AvroType.fromSchema(field.type); } - return new AvroRecordType(fields, schema3.name); + return new AvroRecordType(fields, schema2.name); case AvroComplex.ENUM: - if (schema3.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema3}`); + if (schema2.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema2}`); } - if (!schema3.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema3}`); + if (!schema2.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema2}`); } - return new AvroEnumType(schema3.symbols); + return new AvroEnumType(schema2.symbols); case AvroComplex.MAP: - if (!schema3.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema3}`); + if (!schema2.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema2}`); } - return new AvroMapType(_AvroType.fromSchema(schema3.values)); + return new AvroMapType(_AvroType.fromSchema(schema2.values)); case AvroComplex.ARRAY: // Unused today case AvroComplex.FIXED: // Unused today default: - throw new Error(`Unexpected Avro type ${type2} in ${schema3}`); + throw new Error(`Unexpected Avro type ${type} in ${schema2}`); } } }; @@ -112339,8 +112119,8 @@ var AvroReader = class { this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema3 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema3); + const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } @@ -112521,11 +112301,11 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { break; } const obj = avroNext.value; - const schema3 = obj.$schema; - if (typeof schema3 !== "string") { + const schema2 = obj.$schema; + if (typeof schema2 !== "string") { throw Error("Missing schema in avro record."); } - switch (schema3) { + switch (schema2) { case "com.microsoft.azure.storage.queryBlobContents.resultData": { const data = obj.data; @@ -112585,7 +112365,7 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { } break; default: - throw Error(`Unknown schema ${schema3} in avro progress record.`); + throw Error(`Unknown schema ${schema2} in avro progress record.`); } } while (!avroNext.done && !this.avroPaused); } @@ -113427,7 +113207,7 @@ var update = /* @__PURE__ */ __name(async function update2(options = {}) { } return makeBlobBeginCopyFromURLPollOperation(state3); }, "update"); -var toString4 = /* @__PURE__ */ __name(function toString5() { +var toString3 = /* @__PURE__ */ __name(function toString4() { return JSON.stringify({ state: this.state }, (key, value) => { if (key === "blobClient") { return void 0; @@ -113439,7 +113219,7 @@ function makeBlobBeginCopyFromURLPollOperation(state3) { return { state: { ...state3 }, cancel, - toString: toString4, + toString: toString3, update }; } @@ -117169,8 +116949,8 @@ function getCacheApiUrl(resource) { return url3; } __name(getCacheApiUrl, "getCacheApiUrl"); -function createAcceptHeader(type2, apiVersion) { - return `${type2};api-version=${apiVersion}`; +function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } __name(createAcceptHeader, "createAcceptHeader"); function getRequestOptions() { @@ -118336,13 +118116,13 @@ function getTarPath() { } __name(getTarPath, "getTarPath"); function getTarArgs(tarPath_1, compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - switch (type2) { + switch (type) { case "create": args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "\ /"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "/"), "-P", "-C", workingDirectory. @@ -118371,14 +118151,14 @@ C", workingDirectory.replace(new RegExp(`\\${path14.sep}`, "g"), "/")); } __name(getTarArgs, "getTarArgs"); function getCommands(compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (compressionMethod, type, archivePath = "") { let args; const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); - const compressionArgs = type2 !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - if (BSD_TAR_ZSTD && type2 !== "create") { + if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; @@ -119130,8 +118910,8 @@ var accessSecretValue = /* @__PURE__ */ __name(async (projectId, name) => execGc ], "gcloud", true -).then(JSON.parse).then((json2) => json2.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), -"accessSecretValue"); +).then(JSON.parse).then((json) => json.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), "\ +accessSecretValue"); var loadSecret = /* @__PURE__ */ __name(async (serviceAccountKey, name) => with_gcloud_default(serviceAccountKey, async (projectId) => { const value = await accessSecretValue(projectId, name).then((secret) => { setSecret(secret); @@ -119154,7 +118934,7 @@ __name(loadSecrets, "loadSecrets"); // customer-config/src/validate/validate-ccc-config.js var import_joi = __toESM(require_lib5(), 1); -var schema2 = import_joi.default.object({ +var schema = import_joi.default.object({ version: import_joi.default.number().equal(1), "system-prefix": import_joi.default.string().regex(/^[a-z0-9]{3}$/).required(), definitions: import_joi.default.array().items( @@ -119180,7 +118960,7 @@ var schema2 = import_joi.default.object({ ).required() }); function validateCccConfig(data) { - const { error: error2 } = schema2.validate(data, { abortEarly: false }); + const { error: error2 } = schema.validate(data, { abortEarly: false }); if (!error2) { return []; } @@ -119310,5 +119090,5 @@ run-parallel/index.js: (*! run-parallel. MIT License. Feross Aboukhadijeh *) js-yaml/dist/js-yaml.mjs: - (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + (*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/external-events/dist/index.cjs b/external-events/dist/index.cjs index e16f09e21..ffb39660e 100644 --- a/external-events/dist/index.cjs +++ b/external-events/dist/index.cjs @@ -40,31 +40,31 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { + var type = typeof val; + if (type === "string" && val.length > 0) { return parse2(val); - } else if (type2 === "number" && isFinite(val)) { + } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse2(str2) { - str2 = String(str2); - if (str2.length > 100) { + function parse2(str) { + str = String(str); + if (str.length > 100) { return; } var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i. exec( - str2 + str ); if (!match2) { return; } var n = parseFloat(match2[1]); - var type2 = (match2[2] || "ms").toLowerCase(); - switch (type2) { + var type = (match2[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -221,7 +221,7 @@ var require_common = __commonJS({ debug3.namespace = namespace; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace); - debug3.extend = extend5; + debug3.extend = extend3; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, @@ -246,12 +246,12 @@ var require_common = __commonJS({ return debug3; } __name(createDebug, "createDebug"); - function extend5(namespace, delimiter4) { + function extend3(namespace, delimiter4) { const newDebug = createDebug(this.namespace + (typeof delimiter4 === "undefined" ? ":" : delimiter4) + namespace); newDebug.log = this.log; return newDebug; } - __name(extend5, "extend"); + __name(extend3, "extend"); function enable2(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; @@ -812,7 +812,7 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util8.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util8.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; @@ -867,8 +867,8 @@ var require_src2 = __commonJS({ } } __name(check, "check"); - function exists3(path17, type2 = exports2.READABLE) { - return check(path17, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0); + function exists3(path17, type = exports2.READABLE) { + return check(path17, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0); } __name(exists3, "exists"); exports2.exists = exists3; @@ -5503,12 +5503,12 @@ var require_data_url = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -5524,7 +5524,7 @@ var require_data_url = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -5661,28 +5661,28 @@ var require_data_url = __commonJS({ return char === 13 || char === 10 || char === 9 || char === 32; } __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); - function removeHTTPWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); } __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; } __name(isASCIIWhitespace, "isASCIIWhitespace"); - function removeASCIIWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isASCIIWhitespace); + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); } __name(removeASCIIWhitespace, "removeASCIIWhitespace"); - function removeChars(str2, leading, trailing, predicate) { + function removeChars(str, leading, trailing, predicate) { let lead = 0; - let trail = str2.length - 1; + let trail = str.length - 1; if (leading) { - while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; } if (trailing) { - while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; } - return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } __name(removeChars, "removeChars"); function isomorphicDecode(input) { @@ -5903,8 +5903,8 @@ var require_webidl = __commonJS({ return r2; }; webidl.util.Stringify = function(V) { - const type2 = webidl.util.Type(V); - switch (type2) { + const type = webidl.util.Type(V); + switch (type) { case "Symbol": return `Symbol(${V.description})`; case "Object": @@ -5924,7 +5924,7 @@ var require_webidl = __commonJS({ }); } const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq2 = []; + const seq = []; let index = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ @@ -5937,9 +5937,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq2.push(converter(value, prefix2, `${argument}[${index++}]`)); + seq.push(converter(value, prefix2, `${argument}[${index++}]`)); } - return seq2; + return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -5985,11 +5985,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix2, argument) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: prefix2, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -6339,8 +6339,8 @@ ption"); } } __name(appendRequestOriginHeader, "appendRequestOriginHeader"); - function coarsenTime(timestamp2, crossOriginIsolatedCapability) { - return timestamp2; + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; } __name(coarsenTime, "coarsenTime"); function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { @@ -7689,13 +7689,13 @@ var require_body = __commonJS({ let action6 = null; let source = null; let length = null; - let type2 = null; + let type = null; if (typeof object === "string") { source = object; - type2 = "text/plain;charset=UTF-8"; + type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (isArrayBuffer3(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { @@ -7704,8 +7704,8 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix2 = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = /* @__PURE__ */ __name((str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "\ -%22"), "escape"); + const escape2 = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%\ +22"), "escape"); const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinef\ eeds"); const blobParts = []; @@ -7751,12 +7751,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }, "action"); - type2 = `multipart/form-data; boundary=${boundary}`; + type = `multipart/form-data; boundary=${boundary}`; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { - type2 = object.type; + type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { @@ -7802,7 +7802,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } const body2 = { stream: stream6, source, length }; - return [body2, type2]; + return [body2, type]; } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { @@ -8098,14 +8098,14 @@ var require_client_h1 = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(delay5, type2) { - if (delay5 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + setTimeout(delay5, type) { + if (delay5 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { if (this.timeout) { timers.clearTimeout(this.timeout); this.timeout = null; } if (delay5) { - if (type2 & USE_FAST_TIMER) { + if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay5, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay5, new WeakRef(this)); @@ -8118,7 +8118,7 @@ var require_client_h1 = __commonJS({ this.timeout.refresh(); } } - this.timeoutType = type2; + this.timeoutType = type; } resume() { if (this.socket.destroyed || !this.paused) { @@ -9158,9 +9158,9 @@ var require_client_h2 = __commonJS({ this[kClient][kOnError](err); } __name(onHttp2SessionError, "onHttp2SessionError"); - function onHttp2FrameError(type2, code, id) { + function onHttp2FrameError(type, code, id) { if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -9352,8 +9352,8 @@ var require_client_h2 = __commonJS({ stream6.once("error", function(err) { abort(err); }); - stream6.once("frameError", (type2, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + stream6.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); return true; function writeBodyH2() { @@ -11750,7 +11750,7 @@ var require_readable = __commonJS({ return util8.isDisturbed(self2) || isLocked(self2); } __name(isUnusable, "isUnusable"); - async function consume(stream6, type2) { + async function consume(stream6, type) { assert4(!stream6[kConsume]); return new Promise((resolve2, reject) => { if (isUnusable(stream6)) { @@ -11767,7 +11767,7 @@ var require_readable = __commonJS({ } else { queueMicrotask(() => { stream6[kConsume] = { - type: type2, + type, stream: stream6, resolve: resolve2, reject, @@ -11843,17 +11843,17 @@ var require_readable = __commonJS({ } __name(chunksConcat, "chunksConcat"); function consumeEnd(consume2) { - const { type: type2, body: body2, resolve: resolve2, stream: stream6, length } = consume2; + const { type, body: body2, resolve: resolve2, stream: stream6, length } = consume2; try { - if (type2 === "text") { + if (type === "text") { resolve2(chunksDecode(body2, length)); - } else if (type2 === "json") { + } else if (type === "json") { resolve2(JSON.parse(chunksDecode(body2, length))); - } else if (type2 === "arrayBuffer") { + } else if (type === "arrayBuffer") { resolve2(chunksConcat(body2, length).buffer); - } else if (type2 === "blob") { + } else if (type === "blob") { resolve2(new Blob(body2, { type: stream6[kContentType] })); - } else if (type2 === "bytes") { + } else if (type === "bytes") { resolve2(chunksConcat(body2, length)); } consumeFinish(consume2); @@ -14045,10 +14045,10 @@ var require_dns = __commonJS({ return ip; } setRecords(origin2, addresses) { - const timestamp2 = Date.now(); + const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; for (const record of addresses) { - record.timestamp = timestamp2; + record.timestamp = timestamp; if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); } else { @@ -14728,8 +14728,8 @@ var require_response = __commonJS({ setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; if (body2 != null) { - const [extractedBody, type2] = extractBody(body2); - bodyWithType = { body: extractedBody, type: type2 }; + const [extractedBody, type] = extractBody(body2); + bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } @@ -14903,18 +14903,18 @@ var require_response = __commonJS({ }); } __name(makeFilteredResponse, "makeFilteredResponse"); - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -14922,7 +14922,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -16221,13 +16221,13 @@ processBodyError"); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type2 = blob.type; + const type = blob.type; if (!request.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; const rangeHeader = request.headersList.get("range", true); @@ -16247,7 +16247,7 @@ processBodyError"); rangeEnd = fullLength - 1; } } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type2); + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); const slicedBodyWithType = extractBody(slicedBlob); response.body = slicedBodyWithType[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); @@ -16255,7 +16255,7 @@ processBodyError"); response.status = 206; response.statusText = "Partial Content"; response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); response.headersList.set("content-range", contentRange, true); } return Promise.resolve(response); @@ -16924,10 +16924,10 @@ var require_progressevent = __commonJS({ static { __name(this, "ProgressEvent"); } - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2, "ProgressEvent constructor", "type"); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -17294,7 +17294,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException("Invalid state", "InvalidStateError"); } @@ -17329,7 +17329,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -17371,8 +17371,8 @@ var require_util4 = __commonJS({ reader.dispatchEvent(event); } __name(fireAProgressEvent, "fireAProgressEvent"); - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -17393,9 +17393,9 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { @@ -18814,9 +18814,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, "setCookie"); webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify(cookie); - if (str2) { - headers.append("Set-Cookie", str2); + const str = stringify(cookie); + if (str) { + headers.append("Set-Cookie", str); } } __name(setCookie, "setCookie"); @@ -18909,17 +18909,17 @@ var require_events = __commonJS({ __name(this, "MessageEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { - if (type2 === kConstruct) { + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { super(arguments[1], arguments[2]); webidl.util.markAsUncloneable(this); return; } const prefix2 = "MessageEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix2, "eventInitDict"); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -18946,10 +18946,10 @@ var require_events = __commonJS({ } return this.#eventInit.ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin2 = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -18959,8 +18959,8 @@ var require_events = __commonJS({ ports }); } - static createFastMessageEvent(type2, init) { - const messageEvent = new _MessageEvent(kConstruct, type2, init); + static createFastMessageEvent(type, init) { + const messageEvent = new _MessageEvent(kConstruct, type, init); messageEvent.#eventInit = init; messageEvent.#eventInit.data ??= null; messageEvent.#eventInit.origin ??= ""; @@ -18977,12 +18977,12 @@ var require_events = __commonJS({ __name(this, "CloseEvent"); } #eventInit; - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { const prefix2 = "CloseEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -19004,12 +19004,12 @@ var require_events = __commonJS({ __name(this, "ErrorEvent"); } #eventInit; - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { const prefix2 = "ErrorEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix2); - super(type2, eventInitDict); + super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type2 = webidl.converters.DOMString(type2, prefix2, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -19270,24 +19270,24 @@ var require_util7 = __commonJS({ return ws[kReadyState] === states.CLOSED; } __name(isClosed, "isClosed"); - function fireEvent(e, target, eventFactory = (type2, init) => new Event(type2, init), eventInitDict = {}) { + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { const event = eventFactory(e, eventInitDict); target.dispatchEvent(event); } __name(fireEvent, "fireEvent"); - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = utf8Decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -19353,7 +19353,7 @@ var require_util7 = __commonJS({ response.socket.destroy(); } if (reason) { - fireEvent("error", ws, (type2, init) => new ErrorEvent(type2, init), { + fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { error: new Error(reason), message: reason }); @@ -19675,7 +19675,7 @@ var require_connection = __commonJS({ code = 1006; } ws[kReadyState] = states.CLOSED; - fireEvent("close", ws, (type2, init) => new CloseEvent(type2, init), { + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { wasClean, code, reason @@ -20461,12 +20461,12 @@ ons"); webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } /** @@ -22173,8 +22173,8 @@ var require_truncate = __commonJS({ } return version3.format(); }, "doTruncation"); - var isPrerelease = /* @__PURE__ */ __name((type2) => { - return type2.startsWith("pre"); + var isPrerelease = /* @__PURE__ */ __name((type) => { + return type.startsWith("pre"); }, "isPrerelease"); module2.exports = truncate; } @@ -22579,20 +22579,20 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }, "hyphenReplace"); - var testSet = /* @__PURE__ */ __name((set2, version3, options) => { - for (let i2 = 0; i2 < set2.length; i2++) { - if (!set2[i2].test(version3)) { + var testSet = /* @__PURE__ */ __name((set, version3, options) => { + for (let i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version3)) { return false; } } if (version3.prerelease.length && !options.includePrerelease) { - for (let i2 = 0; i2 < set2.length; i2++) { - debug3(set2[i2].semver); - if (set2[i2].semver === Comparator.ANY) { + for (let i2 = 0; i2 < set.length; i2++) { + debug3(set[i2].semver); + if (set[i2].semver === Comparator.ANY) { continue; } - if (set2[i2].semver.prerelease.length > 0) { - const allowed = set2[i2].semver; + if (set[i2].semver.prerelease.length > 0) { + const allowed = set[i2].semver; if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } @@ -22994,7 +22994,7 @@ var require_simplify = __commonJS({ var satisfies3 = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range2, options) => { - const set2 = []; + const set = []; let first2 = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); @@ -23007,17 +23007,17 @@ var require_simplify = __commonJS({ } } else { if (prev) { - set2.push([first2, prev]); + set.push([first2, prev]); } prev = null; first2 = null; } } if (first2) { - set2.push([first2, null]); + set.push([first2, null]); } const ranges = []; - for (const [min, max] of set2) { + for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { @@ -32112,11 +32112,11 @@ var require_mime_types = __commonJS({ exports2.lookup = lookup; exports2.types = /* @__PURE__ */ Object.create(null); populateMaps(exports2.extensions, exports2.types); - function charset(type2) { - if (!type2 || typeof type2 !== "string") { + function charset(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var mime = match2 && db[match2[1].toLowerCase()]; if (mime && mime.charset) { return mime.charset; @@ -32127,11 +32127,11 @@ var require_mime_types = __commonJS({ return false; } __name(charset, "charset"); - function contentType2(str2) { - if (!str2 || typeof str2 !== "string") { + function contentType2(str) { + if (!str || typeof str !== "string") { return false; } - var mime = str2.indexOf("/") === -1 ? exports2.lookup(str2) : str2; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } @@ -32142,11 +32142,11 @@ var require_mime_types = __commonJS({ return mime; } __name(contentType2, "contentType"); - function extension(type2) { - if (!type2 || typeof type2 !== "string") { + function extension(type) { + if (!type || typeof type !== "string") { return false; } - var match2 = EXTRACT_TYPE_REGEXP.exec(type2); + var match2 = EXTRACT_TYPE_REGEXP.exec(type); var exts = match2 && exports2.extensions[match2[1].toLowerCase()]; if (!exts || !exts.length) { return false; @@ -32167,13 +32167,13 @@ var require_mime_types = __commonJS({ __name(lookup, "lookup"); function populateMaps(extensions, types2) { var preference = ["nginx", "apache", void 0, "iana"]; - Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type2) { - var mime = db[type2]; + Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type) { + var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { return; } - extensions[type2] = exts; + extensions[type] = exts; for (var i2 = 0; i2 < exts.length; i2++) { var extension2 = exts[i2]; if (types2[extension2]) { @@ -32184,7 +32184,7 @@ var require_mime_types = __commonJS({ continue; } } - types2[extension2] = type2; + types2[extension2] = type; } }, "forEachMimeType")); } @@ -32713,14 +32713,14 @@ var require_implementation = __commonJS({ return arr; }, "slicy"); var joiny = /* @__PURE__ */ __name(function(arr, joiner) { - var str2 = ""; + var str = ""; for (var i2 = 0; i2 < arr.length; i2 += 1) { - str2 += arr[i2]; + str += arr[i2]; if (i2 + 1 < arr.length) { - str2 += joiner; + str += joiner; } } - return str2; + return str; }, "joiny"); module2.exports = /* @__PURE__ */ __name(function bind2(that) { var target = this; @@ -35202,8 +35202,8 @@ var require_Node = __commonJS({ static { __name(this, "NodeBase"); } - constructor(type2) { - Object.defineProperty(this, identity.NODE_TYPE, { value: type2 }); + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); } /** Create a copy of this node. */ clone() { @@ -35414,15 +35414,15 @@ var require_createNode = __commonJS({ if (identity.isNode(value)) return value; if (identity.isPair(value)) { - const map2 = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); - map2.items.push(value); - return map2; + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; } if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) { value = value.valueOf(); } - const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema3, sourceObjects } = ctx; + const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema2, sourceObjects } = ctx; let ref = void 0; if (aliasDuplicateObjects && value && typeof value === "object") { ref = sourceObjects.get(value); @@ -35436,7 +35436,7 @@ var require_createNode = __commonJS({ } if (tagName?.startsWith("!!")) tagName = defaultTagPrefix + tagName.slice(2); - let tagObj = findTagObject(value, tagName, schema3.tags); + let tagObj = findTagObject(value, tagName, schema2.tags); if (!tagObj) { if (value && typeof value.toJSON === "function") { value = value.toJSON(); @@ -35447,8 +35447,8 @@ var require_createNode = __commonJS({ ref.node = node2; return node2; } - tagObj = value instanceof Map ? schema3[identity.MAP] : Symbol.iterator in Object(value) ? schema3[identity.SEQ] : - schema3[identity.MAP]; + tagObj = value instanceof Map ? schema2[identity.MAP] : Symbol.iterator in Object(value) ? schema2[identity.SEQ] : + schema2[identity.MAP]; } if (onTagObj) { onTagObj(tagObj); @@ -35476,7 +35476,7 @@ var require_Collection = __commonJS({ var createNode = require_createNode(); var identity = require_identity(); var Node = require_Node(); - function collectionFromPath(schema3, path17, value) { + function collectionFromPath(schema2, path17, value) { let v = value; for (let i2 = path17.length - 1; i2 >= 0; --i2) { const k = path17[i2]; @@ -35494,7 +35494,7 @@ var require_Collection = __commonJS({ onAnchor: /* @__PURE__ */ __name(() => { throw new Error("This should not happen, please report a bug."); }, "onAnchor"), - schema: schema3, + schema: schema2, sourceObjects: /* @__PURE__ */ new Map() }); } @@ -35505,10 +35505,10 @@ var require_Collection = __commonJS({ static { __name(this, "Collection"); } - constructor(type2, schema3) { - super(type2); + constructor(type, schema2) { + super(type); Object.defineProperty(this, "schema", { - value: schema3, + value: schema2, configurable: true, enumerable: false, writable: true @@ -35519,11 +35519,11 @@ var require_Collection = __commonJS({ * * @param schema - If defined, overwrites the original's schema */ - clone(schema3) { + clone(schema2) { const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); - if (schema3) - copy.schema = schema3; - copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema3) : it); + if (schema2) + copy.schema = schema2; + copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema2) : it); if (this.range) copy.range = this.range.slice(); return copy; @@ -35622,16 +35622,16 @@ var require_Collection = __commonJS({ var require_stringifyComment = __commonJS({ "node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) { "use strict"; - var stringifyComment = /* @__PURE__ */ __name((str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); + var stringifyComment = /* @__PURE__ */ __name((str) => str.replace(/^(?!$)(?: $)?/gm, "#"), "stringifyComment"); function indentComment(comment, indent) { if (/^\n+$/.test(comment)) return comment.substring(1); return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; } __name(indentComment, "indentComment"); - var lineComment = /* @__PURE__ */ __name((str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : - comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment, "lineCom\ -ment"); + var lineComment = /* @__PURE__ */ __name((str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : + comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment, "lineComm\ +ent"); exports2.indentComment = indentComment; exports2.lineComment = lineComment; exports2.stringifyComment = stringifyComment; @@ -35787,16 +35787,16 @@ var require_stringifyString = __commonJS({ lineWidth: ctx.options.lineWidth, minContentWidth: ctx.options.minContentWidth }), "getFoldOptions"); - var containsDocumentMarker = /* @__PURE__ */ __name((str2) => /^(%|---|\.\.\.)/m.test(str2), "containsDocumentMarker"); - function lineLengthOverLimit(str2, lineWidth, indentLength) { + var containsDocumentMarker = /* @__PURE__ */ __name((str) => /^(%|---|\.\.\.)/m.test(str), "containsDocumentMarker"); + function lineLengthOverLimit(str, lineWidth, indentLength) { if (!lineWidth || lineWidth < 0) return false; const limit = lineWidth - indentLength; - const strLen = str2.length; + const strLen = str.length; if (strLen <= limit) return false; for (let i2 = 0, start = 0; i2 < strLen; ++i2) { - if (str2[i2] === "\n") { + if (str[i2] === "\n") { if (i2 - start > limit) return true; start = i2 + 1; @@ -35808,74 +35808,74 @@ var require_stringifyString = __commonJS({ } __name(lineLengthOverLimit, "lineLengthOverLimit"); function doubleQuotedString(value, ctx) { - const json2 = JSON.stringify(value); + const json = JSON.stringify(value); if (ctx.options.doubleQuotedAsJSON) - return json2; + return json; const { implicitKey } = ctx; const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); - let str2 = ""; + let str = ""; let start = 0; - for (let i2 = 0, ch = json2[i2]; ch; ch = json2[++i2]) { - if (ch === " " && json2[i2 + 1] === "\\" && json2[i2 + 2] === "n") { - str2 += json2.slice(start, i2) + "\\ "; + for (let i2 = 0, ch = json[i2]; ch; ch = json[++i2]) { + if (ch === " " && json[i2 + 1] === "\\" && json[i2 + 2] === "n") { + str += json.slice(start, i2) + "\\ "; i2 += 1; start = i2; ch = "\\"; } if (ch === "\\") - switch (json2[i2 + 1]) { + switch (json[i2 + 1]) { case "u": { - str2 += json2.slice(start, i2); - const code = json2.substr(i2 + 2, 4); + str += json.slice(start, i2); + const code = json.substr(i2 + 2, 4); switch (code) { case "0000": - str2 += "\\0"; + str += "\\0"; break; case "0007": - str2 += "\\a"; + str += "\\a"; break; case "000b": - str2 += "\\v"; + str += "\\v"; break; case "001b": - str2 += "\\e"; + str += "\\e"; break; case "0085": - str2 += "\\N"; + str += "\\N"; break; case "00a0": - str2 += "\\_"; + str += "\\_"; break; case "2028": - str2 += "\\L"; + str += "\\L"; break; case "2029": - str2 += "\\P"; + str += "\\P"; break; default: if (code.substr(0, 2) === "00") - str2 += "\\x" + code.substr(2); + str += "\\x" + code.substr(2); else - str2 += json2.substr(i2, 6); + str += json.substr(i2, 6); } i2 += 5; start = i2 + 1; } break; case "n": - if (implicitKey || json2[i2 + 2] === '"' || json2.length < minMultiLineLength) { + if (implicitKey || json[i2 + 2] === '"' || json.length < minMultiLineLength) { i2 += 1; } else { - str2 += json2.slice(start, i2) + "\n\n"; - while (json2[i2 + 2] === "\\" && json2[i2 + 3] === "n" && json2[i2 + 4] !== '"') { - str2 += "\n"; + str += json.slice(start, i2) + "\n\n"; + while (json[i2 + 2] === "\\" && json[i2 + 3] === "n" && json[i2 + 4] !== '"') { + str += "\n"; i2 += 2; } - str2 += indent; - if (json2[i2 + 2] === " ") - str2 += "\\"; + str += indent; + if (json[i2 + 2] === " ") + str += "\\"; i2 += 1; start = i2 + 1; } @@ -35884,8 +35884,8 @@ var require_stringifyString = __commonJS({ i2 += 1; } } - str2 = start ? str2 + json2.slice(start) : json2; - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); } __name(doubleQuotedString, "doubleQuotedString"); @@ -35923,14 +35923,14 @@ ${indent}`) + "'"; } catch { blockEndNewlines = /\n+(?!\n|$)/g; } - function blockString({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + function blockString({ comment, type, value }, ctx, onComment, onChompKeep) { const { blockQuote, commentString, lineWidth } = ctx.options; if (!blockQuote || /\n[\t ]+$/.test(value)) { return quotedString(value, ctx); } const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); - const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type2 === Scalar.Scalar.BLOCK_FOLDED ? - false : type2 === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); + const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.Scalar.BLOCK_FOLDED ? + false : type === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length); if (!value) return literal ? "|\n" : ">\n"; let chomp; @@ -35986,7 +35986,7 @@ ${indent}`) + "'"; 2").replace(/\n+/g, `$&${indent}`); let literalFallback = false; const foldOptions = getFoldOptions(ctx, true); - if (blockQuote !== "folded" && type2 !== Scalar.Scalar.BLOCK_FOLDED) { + if (blockQuote !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) { foldOptions.onOverflow = () => { literalFallback = true; }; @@ -36002,7 +36002,7 @@ ${indent}${start}${value}${end}`; } __name(blockString, "blockString"); function plainString(item, ctx, onComment, onChompKeep) { - const { type: type2, value } = item; + const { type, value } = item; const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { return quotedString(value, ctx); @@ -36011,7 +36011,7 @@ ${indent}${start}${value}${end}`; return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); } - if (!implicitKey && !inFlow && type2 !== Scalar.Scalar.PLAIN && value.includes("\n")) { + if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) { return blockString(item, ctx, onComment, onChompKeep); } if (containsDocumentMarker(value)) { @@ -36022,26 +36022,25 @@ ${indent}${start}${value}${end}`; return quotedString(value, ctx); } } - const str2 = value.replace(/\n+/g, `$& + const str = value.replace(/\n+/g, `$& ${indent}`); if (actualString) { const test2 = /* @__PURE__ */ __name((tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test( - str2), "test"); + str), "test"); const { compat, tags: tags2 } = ctx.doc.schema; if (tags2.some(test2) || compat?.some(test2)) return quotedString(value, ctx); } - return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, - false)); + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); } __name(plainString, "plainString"); 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: type2 } = item; - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) - type2 = Scalar.Scalar.QUOTE_DOUBLE; + type = Scalar.Scalar.QUOTE_DOUBLE; } const _stringify = /* @__PURE__ */ __name((_type) => { switch (_type) { @@ -36058,7 +36057,7 @@ ${indent}`); return null; } }, "_stringify"); - let res = _stringify(type2); + let res = _stringify(type); if (res === null) { const { defaultKeyType, defaultStringType } = ctx.options; const t2 = implicitKey && defaultKeyType || defaultStringType; @@ -36190,13 +36189,13 @@ var require_stringify = __commonJS({ const props = stringifyProps(node, tagObj, ctx); if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; - const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity. + 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 str2; - return identity.isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} -${ctx.indent}${str2}`; + return str; + return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; } __name(stringify, "stringify"); exports2.createStringifyContext = createStringifyContext; @@ -36234,8 +36233,8 @@ var require_stringifyPair = __commonJS({ }); let keyCommentDone = false; let chompKeep = false; - let str2 = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); - if (!explicitKey && !ctx.inFlow && str2.length > 1024) { + let str = stringify.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; @@ -36244,27 +36243,27 @@ var require_stringifyPair = __commonJS({ if (allNullValues || value == null) { if (keyCommentDone && onComment) onComment(); - return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; + return str === "" ? "?" : explicitKey ? `? ${str}` : str; } } else if (allNullValues && !simpleKeys || value == null && explicitKey) { - str2 = `? ${str2}`; + str = `? ${str}`; if (keyComment && !keyCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } if (keyCommentDone) keyComment = null; if (explicitKey) { if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); - str2 = `? ${str2} + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str} ${indent}:`; } else { - str2 = `${str2}:`; + str = `${str}:`; if (keyComment) - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); } let vsb, vcb, valueComment; if (identity.isNode(value)) { @@ -36280,7 +36279,7 @@ ${indent}:`; } ctx.implicitKey = false; if (!explicitKey && !keyComment && identity.isScalar(value)) - ctx.indentAtStart = str2.length + 1; + ctx.indentAtStart = str.length + 1; chompKeep = false; if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) { @@ -36325,16 +36324,16 @@ ${ctx.indent}`; } else if (valueStr === "" || valueStr[0] === "\n") { ws = ""; } - str2 += ws + valueStr; + str += ws + valueStr; if (ctx.inFlow) { if (valueCommentDone && onComment) onComment(); } else if (valueComment && !valueCommentDone) { - str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment)); + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); } else if (chompKeep && onChompKeep) { onChompKeep(); } - return str2; + return str; } __name(stringifyPair, "stringifyPair"); exports2.stringifyPair = stringifyPair; @@ -36372,7 +36371,7 @@ var require_merge = __commonJS({ var identity = require_identity(); var Scalar = require_Scalar(); var MERGE_KEY = "<<"; - var merge3 = { + var merge2 = { identify: /* @__PURE__ */ __name((value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY, "identify"), default: "key", @@ -36383,34 +36382,34 @@ var require_merge = __commonJS({ }), "resolve"), stringify: /* @__PURE__ */ __name(() => MERGE_KEY, "stringify") }; - var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || - key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3. + var isMergeKey = /* @__PURE__ */ __name((ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || + key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2. tag && tag.default), "isMergeKey"); - function addMergeToJSMap(ctx, map2, value) { + function addMergeToJSMap(ctx, map, value) { const source = resolveAliasValue(ctx, value); if (identity.isSeq(source)) for (const it of source.items) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else if (Array.isArray(source)) for (const it of source) - mergeValue(ctx, map2, it); + mergeValue(ctx, map, it); else - mergeValue(ctx, map2, source); + mergeValue(ctx, map, source); } __name(addMergeToJSMap, "addMergeToJSMap"); - function mergeValue(ctx, map2, value) { + function mergeValue(ctx, map, value) { const source = resolveAliasValue(ctx, 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 (map2 instanceof Map) { - if (!map2.has(key)) - map2.set(key, value2); - } else if (map2 instanceof Set) { - map2.add(key); - } else if (!Object.prototype.hasOwnProperty.call(map2, key)) { - Object.defineProperty(map2, key, { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value2); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { value: value2, writable: true, enumerable: true, @@ -36418,7 +36417,7 @@ var require_merge = __commonJS({ }); } } - return map2; + return map; } __name(mergeValue, "mergeValue"); function resolveAliasValue(ctx, value) { @@ -36427,7 +36426,7 @@ var require_merge = __commonJS({ __name(resolveAliasValue, "resolveAliasValue"); exports2.addMergeToJSMap = addMergeToJSMap; exports2.isMergeKey = isMergeKey; - exports2.merge = merge3; + exports2.merge = merge2; } }); @@ -36436,36 +36435,36 @@ var require_addPairToJSMap = __commonJS({ "node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) { "use strict"; var log2 = require_log(); - var merge3 = require_merge(); + var merge2 = require_merge(); var stringify = require_stringify(); var identity = require_identity(); var toJS = require_toJS(); - function addPairToJSMap(ctx, map2, { key, value }) { + function addPairToJSMap(ctx, map, { key, value }) { if (identity.isNode(key) && key.addToJSMap) - key.addToJSMap(ctx, map2, value); - else if (merge3.isMergeKey(ctx, key)) - merge3.addMergeToJSMap(ctx, map2, value); + key.addToJSMap(ctx, map, value); + else if (merge2.isMergeKey(ctx, key)) + merge2.addMergeToJSMap(ctx, map, value); else { const jsKey = toJS.toJS(key, "", ctx); - if (map2 instanceof Map) { - map2.set(jsKey, toJS.toJS(value, jsKey, ctx)); - } else if (map2 instanceof Set) { - map2.add(jsKey); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map instanceof Set) { + map.add(jsKey); } else { const stringKey = stringifyKey(key, jsKey, ctx); const jsValue = toJS.toJS(value, stringKey, ctx); - if (stringKey in map2) - Object.defineProperty(map2, stringKey, { + if (stringKey in map) + Object.defineProperty(map, stringKey, { value: jsValue, writable: true, enumerable: true, configurable: true }); else - map2[stringKey] = jsValue; + map[stringKey] = jsValue; } } - return map2; + return map; } __name(addPairToJSMap, "addPairToJSMap"); function stringifyKey(key, jsKey, ctx) { @@ -36521,12 +36520,12 @@ var require_Pair = __commonJS({ this.key = key; this.value = value; } - clone(schema3) { + clone(schema2) { let { key, value } = this; if (identity.isNode(key)) - key = key.clone(schema3); + key = key.clone(schema2); if (identity.isNode(value)) - value = value.clone(schema3); + value = value.clone(schema2); return new _Pair(key, value); } toJSON(_, ctx) { @@ -36578,31 +36577,31 @@ var require_stringifyCollection = __commonJS({ } } chompKeep = false; - let str3 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); if (comment2) - str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2)); + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); if (chompKeep && comment2) chompKeep = false; - lines.push(blockItemPrefix + str3); + lines.push(blockItemPrefix + str2); } - let str2; + let str; if (lines.length === 0) { - str2 = flowChars.start + flowChars.end; + str = flowChars.start + flowChars.end; } else { - str2 = lines[0]; + str = lines[0]; for (let i2 = 1; i2 < lines.length; ++i2) { const line = lines[i2]; - str2 += line ? ` + str += line ? ` ${indent}${line}` : "\n"; } } if (comment) { - str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent); + str += "\n" + stringifyComment.indentComment(commentString(comment), indent); if (onComment) onComment(); } else if (chompKeep && onChompKeep) onChompKeep(); - return str2; + return str; } __name(stringifyBlockCollection, "stringifyBlockCollection"); function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { @@ -36646,22 +36645,22 @@ ${indent}${line}` : "\n"; } if (comment) reqNewline = true; - let str2 = stringify.stringify(item, itemCtx, () => comment = null); - reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n")); + let str = stringify.stringify(item, itemCtx, () => comment = null); + reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n")); if (i2 < items.length - 1) { - str2 += ","; + str += ","; } else if (ctx.options.trailingComma) { if (ctx.options.lineWidth > 0) { - reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx. - options.lineWidth); + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options. + lineWidth); } if (reqNewline) { - str2 += ","; + str += ","; } } if (comment) - str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment)); - lines.push(str2); + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + lines.push(str); linesAtValue = lines.length; } const { start, end } = flowChars; @@ -36673,11 +36672,11 @@ ${indent}${line}` : "\n"; reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - let str2 = start; + let str = start; for (const line of lines) - str2 += line ? ` + str += line ? ` ${indentStep}${indent}${line}` : "\n"; - return `${str2} + return `${str} ${indent}${end}`; } else { return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; @@ -36728,24 +36727,24 @@ var require_YAMLMap = __commonJS({ static get tagName() { return "tag:yaml.org,2002:map"; } - constructor(schema3) { - super(identity.MAP, schema3); + constructor(schema2) { + super(identity.MAP, schema2); this.items = []; } /** * A generic collection parsing method that can be extended * to other node classes that inherit from YAMLMap */ - static from(schema3, obj, ctx) { + static from(schema2, obj, ctx) { const { keepUndefined, replacer } = ctx; - const map2 = new this(schema3); + const map = new this(schema2); const add = /* @__PURE__ */ __name((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) - map2.items.push(Pair.createPair(key, value, ctx)); + map.items.push(Pair.createPair(key, value, ctx)); }, "add"); if (obj instanceof Map) { for (const [key, value] of obj) @@ -36754,10 +36753,10 @@ var require_YAMLMap = __commonJS({ for (const key of Object.keys(obj)) add(key, obj[key]); } - if (typeof schema3.sortMapEntries === "function") { - map2.items.sort(schema3.sortMapEntries); + if (typeof schema2.sortMapEntries === "function") { + map.items.sort(schema2.sortMapEntries); } - return map2; + return map; } /** * Adds a value to the collection. @@ -36816,12 +36815,12 @@ var require_YAMLMap = __commonJS({ * @returns Instance of Type, Map, or Object */ toJSON(_, ctx, Type2) { - const map2 = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + const map = Type2 ? new Type2() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const item of this.items) - addPairToJSMap.addPairToJSMap(ctx, map2, item); - return map2; + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -36852,19 +36851,19 @@ var require_map = __commonJS({ "use strict"; var identity = require_identity(); var YAMLMap = require_YAMLMap(); - var map2 = { + var map = { collection: "map", default: true, nodeClass: YAMLMap.YAMLMap, tag: "tag:yaml.org,2002:map", - resolve(map3, onError2) { - if (!identity.isMap(map3)) + resolve(map2, onError2) { + if (!identity.isMap(map2)) onError2("Expected a mapping for this tag"); - return map3; + return map2; }, - createNode: /* @__PURE__ */ __name((schema3, obj, ctx) => YAMLMap.YAMLMap.from(schema3, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLMap.YAMLMap.from(schema2, obj, ctx), "createNode") }; - exports2.map = map2; + exports2.map = map; } }); @@ -36885,8 +36884,8 @@ var require_YAMLSeq = __commonJS({ static get tagName() { return "tag:yaml.org,2002:seq"; } - constructor(schema3) { - super(identity.SEQ, schema3); + constructor(schema2) { + super(identity.SEQ, schema2); this.items = []; } add(value) { @@ -36942,13 +36941,13 @@ var require_YAMLSeq = __commonJS({ this.items[idx] = value; } toJSON(_, ctx) { - const seq2 = []; + const seq = []; if (ctx?.onCreate) - ctx.onCreate(seq2); + ctx.onCreate(seq); let i2 = 0; for (const item of this.items) - seq2.push(toJS.toJS(item, String(i2++), ctx)); - return seq2; + seq.push(toJS.toJS(item, String(i2++), ctx)); + return seq; } toString(ctx, onComment, onChompKeep) { if (!ctx) @@ -36961,9 +36960,9 @@ var require_YAMLSeq = __commonJS({ onComment }); } - static from(schema3, obj, ctx) { + static from(schema2, obj, ctx) { const { replacer } = ctx; - const seq2 = new this(schema3); + const seq = new this(schema2); if (obj && Symbol.iterator in Object(obj)) { let i2 = 0; for (let it of obj) { @@ -36971,10 +36970,10 @@ var require_YAMLSeq = __commonJS({ const key = obj instanceof Set ? it : String(i2++); it = replacer.call(obj, key, it); } - seq2.items.push(createNode.createNode(it, void 0, ctx)); + seq.items.push(createNode.createNode(it, void 0, ctx)); } } - return seq2; + return seq; } }; function asItemIndex(key) { @@ -36994,19 +36993,19 @@ var require_seq = __commonJS({ "use strict"; var identity = require_identity(); var YAMLSeq = require_YAMLSeq(); - var seq2 = { + var seq = { collection: "seq", default: true, nodeClass: YAMLSeq.YAMLSeq, tag: "tag:yaml.org,2002:seq", - resolve(seq3, onError2) { - if (!identity.isSeq(seq3)) + resolve(seq2, onError2) { + if (!identity.isSeq(seq2)) onError2("Expected a sequence for this tag"); - return seq3; + return seq2; }, - createNode: /* @__PURE__ */ __name((schema3, obj, ctx) => YAMLSeq.YAMLSeq.from(schema3, obj, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, obj, ctx) => YAMLSeq.YAMLSeq.from(schema2, obj, ctx), "createNode") }; - exports2.seq = seq2; + exports2.seq = seq; } }); @@ -37019,7 +37018,7 @@ var require_string = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify(item, ctx, onComment, onChompKeep) { ctx = Object.assign({ actualString: true }, ctx); return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); @@ -37058,7 +37057,7 @@ var require_bool = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, - resolve: /* @__PURE__ */ __name((str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"), "resolve"), + resolve: /* @__PURE__ */ __name((str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"), "resolve"), stringify({ source, value }, ctx) { if (source && boolTag.test.test(source)) { const sv = source[0] === "t" || source[0] === "T"; @@ -37112,8 +37111,8 @@ var require_float = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -37122,27 +37121,27 @@ var require_float = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2)); - const dot = str2.indexOf("."); - if (dot !== -1 && str2[str2.length - 1] === "0") - node.minFractionDigits = str2.length - dot - 1; + 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 }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } @@ -37155,8 +37154,8 @@ var require_int = __commonJS({ var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - var intResolve = /* @__PURE__ */ __name((str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt( - str2.substring(offset), radix), "intResolve"); + var intResolve = /* @__PURE__ */ __name((str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt( + str.substring(offset), radix), "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value) && value >= 0) @@ -37170,15 +37169,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o[0-7]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0o"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -37187,10 +37186,10 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x[0-9a-fA-F]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intHex = intHex; exports2.intOct = intOct; } @@ -37200,27 +37199,27 @@ fy"); var require_schema = __commonJS({ "node_modules/yaml/dist/schema/core/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); var string = require_string(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema3 = [ - map2.map, - seq2.seq, + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema2 = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.boolTag, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float ]; - exports2.schema = schema3; + exports2.schema = schema2; } }); @@ -37229,8 +37228,8 @@ var require_schema2 = __commonJS({ "node_modules/yaml/dist/schema/json/schema.js"(exports2) { "use strict"; var Scalar = require_Scalar(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map(); + var seq = require_seq(); function intIdentify(value) { return typeof value === "bigint" || Number.isInteger(value); } @@ -37241,7 +37240,7 @@ var require_schema2 = __commonJS({ identify: /* @__PURE__ */ __name((value) => typeof value === "string", "identify"), default: true, tag: "tag:yaml.org,2002:str", - resolve: /* @__PURE__ */ __name((str2) => str2, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str, "resolve"), stringify: stringifyJSON }, { @@ -37258,7 +37257,7 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:bool", test: /^true$|^false$/, - resolve: /* @__PURE__ */ __name((str2) => str2 === "true", "resolve"), + resolve: /* @__PURE__ */ __name((str) => str === "true", "resolve"), stringify: stringifyJSON }, { @@ -37266,8 +37265,8 @@ var require_schema2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, - 10), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + "resolve"), stringify: /* @__PURE__ */ __name(({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value), "\ stringify") }, @@ -37276,7 +37275,7 @@ stringify") default: true, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str), "resolve"), stringify: stringifyJSON } ]; @@ -37284,13 +37283,13 @@ stringify") default: true, tag: "", test: /^/, - resolve(str2, onError2) { - onError2(`Unresolved plain scalar ${JSON.stringify(str2)}`); - return str2; + resolve(str, onError2) { + onError2(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; } }; - var schema3 = [map2.map, seq2.seq].concat(jsonScalars, jsonError); - exports2.schema = schema3; + var schema2 = [map.map, seq.seq].concat(jsonScalars, jsonError); + exports2.schema = schema2; } }); @@ -37301,7 +37300,7 @@ var require_binary = __commonJS({ var node_buffer = require("buffer"); var Scalar = require_Scalar(); var stringifyString = require_stringifyString(); - var binary2 = { + var binary = { identify: /* @__PURE__ */ __name((value) => value instanceof Uint8Array, "identify"), // Buffer inherits from Uint8Array default: false, @@ -37318,46 +37317,46 @@ var require_binary = __commonJS({ if (typeof node_buffer.Buffer === "function") { return node_buffer.Buffer.from(src, "base64"); } else if (typeof atob === "function") { - const str2 = atob(src.replace(/[\n\r]/g, "")); - const buffer3 = new Uint8Array(str2.length); - for (let i2 = 0; i2 < str2.length; ++i2) - buffer3[i2] = str2.charCodeAt(i2); + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer3 = new Uint8Array(str.length); + for (let i2 = 0; i2 < str.length; ++i2) + buffer3[i2] = str.charCodeAt(i2); return buffer3; } else { onError2("This environment does not support reading binary tags; either Buffer or atob is required"); return src; } }, - stringify({ comment, type: type2, value }, ctx, onComment, onChompKeep) { + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { if (!value) return ""; const buf = value; - let str2; + let str; if (typeof node_buffer.Buffer === "function") { - str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( + str = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString( "base64"); } else if (typeof btoa === "function") { let s = ""; for (let i2 = 0; i2 < buf.length; ++i2) s += String.fromCharCode(buf[i2]); - str2 = btoa(s); + str = btoa(s); } else { throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); } - type2 ?? (type2 = Scalar.Scalar.BLOCK_LITERAL); - if (type2 !== Scalar.Scalar.QUOTE_DOUBLE) { + 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(str2.length / lineWidth); + const n = Math.ceil(str.length / lineWidth); const lines = new Array(n); for (let i2 = 0, o2 = 0; i2 < n; ++i2, o2 += lineWidth) { - lines[i2] = str2.substr(o2, lineWidth); + lines[i2] = str.substr(o2, lineWidth); } - str2 = lines.join(type2 === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); } - return stringifyString.stringifyString({ comment, type: type2, value: str2 }, ctx, onComment, onChompKeep); + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); } }; - exports2.binary = binary2; + exports2.binary = binary; } }); @@ -37369,10 +37368,10 @@ var require_pairs = __commonJS({ var Pair = require_Pair(); var Scalar = require_Scalar(); var YAMLSeq = require_YAMLSeq(); - function resolvePairs(seq2, onError2) { - if (identity.isSeq(seq2)) { - for (let i2 = 0; i2 < seq2.items.length; ++i2) { - let item = seq2.items[i2]; + function resolvePairs(seq, onError2) { + if (identity.isSeq(seq)) { + for (let i2 = 0; i2 < seq.items.length; ++i2) { + let item = seq.items[i2]; if (identity.isPair(item)) continue; else if (identity.isMap(item)) { @@ -37389,17 +37388,17 @@ ${cn.comment}` : item.comment; } item = pair; } - seq2.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); + seq.items[i2] = identity.isPair(item) ? item : new Pair.Pair(item); } } else onError2("Expected a sequence for this tag"); - return seq2; + return seq; } __name(resolvePairs, "resolvePairs"); - function createPairs(schema3, iterable, ctx) { + function createPairs(schema2, iterable, ctx) { const { replacer } = ctx; - const pairs3 = new YAMLSeq.YAMLSeq(schema3); - pairs3.tag = "tag:yaml.org,2002:pairs"; + const pairs2 = new YAMLSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; let i2 = 0; if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) { @@ -37423,12 +37422,12 @@ ${cn.comment}` : item.comment; } else { key = it; } - pairs3.items.push(Pair.createPair(key, value, ctx)); + pairs2.items.push(Pair.createPair(key, value, ctx)); } - return pairs3; + return pairs2; } __name(createPairs, "createPairs"); - var pairs2 = { + var pairs = { collection: "seq", default: false, tag: "tag:yaml.org,2002:pairs", @@ -37436,7 +37435,7 @@ ${cn.comment}` : item.comment; createNode: createPairs }; exports2.createPairs = createPairs; - exports2.pairs = pairs2; + exports2.pairs = pairs; exports2.resolvePairs = resolvePairs; } }); @@ -37449,7 +37448,7 @@ var require_omap = __commonJS({ var toJS = require_toJS(); var YAMLMap = require_YAMLMap(); var YAMLSeq = require_YAMLSeq(); - var pairs2 = require_pairs(); + var pairs = require_pairs(); var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq { static { __name(this, "YAMLOMap"); @@ -37470,9 +37469,9 @@ var require_omap = __commonJS({ toJSON(_, ctx) { if (!ctx) return super.toJSON(_); - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); if (ctx?.onCreate) - ctx.onCreate(map2); + ctx.onCreate(map); for (const pair of this.items) { let key, value; if (identity.isPair(pair)) { @@ -37481,28 +37480,28 @@ var require_omap = __commonJS({ } else { key = toJS.toJS(pair, "", ctx); } - if (map2.has(key)) + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); - map2.set(key, value); + map.set(key, value); } - return map2; + return map; } - static from(schema3, iterable, ctx) { - const pairs$1 = pairs2.createPairs(schema3, iterable, ctx); - const omap3 = new this(); - omap3.items = pairs$1.items; - return omap3; + static from(schema2, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema2, iterable, ctx); + const omap2 = new this(); + omap2.items = pairs$1.items; + return omap2; } }; YAMLOMap.tag = "tag:yaml.org,2002:omap"; - var omap2 = { + var omap = { collection: "seq", identify: /* @__PURE__ */ __name((value) => value instanceof Map, "identify"), nodeClass: YAMLOMap, default: false, tag: "tag:yaml.org,2002:omap", - resolve(seq2, onError2) { - const pairs$1 = pairs2.resolvePairs(seq2, onError2); + resolve(seq, onError2) { + const pairs$1 = pairs.resolvePairs(seq, onError2); const seenKeys = []; for (const { key } of pairs$1.items) { if (identity.isScalar(key)) { @@ -37515,10 +37514,10 @@ var require_omap = __commonJS({ } return Object.assign(new YAMLOMap(), pairs$1); }, - createNode: /* @__PURE__ */ __name((schema3, iterable, ctx) => YAMLOMap.from(schema3, iterable, ctx), "createNode") + createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLOMap.from(schema2, iterable, ctx), "createNode") }; exports2.YAMLOMap = YAMLOMap; - exports2.omap = omap2; + exports2.omap = omap; } }); @@ -37566,8 +37565,8 @@ var require_float2 = __commonJS({ default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, - resolve: /* @__PURE__ */ __name((str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number. - NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, "resolve"), + resolve: /* @__PURE__ */ __name((str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : + Number.POSITIVE_INFINITY, "resolve"), stringify: stringifyNumber.stringifyNumber }; var floatExp = { @@ -37576,22 +37575,22 @@ var require_float2 = __commonJS({ tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, - resolve: /* @__PURE__ */ __name((str2) => parseFloat(str2.replace(/_/g, "")), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseFloat(str.replace(/_/g, "")), "resolve"), stringify(node) { const num = Number(node.value); return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); } }; - var float2 = { + var float = { identify: /* @__PURE__ */ __name((value) => typeof value === "number", "identify"), default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, - resolve(str2) { - const node = new Scalar.Scalar(parseFloat(str2.replace(/_/g, ""))); - const dot = str2.indexOf("."); + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ""))); + const dot = str.indexOf("."); if (dot !== -1) { - const f = str2.substring(dot + 1).replace(/_/g, ""); + const f = str.substring(dot + 1).replace(/_/g, ""); if (f[f.length - 1] === "0") node.minFractionDigits = f.length; } @@ -37599,7 +37598,7 @@ var require_float2 = __commonJS({ }, stringify: stringifyNumber.stringifyNumber }; - exports2.float = float2; + exports2.float = float; exports2.floatExp = floatExp; exports2.floatNaN = floatNaN; } @@ -37612,35 +37611,35 @@ var require_int2 = __commonJS({ var stringifyNumber = require_stringifyNumber(); var intIdentify = /* @__PURE__ */ __name((value) => typeof value === "bigint" || Number.isInteger(value), "intIdenti\ fy"); - function intResolve(str2, offset, radix, { intAsBigInt }) { - const sign = str2[0]; + function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; if (sign === "-" || sign === "+") offset += 1; - str2 = str2.substring(offset).replace(/_/g, ""); + str = str.substring(offset).replace(/_/g, ""); if (intAsBigInt) { switch (radix) { case 2: - str2 = `0b${str2}`; + str = `0b${str}`; break; case 8: - str2 = `0o${str2}`; + str = `0o${str}`; break; case 16: - str2 = `0x${str2}`; + str = `0x${str}`; break; } - const n2 = BigInt(str2); + const n2 = BigInt(str); return sign === "-" ? BigInt(-1) * n2 : n2; } - const n = parseInt(str2, radix); + const n = parseInt(str, radix); return sign === "-" ? -1 * n : n; } __name(intResolve, "intResolve"); function intStringify(node, radix, prefix2) { const { value } = node; if (intIdentify(value)) { - const str2 = value.toString(radix); - return value < 0 ? "-" + prefix2 + str2.substr(1) : prefix2 + str2; + const str = value.toString(radix); + return value < 0 ? "-" + prefix2 + str.substr(1) : prefix2 + str; } return stringifyNumber.stringifyNumber(node); } @@ -37651,7 +37650,7 @@ fy"); tag: "tag:yaml.org,2002:int", format: "BIN", test: /^[-+]?0b[0-1_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 2, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 2, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 2, "0b"), "stringify") }; var intOct = { @@ -37660,15 +37659,15 @@ fy"); tag: "tag:yaml.org,2002:int", format: "OCT", test: /^[-+]?0[0-7_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 1, 8, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 1, 8, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 8, "0"), "stringify") }; - var int2 = { + var int = { identify: intIdentify, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9][0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 0, 10, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 0, 10, opt), "resolve"), stringify: stringifyNumber.stringifyNumber }; var intHex = { @@ -37677,10 +37676,10 @@ fy"); tag: "tag:yaml.org,2002:int", format: "HEX", test: /^[-+]?0x[0-9a-fA-F_]+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, opt) => intResolve(str2, 2, 16, opt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, opt) => intResolve(str, 2, 16, opt), "resolve"), stringify: /* @__PURE__ */ __name((node) => intStringify(node, 16, "0x"), "stringify") }; - exports2.int = int2; + exports2.int = int; exports2.intBin = intBin; exports2.intHex = intHex; exports2.intOct = intOct; @@ -37698,8 +37697,8 @@ var require_set = __commonJS({ static { __name(this, "YAMLSet"); } - constructor(schema3) { - super(schema3); + constructor(schema2) { + super(schema2); this.tag = _YAMLSet.tag; } add(key) { @@ -37743,39 +37742,39 @@ var require_set = __commonJS({ else throw new Error("Set items must all have null values"); } - static from(schema3, iterable, ctx) { + static from(schema2, iterable, ctx) { const { replacer } = ctx; - const set3 = new this(schema3); + const set2 = new this(schema2); if (iterable && Symbol.iterator in Object(iterable)) for (let value of iterable) { if (typeof replacer === "function") value = replacer.call(iterable, value, value); - set3.items.push(Pair.createPair(value, null, ctx)); + set2.items.push(Pair.createPair(value, null, ctx)); } - return set3; + return set2; } }; YAMLSet.tag = "tag:yaml.org,2002:set"; - var set2 = { + var set = { collection: "map", identify: /* @__PURE__ */ __name((value) => value instanceof Set, "identify"), nodeClass: YAMLSet, default: false, tag: "tag:yaml.org,2002:set", - createNode: /* @__PURE__ */ __name((schema3, iterable, ctx) => YAMLSet.from(schema3, iterable, ctx), "createNode"), - resolve(map2, onError2) { - if (identity.isMap(map2)) { - if (map2.hasAllNullValues(true)) - return Object.assign(new YAMLSet(), map2); + createNode: /* @__PURE__ */ __name((schema2, iterable, ctx) => YAMLSet.from(schema2, iterable, ctx), "createNode"), + resolve(map, onError2) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); else onError2("Set items must all have null values"); } else onError2("Expected a mapping for this tag"); - return map2; + return map; } }; exports2.YAMLSet = YAMLSet; - exports2.set = set2; + exports2.set = set; } }); @@ -37784,9 +37783,9 @@ var require_timestamp = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) { "use strict"; var stringifyNumber = require_stringifyNumber(); - function parseSexagesimal(str2, asBigInt) { - const sign = str2[0]; - const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; + function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === "-" || sign === "+" ? str.substring(1) : str; const num = /* @__PURE__ */ __name((n) => asBigInt ? BigInt(n) : Number(n), "num"); const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0)); return sign === "-" ? num(-1) * res : res; @@ -37825,7 +37824,7 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:int", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, - resolve: /* @__PURE__ */ __name((str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt), "resolve"), + resolve: /* @__PURE__ */ __name((str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), "resolve"), stringify: stringifySexagesimal }; var floatTime = { @@ -37834,10 +37833,10 @@ var require_timestamp = __commonJS({ tag: "tag:yaml.org,2002:float", format: "TIME", test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, - resolve: /* @__PURE__ */ __name((str2) => parseSexagesimal(str2, false), "resolve"), + resolve: /* @__PURE__ */ __name((str) => parseSexagesimal(str, false), "resolve"), stringify: stringifySexagesimal }; - var timestamp2 = { + var timestamp = { identify: /* @__PURE__ */ __name((value) => value instanceof Date, "identify"), default: true, tag: "tag:yaml.org,2002:timestamp", @@ -37846,8 +37845,8 @@ var require_timestamp = __commonJS({ // assumed to be 00:00:00Z (start of day, UTC). test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+\ )?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), - resolve(str2) { - const match2 = str2.match(timestamp2.test); + 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); @@ -37867,7 +37866,7 @@ tringify") }; exports2.floatTime = floatTime; exports2.intTime = intTime; - exports2.timestamp = timestamp2; + exports2.timestamp = timestamp; } }); @@ -37875,43 +37874,43 @@ tringify") var require_schema3 = __commonJS({ "node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); var string = require_string(); - var binary2 = require_binary(); - var bool2 = require_bool2(); - var float2 = require_float2(); - var int2 = require_int2(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); - var schema3 = [ - map2.map, - seq2.seq, + var binary = require_binary(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var merge2 = require_merge(); + var omap = require_omap(); + var pairs = require_pairs(); + var set = require_set(); + var timestamp = require_timestamp(); + var schema2 = [ + map.map, + seq.seq, string.string, - _null2.nullTag, - bool2.trueTag, - bool2.falseTag, - int2.intBin, - int2.intOct, - int2.int, - int2.intHex, - float2.floatNaN, - float2.floatExp, - float2.float, - binary2.binary, - merge3.merge, - omap2.omap, - pairs2.pairs, - set2.set, - timestamp2.intTime, - timestamp2.floatTime, - timestamp2.timestamp + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + merge2.merge, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp ]; - exports2.schema = schema3; + exports2.schema = schema2; } }); @@ -37919,61 +37918,61 @@ var require_schema3 = __commonJS({ var require_tags = __commonJS({ "node_modules/yaml/dist/schema/tags.js"(exports2) { "use strict"; - var map2 = require_map(); - var _null2 = require_null(); - var seq2 = require_seq(); + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); var string = require_string(); - var bool2 = require_bool(); - var float2 = require_float(); - var int2 = require_int(); - var schema3 = require_schema(); + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema2 = require_schema(); var schema$1 = require_schema2(); - var binary2 = require_binary(); - var merge3 = require_merge(); - var omap2 = require_omap(); - var pairs2 = require_pairs(); + var binary = require_binary(); + var merge2 = require_merge(); + var omap = require_omap(); + var pairs = require_pairs(); var schema$2 = require_schema3(); - var set2 = require_set(); - var timestamp2 = require_timestamp(); + var set = require_set(); + var timestamp = require_timestamp(); var schemas = /* @__PURE__ */ new Map([ - ["core", schema3.schema], - ["failsafe", [map2.map, seq2.seq, string.string]], + ["core", schema2.schema], + ["failsafe", [map.map, seq.seq, string.string]], ["json", schema$1.schema], ["yaml11", schema$2.schema], ["yaml-1.1", schema$2.schema] ]); var tagsByName = { - binary: binary2.binary, - bool: bool2.boolTag, - float: float2.float, - floatExp: float2.floatExp, - floatNaN: float2.floatNaN, - floatTime: timestamp2.floatTime, - int: int2.int, - intHex: int2.intHex, - intOct: int2.intOct, - intTime: timestamp2.intTime, - map: map2.map, - merge: merge3.merge, - null: _null2.nullTag, - omap: omap2.omap, - pairs: pairs2.pairs, - seq: seq2.seq, - set: set2.set, - timestamp: timestamp2.timestamp + 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: map.map, + merge: merge2.merge, + 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": binary2.binary, - "tag:yaml.org,2002:merge": merge3.merge, - "tag:yaml.org,2002:omap": omap2.omap, - "tag:yaml.org,2002:pairs": pairs2.pairs, - "tag:yaml.org,2002:set": set2.set, - "tag:yaml.org,2002:timestamp": timestamp2.timestamp + "tag:yaml.org,2002:binary": binary.binary, + "tag:yaml.org,2002:merge": merge2.merge, + "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, addMergeTag) { const schemaTags = schemas.get(schemaName); if (schemaTags && !customTags) { - return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice(); + return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice(); } let tags2 = schemaTags; if (!tags2) { @@ -37992,7 +37991,7 @@ var require_tags = __commonJS({ tags2 = customTags(tags2.slice()); } if (addMergeTag) - tags2 = tags2.concat(merge3.merge); + tags2 = tags2.concat(merge2.merge); return tags2.reduce((tags3, tag) => { const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; if (!tagObj) { @@ -38016,8 +38015,8 @@ var require_Schema = __commonJS({ "node_modules/yaml/dist/schema/Schema.js"(exports2) { "use strict"; var identity = require_identity(); - var map2 = require_map(); - var seq2 = require_seq(); + var map = require_map(); + var seq = require_seq(); var string = require_string(); var tags2 = require_tags(); var sortMapEntriesByKey = /* @__PURE__ */ __name((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0, "sortMapEntri\ @@ -38026,15 +38025,15 @@ esByKey"); static { __name(this, "Schema"); } - constructor({ compat, customTags, merge: merge3, resolveKnownTags, schema: schema3, sortMapEntries, toStringDefaults }) { + constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema: schema2, sortMapEntries, toStringDefaults }) { this.compat = Array.isArray(compat) ? tags2.getTags(compat, "compat") : compat ? tags2.getTags(null, compat) : null; - this.name = typeof schema3 === "string" && schema3 || "core"; + this.name = typeof schema2 === "string" && schema2 || "core"; this.knownTags = resolveKnownTags ? tags2.coreKnownTags : {}; - this.tags = tags2.getTags(customTags, this.name, merge3); + this.tags = tags2.getTags(customTags, this.name, merge2); this.toStringOptions = toStringDefaults ?? null; - Object.defineProperty(this, identity.MAP, { value: map2.map }); + Object.defineProperty(this, identity.MAP, { value: map.map }); Object.defineProperty(this, identity.SCALAR, { value: string.string }); - Object.defineProperty(this, identity.SEQ, { value: seq2.seq }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; } @@ -38398,11 +38397,11 @@ var require_Document = __commonJS({ throw new Error(`With a null YAML version, the { schema: Schema } option is required`); } // json & jsonArg are only used from toJSON() - toJS({ json: json2, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { const ctx = { anchors: /* @__PURE__ */ new Map(), doc: this, - keep: !json2, + keep: !json, mapAsMap: mapAsMap === true, mapKeyWarned: false, maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 @@ -38745,9 +38744,9 @@ var require_resolve_block_map = __commonJS({ 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: composeNode2, composeEmptyNode }, ctx, bm, onError2, tag) { + function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; - const map2 = new NodeClass(ctx.schema); + const map = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; let offset = bm.offset; @@ -38773,10 +38772,10 @@ var require_resolve_block_map = __commonJS({ if (!keyProps.anchor && !keyProps.tag && !sep7) { commentEnd = keyProps.end; if (keyProps.comment) { - if (map2.comment) - map2.comment += "\n" + keyProps.comment; + if (map.comment) + map.comment += "\n" + keyProps.comment; else - map2.comment = keyProps.comment; + map.comment = keyProps.comment; } continue; } @@ -38789,12 +38788,12 @@ e"); } ctx.atKey = true; const keyStart = keyProps.end; - const keyNode = key ? composeNode2(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, + const keyNode = key ? composeNode(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError2); ctx.atKey = false; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); const valueProps = resolveProps.resolveProps(sep7 ?? [], { indicator: "map-value-ind", @@ -38813,15 +38812,15 @@ e"); onError2(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 ? composeNode2(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, - null, valueProps, onError2); + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, null, + valueProps, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError2); offset = valueNode.range[2]; const pair = new Pair.Pair(keyNode, valueNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } else { if (implicitKey) onError2(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); @@ -38834,13 +38833,13 @@ e"); const pair = new Pair.Pair(keyNode); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; - map2.items.push(pair); + map.items.push(pair); } } if (commentEnd && commentEnd < offset) onError2(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); - map2.range = [bm.offset, offset, commentEnd ?? offset]; - return map2; + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; } __name(resolveBlockMap, "resolveBlockMap"); exports2.resolveBlockMap = resolveBlockMap; @@ -38854,9 +38853,9 @@ var require_resolve_block_seq = __commonJS({ var YAMLSeq = require_YAMLSeq(); var resolveProps = require_resolve_props(); var utilFlowIndentCheck = require_util_flow_indent_check(); - function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode }, ctx, bs, onError2, tag) { + function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError2, tag) { const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; - const seq2 = new NodeClass(ctx.schema); + const seq = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; if (ctx.atKey) @@ -38881,19 +38880,19 @@ var require_resolve_block_seq = __commonJS({ } else { commentEnd = props.end; if (props.comment) - seq2.comment = props.comment; + seq.comment = props.comment; continue; } } - const node = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, + const node = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, start, null, props, onError2); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError2); offset = node.range[2]; - seq2.items.push(node); + seq.items.push(node); } - seq2.range = [bs.offset, offset, commentEnd ?? offset]; - return seq2; + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; } __name(resolveBlockSeq, "resolveBlockSeq"); exports2.resolveBlockSeq = resolveBlockSeq; @@ -38910,8 +38909,8 @@ var require_resolve_end = __commonJS({ let hasSpace = false; let sep7 = ""; for (const token of end) { - const { source, type: type2 } = token; - switch (type2) { + const { source, type } = token; + switch (type) { case "space": hasSpace = true; break; @@ -38932,7 +38931,7 @@ var require_resolve_end = __commonJS({ hasSpace = true; break; default: - onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type2} at node end`); + onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); } offset += source.length; } @@ -38959,7 +38958,7 @@ var require_resolve_flow_collection = __commonJS({ var blockMsg = "Block collections are not allowed within flow collections"; var isBlock = /* @__PURE__ */ __name((token) => token && (token.type === "block-map" || token.type === "block-seq"), "isBlock"); - function resolveFlowCollection({ composeNode: composeNode2, composeEmptyNode }, ctx, fc, onError2, tag) { + function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError2, tag) { const isMap = fc.start.source === "{"; const fcName = isMap ? "flow map" : "flow sequence"; const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq); @@ -39039,7 +39038,7 @@ var require_resolve_flow_collection = __commonJS({ } } if (!isMap && !sep7 && !props.found) { - const valueNode = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, + const valueNode = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, props, onError2); coll.items.push(valueNode); offset = valueNode.range[2]; @@ -39048,7 +39047,7 @@ var require_resolve_flow_collection = __commonJS({ } else { ctx.atKey = true; const keyStart = props.end; - const keyNode = key ? composeNode2(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, + const keyNode = key ? composeNode(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, onError2); if (isBlock(key)) onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg); @@ -39084,7 +39083,7 @@ start of an implicit flow sequence key"); else onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); } - const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( + const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode( ctx, valueProps.end, sep7, null, valueProps, onError2) : null; if (valueNode) { if (isBlock(value)) @@ -39099,17 +39098,17 @@ start of an implicit flow sequence key"); if (ctx.options.keepSourceTokens) pair.srcToken = collItem; if (isMap) { - const map2 = coll; - if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode)) + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); - map2.items.push(pair); + map.items.push(pair); } else { - const map2 = new YAMLMap.YAMLMap(ctx.schema); - map2.flow = true; - map2.items.push(pair); + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); const endRange = (valueNode ?? keyNode).range; - map2.range = [keyNode.range[0], endRange[1], endRange[2]]; - coll.items.push(map2); + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); } offset = valueNode ? valueNode.range[2] : valueProps.end; } @@ -39229,7 +39228,7 @@ var require_resolve_block_scalar = __commonJS({ const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError2); if (!header) return { value: "", type: null, comment: "", range: [start, start, start] }; - const type2 = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + 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 i2 = lines.length - 1; i2 >= 0; --i2) { @@ -39244,7 +39243,7 @@ var require_resolve_block_scalar = __commonJS({ let end2 = start + header.length; if (scalar.source) end2 += scalar.source.length; - return { value: value2, type: type2, comment: header.comment, range: [start, end2, end2] }; + return { value: value2, type, comment: header.comment, range: [start, end2, end2] }; } let trimIndent = scalar.indent + header.indent; let offset = scalar.offset + header.length; @@ -39292,7 +39291,7 @@ ator"; onError2(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); indent = ""; } - if (type2 === Scalar.Scalar.BLOCK_LITERAL) { + if (type === Scalar.Scalar.BLOCK_LITERAL) { value += sep7 + indent.slice(trimIndent) + content; sep7 = "\n"; } else if (indent.length > trimIndent || content[0] === " ") { @@ -39327,7 +39326,7 @@ ator"; value += "\n"; } const end = start + header.length + scalar.source.length; - return { value, type: type2, comment: header.comment, range: [start, end, end] }; + return { value, type, comment: header.comment, range: [start, end, end] }; } __name(resolveBlockScalar, "resolveBlockScalar"); function parseBlockScalarHeader({ offset, props }, strict, onError2) { @@ -39413,11 +39412,11 @@ var require_resolve_flow_scalar = __commonJS({ var Scalar = require_Scalar(); var resolveEnd = require_resolve_end(); function resolveFlowScalar(scalar, strict, onError2) { - const { offset, type: type2, source, end } = scalar; + const { offset, type, source, end } = scalar; let _type; let value; const _onError = /* @__PURE__ */ __name((rel, code, msg) => onError2(offset + rel, code, msg), "_onError"); - switch (type2) { + switch (type) { case "scalar": _type = Scalar.Scalar.PLAIN; value = plainValue(source, _onError); @@ -39432,7 +39431,7 @@ var require_resolve_flow_scalar = __commonJS({ break; /* istanbul ignore next should not happen */ default: - onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type2}`); + onError2(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); return { value: "", type: null, @@ -39642,7 +39641,7 @@ var require_compose_scalar = __commonJS({ var resolveBlockScalar = require_resolve_block_scalar(); var resolveFlowScalar = require_resolve_flow_scalar(); function composeScalar(ctx, token, tagToken, onError2) { - const { value, type: type2, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( + const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar( ctx, token, onError2) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError2); const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError2(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; @@ -39666,8 +39665,8 @@ var require_compose_scalar = __commonJS({ } scalar.range = range2; scalar.source = value; - if (type2) - scalar.type = type2; + if (type) + scalar.type = type; if (tagName) scalar.tag = tagName; if (tag.format) @@ -39677,11 +39676,11 @@ var require_compose_scalar = __commonJS({ return scalar; } __name(composeScalar, "composeScalar"); - function findScalarTagByName(schema3, value, tagName, tagToken, onError2) { + function findScalarTagByName(schema2, value, tagName, tagToken, onError2) { if (tagName === "!") - return schema3[identity.SCALAR]; + return schema2[identity.SCALAR]; const matchWithTest = []; - for (const tag of schema3.tags) { + for (const tag of schema2.tags) { if (!tag.collection && tag.tag === tagName) { if (tag.default && tag.test) matchWithTest.push(tag); @@ -39692,20 +39691,20 @@ var require_compose_scalar = __commonJS({ for (const tag of matchWithTest) if (tag.test?.test(value)) return tag; - const kt = schema3.knownTags[tagName]; + const kt = schema2.knownTags[tagName]; if (kt && !kt.collection) { - schema3.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + schema2.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); return kt; } onError2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); - return schema3[identity.SCALAR]; + return schema2[identity.SCALAR]; } __name(findScalarTagByName, "findScalarTagByName"); - function findScalarTagByTest({ atKey, directives, schema: schema3 }, value, token, onError2) { - const tag = schema3.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test( - value)) || schema3[identity.SCALAR]; - if (schema3.compat) { - const compat = schema3.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema3[identity.SCALAR]; + function findScalarTagByTest({ atKey, directives, schema: schema2 }, value, token, onError2) { + const tag = schema2.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test( + value)) || schema2[identity.SCALAR]; + if (schema2.compat) { + const compat = schema2.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema2[identity.SCALAR]; if (tag.tag !== compat.tag) { const ts = directives.tagString(tag.tag); const cs = directives.tagString(compat.tag); @@ -39761,8 +39760,8 @@ var require_compose_node = __commonJS({ var composeScalar = require_compose_scalar(); var resolveEnd = require_resolve_end(); var utilEmptyScalarPosition = require_util_empty_scalar_position(); - var CN = { composeNode: composeNode2, composeEmptyNode }; - function composeNode2(ctx, token, props, onError2) { + var CN = { composeNode, composeEmptyNode }; + function composeNode(ctx, token, props, onError2) { const atKey = ctx.atKey; const { spaceBefore, comment, anchor, tag } = props; let node; @@ -39819,7 +39818,7 @@ var require_compose_node = __commonJS({ node.srcToken = token; return node; } - __name(composeNode2, "composeNode"); + __name(composeNode, "composeNode"); function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError2) { const token = { type: "scalar", @@ -39857,7 +39856,7 @@ var require_compose_node = __commonJS({ } __name(composeAlias, "composeAlias"); exports2.composeEmptyNode = composeEmptyNode; - exports2.composeNode = composeNode2; + exports2.composeNode = composeNode; } }); @@ -39866,7 +39865,7 @@ var require_compose_doc = __commonJS({ "node_modules/yaml/dist/compose/compose-doc.js"(exports2) { "use strict"; var Document = require_Document(); - var composeNode2 = require_compose_node(); + var composeNode = require_compose_node(); var resolveEnd = require_resolve_end(); var resolveProps = require_resolve_props(); function composeDoc(options, directives, { offset, start, value, end }, onError2) { @@ -39892,7 +39891,7 @@ var require_compose_doc = __commonJS({ if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) onError2(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); } - doc.contents = value ? composeNode2.composeNode(ctx, value, props, onError2) : composeNode2.composeEmptyNode(ctx, props. + doc.contents = value ? composeNode.composeNode(ctx, value, props, onError2) : composeNode.composeEmptyNode(ctx, props. end, start, null, props, onError2); const contentEnd = doc.contents.range[2]; const re = resolveEnd.resolveEnd(end, contentEnd, false, onError2); @@ -40151,8 +40150,8 @@ var require_cst_scalar = __commonJS({ } __name(resolveAsScalar, "resolveAsScalar"); function createScalarToken(value, context3) { - const { implicitKey = false, indent, inFlow = false, offset = -1, type: type2 = "PLAIN" } = context3; - const source = stringifyString.stringifyString({ type: type2, value }, { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = "PLAIN" } = context3; + const source = stringifyString.stringifyString({ type, value }, { implicitKey, indent: indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -40184,29 +40183,29 @@ var require_cst_scalar = __commonJS({ } __name(createScalarToken, "createScalarToken"); function setScalarValue(token, value, context3 = {}) { - let { afterKey = false, implicitKey = false, inFlow = false, type: type2 } = context3; + let { afterKey = false, implicitKey = false, inFlow = false, type } = context3; let indent = "indent" in token ? token.indent : null; if (afterKey && typeof indent === "number") indent += 2; - if (!type2) + if (!type) switch (token.type) { case "single-quoted-scalar": - type2 = "QUOTE_SINGLE"; + type = "QUOTE_SINGLE"; break; case "double-quoted-scalar": - type2 = "QUOTE_DOUBLE"; + 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"); - type2 = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; + type = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; break; } default: - type2 = "PLAIN"; + type = "PLAIN"; } - const source = stringifyString.stringifyString({ type: type2, value }, { + const source = stringifyString.stringifyString({ type, value }, { implicitKey: implicitKey || indent === null, indent: indent !== null && indent > 0 ? " ".repeat(indent) : "", inFlow, @@ -40268,12 +40267,12 @@ var require_cst_scalar = __commonJS({ return false; } __name(addEndtoBlockProps, "addEndtoBlockProps"); - function setFlowScalarValue(token, source, type2) { + function setFlowScalarValue(token, source, type) { switch (token.type) { case "scalar": case "double-quoted-scalar": case "single-quoted-scalar": - token.type = type2; + token.type = type; token.source = source; break; case "block-scalar": { @@ -40284,7 +40283,7 @@ var require_cst_scalar = __commonJS({ for (const tok of end) tok.offset += oa; delete token.props; - Object.assign(token, { type: type2, source, end }); + Object.assign(token, { type, source, end }); break; } case "block-map": @@ -40292,7 +40291,7 @@ var require_cst_scalar = __commonJS({ const offset = token.offset + source.length; const nl = { type: "newline", offset, indent: token.indent, source: "\n" }; delete token.items; - Object.assign(token, { type: type2, source, end: [nl] }); + Object.assign(token, { type, source, end: [nl] }); break; } default: { @@ -40302,7 +40301,7 @@ var require_cst_scalar = __commonJS({ for (const key of Object.keys(token)) if (key !== "type" && key !== "offset") delete token[key]; - Object.assign(token, { type: type2, indent, source, end }); + Object.assign(token, { type, indent, source, end }); } } } @@ -41181,9 +41180,9 @@ var require_parser = __commonJS({ var node_process = require("process"); var cst = require_cst(); var lexer = require_lexer(); - function includesToken(list, type2) { + function includesToken(list, type) { for (let i2 = 0; i2 < list.length; ++i2) - if (list[i2].type === type2) + if (list[i2].type === type) return true; return false; } @@ -41328,19 +41327,19 @@ nd")) { this.offset += source.length; return; } - const type2 = cst.tokenType(source); - if (!type2) { + 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 (type2 === "scalar") { + } else if (type === "scalar") { this.atNewLine = false; this.atScalar = true; this.type = "scalar"; } else { - this.type = type2; + this.type = type; yield* this.step(); - switch (type2) { + switch (type) { case "newline": this.atNewLine = true; this.indent = 0; @@ -41567,14 +41566,14 @@ k-map" || token.type === "block-seq")) { delete scalar.end; } else sep7 = [this.sourceToken]; - const map2 = { + const map = { type: "block-map", offset: scalar.offset, indent: scalar.indent, items: [{ start, key: scalar, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else yield* this.lineEnd(scalar); } @@ -41604,8 +41603,8 @@ k-map" || token.type === "block-seq")) { yield* this.step(); } } - *blockMap(map2) { - const it = map2.items[map2.items.length - 1]; + *blockMap(map) { + const it = map.items[map.items.length - 1]; switch (this.type) { case "newline": this.onKeyLine = false; @@ -41615,7 +41614,7 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { @@ -41625,17 +41624,17 @@ k-map" || token.type === "block-seq")) { case "space": case "comment": if (it.value) { - map2.items.push({ start: [this.sourceToken] }); + map.items.push({ start: [this.sourceToken] }); } else if (it.sep) { it.sep.push(this.sourceToken); } else { - if (this.atIndentedComment(it.start, map2.indent)) { - const prev = map2.items[map2.items.length - 2]; + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - map2.items.pop(); + map.items.pop(); return; } } @@ -41643,8 +41642,8 @@ k-map" || token.type === "block-seq")) { } return; } - if (this.indent >= map2.indent) { - const atMapIndent = !this.onKeyLine && this.indent === map2.indent; + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind"; let start = []; if (atNextItem && it.sep && !it.value) { @@ -41658,7 +41657,7 @@ k-map" || token.type === "block-seq")) { case "space": break; case "comment": - if (st.indent > map2.indent) + if (st.indent > map.indent) nl.length = 0; break; default: @@ -41673,7 +41672,7 @@ k-map" || token.type === "block-seq")) { case "tag": if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start }); + map.items.push({ start }); this.onKeyLine = true; } else if (it.sep) { it.sep.push(this.sourceToken); @@ -41687,7 +41686,7 @@ k-map" || token.type === "block-seq")) { it.explicitKey = true; } else if (atNextItem || it.value) { start.push(this.sourceToken); - map2.items.push({ start, explicitKey: true }); + map.items.push({ start, explicitKey: true }); } else { this.stack.push({ type: "block-map", @@ -41713,7 +41712,7 @@ k-map" || token.type === "block-seq")) { }); } } else if (it.value) { - map2.items.push({ start: [], key: null, sep: [this.sourceToken] }); + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -41743,7 +41742,7 @@ k-map" || token.type === "block-seq")) { if (!it.sep) { Object.assign(it, { key: null, sep: [this.sourceToken] }); } else if (it.value || atNextItem) { - map2.items.push({ start, key: null, sep: [this.sourceToken] }); + map.items.push({ start, key: null, sep: [this.sourceToken] }); } else if (includesToken(it.sep, "map-value-ind")) { this.stack.push({ type: "block-map", @@ -41763,7 +41762,7 @@ k-map" || token.type === "block-seq")) { case "double-quoted-scalar": { const fs15 = this.flowScalar(this.type); if (atNextItem || it.value) { - map2.items.push({ start, key: fs15, sep: [] }); + map.items.push({ start, key: fs15, sep: [] }); this.onKeyLine = true; } else if (it.sep) { this.stack.push(fs15); @@ -41774,7 +41773,7 @@ k-map" || token.type === "block-seq")) { return; } default: { - const bv = this.startBlockValue(map2); + const bv = this.startBlockValue(map); if (bv) { if (bv.type === "block-seq") { if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) { @@ -41787,7 +41786,7 @@ k-map" || token.type === "block-seq")) { return; } } else if (atMapIndent) { - map2.items.push({ start }); + map.items.push({ start }); } this.stack.push(bv); return; @@ -41798,8 +41797,8 @@ k-map" || token.type === "block-seq")) { yield* this.pop(); yield* this.step(); } - *blockSequence(seq2) { - const it = seq2.items[seq2.items.length - 1]; + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; switch (this.type) { case "newline": if (it.value) { @@ -41808,22 +41807,22 @@ k-map" || token.type === "block-seq")) { if (last2?.type === "comment") end?.push(this.sourceToken); else - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); } else it.start.push(this.sourceToken); return; case "space": case "comment": if (it.value) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else { - if (this.atIndentedComment(it.start, seq2.indent)) { - const prev = seq2.items[seq2.items.length - 2]; + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; const end = prev?.value?.end; if (Array.isArray(end)) { arrayPushArray(end, it.start); end.push(this.sourceToken); - seq2.items.pop(); + seq.items.pop(); return; } } @@ -41832,21 +41831,21 @@ k-map" || token.type === "block-seq")) { return; case "anchor": case "tag": - if (it.value || this.indent <= seq2.indent) + if (it.value || this.indent <= seq.indent) break; it.start.push(this.sourceToken); return; case "seq-item-ind": - if (this.indent !== seq2.indent) + if (this.indent !== seq.indent) break; if (it.value || includesToken(it.start, "seq-item-ind")) - seq2.items.push({ start: [this.sourceToken] }); + seq.items.push({ start: [this.sourceToken] }); else it.start.push(this.sourceToken); return; } - if (this.indent > seq2.indent) { - const bv = this.startBlockValue(seq2); + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); if (bv) { this.stack.push(bv); return; @@ -41929,20 +41928,20 @@ k-map" || token.type === "block-seq")) { fixFlowSeqItems(fc); const sep7 = fc.end.splice(1, fc.end.length); sep7.push(this.sourceToken); - const map2 = { + const map = { type: "block-map", offset: fc.offset, indent: fc.indent, items: [{ start, key: fc, sep: sep7 }] }; this.onKeyLine = true; - this.stack[this.stack.length - 1] = map2; + this.stack[this.stack.length - 1] = map; } else { yield* this.lineEnd(fc); } } } - flowScalar(type2) { + flowScalar(type) { if (this.onNewLine) { let nl = this.source.indexOf("\n") + 1; while (nl !== 0) { @@ -41951,7 +41950,7 @@ k-map" || token.type === "block-seq")) { } } return { - type: type2, + type, offset: this.offset, indent: this.indent, source: this.source @@ -42240,40 +42239,40 @@ var require_balanced_match = __commonJS({ "node_modules/@actions/glob/node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r2 = range2(a, b, str2); + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r2 = range2(a, b, str); return r2 && { start: r2[0], end: r2[1], - pre: str2.slice(0, r2[0]), - body: str2.slice(r2[0] + a.length, r2[1]), - post: str2.slice(r2[1] + b.length) + pre: str.slice(0, r2[0]), + body: str.slice(r2[0] + a.length, r2[1]), + post: str.slice(r2[1] + b.length) }; } __name(balanced, "balanced"); - function maybeMatch(reg, str2) { - var m = str2.match(reg); + function maybeMatch(reg, str) { + var m = str.match(reg); return m ? m[0] : null; } __name(maybeMatch, "maybeMatch"); balanced.range = range2; - function range2(a, b, str2) { + function range2(a, b, str) { var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); var i2 = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; - left = str2.length; + left = str.length; while (i2 >= 0 && !result) { if (i2 == ai) { begs.push(i2); - ai = str2.indexOf(a, i2 + 1); + ai = str.indexOf(a, i2 + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { @@ -42282,7 +42281,7 @@ var require_balanced_match = __commonJS({ left = beg; right = bi; } - bi = str2.indexOf(b, i2 + 1); + bi = str.indexOf(b, i2 + 1); } i2 = ai < bi && ai >= 0 ? ai : bi; } @@ -42307,27 +42306,27 @@ var require_brace_expansion = __commonJS({ var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } __name(numeric, "numeric"); - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join( - escComma).split("\\.").join(escPeriod); + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma). + split("\\.").join(escPeriod); } __name(escapeBraces, "escapeBraces"); - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(","). split(escPeriod).join("."); } __name(unescapeBraces, "unescapeBraces"); - function parseCommaParts(str2) { - if (!str2) + function parseCommaParts(str) { + if (!str) return [""]; var parts = []; - var m = balanced("{", "}", str2); + var m = balanced("{", "}", str); if (!m) - return str2.split(","); + return str.split(","); var pre = m.pre; var body2 = m.body; var post = m.post; @@ -42342,19 +42341,19 @@ var require_brace_expansion = __commonJS({ return parts; } __name(parseCommaParts, "parseCommaParts"); - function expandTop(str2, options) { - if (!str2) + function expandTop(str, options) { + if (!str) return []; options = options || {}; var max = options.max == null ? Infinity : options.max; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); } - return expand(escapeBraces(str2), max, true).map(unescapeBraces); + return expand(escapeBraces(str), max, true).map(unescapeBraces); } __name(expandTop, "expandTop"); - function embrace(str2) { - return "{" + str2 + "}"; + function embrace(str) { + return "{" + str + "}"; } __name(embrace, "embrace"); function isPadded(el) { @@ -42369,20 +42368,20 @@ var require_brace_expansion = __commonJS({ return i2 >= y; } __name(gte, "gte"); - function expand(str2, max, isTop) { + function expand(str, max, isTop) { var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2, max, true); + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str, max, true); } - return [str2]; + return [str]; } var n; if (isSequence) { @@ -42483,9 +42482,9 @@ var require_minimatch = __commonJS({ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { - return s.split("").reduce(function(set2, c3) { - set2[c3] = true; - return set2; + return s.split("").reduce(function(set, c3) { + set[c3] = true; + return set; }, {}); } __name(charSet, "charSet"); @@ -42590,24 +42589,24 @@ var require_minimatch = __commonJS({ return; } this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); + var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = /* @__PURE__ */ __name(function debug3() { console.error.apply(console, arguments); }, "debug"); - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { + this.debug(this.pattern, set); + set = set.filter(function(s) { return s.indexOf(false) === -1; }); - this.debug(this.pattern, set2); - this.set = set2; + this.debug(this.pattern, set); + this.set = set; } __name(make, "make"); Minimatch2.prototype.parseNegate = parseNegate; @@ -42898,15 +42897,15 @@ var require_minimatch = __commonJS({ Minimatch2.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { + var set = this.set; + if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { + var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); @@ -42944,16 +42943,16 @@ var require_minimatch = __commonJS({ } f = f.split(slashSplit); this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); + var set = this.set; + this.debug(this.pattern, "set", set); var filename; var i2; for (i2 = f.length - 1; i2 >= 0; i2--) { filename = f[i2]; if (filename) break; } - for (i2 = 0; i2 < set2.length; i2++) { - var pattern = set2[i2]; + for (i2 = 0; i2 < set.length; i2++) { + var pattern = set[i2]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; @@ -43186,19 +43185,19 @@ var require_helpers = __commonJS({ } __name(toBuffer, "toBuffer"); exports2.toBuffer = toBuffer; - async function json2(stream6) { + async function json(stream6) { const buf = await toBuffer(stream6); - const str2 = buf.toString("utf8"); + const str = buf.toString("utf8"); try { - return JSON.parse(str2); + return JSON.parse(str); } catch (_err) { const err = _err; - err.message += ` (input: ${str2})`; + err.message += ` (input: ${str})`; throw err; } } - __name(json2, "json"); - exports2.json = json2; + __name(json, "json"); + exports2.json = json; function req(url3, opts = {}) { const href = typeof url3 === "string" ? url3 : url3.href; const req2 = (href.startsWith("https:") ? https4 : http4).request(url3, opts); @@ -44816,8 +44815,8 @@ var require_binary_writer = __commonJS({ * * Generated code should compute the tag ahead of time and call `uint32()`. */ - tag(fieldNo, type2) { - return this.uint32((fieldNo << 3 | type2) >>> 0); + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } /** * Write a chunk of raw bytes. @@ -45346,31 +45345,31 @@ var require_reflection_type_check = __commonJS({ } return true; } - message(arg, type2, allowExcessProperties, depth) { + message(arg, type, allowExcessProperties, depth) { if (allowExcessProperties) { - return type2.isAssignable(arg, depth); + return type.isAssignable(arg, depth); } - return type2.is(arg, depth); + return type.is(arg, depth); } - messages(arg, type2, allowExcessProperties, depth) { + messages(arg, type, allowExcessProperties, depth) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (allowExcessProperties) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.isAssignable(arg[i2], depth - 1)) + if (!type.isAssignable(arg[i2], depth - 1)) return false; } else { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!type2.is(arg[i2], depth - 1)) + if (!type.is(arg[i2], depth - 1)) return false; } return true; } - scalar(arg, type2, longType) { + scalar(arg, type, longType) { let argType = typeof arg; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.UINT64: case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.INT64: @@ -45397,31 +45396,31 @@ var require_reflection_type_check = __commonJS({ return argType == "number" && Number.isInteger(arg); } } - scalars(arg, type2, depth, longType) { + scalars(arg, type, depth, longType) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (Array.isArray(arg)) { for (let i2 = 0; i2 < arg.length && i2 < depth; i2++) - if (!this.scalar(arg[i2], type2, longType)) + if (!this.scalar(arg[i2], type, longType)) return false; } return true; } - mapKeys(map2, type2, depth) { - let keys = Object.keys(map2); - switch (type2) { + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); case reflection_info_1.ScalarType.BOOL: - return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); default: - return this.scalars(keys, type2, depth, reflection_info_1.LongType.STRING); + return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING); } } }; @@ -45436,8 +45435,8 @@ var require_reflection_long_convert = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionLongConvert = void 0; var reflection_info_1 = require_reflection_info(); - function reflectionLongConvert(long, type2) { - switch (type2) { + function reflectionLongConvert(long, type) { + switch (type) { case reflection_info_1.LongType.BIGINT: return long.toBigInt(); case reflection_info_1.LongType.NUMBER: @@ -45610,93 +45609,93 @@ var require_reflection_json_reader = __commonJS({ * * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - enum(type2, json2, fieldName, ignoreUnknownFields) { - if (type2[0] == "google.protobuf.NullValue") - assert_1.assert(json2 === null || json2 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ -, enum ${type2[0]} only accepts null.`); - if (json2 === null) + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") + assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}\ +, enum ${type[0]} only accepts null.`); + if (json === null) return 0; - switch (typeof json2) { + switch (typeof json) { case "number": - assert_1.assert(Number.isInteger(json2), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can\ - only be integral number, got ${json2}.`); - return json2; + assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can \ +only be integral number, got ${json}.`); + return json; case "string": - let localEnumName = json2; - if (type2[2] && json2.substring(0, type2[2].length) === type2[2]) - localEnumName = json2.substring(type2[2].length); - let enumNumber = type2[1][localEnumName]; + let localEnumName = json; + if (type[2] && json.substring(0, type[2].length) === type[2]) + localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; if (typeof enumNumber === "undefined" && ignoreUnknownFields) { return false; } assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, en\ -um ${type2[0]} has no value for "${json2}".`); +um ${type[0]} has no value for "${json}".`); return enumNumber; } - assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json2}\ + assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}\ ".`); } - scalar(json2, type2, longType, fieldName) { + scalar(json, type, longType, fieldName) { let e; try { - switch (type2) { + switch (type) { // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity". // Either numbers or strings are accepted. Exponent notation is also accepted. case reflection_info_1.ScalarType.DOUBLE: case reflection_info_1.ScalarType.FLOAT: - if (json2 === null) + if (json === null) return 0; - if (json2 === "NaN") + if (json === "NaN") return Number.NaN; - if (json2 === "Infinity") + if (json === "Infinity") return Number.POSITIVE_INFINITY; - if (json2 === "-Infinity") + if (json === "-Infinity") return Number.NEGATIVE_INFINITY; - if (json2 === "") { + if (json === "") { e = "empty string"; break; } - if (typeof json2 == "string" && json2.trim().length !== json2.length) { + if (typeof json == "string" && json.trim().length !== json.length) { e = "extra whitespace"; break; } - if (typeof json2 != "string" && typeof json2 != "number") { + if (typeof json != "string" && typeof json != "number") { break; } - let float2 = Number(json2); - if (Number.isNaN(float2)) { + let float = Number(json); + if (Number.isNaN(float)) { e = "not a number"; break; } - if (!Number.isFinite(float2)) { + if (!Number.isFinite(float)) { e = "too large or small"; break; } - if (type2 == reflection_info_1.ScalarType.FLOAT) - assert_1.assertFloat32(float2); - return float2; + if (type == reflection_info_1.ScalarType.FLOAT) + assert_1.assertFloat32(float); + return float; // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - if (json2 === null) + if (json === null) return 0; let int32; - if (typeof json2 == "number") - int32 = json2; - else if (json2 === "") + if (typeof json == "number") + int32 = json; + else if (json === "") e = "empty string"; - else if (typeof json2 == "string") { - if (json2.trim().length !== json2.length) + else if (typeof json == "string") { + if (json.trim().length !== json.length) e = "extra whitespace"; else - int32 = Number(json2); + int32 = Number(json); } if (int32 === void 0) break; - if (type2 == reflection_info_1.ScalarType.UINT32) + if (type == reflection_info_1.ScalarType.UINT32) assert_1.assertUInt32(int32); else assert_1.assertInt32(int32); @@ -45705,53 +45704,53 @@ um ${type2[0]} has no value for "${json2}".`); case reflection_info_1.ScalarType.INT64: case reflection_info_1.ScalarType.SFIXED64: case reflection_info_1.ScalarType.SINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType); case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.UINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType); // bool: case reflection_info_1.ScalarType.BOOL: - if (json2 === null) + if (json === null) return false; - if (typeof json2 !== "boolean") + if (typeof json !== "boolean") break; - return json2; + return json; // string: case reflection_info_1.ScalarType.STRING: - if (json2 === null) + if (json === null) return ""; - if (typeof json2 !== "string") { + if (typeof json !== "string") { e = "extra whitespace"; break; } try { - encodeURIComponent(json2); + encodeURIComponent(json); } catch (e2) { e2 = "invalid UTF8"; break; } - return json2; + return json; // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. // Either standard or URL-safe base64 encoding with/without paddings are accepted. case reflection_info_1.ScalarType.BYTES: - if (json2 === null || json2 === "") + if (json === null || json === "") return new Uint8Array(0); - if (typeof json2 !== "string") + if (typeof json !== "string") break; - return base64_1.base64decode(json2); + return base64_1.base64decode(json); } } catch (error2) { e = error2.message; } - this.assert(false, fieldName + (e ? " - " + e : ""), json2); + this.assert(false, fieldName + (e ? " - " + e : ""), json); } }; exports2.ReflectionJsonReader = ReflectionJsonReader; @@ -45780,12 +45779,12 @@ var require_reflection_json_writer = __commonJS({ * Converts the message to a JSON object, based on the field descriptors. */ write(message, options) { - const json2 = {}, source = message; + const json = {}, source = message; for (const field of this.fields) { if (!field.oneof) { let jsonValue2 = this.field(field, source[field.localName], options); if (jsonValue2 !== void 0) - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; continue; } const group = source[field.oneof]; @@ -45795,9 +45794,9 @@ var require_reflection_json_writer = __commonJS({ options; let jsonValue = this.field(field, group[field.localName], opt); assert_1.assert(jsonValue !== void 0); - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; } - return json2; + return json; } field(field, value, options) { let jsonValue = void 0; @@ -45881,8 +45880,8 @@ var require_reflection_json_writer = __commonJS({ /** * Returns `null` as the default for google.protobuf.NullValue. */ - enum(type2, value, fieldName, optional, emitDefaultValues, enumAsInteger) { - if (type2[0] == "google.protobuf.NullValue") + enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; if (value === void 0) { assert_1.assert(optional); @@ -45892,24 +45891,24 @@ var require_reflection_json_writer = __commonJS({ return void 0; assert_1.assert(typeof value == "number"); assert_1.assert(Number.isInteger(value)); - if (enumAsInteger || !type2[1].hasOwnProperty(value)) + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type2[2]) - return type2[2] + type2[1][value]; - return type2[1][value]; + if (type[2]) + return type[2] + type[1][value]; + return type[1][value]; } - message(type2, value, fieldName, options) { + message(type, value, fieldName, options) { if (value === void 0) return options.emitDefaultValues ? null : void 0; - return type2.internalJsonWrite(value, options); + return type.internalJsonWrite(value, options); } - scalar(type2, value, fieldName, optional, emitDefaultValues) { + scalar(type, value, fieldName, optional, emitDefaultValues) { if (value === void 0) { assert_1.assert(optional); return void 0; } const ed = emitDefaultValues || optional; - switch (type2) { + switch (type) { // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.SFIXED32: @@ -45991,8 +45990,8 @@ var require_reflection_scalar_default = __commonJS({ var reflection_info_1 = require_reflection_info(); var reflection_long_convert_1 = require_reflection_long_convert(); var pb_long_1 = require_pb_long(); - function reflectionScalarDefault(type2, longType = reflection_info_1.LongType.STRING) { - switch (type2) { + function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) { + switch (type) { case reflection_info_1.ScalarType.BOOL: return false; case reflection_info_1.ScalarType.UINT64: @@ -46159,8 +46158,8 @@ var require_reflection_binary_reader = __commonJS({ } return [key, val]; } - scalar(reader, type2, longType) { - switch (type2) { + scalar(reader, type, longType) { + switch (type) { case reflection_info_1.ScalarType.INT32: return reader.int32(); case reflection_info_1.ScalarType.STRING: @@ -46315,8 +46314,8 @@ var require_reflection_binary_writer = __commonJS({ /** * Write a single scalar value. */ - scalar(writer, type2, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type2, value); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); if (!isDefault || emitDefault) { writer.tag(fieldNo, wireType); writer[method](value); @@ -46325,13 +46324,13 @@ var require_reflection_binary_writer = __commonJS({ /** * Write an array of scalar values in packed format. */ - packed(writer, type2, fieldNo, value) { + packed(writer, type, fieldNo, value) { if (!value.length) return; - assert_1.assert(type2 !== reflection_info_1.ScalarType.BYTES && type2 !== reflection_info_1.ScalarType.STRING); + assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING); writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited); writer.fork(); - let [, method] = this.scalarInfo(type2); + let [, method] = this.scalarInfo(type); for (let i2 = 0; i2 < value.length; i2++) writer[method](value[i2]); writer.join(); @@ -46346,12 +46345,12 @@ var require_reflection_binary_writer = __commonJS({ * * If argument `value` is omitted, [2] is always false. */ - scalarInfo(type2, value) { + scalarInfo(type, value) { let t2 = binary_format_contract_1.WireType.Varint; let m; let i2 = value === void 0; let d = value === 0; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.INT32: m = "int32"; break; @@ -46429,10 +46428,10 @@ var require_reflection_create = __commonJS({ exports2.reflectionCreate = void 0; var reflection_scalar_default_1 = require_reflection_scalar_default(); var message_type_contract_1 = require_message_type_contract(); - function reflectionCreate(type2) { - const msg = type2.messagePrototype ? Object.create(type2.messagePrototype) : Object.defineProperty({}, message_type_contract_1. - MESSAGE_TYPE, { value: type2 }); - for (let field of type2.fields) { + function reflectionCreate(type) { + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1. + MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { let name = field.localName; if (field.opt) continue; @@ -46571,10 +46570,10 @@ var require_reflection_equals = __commonJS({ __name(reflectionEquals, "reflectionEquals"); exports2.reflectionEquals = reflectionEquals; var objectValues = Object.values; - function primitiveEq(type2, a, b) { + function primitiveEq(type, a, b) { if (a === b) return true; - if (type2 !== reflection_info_1.ScalarType.BYTES) + if (type !== reflection_info_1.ScalarType.BYTES) return false; let ba = a; let bb = b; @@ -46586,20 +46585,20 @@ var require_reflection_equals = __commonJS({ return true; } __name(primitiveEq, "primitiveEq"); - function repeatedPrimitiveEq(type2, a, b) { + function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!primitiveEq(type2, a[i2], b[i2])) + if (!primitiveEq(type, a[i2], b[i2])) return false; return true; } __name(repeatedPrimitiveEq, "repeatedPrimitiveEq"); - function repeatedMsgEq(type2, a, b) { + function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; for (let i2 = 0; i2 < a.length; i2++) - if (!type2.equals(a[i2], b[i2])) + if (!type.equals(a[i2], b[i2])) return false; return true; } @@ -46702,15 +46701,15 @@ var require_message_type = __commonJS({ /** * Read a new message from a JSON value. */ - fromJson(json2, options) { - return this.internalJsonRead(json2, json_format_contract_1.jsonReadOptions(options)); + fromJson(json, options) { + return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options)); } /** * Read a new message from a JSON string. * This is equivalent to `T.fromJson(JSON.parse(json))`. */ - fromJsonString(json2, options) { - let value = JSON.parse(json2); + fromJsonString(json, options) { + let value = JSON.parse(json); return this.fromJson(value, options); } /** @@ -46744,13 +46743,13 @@ var require_message_type = __commonJS({ * according to protobuf rules. If the target is omitted, * a new instance is created first. */ - internalJsonRead(json2, options, target) { - if (json2 !== null && typeof json2 == "object" && !Array.isArray(json2)) { + internalJsonRead(json, options, target) { + if (json !== null && typeof json == "object" && !Array.isArray(json)) { let message = target !== null && target !== void 0 ? target : this.create(); - this.refJsonReader.read(json2, message, options); + this.refJsonReader.read(json, message, options); return message; } - throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json2)}.`); + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`); } /** * This is an internal method. If you just want to write a message @@ -48442,14 +48441,14 @@ var require_path = __commonJS({ // node_modules/is-extglob/index.js var require_is_extglob = __commonJS({ "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = /* @__PURE__ */ __name(function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isExtglob(str) { + if (typeof str !== "string" || str === "") { return false; } var match2; - while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { + while (match2 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { if (match2[2]) return true; - str2 = str2.slice(match2.index + match2[0].length); + str = str.slice(match2.index + match2[0].length); } return false; }, "isExtglob"); @@ -48461,8 +48460,8 @@ var require_is_glob = __commonJS({ "node_modules/is-glob/index.js"(exports2, module2) { var isExtglob = require_is_extglob(); var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var strictCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; @@ -48471,71 +48470,71 @@ var require_is_glob = __commonJS({ var closeCurlyIndex = -2; var closeParenIndex = -2; var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { + while (index < str.length) { + if (str[index] === "*") { return true; } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) { return true; } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); + closeSquareIndex = str.indexOf("]", index); } if (closeSquareIndex > index) { if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } } } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { return true; } } } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && - str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); + backSlashIndex = str.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); + pipeIndex = str.indexOf("|", index); } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); + backSlashIndex = str.indexOf("\\", pipeIndex); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -48544,26 +48543,26 @@ var require_is_glob = __commonJS({ } return false; }, "strictCheck"); - var relaxedCheck = /* @__PURE__ */ __name(function(str2) { - if (str2[0] === "!") { + var relaxedCheck = /* @__PURE__ */ __name(function(str) { + if (str[0] === "!") { return true; } var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { return true; } - if (str2[index] === "\\") { - var open2 = str2[index + 1]; + if (str[index] === "\\") { + var open2 = str[index + 1]; index += 2; var close = chars[open2]; if (close) { - var n = str2.indexOf(close, index); + var n = str.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str2[index] === "!") { + if (str[index] === "!") { return true; } } else { @@ -48572,18 +48571,18 @@ var require_is_glob = __commonJS({ } return false; }, "relaxedCheck"); - module2.exports = /* @__PURE__ */ __name(function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { + module2.exports = /* @__PURE__ */ __name(function isGlob(str, options) { + if (typeof str !== "string" || str === "") { return false; } - if (isExtglob(str2)) { + if (isExtglob(str)) { return true; } var check = strictCheck; if (options && options.strict === false) { check = relaxedCheck; } - return check(str2); + return check(str); }, "isGlob"); } }); @@ -48600,19 +48599,19 @@ var require_glob_parent = __commonJS({ var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = /* @__PURE__ */ __name(function globParent(str2, opts) { + module2.exports = /* @__PURE__ */ __name(function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); } - if (enclosure.test(str2)) { - str2 += slash; + if (enclosure.test(str)) { + str += slash; } - str2 += "a"; + str += "a"; do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); }, "globParent"); } }); @@ -48630,16 +48629,16 @@ var require_utils2 = __commonJS({ } return false; }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); + exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type); exports2.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; return (Number(max) - Number(min)) / Number(step) >= limit; }; - exports2.escapeNode = (block, n = 0, type2) => { + exports2.escapeNode = (block, n = 0, type) => { const node = block.nodes[n]; if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { + if (type && node.type === type || node.type === "open" || node.type === "close") { if (node.escaped !== true) { node.value = "\\" + node.value; node.escaped = true; @@ -48942,8 +48941,8 @@ var require_to_regex_range = __commonJS({ return `[${a}${b - a === 1 ? "" : "-"}${b}]`; } __name(toCharacterClass, "toCharacterClass"); - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); + function hasPadding(str) { + return /^-?(0+)\d/.test(str); } __name(hasPadding, "hasPadding"); function padZeros(value, tok, options) { @@ -48977,7 +48976,7 @@ var require_fill_range = __commonJS({ "use strict"; var util8 = require("util"); var toRegexRange = require_to_regex_range(); - var isObject6 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ + var isObject5 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isO\ bject"); var transform2 = /* @__PURE__ */ __name((toNumber3) => { return (value) => toNumber3 === true ? Number(value) : String(value); @@ -49147,14 +49146,14 @@ bject"); if (typeof step === "function") { return fill(start, end, 1, { transform: step }); } - if (isObject6(step)) { + if (isObject5(step)) { return fill(start, end, 0, step); } let opts = { ...options }; if (opts.capture === true) opts.wrap = true; step = step || opts.step || 1; if (!isNumber2(step)) { - if (step != null && !isObject6(step)) return invalidStep(step, opts); + if (step != null && !isObject5(step)) return invalidStep(step, opts); return fill(start, end, 1, step); } if (isNumber2(start) && isNumber2(end)) { @@ -49425,7 +49424,7 @@ var require_parse3 = __commonJS({ /* \ */ CHAR_BACKTICK, /* ` */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -49437,13 +49436,13 @@ var require_parse3 = __commonJS({ /* { */ CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, + CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, + CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE @@ -49492,16 +49491,16 @@ var require_parse3 = __commonJS({ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); continue; } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { + if (value === CHAR_RIGHT_SQUARE_BRACKET) { push({ type: "text", value: "\\" + value }); continue; } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { + if (value === CHAR_LEFT_SQUARE_BRACKET) { brackets++; let next; while (index < length && (next = advance())) { value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { + if (next === CHAR_LEFT_SQUARE_BRACKET) { brackets++; continue; } @@ -49509,7 +49508,7 @@ var require_parse3 = __commonJS({ value += advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { brackets--; if (brackets === 0) { break; @@ -49535,7 +49534,7 @@ var require_parse3 = __commonJS({ block = stack[stack.length - 1]; continue; } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { const open2 = value; let next; if (options.keepQuotes !== true) { @@ -49578,15 +49577,15 @@ var require_parse3 = __commonJS({ push({ type: "text", value }); continue; } - const type2 = "close"; + const type = "close"; block = stack.pop(); block.close = true; - push({ type: type2, value }); + push({ type, value }); depth--; block = stack[stack.length - 1]; continue; } - if (value === CHAR_COMMA2 && depth > 0) { + if (value === CHAR_COMMA && depth > 0) { if (block.ranges > 0) { block.ranges = 0; const open2 = block.nodes.shift(); @@ -49929,12 +49928,12 @@ var require_utils3 = __commonJS({ REGEX_SPECIAL_CHARS_GLOBAL } = require_constants8(); exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match2) => { + exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str); + exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports2.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => { return match2 === "\\" ? "" : match2; }); }; @@ -49983,13 +49982,13 @@ var require_scan = __commonJS({ "use strict"; var utils = require_utils3(); var { - CHAR_ASTERISK: CHAR_ASTERISK2, + CHAR_ASTERISK, /* * */ CHAR_AT, /* @ */ CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA: CHAR_COMMA2, + CHAR_COMMA, /* , */ CHAR_DOT, /* . */ @@ -50001,7 +50000,7 @@ var require_scan = __commonJS({ /* { */ CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + CHAR_LEFT_SQUARE_BRACKET, /* [ */ CHAR_PLUS, /* + */ @@ -50011,7 +50010,7 @@ var require_scan = __commonJS({ /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 + CHAR_RIGHT_SQUARE_BRACKET /* ] */ } = require_constants8(); var isPathSeparator = /* @__PURE__ */ __name((code) => { @@ -50029,7 +50028,7 @@ var require_scan = __commonJS({ const slashes = []; const tokens = []; const parts = []; - let str2 = input; + let str = input; let index = -1; let start = 0; let lastIndex = 0; @@ -50048,10 +50047,10 @@ var require_scan = __commonJS({ let code; let token = { value: "", depth: 0, isGlob: false }; const eos = /* @__PURE__ */ __name(() => index >= length, "eos"); - const peek = /* @__PURE__ */ __name(() => str2.charCodeAt(index + 1), "peek"); + const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek"); const advance = /* @__PURE__ */ __name(() => { prev = code; - return str2.charCodeAt(++index); + return str.charCodeAt(++index); }, "advance"); while (index < length) { code = advance(); @@ -50085,7 +50084,7 @@ var require_scan = __commonJS({ } break; } - if (braceEscaped !== true && code === CHAR_COMMA2) { + if (braceEscaped !== true && code === CHAR_COMMA) { isBrace = token.isBrace = true; isGlob = token.isGlob = true; finished = true; @@ -50122,7 +50121,7 @@ var require_scan = __commonJS({ continue; } if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { isGlob = token.isGlob = true; @@ -50149,8 +50148,8 @@ var require_scan = __commonJS({ break; } } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; isGlob = token.isGlob = true; finished = true; if (scanToEnd === true) { @@ -50166,14 +50165,14 @@ var require_scan = __commonJS({ } break; } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { + if (code === CHAR_LEFT_SQUARE_BRACKET) { while (eos() !== true && (next = advance())) { if (next === CHAR_BACKWARD_SLASH) { backslashes = token.backslashes = true; advance(); continue; } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + if (next === CHAR_RIGHT_SQUARE_BRACKET) { isBracket = token.isBracket = true; isGlob = token.isGlob = true; finished = true; @@ -50220,24 +50219,24 @@ var require_scan = __commonJS({ isExtglob = false; isGlob = false; } - let base = str2; + let base = str; let prefix2 = ""; let glob2 = ""; if (start > 0) { - prefix2 = str2.slice(0, start); - str2 = str2.slice(start); + prefix2 = str.slice(0, start); + str = str.slice(start); lastIndex -= start; } if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); + base = str.slice(0, lastIndex); + glob2 = str.slice(lastIndex); } else if (isGlob === true) { base = ""; - glob2 = str2; + glob2 = str; } else { - base = str2; + base = str; } - if (base && base !== "" && base !== "/" && base !== str2) { + if (base && base !== "" && base !== "/" && base !== str) { if (isPathSeparator(base.charCodeAt(base.length - 1))) { base = base.slice(0, -1); } @@ -50334,8 +50333,8 @@ var require_parse4 = __commonJS({ } return value; }, "expandRange"); - var syntaxError = /* @__PURE__ */ __name((type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + var syntaxError = /* @__PURE__ */ __name((type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; }, "syntaxError"); var splitTopLevel = /* @__PURE__ */ __name((input) => { const parts = []; @@ -50639,12 +50638,12 @@ var require_parse4 = __commonJS({ state3.start++; return true; }, "negate"); - const increment = /* @__PURE__ */ __name((type2) => { - state3[type2]++; - stack.push(type2); + const increment = /* @__PURE__ */ __name((type) => { + state3[type]++; + stack.push(type); }, "increment"); - const decrement = /* @__PURE__ */ __name((type2) => { - state3[type2]--; + const decrement = /* @__PURE__ */ __name((type) => { + state3[type]--; stack.pop(); }, "decrement"); const push = /* @__PURE__ */ __name((tok) => { @@ -50672,7 +50671,7 @@ var require_parse4 = __commonJS({ tokens.push(tok); prev = tok; }, "push"); - const extglobOpen = /* @__PURE__ */ __name((type2, value2) => { + const extglobOpen = /* @__PURE__ */ __name((type, value2) => { const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; token.prev = prev; token.parens = state3.parens; @@ -50681,7 +50680,7 @@ var require_parse4 = __commonJS({ token.tokensIndex = tokens.length; const output = (opts.capture ? "(" : "") + token.open; increment("parens"); - push({ type: type2, value: value2, output: state3.output ? "" : ONE_CHAR }); + push({ type, value: value2, output: state3.output ? "" : ONE_CHAR }); push({ type: "paren", extglob: true, value: advance(), output }); extglobs.push(token); }, "extglobOpen"); @@ -51275,8 +51274,8 @@ var require_parse4 = __commonJS({ if (opts2.noglobstar === true) return star; return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }, "globstar"); - const create3 = /* @__PURE__ */ __name((str2) => { - switch (str2) { + const create3 = /* @__PURE__ */ __name((str) => { + switch (str) { case "*": return `${nodot}${ONE_CHAR}${star}`; case ".*": @@ -51294,7 +51293,7 @@ var require_parse4 = __commonJS({ case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; default: { - const match2 = /^(.*?)\.(\w+)$/.exec(str2); + const match2 = /^(.*?)\.(\w+)$/.exec(str); if (!match2) return; const source2 = create3(match2[1]); if (!source2) return; @@ -51322,20 +51321,20 @@ var require_picomatch = __commonJS({ var parse2 = require_parse4(); var utils = require_utils3(); var constants4 = require_constants8(); - var isObject6 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); + var isObject5 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject"); var picomatch = /* @__PURE__ */ __name((glob2, options, returnState = false) => { if (Array.isArray(glob2)) { const fns = glob2.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = /* @__PURE__ */ __name((str2) => { + const arrayMatcher = /* @__PURE__ */ __name((str) => { for (const isMatch of fns) { - const state4 = isMatch(str2); + const state4 = isMatch(str); if (state4) return state4; } return false; }, "arrayMatcher"); return arrayMatcher; } - const isState = isObject6(glob2) && glob2.tokens && glob2.input; + const isState = isObject5(glob2) && glob2.tokens && glob2.input; if (glob2 === "" || typeof glob2 !== "string" && !isState) { throw new TypeError("Expected pattern to be a non-empty string"); } @@ -51404,7 +51403,7 @@ var require_picomatch = __commonJS({ const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); return regex.test(path17.basename(input)); }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + 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 parse2(pattern, { ...options, fastpaths: false }); @@ -51518,7 +51517,7 @@ var require_micromatch = __commonJS({ }, "micromatch"); micromatch.match = micromatch; micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); micromatch.any = micromatch.isMatch; micromatch.not = (list, patterns, options = {}) => { patterns = [].concat(patterns).map(String); @@ -51536,22 +51535,22 @@ var require_micromatch = __commonJS({ } return [...result]; }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); + return pattern.some((p) => micromatch.contains(str, p, options)); } if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { + if (isEmptyString(str) || isEmptyString(pattern)) { return false; } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { return true; } } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); + return micromatch.isMatch(str, pattern, { ...options, contains: true }); }; micromatch.matchKeys = (obj, patterns, options) => { if (!utils.isObject(obj)) { @@ -51582,11 +51581,11 @@ var require_micromatch = __commonJS({ } return true; }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util8.inspect(str2)}"`); + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util8.inspect(str)}"`); } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); + return [].concat(patterns).every((p) => picomatch(p, options)(str)); }; micromatch.capture = (glob2, input, options) => { let posix = utils.isWindows(options); @@ -51601,8 +51600,8 @@ var require_micromatch = __commonJS({ micromatch.parse = (patterns, options) => { let res = []; for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); } } return res; @@ -51827,8 +51826,8 @@ var require_merge2 = __commonJS({ var Stream = require("stream"); var PassThrough = Stream.PassThrough; var slice = Array.prototype.slice; - module2.exports = merge22; - function merge22() { + module2.exports = merge2; + function merge2() { const streamsQueue = []; const args = slice.call(arguments); let merging = false; @@ -51927,7 +51926,7 @@ var require_merge2 = __commonJS({ } return mergedStream; } - __name(merge22, "merge2"); + __name(merge2, "merge2"); function pauseStreams(streams, options) { if (!Array.isArray(streams)) { if (!streams._readableState && streams.pipe) { @@ -51954,9 +51953,9 @@ var require_stream = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.merge = void 0; - var merge22 = require_merge2(); + var merge2 = require_merge2(); function merge3(streams) { - const mergedStream = merge22(streams); + const mergedStream = merge2(streams); streams.forEach((stream6) => { stream6.once("error", (error2) => mergedStream.emit("error", error2)); }); @@ -52432,7 +52431,7 @@ var require_async3 = __commonJS({ var rpl = require_run_parallel(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); @@ -52451,7 +52450,7 @@ var require_async3 = __commonJS({ const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { callSuccessCallback(callback, entries); @@ -52497,7 +52496,7 @@ var require_async3 = __commonJS({ return; } const tasks = names.map((name) => { - const path17 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path17 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { fsStat2.stat(path17, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { @@ -52547,7 +52546,7 @@ var require_sync2 = __commonJS({ var fsStat2 = require_out(); var constants_1 = require_constants9(); var utils = require_utils5(); - var common2 = require_common2(); + var common = require_common2(); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); @@ -52562,7 +52561,7 @@ var require_sync2 = __commonJS({ const entry = { dirent, name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { try { @@ -52582,7 +52581,7 @@ var require_sync2 = __commonJS({ function readdir2(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); const stats = fsStat2.statSync(entryPath, settings.fsStatSettings); const entry = { name, @@ -53077,7 +53076,7 @@ var require_reader = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common3(); + var common = require_common3(); var Reader = class { static { __name(this, "Reader"); @@ -53085,7 +53084,7 @@ var require_reader = __commonJS({ constructor(_root, _settings) { this._root = _root; this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } }; exports2.default = Reader; @@ -53100,7 +53099,7 @@ var require_async4 = __commonJS({ var events_1 = require("events"); var fsScandir = require_out2(); var fastq = require_queue(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var AsyncReader = class extends reader_1.default { static { @@ -53168,7 +53167,7 @@ var require_async4 = __commonJS({ }); } _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { + if (this._isDestroyed || !common.isFatalError(this._settings, error2)) { return; } this._isFatalError = true; @@ -53181,12 +53180,12 @@ var require_async4 = __commonJS({ } const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -53289,7 +53288,7 @@ var require_sync3 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var fsScandir = require_out2(); - var common2 = require_common3(); + var common = require_common3(); var reader_1 = require_reader(); var SyncReader = class extends reader_1.default { static { @@ -53325,7 +53324,7 @@ var require_sync3 = __commonJS({ } } _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { + if (!common.isFatalError(this._settings, error2)) { return; } throw error2; @@ -53333,12 +53332,12 @@ var require_sync3 = __commonJS({ _handleEntry(entry, base) { const fullpath = entry.path; if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -54371,24 +54370,24 @@ var require_reach = __commonJS({ let ref = obj; for (let i2 = 0; i2 < path17.length; ++i2) { let key = path17[i2]; - const type2 = options.iterables && internals.iterables(ref); - if (Array.isArray(ref) || type2 === "set") { + const type = options.iterables && internals.iterables(ref); + if (Array.isArray(ref) || type === "set") { const number = Number(key); if (Number.isInteger(number)) { key = number < 0 ? ref.length + number : number; } } if (!ref || typeof ref === "function" && options.functions === false || // Defaults to true - !type2 && ref[key] === void 0) { + !type && ref[key] === void 0) { Assert(!options.strict || i2 + 1 === path17.length, "Missing segment", key, "in reach path ", chain); Assert(typeof ref === "object" || options.functions === true || typeof ref !== "function", "Invalid segment", key, "in reach path ", chain); ref = options.default; break; } - if (!type2) { + if (!type) { ref = ref[key]; - } else if (type2 === "set") { + } else if (type === "set") { ref = [...ref][key]; } else { ref = ref.get(key); @@ -54608,7 +54607,7 @@ var require_clone = __commonJS({ }); // node_modules/@hapi/hoek/lib/merge.js -var require_merge3 = __commonJS({ +var require_merge4 = __commonJS({ "node_modules/@hapi/hoek/lib/merge.js"(exports2, module2) { "use strict"; var Assert = require_assert2(); @@ -54670,7 +54669,7 @@ var require_applyToDefaults = __commonJS({ "use strict"; var Assert = require_assert2(); var Clone = require_clone(); - var Merge = require_merge3(); + var Merge = require_merge4(); var Reach = require_reach(); var internals = {}; module2.exports = function(defaults2, source, options = {}) { @@ -54695,21 +54694,21 @@ object"); const keys = options.shallow; Assert(Array.isArray(keys), "Invalid keys"); const seen = /* @__PURE__ */ new Map(); - const merge3 = source === true ? null : /* @__PURE__ */ new Set(); + const merge2 = source === true ? null : /* @__PURE__ */ new Set(); for (let key of keys) { key = Array.isArray(key) ? key : key.split("."); const ref = Reach(defaults2, key); if (ref && typeof ref === "object") { - seen.set(ref, merge3 && Reach(source, key) || ref); - } else if (merge3) { - merge3.add(key); + seen.set(ref, merge2 && Reach(source, key) || ref); + } else if (merge2) { + merge2.add(key); } } const copy = Clone(defaults2, {}, seen); - if (!merge3) { + if (!merge2) { return copy; } - for (const key of merge3) { + for (const key of merge2) { internals.reachCopy(copy, source, key); } const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false; @@ -54800,18 +54799,18 @@ var require_deepEqual = __commonJS({ if (obj === ref) { return obj !== 0 || 1 / obj === 1 / ref; } - const type2 = typeof obj; - if (type2 !== typeof ref) { + const type = typeof obj; + if (type !== typeof ref) { return false; } if (obj === null || ref === null) { return false; } - if (type2 === "function") { + if (type === "function") { if (!options.deepFunction || obj.toString() !== ref.toString()) { return false; } - } else if (type2 !== "object") { + } else if (type !== "object") { return obj !== obj && ref !== ref; } const instanceType = internals.getSharedType(obj, ref, !!options.prototype); @@ -54846,11 +54845,11 @@ var require_deepEqual = __commonJS({ } return Types.getInternalProto(obj); } - const type2 = Types.getInternalProto(obj); - if (type2 !== Types.getInternalProto(ref)) { + const type = Types.getInternalProto(obj); + if (type !== Types.getInternalProto(ref)) { return internals.mismatched; } - return type2; + return type; }; internals.valueOf = function(obj) { const objValueOf = obj.valueOf; @@ -55046,19 +55045,19 @@ var require_contain = __commonJS({ return false; } let compare; - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); for (const value of values) { if (!options.deep || !value || typeof value !== "object") { - const existing = map2.get(value); + const existing = map.get(value); if (existing) { ++existing.allowed; } else { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); } } else { compare = compare ?? internals.compare(options); let found = false; - for (const [key, existing] of map2.entries()) { + for (const [key, existing] of map.entries()) { if (compare(key, value)) { ++existing.allowed; found = true; @@ -55066,7 +55065,7 @@ var require_contain = __commonJS({ } } if (!found) { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); } } } @@ -55074,10 +55073,10 @@ var require_contain = __commonJS({ for (const item of ref) { let match2; if (!options.deep || !item || typeof item !== "object") { - match2 = map2.get(item); + match2 = map.get(item); } else { compare = compare ?? internals.compare(options); - for (const [key, existing] of map2.entries()) { + for (const [key, existing] of map.entries()) { if (compare(key, item)) { match2 = existing; break; @@ -55095,7 +55094,7 @@ var require_contain = __commonJS({ if (options.only && hits !== ref.length) { return false; } - for (const match2 of map2.values()) { + for (const match2 of map.values()) { if (match2.hits === match2.allowed) { continue; } @@ -55117,9 +55116,9 @@ var require_contain = __commonJS({ const symbols = Object.getOwnPropertySymbols(values).filter((sym) => values.propertyIsEnumerable(sym)); const targets = [...Object.keys(values), ...symbols]; const compare = internals.compare(options); - const set2 = new Set(targets); + const set = new Set(targets); for (const key of keys) { - if (!set2.has(key)) { + if (!set.has(key)) { if (options.only) { return false; } @@ -55128,10 +55127,10 @@ var require_contain = __commonJS({ if (!compare(values[key], ref[key])) { return false; } - set2.delete(key); + set.delete(key); } - if (set2.size) { - return options.part ? set2.size < targets.length : false; + if (set.size) { + return options.part ? set.size < targets.length : false; } return true; }; @@ -55140,16 +55139,16 @@ var require_contain = __commonJS({ return values.length === 1 && values[0] === "" || // '' contains '' !options.once && !values.some((v) => v !== ""); } - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); const patterns = []; for (const value of values) { Assert(typeof value === "string", "Cannot compare string reference to non-string value"); if (value) { - const existing = map2.get(value); + const existing = map.get(value); if (existing) { ++existing.allowed; } else { - map2.set(value, { allowed: 1, hits: 0 }); + map.set(value, { allowed: 1, hits: 0 }); patterns.push(EscapeRegex(value)); } } else if (options.once || options.only) { @@ -55161,14 +55160,14 @@ var require_contain = __commonJS({ } const regex = new RegExp(`(${patterns.join("|")})`, "g"); const leftovers = ref.replace(regex, ($0, $1) => { - ++map2.get($1).hits; + ++map.get($1).hits; return ""; }); if (options.only && leftovers) { return false; } let any = false; - for (const match2 of map2.values()) { + for (const match2 of map.values()) { if (match2.hits) { any = true; } @@ -55333,7 +55332,7 @@ var require_intersect = __commonJS({ if (!array1 || !array2) { return options.first ? null : []; } - const common2 = []; + const common = []; const hash = Array.isArray(array1) ? new Set(array1) : array1; const found = /* @__PURE__ */ new Set(); for (const value of array2) { @@ -55341,11 +55340,11 @@ var require_intersect = __commonJS({ if (options.first) { return value; } - common2.push(value); + common.push(value); found.add(value); } } - return options.first ? null : common2; + return options.first ? null : common; }; internals.has = function(ref, key) { if (typeof ref.has === "function") { @@ -55457,7 +55456,7 @@ var require_lib = __commonJS({ exports2.ignore = require_ignore(); exports2.intersect = require_intersect(); exports2.isPromise = require_isPromise(); - exports2.merge = require_merge3(); + exports2.merge = require_merge4(); exports2.once = require_once(); exports2.reach = require_reach(); exports2.reachTemplate = require_reachTemplate(); @@ -55997,9 +55996,9 @@ var require_lib2 = __commonJS({ parts[i2] = internals.single(part.value, value); } } - internals.operatorsOrder.forEach((set2) => { + internals.operatorsOrder.forEach((set) => { for (let i2 = 1; i2 < parts.length - 1; ) { - if (set2.includes(parts[i2])) { + if (set.includes(parts[i2])) { const operator = parts[i2]; const left = internals.evaluate(parts[i2 - 1], context3); const right = internals.evaluate(parts[i2 + 1], context3); @@ -56099,7 +56098,7 @@ var require_annotate = __commonJS({ "node_modules/joi/lib/annotate.js"(exports2) { "use strict"; var { clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { annotations: /* @__PURE__ */ Symbol("annotations") }; @@ -56225,7 +56224,7 @@ var require_errors3 = __commonJS({ "node_modules/joi/lib/errors.js"(exports2) { "use strict"; var Annotate = require_annotate(); - var Common = require_common4(); + var Common = require_common5(); var Template = require_template(); exports2.Report = class { constructor(code, value, local, flags, messages, state3, prefs) { @@ -56410,7 +56409,7 @@ var require_ref2 = __commonJS({ "node_modules/joi/lib/ref.js"(exports2) { "use strict"; var { assert: assert4, clone, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Template; var internals = { symbol: /* @__PURE__ */ Symbol("ref"), @@ -56701,7 +56700,7 @@ var require_template = __commonJS({ "use strict"; var { assert: assert4, clone, escapeHtml } = require_lib(); var Formula = require_lib2(); - var Common = require_common4(); + var Common = require_common5(); var Errors = require_errors3(); var Ref = require_ref2(); var internals = { @@ -56941,7 +56940,7 @@ functions"); return `${ends[0]}${value}${ends[1]}`; }; internals.stringify = function(value, original, state3, prefs, local, options = {}) { - const type2 = typeof value; + const type = typeof value; const wrap = prefs && prefs.errors && prefs.errors.wrap || {}; let skipWrap = false; if (Ref.isRef(value) && value.render) { @@ -56951,24 +56950,24 @@ functions"); if (value === null) { return "null"; } - if (type2 === "string") { + if (type === "string") { return internals.wrap(value, options.arrayItems && wrap.string); } - if (type2 === "number" || type2 === "function" || type2 === "symbol") { + if (type === "number" || type === "function" || type === "symbol") { return value.toString(); } - if (type2 !== "object") { + if (type !== "object") { return JSON.stringify(value); } if (value instanceof Date) { return internals.Template.date(value, prefs); } if (value instanceof Map) { - const pairs2 = []; + const pairs = []; for (const [key, sym] of value.entries()) { - pairs2.push(`${key.toString()} -> ${sym.toString()}`); + pairs.push(`${key.toString()} -> ${sym.toString()}`); } - value = pairs2; + value = pairs; } if (!Array.isArray(value)) { return value.toString(); @@ -57146,7 +57145,7 @@ var require_messages = __commonJS({ }); // node_modules/joi/lib/common.js -var require_common4 = __commonJS({ +var require_common5 = __commonJS({ "node_modules/joi/lib/common.js"(exports2) { "use strict"; var { assert: Assert, AssertError } = require_lib(); @@ -57228,12 +57227,12 @@ var require_common4 = __commonJS({ exports2.default = function(value, defaultValue) { return value === void 0 ? defaultValue : value; }; - exports2.intersect = function(set2, other) { - if (typeof set2.intersection === "function") { - return set2.intersection(other); + exports2.intersect = function(set, other) { + if (typeof set.intersection === "function") { + return set.intersection(other); } const result = /* @__PURE__ */ new Set(); - for (const item of set2) { + for (const item of set) { if (other.has(item)) { result.add(item); } @@ -57252,8 +57251,8 @@ var require_common4 = __commonJS({ } return obj[exports2.symbols.ref] || obj[exports2.symbols.template]; }; - exports2.isSchema = function(schema3, options = {}) { - const any = schema3 && schema3[exports2.symbols.any]; + exports2.isSchema = function(schema2, options = {}) { + const any = schema2 && schema2[exports2.symbols.any]; if (!any) { return false; } @@ -57320,7 +57319,7 @@ var require_cache2 = __commonJS({ "node_modules/joi/lib/cache.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { max: 1e3, supported: /* @__PURE__ */ new Set(["undefined", "boolean", "number", "string"]) @@ -57419,7 +57418,7 @@ var require_compile2 = __commonJS({ "node_modules/joi/lib/compile.js"(exports2) { "use strict"; var { assert: assert4 } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Ref = require_ref2(); var internals = {}; exports2.schema = function(Joi, config, options = {}) { @@ -57480,29 +57479,29 @@ var require_compile2 = __commonJS({ exports2.ref = function(id, options) { return Ref.isRef(id) ? id : Ref.create(id, options); }; - exports2.compile = function(root, schema3, options = {}) { + exports2.compile = function(root, schema2, options = {}) { Common.assertOptions(options, ["legacy"]); - const any = schema3 && schema3[Common.symbols.any]; + const any = schema2 && schema2[Common.symbols.any]; if (any) { assert4(options.legacy || any.version === Common.version, "Cannot mix different versions of joi schemas:", any.version, Common.version); - return schema3; + return schema2; } - if (typeof schema3 !== "object" || !options.legacy) { - return exports2.schema(root, schema3, { appendPath: true }); + if (typeof schema2 !== "object" || !options.legacy) { + return exports2.schema(root, schema2, { appendPath: true }); } - const compiler = internals.walk(schema3); + const compiler = internals.walk(schema2); if (!compiler) { - return exports2.schema(root, schema3, { appendPath: true }); + return exports2.schema(root, schema2, { appendPath: true }); } - return compiler.compile(compiler.root, schema3); + return compiler.compile(compiler.root, schema2); }; - internals.walk = function(schema3) { - if (typeof schema3 !== "object") { + internals.walk = function(schema2) { + if (typeof schema2 !== "object") { return null; } - if (Array.isArray(schema3)) { - for (const item of schema3) { + if (Array.isArray(schema2)) { + for (const item of schema2) { const compiler = internals.walk(item); if (compiler) { return compiler; @@ -57510,13 +57509,13 @@ var require_compile2 = __commonJS({ } return null; } - const any = schema3[Common.symbols.any]; + const any = schema2[Common.symbols.any]; if (any) { - return { root: schema3[any.root], compile: any.compile }; + return { root: schema2[any.root], compile: any.compile }; } - assert4(Object.getPrototypeOf(schema3) === Object.getPrototypeOf({}), "Schema can only contain plain objects"); - for (const key in schema3) { - const compiler = internals.walk(schema3[key]); + assert4(Object.getPrototypeOf(schema2) === Object.getPrototypeOf({}), "Schema can only contain plain objects"); + for (const key in schema2) { + const compiler = internals.walk(schema2[key]); if (compiler) { return compiler; } @@ -57526,7 +57525,7 @@ var require_compile2 = __commonJS({ internals.simple = function(value) { return value === null || ["boolean", "string", "number"].includes(typeof value); }; - exports2.when = function(schema3, condition, options) { + exports2.when = function(schema2, condition, options) { if (options === void 0) { assert4(condition && typeof condition === "object", "Missing options"); options = condition; @@ -57540,7 +57539,7 @@ var require_compile2 = __commonJS({ assert4(options.is === void 0, '"is" can not be used with a schema condition'); assert4(options.not === void 0, '"not" can not be used with a schema condition'); assert4(options.switch === void 0, '"switch" can not be used with a schema condition'); - return internals.condition(schema3, { is: condition, then: options.then, otherwise: options.otherwise, break: options. + return internals.condition(schema2, { is: condition, then: options.then, otherwise: options.otherwise, break: options. break }); } assert4(Ref.isRef(condition) || typeof condition === "string", "Invalid condition:", condition); @@ -57550,7 +57549,7 @@ var require_compile2 = __commonJS({ if (options.not !== void 0) { rule2 = { is: options.not, then: options.otherwise, otherwise: options.then, break: options.break }; } - let is = rule2.is !== void 0 ? schema3.$_compile(rule2.is) : schema3.$_root.invalid(null, false, 0, "").required(); + let is = rule2.is !== void 0 ? schema2.$_compile(rule2.is) : schema2.$_root.invalid(null, false, 0, "").required(); assert4(rule2.then !== void 0 || rule2.otherwise !== void 0, 'options must have at least one of "then", "otherwi\ se", or "switch"'); assert4(rule2.break === void 0 || rule2.then === void 0 || rule2.otherwise === void 0, "Cannot specify then, oth\ @@ -57558,7 +57557,7 @@ erwise, and break all together"); if (options.is !== void 0 && !Ref.isRef(options.is) && !Common.isSchema(options.is)) { is = is.required(); } - return internals.condition(schema3, { ref: exports2.ref(condition), is, then: rule2.then, otherwise: rule2.otherwise, + return internals.condition(schema2, { ref: exports2.ref(condition), is, then: rule2.then, otherwise: rule2.otherwise, break: rule2.break }); } assert4(Array.isArray(options.switch), '"switch" must be an array'); @@ -57577,8 +57576,8 @@ erwise, and break all together"); assert4(test2.is !== void 0, 'Switch statement missing "is"'); assert4(test2.then !== void 0, 'Switch statement missing "then"'); const item = { - is: schema3.$_compile(test2.is), - then: schema3.$_compile(test2.then) + is: schema2.$_compile(test2.is), + then: schema2.$_compile(test2.then) }; if (!Ref.isRef(test2.is) && !Common.isSchema(test2.is)) { item.is = item.is.required(); @@ -57589,19 +57588,19 @@ side a "switch"'); const otherwise = options.otherwise !== void 0 ? options.otherwise : test2.otherwise; if (otherwise !== void 0) { assert4(rule.break === void 0, "Cannot specify both otherwise and break"); - item.otherwise = schema3.$_compile(otherwise); + item.otherwise = schema2.$_compile(otherwise); } } rule.switch.push(item); } return rule; }; - internals.condition = function(schema3, condition) { + internals.condition = function(schema2, condition) { for (const key of ["then", "otherwise"]) { if (condition[key] === void 0) { delete condition[key]; } else { - condition[key] = schema3.$_compile(condition[key]); + condition[key] = schema2.$_compile(condition[key]); } } return condition; @@ -57614,27 +57613,27 @@ var require_extend = __commonJS({ "node_modules/joi/lib/extend.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); var internals = {}; exports2.type = function(from, options) { const base = Object.getPrototypeOf(from); const prototype2 = clone(base); - const schema3 = from._assign(Object.create(prototype2)); + const schema2 = from._assign(Object.create(prototype2)); const def = Object.assign({}, options); delete def.base; prototype2._definition = def; const parent = base._definition || {}; def.messages = Messages.merge(parent.messages, def.messages); def.properties = Object.assign({}, parent.properties, def.properties); - schema3.type = def.type; + schema2.type = def.type; def.flags = Object.assign({}, parent.flags, def.flags); const terms = Object.assign({}, parent.terms); if (def.terms) { for (const name in def.terms) { const term = def.terms[name]; - assert4(schema3.$_terms[name] === void 0, "Invalid term override for", def.type, name); - schema3.$_terms[name] = term.init; + assert4(schema2.$_terms[name] === void 0, "Invalid term override for", def.type, name); + schema2.$_terms[name] = term.init; terms[name] = term; } } @@ -57712,11 +57711,11 @@ var require_extend = __commonJS({ def.modifiers = modifiers; if (def.overrides) { prototype2._super = base; - schema3.$_super = {}; + schema2.$_super = {}; for (const override in def.overrides) { assert4(base[override], "Cannot override missing", override); def.overrides[override][Common.symbols.parent] = base[override]; - schema3.$_super[override] = base[override].bind(schema3); + schema2.$_super[override] = base[override].bind(schema2); } Object.assign(prototype2, def.overrides); } @@ -57725,7 +57724,7 @@ var require_extend = __commonJS({ manifest.build = internals.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build); def.manifest = manifest; def.rebuild = internals.rebuild(def.rebuild, parent.rebuild); - return schema3; + return schema2; }; internals.build = function(child2, parent) { if (!child2 || !parent) { @@ -57781,9 +57780,9 @@ var require_extend = __commonJS({ if (!child2 || !parent) { return child2 || parent; } - return function(schema3) { - parent(schema3); - child2(schema3); + return function(schema2) { + parent(schema2); + child2(schema2); }; }; internals.validate = function(child2, parent) { @@ -57809,41 +57808,41 @@ var require_manifest = __commonJS({ "node_modules/joi/lib/manifest.js"(exports2) { "use strict"; var { assert: assert4, clone } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); var Ref = require_ref2(); var Template = require_template(); var Schemas; var internals = {}; - exports2.describe = function(schema3) { - const def = schema3._definition; + exports2.describe = function(schema2) { + const def = schema2._definition; const desc = { - type: schema3.type, + type: schema2.type, flags: {}, rules: [] }; - for (const flag in schema3._flags) { + for (const flag in schema2._flags) { if (flag[0] !== "_") { - desc.flags[flag] = internals.describe(schema3._flags[flag]); + desc.flags[flag] = internals.describe(schema2._flags[flag]); } } if (!Object.keys(desc.flags).length) { delete desc.flags; } - if (schema3._preferences) { - desc.preferences = clone(schema3._preferences, { shallow: ["messages"] }); + if (schema2._preferences) { + desc.preferences = clone(schema2._preferences, { shallow: ["messages"] }); delete desc.preferences[Common.symbols.prefs]; if (desc.preferences.messages) { desc.preferences.messages = Messages.decompile(desc.preferences.messages); } } - if (schema3._valids) { - desc.allow = schema3._valids.describe(); + if (schema2._valids) { + desc.allow = schema2._valids.describe(); } - if (schema3._invalids) { - desc.invalid = schema3._invalids.describe(); + if (schema2._invalids) { + desc.invalid = schema2._invalids.describe(); } - for (const rule of schema3._rules) { + for (const rule of schema2._rules) { const ruleDef = def.rules[rule.name]; if (ruleDef.manifest === false) { continue; @@ -57872,12 +57871,12 @@ var require_manifest = __commonJS({ if (!desc.rules.length) { delete desc.rules; } - for (const term in schema3.$_terms) { + for (const term in schema2.$_terms) { if (term[0] === "_") { continue; } assert4(!desc[term], "Cannot describe schema due to internal name conflict with", term); - const items = schema3.$_terms[term]; + const items = schema2.$_terms[term]; if (!items) { continue; } @@ -57916,7 +57915,7 @@ var require_manifest = __commonJS({ } desc[term] = normalized; } - internals.validate(schema3.$_root, desc); + internals.validate(schema2.$_root, desc); return desc; }; internals.describe = function(item, options = {}) { @@ -57976,27 +57975,27 @@ var require_manifest = __commonJS({ } parse(desc) { internals.validate(this.joi, desc); - let schema3 = this.joi[desc.type]()._bare(); - const def = schema3._definition; + let schema2 = this.joi[desc.type]()._bare(); + const def = schema2._definition; if (desc.flags) { for (const flag in desc.flags) { const setter = def.flags[flag] && def.flags[flag].setter || flag; - assert4(typeof schema3[setter] === "function", "Invalid flag", flag, "for type", desc.type); - schema3 = schema3[setter](this.build(desc.flags[flag])); + assert4(typeof schema2[setter] === "function", "Invalid flag", flag, "for type", desc.type); + schema2 = schema2[setter](this.build(desc.flags[flag])); } } if (desc.preferences) { - schema3 = schema3.preferences(this.build(desc.preferences)); + schema2 = schema2.preferences(this.build(desc.preferences)); } if (desc.allow) { - schema3 = schema3.allow(...this.build(desc.allow)); + schema2 = schema2.allow(...this.build(desc.allow)); } if (desc.invalid) { - schema3 = schema3.invalid(...this.build(desc.invalid)); + schema2 = schema2.invalid(...this.build(desc.invalid)); } if (desc.rules) { for (const rule of desc.rules) { - assert4(typeof schema3[rule.name] === "function", "Invalid rule", rule.name, "for type", desc.type); + assert4(typeof schema2[rule.name] === "function", "Invalid rule", rule.name, "for type", desc.type); const args = []; if (rule.args) { const built = {}; @@ -58017,7 +58016,7 @@ found", keys.length, ")"); args.push(built[keys[0]]); } } - schema3 = schema3[rule.name](...args); + schema2 = schema2[rule.name](...args); const options = {}; for (const custom2 in def.modifiers) { if (rule[custom2] !== void 0) { @@ -58025,7 +58024,7 @@ found", keys.length, ")"); } } if (Object.keys(options).length) { - schema3 = schema3.rule(options); + schema2 = schema2.rule(options); } } } @@ -58061,9 +58060,9 @@ found", keys.length, ")"); if (desc.whens) { terms.whens = desc.whens.map((when) => this.build(when)); } - schema3 = def.manifest.build(schema3, terms); - schema3.$_temp.ruleset = false; - return schema3; + schema2 = def.manifest.build(schema2, terms); + schema2.$_temp.ruleset = false; + return schema2; } build(desc, options = {}) { if (desc === null) { @@ -58187,22 +58186,22 @@ var require_trace = __commonJS({ root._tracer = null; }; }; - exports2.location = function(schema3) { - return schema3.$_setFlag("_tracerLocation", Pinpoint.location(2)); + exports2.location = function(schema2) { + return schema2.$_setFlag("_tracerLocation", Pinpoint.location(2)); }; internals.Tracer = class { constructor() { this.name = "Joi"; this._schemas = /* @__PURE__ */ new Map(); } - _register(schema3) { - const existing = this._schemas.get(schema3); + _register(schema2) { + const existing = this._schemas.get(schema2); if (existing) { return existing.store; } - const store = new internals.Store(schema3); - const { filename, line } = schema3._flags._tracerLocation || Pinpoint.location(5); - this._schemas.set(schema3, { filename, line, store }); + const store = new internals.Store(schema2); + const { filename, line } = schema2._flags._tracerLocation || Pinpoint.location(5); + this._schemas.set(schema2, { filename, line, store }); return store; } _combine(merged, sources) { @@ -58218,7 +58217,7 @@ var require_trace = __commonJS({ } const missing = []; const skipped = []; - for (const [schema3, log2] of store._sources.entries()) { + for (const [schema2, log2] of store._sources.entries()) { if (internals.sub(log2.paths, skipped)) { continue; } @@ -58230,28 +58229,28 @@ var require_trace = __commonJS({ skipped.push(...log2.paths); continue; } - for (const type2 of ["valid", "invalid"]) { - const set2 = schema3[`_${type2}s`]; - if (!set2) { + for (const type of ["valid", "invalid"]) { + const set = schema2[`_${type}s`]; + if (!set) { continue; } - const values = new Set(set2._values); - const refs = new Set(set2._refs); - for (const { value, ref } of log2[type2]) { + const values = new Set(set._values); + const refs = new Set(set._refs); + for (const { value, ref } of log2[type]) { values.delete(value); refs.delete(ref); } if (values.size || refs.size) { missing.push({ status: [...values, ...[...refs].map((ref) => ref.display)], - rule: `${type2}s` + rule: `${type}s` }); } } - const rules = schema3._rules.map((rule) => rule.name); - for (const type2 of ["default", "failover"]) { - if (schema3._flags[type2] !== void 0) { - rules.push(type2); + const rules = schema2._rules.map((rule) => rule.name); + for (const type of ["default", "failover"]) { + if (schema2._flags[type] !== void 0) { + rules.push(type); } } for (const name of rules) { @@ -58279,30 +58278,30 @@ var require_trace = __commonJS({ } }; internals.Store = class { - constructor(schema3) { + constructor(schema2) { this.active = true; this._sources = /* @__PURE__ */ new Map(); this._combos = /* @__PURE__ */ new Map(); - this._scan(schema3); + this._scan(schema2); } debug(state3, source, name, result) { state3.mainstay.debug && state3.mainstay.debug.push({ type: source, name, result, path: state3.path }); } - entry(schema3, state3) { + entry(schema2, state3) { internals.debug(state3, { type: "entry" }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2.entry = true; }); } - filter(schema3, state3, source, value) { + filter(schema2, state3, source, value) { internals.debug(state3, { type: source, ...value }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2[source].add(value); }); } - log(schema3, state3, source, name, result) { + log(schema2, state3, source, name, result) { internals.debug(state3, { type: source, name, result: result === "full" ? "pass" : result }); - this._record(schema3, (log2) => { + this._record(schema2, (log2) => { log2[source][name] = log2[source][name] || 0; log2[source][name] |= internals.codes[result]; }); @@ -58324,20 +58323,20 @@ var require_trace = __commonJS({ } state3.mainstay.debug.push(log2); } - _record(schema3, each) { - const log2 = this._sources.get(schema3); + _record(schema2, each) { + const log2 = this._sources.get(schema2); if (log2) { each(log2); return; } - const sources = this._combos.get(schema3); + const sources = this._combos.get(schema2); for (const source of sources) { this._record(source, each); } } - _scan(schema3, _path) { + _scan(schema2, _path) { const path17 = _path || []; - let log2 = this._sources.get(schema3); + let log2 = this._sources.get(schema2); if (!log2) { log2 = { paths: /* @__PURE__ */ new Set(), @@ -58346,7 +58345,7 @@ var require_trace = __commonJS({ valid: /* @__PURE__ */ new Set(), invalid: /* @__PURE__ */ new Set() }; - this._sources.set(schema3, log2); + this._sources.set(schema2, log2); } if (path17.length) { log2.paths.add(path17); @@ -58355,7 +58354,7 @@ var require_trace = __commonJS({ const subId = internals.id(sub, source); this._scan(sub, path17.concat(subId)); }, "each"); - schema3.$_modify({ each, ref: false }); + schema2.$_modify({ each, ref: false }); } _combine(merged, sources) { this._combos.set(merged, sources); @@ -58365,9 +58364,9 @@ var require_trace = __commonJS({ const path17 = item.paths ? Errors.path(item.paths[0]) + (item.rule ? ":" : "") : ""; return `${path17}${item.rule || ""} (${item.status})`; }; - internals.id = function(schema3, { source, name, path: path17, key }) { - if (schema3._flags.id) { - return schema3._flags.id; + internals.id = function(schema2, { source, name, path: path17, key }) { + if (schema2._flags.id) { + return schema2._flags.id; } if (key) { return key; @@ -58402,7 +58401,7 @@ var require_modify = __commonJS({ "node_modules/joi/lib/modify.js"(exports2) { "use strict"; var { assert: assert4 } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Ref = require_ref2(); var internals = {}; exports2.Ids = internals.Ids = class { @@ -58465,24 +58464,24 @@ var require_modify = __commonJS({ } return node.schema._ids.reach(forward, [...behind, current]); } - register(schema3, { key } = {}) { - if (!schema3 || !Common.isSchema(schema3)) { + register(schema2, { key } = {}) { + if (!schema2 || !Common.isSchema(schema2)) { return; } - if (schema3.$_property("schemaChain") || schema3._ids._schemaChain) { + if (schema2.$_property("schemaChain") || schema2._ids._schemaChain) { this._schemaChain = true; } - const id = schema3._flags.id; + const id = schema2._flags.id; if (id) { const existing = this._byId.get(id); - assert4(!existing || existing.schema === schema3, "Cannot add different schemas with the same id:", id); + assert4(!existing || existing.schema === schema2, "Cannot add different schemas with the same id:", id); assert4(!this._byKey.has(id), "Schema id conflicts with existing key:", id); - this._byId.set(id, { schema: schema3, id }); + this._byId.set(id, { schema: schema2, id }); } if (key) { assert4(!this._byKey.has(key), "Schema already contains key:", key); assert4(!this._byId.has(key), "Schema key conflicts with existing id:", key); - this._byKey.set(key, { schema: schema3, id: key }); + this._byKey.set(key, { schema: schema2, id: key }); } } reset() { @@ -58505,32 +58504,32 @@ var require_modify = __commonJS({ return this._byId.get(id) || this._byKey.get(id); } }; - internals.fork = function(schema3, id, replacement) { + internals.fork = function(schema2, id, replacement) { const each = /* @__PURE__ */ __name((item, { key }) => { if (id === (item._flags.id || key)) { return replacement; } }, "each"); - const obj = exports2.schema(schema3, { each, ref: false }); - return obj ? obj.$_mutateRebuild() : schema3; + const obj = exports2.schema(schema2, { each, ref: false }); + return obj ? obj.$_mutateRebuild() : schema2; }; - exports2.schema = function(schema3, options) { + exports2.schema = function(schema2, options) { let obj; - for (const name in schema3._flags) { + for (const name in schema2._flags) { if (name[0] === "_") { continue; } - const result = internals.scan(schema3._flags[name], { source: "flags", name }, options); + const result = internals.scan(schema2._flags[name], { source: "flags", name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); obj._flags[name] = result; } } - for (let i2 = 0; i2 < schema3._rules.length; ++i2) { - const rule = schema3._rules[i2]; + for (let i2 = 0; i2 < schema2._rules.length; ++i2) { + const rule = schema2._rules[i2]; const result = internals.scan(rule.args, { source: "rules", name: rule.name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); const clone = Object.assign({}, rule); clone.args = result; obj._rules[i2] = clone; @@ -58540,13 +58539,13 @@ var require_modify = __commonJS({ } } } - for (const name in schema3.$_terms) { + for (const name in schema2.$_terms) { if (name[0] === "_") { continue; } - const result = internals.scan(schema3.$_terms[name], { source: "terms", name }, options); + const result = internals.scan(schema2.$_terms[name], { source: "terms", name }, options); if (result !== void 0) { - obj = obj || schema3.clone(); + obj = obj || schema2.clone(); obj.$_terms[name] = result; } } @@ -58596,7 +58595,7 @@ var require_state4 = __commonJS({ "node_modules/joi/lib/state.js"(exports2, module2) { "use strict"; var { clone, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = { value: /* @__PURE__ */ Symbol("value") }; @@ -58608,16 +58607,16 @@ var require_state4 = __commonJS({ this.schemas = state3.schemas; this.debug = null; } - localize(path17, ancestors = null, schema3 = null) { + localize(path17, ancestors = null, schema2 = null) { const state3 = new internals.State(path17, ancestors, this); - if (schema3 && state3.schemas) { - state3.schemas = [internals.schemas(schema3), ...state3.schemas]; + if (schema2 && state3.schemas) { + state3.schemas = [internals.schemas(schema2), ...state3.schemas]; } return state3; } - nest(schema3, debug3) { + nest(schema2, debug3) { const state3 = new internals.State(this.path, this.ancestors, this); - state3.schemas = state3.schemas && [internals.schemas(schema3), ...state3.schemas]; + state3.schemas = state3.schemas && [internals.schemas(schema2), ...state3.schemas]; state3.debug = debug3; return state3; } @@ -58646,11 +58645,11 @@ var require_state4 = __commonJS({ this.mainstay.commit(); } }; - internals.schemas = function(schema3) { - if (Common.isSchema(schema3)) { - return { schema: schema3 }; + internals.schemas = function(schema2) { + if (Common.isSchema(schema2)) { + return { schema: schema2 }; } - return schema3; + return schema2; }; internals.Shadow = class { constructor() { @@ -58712,20 +58711,20 @@ var require_validator = __commonJS({ "node_modules/joi/lib/validator.js"(exports2) { "use strict"; var { assert: assert4, clone, ignore, reach } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var Errors = require_errors3(); - var State2 = require_state4(); + var State = require_state4(); var internals = { result: /* @__PURE__ */ Symbol("result") }; - exports2.entry = function(value, schema3, prefs) { + exports2.entry = function(value, schema2, prefs) { let settings = Common.defaults; if (prefs) { assert4(prefs.warnings === void 0, "Cannot override warnings preference in synchronous validation"); assert4(prefs.artifacts === void 0, "Cannot override artifacts preference in synchronous validation"); settings = Common.preferences(Common.defaults, prefs); } - const result = internals.entry(value, schema3, settings); + const result = internals.entry(value, schema2, settings); assert4(!result.mainstay.externals.length, "Schema with external rules must use validateAsync()"); const outcome = { value: result.value }; if (result.error) { @@ -58742,12 +58741,12 @@ var require_validator = __commonJS({ } return outcome; }; - exports2.entryAsync = async function(value, schema3, prefs) { + exports2.entryAsync = async function(value, schema2, prefs) { let settings = Common.defaults; if (prefs) { settings = Common.preferences(Common.defaults, prefs); } - const result = internals.entry(value, schema3, settings); + const result = internals.entry(value, schema2, settings); const mainstay = result.mainstay; if (result.error) { if (mainstay.debug) { @@ -58849,12 +58848,12 @@ var require_validator = __commonJS({ } return outcome; }; - exports2.standard = function(value, schema3, options) { + exports2.standard = function(value, schema2, options) { const prefs = options?.libraryOptions; - if (schema3.isAsync()) { - return exports2.entryAsync(value, schema3, prefs); + if (schema2.isAsync()) { + return exports2.entryAsync(value, schema2, prefs); } - return exports2.entry(value, schema3, prefs); + return exports2.entry(value, schema2, prefs); }; internals.Mainstay = class { constructor(tracer, debug3, links) { @@ -58882,60 +58881,60 @@ var require_validator = __commonJS({ this._snapshots.pop(); } }; - internals.entry = function(value, schema3, prefs) { - const { tracer, cleanup } = internals.tracer(schema3, prefs); + internals.entry = function(value, schema2, prefs) { + const { tracer, cleanup } = internals.tracer(schema2, prefs); const debug3 = prefs.debug ? [] : null; - const links = schema3._ids._schemaChain ? /* @__PURE__ */ new Map() : null; + const links = schema2._ids._schemaChain ? /* @__PURE__ */ new Map() : null; const mainstay = new internals.Mainstay(tracer, debug3, links); - const schemas = schema3._ids._schemaChain ? [{ schema: schema3 }] : null; - const state3 = new State2([], [], { mainstay, schemas }); - const result = exports2.validate(value, schema3, state3, prefs); + const schemas = schema2._ids._schemaChain ? [{ schema: schema2 }] : null; + const state3 = new State([], [], { mainstay, schemas }); + const result = exports2.validate(value, schema2, state3, prefs); if (cleanup) { - schema3.$_root.untrace(); + schema2.$_root.untrace(); } const error2 = Errors.process(result.errors, value, prefs); return { value: result.value, error: error2, mainstay }; }; - internals.tracer = function(schema3, prefs) { - if (schema3.$_root._tracer) { - return { tracer: schema3.$_root._tracer._register(schema3) }; + internals.tracer = function(schema2, prefs) { + if (schema2.$_root._tracer) { + return { tracer: schema2.$_root._tracer._register(schema2) }; } if (prefs.debug) { - assert4(schema3.$_root.trace, "Debug mode not supported"); - return { tracer: schema3.$_root.trace()._register(schema3), cleanup: true }; + assert4(schema2.$_root.trace, "Debug mode not supported"); + return { tracer: schema2.$_root.trace()._register(schema2), cleanup: true }; } return { tracer: internals.ignore }; }; - exports2.validate = function(value, schema3, state3, prefs, overrides = {}) { - if (schema3.$_terms.whens) { - schema3 = schema3._generate(value, state3, prefs).schema; + exports2.validate = function(value, schema2, state3, prefs, overrides = {}) { + if (schema2.$_terms.whens) { + schema2 = schema2._generate(value, state3, prefs).schema; } - if (schema3._preferences) { - prefs = internals.prefs(schema3, prefs); + if (schema2._preferences) { + prefs = internals.prefs(schema2, prefs); } - if (schema3._cache && prefs.cache) { - const result = schema3._cache.get(value); + if (schema2._cache && prefs.cache) { + const result = schema2._cache.get(value); state3.mainstay.tracer.debug(state3, "validate", "cached", !!result); if (result) { return result; } } - const createError = /* @__PURE__ */ __name((code, local, localState) => schema3.$_createError(code, value, local, localState || + const createError = /* @__PURE__ */ __name((code, local, localState) => schema2.$_createError(code, value, local, localState || state3, prefs), "createError"); const helpers = { original: value, prefs, - schema: schema3, + schema: schema2, state: state3, error: createError, errorsArray: internals.errorsArray, warn: /* @__PURE__ */ __name((code, local, localState) => state3.mainstay.warnings.push(createError(code, local, localState)), "warn"), - message: /* @__PURE__ */ __name((messages, local) => schema3.$_createError("custom", value, local, state3, prefs, + message: /* @__PURE__ */ __name((messages, local) => schema2.$_createError("custom", value, local, state3, prefs, { messages }), "message") }; - state3.mainstay.tracer.entry(schema3, state3); - const def = schema3._definition; + state3.mainstay.tracer.entry(schema2, state3); + const def = schema2._definition; if (def.prepare && value !== void 0 && prefs.convert) { const prepared = def.prepare(value, helpers); if (prepared) { @@ -58956,42 +58955,42 @@ var require_validator = __commonJS({ value = coerced.value; } } - const empty = schema3._flags.empty; - if (empty && empty.$_match(internals.trim(value, schema3), state3.nest(empty), Common.defaults)) { + const empty = schema2._flags.empty; + if (empty && empty.$_match(internals.trim(value, schema2), state3.nest(empty), Common.defaults)) { state3.mainstay.tracer.value(state3, "empty", value, void 0); value = void 0; } - const presence = overrides.presence || schema3._flags.presence || (schema3._flags._endedSwitch ? null : prefs.presence); + const presence = overrides.presence || schema2._flags.presence || (schema2._flags._endedSwitch ? null : prefs.presence); if (value === void 0) { if (presence === "forbidden") { return internals.finalize(value, null, helpers); } if (presence === "required") { - return internals.finalize(value, [schema3.$_createError("any.required", value, null, state3, prefs)], helpers); + return internals.finalize(value, [schema2.$_createError("any.required", value, null, state3, prefs)], helpers); } if (presence === "optional") { - if (schema3._flags.default !== Common.symbols.deepDefault) { + if (schema2._flags.default !== Common.symbols.deepDefault) { return internals.finalize(value, null, helpers); } state3.mainstay.tracer.value(state3, "default", value, {}); value = {}; } } else if (presence === "forbidden") { - return internals.finalize(value, [schema3.$_createError("any.unknown", value, null, state3, prefs)], helpers); + return internals.finalize(value, [schema2.$_createError("any.unknown", value, null, state3, prefs)], helpers); } const errors = []; - if (schema3._valids) { - const match2 = schema3._valids.get(value, state3, prefs, schema3._flags.insensitive); + if (schema2._valids) { + const match2 = schema2._valids.get(value, state3, prefs, schema2._flags.insensitive); if (match2) { if (prefs.convert) { state3.mainstay.tracer.value(state3, "valids", value, match2.value); value = match2.value; } - state3.mainstay.tracer.filter(schema3, state3, "valid", match2); + state3.mainstay.tracer.filter(schema2, state3, "valid", match2); return internals.finalize(value, null, helpers); } - if (schema3._flags.only) { - const report = schema3.$_createError("any.only", value, { valids: schema3._valids.values({ display: true }) }, + if (schema2._flags.only) { + const report = schema2.$_createError("any.only", value, { valids: schema2._valids.values({ display: true }) }, state3, prefs); if (prefs.abortEarly) { return internals.finalize(value, [report], helpers); @@ -58999,11 +58998,11 @@ var require_validator = __commonJS({ errors.push(report); } } - if (schema3._invalids) { - const match2 = schema3._invalids.get(value, state3, prefs, schema3._flags.insensitive); + if (schema2._invalids) { + const match2 = schema2._invalids.get(value, state3, prefs, schema2._flags.insensitive); if (match2) { - state3.mainstay.tracer.filter(schema3, state3, "invalid", match2); - const report = schema3.$_createError("any.invalid", value, { invalids: schema3._invalids.values({ display: true }) }, + state3.mainstay.tracer.filter(schema2, state3, "invalid", match2); + const report = schema2.$_createError("any.invalid", value, { invalids: schema2._invalids.values({ display: true }) }, state3, prefs); if (prefs.abortEarly) { return internals.finalize(value, [report], helpers); @@ -59028,17 +59027,17 @@ var require_validator = __commonJS({ } } } - if (!schema3._rules.length) { + if (!schema2._rules.length) { return internals.finalize(value, errors, helpers); } return internals.rules(value, errors, helpers); }; internals.rules = function(value, errors, helpers) { - const { schema: schema3, state: state3, prefs } = helpers; - for (const rule of schema3._rules) { - const definition = schema3._definition.rules[rule.method]; + const { schema: schema2, state: state3, prefs } = helpers; + for (const rule of schema2._rules) { + const definition = schema2._definition.rules[rule.method]; if (definition.convert && prefs.convert) { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "full"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "full"); continue; } let ret; @@ -59051,7 +59050,7 @@ var require_validator = __commonJS({ const normalized = resolver.normalize ? resolver.normalize(resolved) : resolved; const invalid = Common.validateArg(normalized, null, resolver); if (invalid) { - ret = schema3.$_createError("any.ref", resolved, { arg: key, ref: args[key], reason: invalid }, state3, prefs); + ret = schema2.$_createError("any.ref", resolved, { arg: key, ref: args[key], reason: invalid }, state3, prefs); break; } args[key] = normalized; @@ -59060,7 +59059,7 @@ var require_validator = __commonJS({ ret = ret || definition.validate(value, helpers, args, rule); const result = internals.rule(ret, rule); if (result.errors) { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "error"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "error"); if (rule.warn) { state3.mainstay.warnings.push(...result.errors); continue; @@ -59070,7 +59069,7 @@ var require_validator = __commonJS({ } errors.push(...result.errors); } else { - state3.mainstay.tracer.log(schema3, state3, "rule", rule.name, "pass"); + state3.mainstay.tracer.log(schema2, state3, "rule", rule.name, "pass"); state3.mainstay.tracer.value(state3, "rule", value, result.value, rule.name); value = result.value; } @@ -59096,7 +59095,7 @@ var require_validator = __commonJS({ }; internals.finalize = function(value, errors, helpers) { errors = errors || []; - const { schema: schema3, state: state3, prefs } = helpers; + const { schema: schema2, state: state3, prefs } = helpers; if (errors.length) { const failover = internals.default("failover", void 0, errors, helpers); if (failover !== void 0) { @@ -59105,9 +59104,9 @@ var require_validator = __commonJS({ errors = []; } } - if (errors.length && schema3._flags.error) { - if (typeof schema3._flags.error === "function") { - errors = schema3._flags.error(errors); + if (errors.length && schema2._flags.error) { + if (typeof schema2._flags.error === "function") { + errors = schema2._flags.error(errors); if (!Array.isArray(errors)) { errors = [errors]; } @@ -59115,7 +59114,7 @@ var require_validator = __commonJS({ assert4(error2 instanceof Error || error2 instanceof Errors.Report, "error() must return an Error object"); } } else { - errors = [schema3._flags.error]; + errors = [schema2._flags.error]; } } if (value === void 0) { @@ -59123,59 +59122,59 @@ var require_validator = __commonJS({ state3.mainstay.tracer.value(state3, "default", value, defaulted); value = defaulted; } - if (schema3._flags.cast && value !== void 0) { - const caster = schema3._definition.cast[schema3._flags.cast]; + if (schema2._flags.cast && value !== void 0) { + const caster = schema2._definition.cast[schema2._flags.cast]; if (caster.from(value)) { const casted = caster.to(value, helpers); - state3.mainstay.tracer.value(state3, "cast", value, casted, schema3._flags.cast); + state3.mainstay.tracer.value(state3, "cast", value, casted, schema2._flags.cast); value = casted; } } - if (schema3.$_terms.externals && prefs.externals && prefs._externals !== false) { - for (const { method } of schema3.$_terms.externals) { - state3.mainstay.externals.push({ method, schema: schema3, state: state3, label: Errors.label(schema3._flags, state3, + if (schema2.$_terms.externals && prefs.externals && prefs._externals !== false) { + for (const { method } of schema2.$_terms.externals) { + state3.mainstay.externals.push({ method, schema: schema2, state: state3, label: Errors.label(schema2._flags, state3, prefs) }); } } const result = { value, errors: errors.length ? errors : null }; - if (schema3._flags.result) { - result.value = schema3._flags.result === "strip" ? void 0 : ( + if (schema2._flags.result) { + result.value = schema2._flags.result === "strip" ? void 0 : ( /* raw */ helpers.original ); - state3.mainstay.tracer.value(state3, schema3._flags.result, value, result.value); - state3.shadow(value, schema3._flags.result); + state3.mainstay.tracer.value(state3, schema2._flags.result, value, result.value); + state3.shadow(value, schema2._flags.result); } - if (schema3._cache && prefs.cache !== false && !schema3._refs.length) { - schema3._cache.set(helpers.original, result); + if (schema2._cache && prefs.cache !== false && !schema2._refs.length) { + schema2._cache.set(helpers.original, result); } - if (value !== void 0 && !result.errors && schema3._flags.artifact !== void 0) { + if (value !== void 0 && !result.errors && schema2._flags.artifact !== void 0) { state3.mainstay.artifacts = state3.mainstay.artifacts || /* @__PURE__ */ new Map(); - if (!state3.mainstay.artifacts.has(schema3._flags.artifact)) { - state3.mainstay.artifacts.set(schema3._flags.artifact, []); + if (!state3.mainstay.artifacts.has(schema2._flags.artifact)) { + state3.mainstay.artifacts.set(schema2._flags.artifact, []); } - state3.mainstay.artifacts.get(schema3._flags.artifact).push(state3.path); + state3.mainstay.artifacts.get(schema2._flags.artifact).push(state3.path); } return result; }; - internals.prefs = function(schema3, prefs) { + internals.prefs = function(schema2, prefs) { const isDefaultOptions = prefs === Common.defaults; - if (isDefaultOptions && schema3._preferences[Common.symbols.prefs]) { - return schema3._preferences[Common.symbols.prefs]; + if (isDefaultOptions && schema2._preferences[Common.symbols.prefs]) { + return schema2._preferences[Common.symbols.prefs]; } - prefs = Common.preferences(prefs, schema3._preferences); + prefs = Common.preferences(prefs, schema2._preferences); if (isDefaultOptions) { - schema3._preferences[Common.symbols.prefs] = prefs; + schema2._preferences[Common.symbols.prefs] = prefs; } return prefs; }; internals.default = function(flag, value, errors, helpers) { - const { schema: schema3, state: state3, prefs } = helpers; - const source = schema3._flags[flag]; + const { schema: schema2, state: state3, prefs } = helpers; + const source = schema2._flags[flag]; if (prefs.noDefaults || source === void 0) { return value; } - state3.mainstay.tracer.log(schema3, state3, "rule", flag, "full"); + state3.mainstay.tracer.log(schema2, state3, "rule", flag, "full"); if (!source) { return source; } @@ -59184,7 +59183,7 @@ var require_validator = __commonJS({ try { return source(...args); } catch (err) { - errors.push(schema3.$_createError(`any.${flag}`, null, { error: err }, state3, prefs)); + errors.push(schema2.$_createError(`any.${flag}`, null, { error: err }, state3, prefs)); return; } } @@ -59199,11 +59198,11 @@ var require_validator = __commonJS({ } return clone(source); }; - internals.trim = function(value, schema3) { + internals.trim = function(value, schema2) { if (typeof value !== "string") { return value; } - const trim2 = schema3.$_getRule("trim"); + const trim2 = schema2.$_getRule("trim"); if (!trim2 || !trim2.args.enabled) { return value; } @@ -59231,7 +59230,7 @@ var require_values = __commonJS({ "node_modules/joi/lib/values.js"(exports2, module2) { "use strict"; var { assert: assert4, deepEqual } = require_lib(); - var Common = require_common4(); + var Common = require_common5(); var internals = {}; module2.exports = internals.Values = class { constructor(values, refs) { @@ -59355,15 +59354,15 @@ var require_values = __commonJS({ return Array.from([...this._values, ...this._refs]); } clone() { - const set2 = new internals.Values(this._values, this._refs); - set2._override = this._override; - return set2; + const set = new internals.Values(this._values, this._refs); + set._override = this._override; + return set; } concat(source) { assert4(!source._override, "Cannot concat override set of values"); - const set2 = new internals.Values([...this._values, ...source._values], [...this._refs, ...source._refs]); - set2._override = this._override; - return set2; + const set = new internals.Values([...this._values, ...source._values], [...this._refs, ...source._refs]); + set._override = this._override; + return set; } describe() { const normalized = []; @@ -59382,15 +59381,15 @@ var require_values = __commonJS({ internals.Values.prototype[Common.symbols.values] = true; internals.Values.prototype.slice = internals.Values.prototype.clone; internals.lowercases = function(from) { - const map2 = /* @__PURE__ */ new Map(); + const map = /* @__PURE__ */ new Map(); if (from) { for (const value of from) { if (typeof value === "string") { - map2.set(value.toLowerCase(), value); + map.set(value.toLowerCase(), value); } } } - return map2; + return map; }; } }); @@ -59399,9 +59398,9 @@ var require_values = __commonJS({ var require_base = __commonJS({ "node_modules/joi/lib/base.js"(exports2, module2) { "use strict"; - var { assert: assert4, clone, deepEqual, merge: merge3 } = require_lib(); + var { assert: assert4, clone, deepEqual, merge: merge2 } = require_lib(); var Cache = require_cache2(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Extend = require_extend(); @@ -59419,8 +59418,8 @@ var require_base = __commonJS({ nullSchema: /* @__PURE__ */ __name(() => ({ type: "null" }), "nullSchema") }; internals.Base = class { - constructor(type2) { - this.type = type2; + constructor(type) { + this.type = type; this.$_root = null; this._definition = {}; this._reset(); @@ -59455,7 +59454,7 @@ var require_base = __commonJS({ } const rootCall = !options.$defs; const defs = options.$defs ?? {}; - let schema3 = {}; + let schema2 = {}; const isTypeAny = this.type === "any"; const isOnly = this._flags.only; const valids = this._valids && Array.from(this._valids._values).filter((v) => v !== null); @@ -59465,22 +59464,22 @@ var require_base = __commonJS({ typesOverlap = types2.has(this.type) || this.type === "date" && types2.has("object"); } if (!isTypeAny && typesOverlap && internals.standardTypes.has(this.type)) { - schema3.type = this.type; + schema2.type = this.type; } if (this._flags.description) { - schema3.description = this._flags.description; + schema2.description = this._flags.description; } if (this._flags.default !== void 0 && typeof this._flags.default !== "function") { - schema3.default = this._flags.default; + schema2.default = this._flags.default; } const subOptions = { ...options, $defs: defs }; if (this._definition.jsonSchema && typesOverlap) { - schema3 = this._definition.jsonSchema(this, schema3, mode, subOptions); + schema2 = this._definition.jsonSchema(this, schema2, mode, subOptions); } for (const rule of this._rules) { const definition = this._definition.rules[rule.name]; if (definition.jsonSchema && typesOverlap) { - schema3 = definition.jsonSchema(rule, schema3, isOnly, mode, subOptions); + schema2 = definition.jsonSchema(rule, schema2, isOnly, mode, subOptions); } } if (this.$_terms.shared) { @@ -59489,43 +59488,43 @@ var require_base = __commonJS({ } } if (rootCall && Object.keys(defs).length) { - schema3.$defs = defs; + schema2.$defs = defs; } if (this._valids) { const values = valids.filter((v) => typeof v !== "symbol"); if (values.length) { if (this._flags.only) { - schema3.enum = values; + schema2.enum = values; const list = Common.intersect(new Set(values.map((v) => typeof v)), internals.primitiveTypes); if (list.size) { const types2 = [...list]; - schema3.type = types2.length === 1 ? types2[0] : types2; + schema2.type = types2.length === 1 ? types2[0] : types2; } } else { const otherTypes = values.filter((v) => typeof v !== this.type || isTypeAny); if (otherTypes.length && !(isTypeAny && !isOnly)) { - if (!schema3.anyOf) { - schema3 = { - anyOf: [schema3] + if (!schema2.anyOf) { + schema2 = { + anyOf: [schema2] }; } - schema3.anyOf.push({ enum: otherTypes }); + schema2.anyOf.push({ enum: otherTypes }); } } } } if (this._valids && this._valids.has(null) && !(isTypeAny && !isOnly)) { if (this._valids.length === 1 && (isTypeAny || isOnly)) { - schema3.type = "null"; - } else if (schema3.type) { - schema3.type = [schema3.type, "null"]; - } else if (schema3.anyOf) { - schema3.anyOf.unshift(internals.nullSchema()); + schema2.type = "null"; + } else if (schema2.type) { + schema2.type = [schema2.type, "null"]; + } else if (schema2.anyOf) { + schema2.anyOf.unshift(internals.nullSchema()); } else { - schema3 = { + schema2 = { anyOf: [ internals.nullSchema(), - schema3 + schema2 ] }; } @@ -59557,7 +59556,7 @@ var require_base = __commonJS({ } return { anyOf: results }; } - return schema3; + return schema2; } // Rules allow(...values) { @@ -59594,12 +59593,12 @@ var require_base = __commonJS({ assert4(desc && typeof desc === "string", "Description must be a non-empty string"); return this.$_setFlag("description", desc); } - empty(schema3) { + empty(schema2) { const obj = this.clone(); - if (schema3 !== void 0) { - schema3 = obj.$_compile(schema3, { override: false }); + if (schema2 !== void 0) { + schema2 = obj.$_compile(schema2, { override: false }); } - return obj.$_setFlag("empty", schema3, { clone: false }); + return obj.$_setFlag("empty", schema2, { clone: false }); } error(err) { assert4(err, "Missing error"); @@ -59781,14 +59780,14 @@ e", obj.type, "with", item.otherwise && item.otherwise.type); obj._flags.empty = obj._flags.empty.concat(source._flags.empty); const flags = Object.assign({}, source._flags); delete flags.empty; - merge3(obj._flags, flags); + merge2(obj._flags, flags); } else if (source._flags.empty) { obj._flags.empty = source._flags.empty; const flags = Object.assign({}, source._flags); delete flags.empty; - merge3(obj._flags, flags); + merge2(obj._flags, flags); } else { - merge3(obj._flags, source._flags); + merge2(obj._flags, source._flags); } for (const key in source.$_terms) { const terms = source.$_terms[key]; @@ -59969,8 +59968,8 @@ ort rule properties"); } return obj; } - $_compile(schema3, options) { - return Compile.schema(this.$_root, schema3, options); + $_compile(schema2, options) { + return Compile.schema(this.$_root, schema2, options); } $_createError(code, value, local, state3, prefs, options = {}) { const flags = options.flags !== false ? this._flags : {}; @@ -60018,9 +60017,9 @@ ort rule properties"); this.$_temp.ruleset = false; return this; } - $_mutateRegister(schema3, { family, key } = {}) { - this._refs.register(schema3, family); - this._ids.register(schema3, { key }); + $_mutateRegister(schema2, { family, key } = {}) { + this._refs.register(schema2, family); + this._ids.register(schema2, { key }); } $_property(name) { return this._definition.properties[name]; @@ -60166,16 +60165,16 @@ ort rule properties"); this.$_temp.whens[id] = obj; return { schema: obj, id }; } - _inner(type2, values, options = {}) { - assert4(!this._inRuleset(), `Cannot set ${type2} inside a ruleset`); + _inner(type, values, options = {}) { + assert4(!this._inRuleset(), `Cannot set ${type} inside a ruleset`); const obj = this.clone(); - if (!obj.$_terms[type2] || options.override) { - obj.$_terms[type2] = []; + if (!obj.$_terms[type] || options.override) { + obj.$_terms[type] = []; } if (options.single) { - obj.$_terms[type2].push(values); + obj.$_terms[type].push(values); } else { - obj.$_terms[type2].push(...values); + obj.$_terms[type].push(...values); } obj.$_temp.ruleset = false; return obj; @@ -60300,7 +60299,7 @@ var require_any = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Base = require_base(); - var Common = require_common4(); + var Common = require_common5(); var Messages = require_messages(); module2.exports = Base.extend({ type: "any", @@ -60341,12 +60340,12 @@ var require_any = __commonJS({ } }, shared: { - method(schema3) { - assert4(Common.isSchema(schema3) && schema3._flags.id, "Schema must be a schema with an id"); + method(schema2) { + assert4(Common.isSchema(schema2) && schema2._flags.id, "Schema must be a schema with an id"); const obj = this.clone(); obj.$_terms.shared = obj.$_terms.shared || []; - obj.$_terms.shared.push(schema3); - obj.$_mutateRegister(schema3); + obj.$_terms.shared.push(schema2); + obj.$_mutateRegister(schema2); return obj; } }, @@ -60431,9 +60430,9 @@ var require_any = __commonJS({ var require_alternatives = __commonJS({ "node_modules/joi/lib/types/alternatives.js"(exports2, module2) { "use strict"; - var { assert: assert4, merge: merge3 } = require_lib(); + var { assert: assert4, merge: merge2 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Ref = require_ref2(); @@ -60447,21 +60446,21 @@ var require_alternatives = __commonJS({ terms: { matches: { init: [], register: Ref.toSibling } }, - args(schema3, ...schemas) { + args(schema2, ...schemas) { if (schemas.length === 1) { if (Array.isArray(schemas[0])) { - return schema3.try(...schemas[0]); + return schema2.try(...schemas[0]); } } - return schema3.try(...schemas); + return schema2.try(...schemas); }, validate(value, helpers) { - const { schema: schema3, error: error2, state: state3, prefs } = helpers; - if (schema3._flags.match) { + const { schema: schema2, error: error2, state: state3, prefs } = helpers; + if (schema2._flags.match) { const matched = []; const failed = []; - for (let i2 = 0; i2 < schema3.$_terms.matches.length; ++i2) { - const item = schema3.$_terms.matches[i2]; + for (let i2 = 0; i2 < schema2.$_terms.matches.length; ++i2) { + const item = schema2.$_terms.matches[i2]; const localState = state3.nest(item.schema, `match.${i2}`); localState.snapshot(); const result = item.schema.$_validate(value, localState, prefs); @@ -60479,10 +60478,10 @@ var require_alternatives = __commonJS({ }; return { errors: error2("alternatives.any", context3) }; } - if (schema3._flags.match === "one") { + if (schema2._flags.match === "one") { return matched.length === 1 ? { value: matched[0] } : { errors: error2("alternatives.one") }; } - if (matched.length !== schema3.$_terms.matches.length) { + if (matched.length !== schema2.$_terms.matches.length) { const context3 = { details: failed.map((f) => Errors.details(f, { override: false })) }; @@ -60493,12 +60492,12 @@ var require_alternatives = __commonJS({ return v.schema.type === "object" || v.schema.type === "alternatives" && isAnyObj(v.schema); }); }, "isAnyObj"); - return isAnyObj(schema3) ? { value: matched.reduce((acc, v) => merge3(acc, v, { mergeArrays: false })) } : { value: matched[matched. + return isAnyObj(schema2) ? { value: matched.reduce((acc, v) => merge2(acc, v, { mergeArrays: false })) } : { value: matched[matched. length - 1] }; } const errors = []; - for (let i2 = 0; i2 < schema3.$_terms.matches.length; ++i2) { - const item = schema3.$_terms.matches[i2]; + for (let i2 = 0; i2 < schema2.$_terms.matches.length; ++i2) { + const item = schema2.$_terms.matches[i2]; if (item.schema) { const localState = state3.nest(item.schema, `match.${i2}`); localState.snapshot(); @@ -60528,9 +60527,9 @@ var require_alternatives = __commonJS({ } return internals.errors(errors, helpers); }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { const matches = []; - for (const match2 of schema3.$_terms.matches) { + for (const match2 of schema2.$_terms.matches) { if (match2.schema) { matches.push(match2.schema.$_jsonSchema(mode, options)); } else { @@ -60547,7 +60546,7 @@ var require_alternatives = __commonJS({ } if (matches.length) { delete res.type; - const matchMode = schema3._flags.match ?? "any"; + const matchMode = schema2._flags.match ?? "any"; if (matchMode === "one") { res.oneOf = matches; } else { @@ -60592,8 +60591,8 @@ var require_alternatives = __commonJS({ Common.verifyFlat(schemas, "try"); assert4(!this._flags._endedSwitch, "Unreachable condition"); const obj = this.clone(); - for (const schema3 of schemas) { - obj.$_terms.matches.push({ schema: obj.$_compile(schema3) }); + for (const schema2 of schemas) { + obj.$_terms.matches.push({ schema: obj.$_compile(schema2) }); } return obj.$_mutateRebuild(); } @@ -60625,21 +60624,21 @@ var require_alternatives = __commonJS({ return false; } }, - rebuild(schema3) { + rebuild(schema2) { const each = /* @__PURE__ */ __name((item) => { if (Common.isSchema(item) && item.type === "array") { - schema3.$_setFlag("_arrayItems", true, { clone: false }); + schema2.$_setFlag("_arrayItems", true, { clone: false }); } }, "each"); - schema3.$_modify({ each }); + schema2.$_modify({ each }); }, manifest: { build(obj, desc) { if (desc.matches) { for (const match2 of desc.matches) { - const { schema: schema3, ref, is, not, then, otherwise } = match2; - if (schema3) { - obj = obj.try(schema3); + const { schema: schema2, ref, is, not, then, otherwise } = match2; + if (schema2) { + obj = obj.try(schema2); } else if (ref) { obj = obj.conditional(ref, { is, then, not, otherwise, switch: match2.switch }); } else { @@ -60667,7 +60666,7 @@ var require_alternatives = __commonJS({ } const valids = /* @__PURE__ */ new Set(); const complex = []; - for (const { reports, schema: schema3 } of failures) { + for (const { reports, schema: schema2 } of failures) { if (reports.length > 1) { return internals.unmatched(failures, error2); } @@ -60676,7 +60675,7 @@ var require_alternatives = __commonJS({ return internals.unmatched(failures, error2); } if (report.state.path.length !== state3.path.length) { - complex.push({ type: schema3.type, report }); + complex.push({ type: schema2.type, report }); continue; } if (report.code === "any.only") { @@ -60685,13 +60684,13 @@ var require_alternatives = __commonJS({ } continue; } - const [type2, code] = report.code.split("."); + const [type, code] = report.code.split("."); if (code !== "base") { - complex.push({ type: schema3.type, report }); + complex.push({ type: schema2.type, report }); } else if (report.code === "object.base") { valids.add(report.local.type); } else { - valids.add(type2); + valids.add(type); } } if (!complex.length) { @@ -60718,7 +60717,7 @@ var require_array2 = __commonJS({ "use strict"; var { assert: assert4, deepEqual, reach } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var internals = {}; module2.exports = Any.extend({ @@ -60736,43 +60735,43 @@ var require_array2 = __commonJS({ }, coerce: { from: "object", - method(value, { schema: schema3, state: state3, prefs }) { + method(value, { schema: schema2, state: state3, prefs }) { if (!Array.isArray(value)) { return; } - const sort = schema3.$_getRule("sort"); + const sort = schema2.$_getRule("sort"); if (!sort) { return; } - return internals.sort(schema3, value, sort.args.options, state3, prefs); + return internals.sort(schema2, value, sort.args.options, state3, prefs); } }, - validate(value, { schema: schema3, error: error2 }) { + validate(value, { schema: schema2, error: error2 }) { if (!Array.isArray(value)) { - if (schema3._flags.single) { + if (schema2._flags.single) { const single = [value]; single[Common.symbols.arraySingle] = true; return { value: single }; } return { errors: error2("array.base") }; } - if (!schema3.$_getRule("items") && !schema3.$_terms.externals) { + if (!schema2.$_getRule("items") && !schema2.$_terms.externals) { return; } return { value: value.slice() }; }, - jsonSchema(schema3, res, mode, options) { - const ordered = schema3.$_terms.ordered; + jsonSchema(schema2, res, mode, options) { + const ordered = schema2.$_terms.ordered; if (ordered.length) { res.prefixItems = ordered.map((item) => item.$_jsonSchema(mode, options)); } - if (schema3.$_terms.items.length) { + if (schema2.$_terms.items.length) { let items; - if (schema3.$_terms.items.length === 1) { - items = schema3.$_terms.items[0].$_jsonSchema(mode, options); + if (schema2.$_terms.items.length === 1) { + items = schema2.$_terms.items[0].$_jsonSchema(mode, options); } else { items = { - anyOf: schema3.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) + anyOf: schema2.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) }; } if (ordered.length) { @@ -60787,7 +60786,7 @@ var require_array2 = __commonJS({ res.maxItems = ordered.length; } const contains = []; - for (const rule of schema3._rules) { + for (const rule of schema2._rules) { if (rule.name === "has") { contains.push(rule.args.schema.$_jsonSchema(mode, options)); } @@ -60799,13 +60798,13 @@ var require_array2 = __commonJS({ res.allOf = contains.map((item) => ({ contains: item })); } } - if (schema3._flags.single && schema3.$_terms.items.length) { + if (schema2._flags.single && schema2.$_terms.items.length) { let items; - if (schema3.$_terms.items.length === 1) { - items = schema3.$_terms.items[0].$_jsonSchema(mode, options); + if (schema2.$_terms.items.length === 1) { + items = schema2.$_terms.items[0].$_jsonSchema(mode, options); } else { items = { - anyOf: schema3.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) + anyOf: schema2.$_terms.items.map((item) => item.$_jsonSchema(mode, options)) }; } res = { @@ -60819,10 +60818,10 @@ var require_array2 = __commonJS({ }, rules: { has: { - method(schema3) { - schema3 = this.$_compile(schema3, { appendPath: true }); - const obj = this.$_addRule({ name: "has", args: { schema: schema3 } }); - obj.$_mutateRegister(schema3); + method(schema2) { + schema2 = this.$_compile(schema2, { appendPath: true }); + const obj = this.$_addRule({ name: "has", args: { schema: schema2 } }); + obj.$_mutateRegister(schema2); return obj; }, validate(value, { state: state3, prefs, error: error2 }, { schema: has2 }) { @@ -60846,15 +60845,15 @@ var require_array2 = __commonJS({ Common.verifyFlat(schemas, "items"); const obj = this.$_addRule("items"); for (let i2 = 0; i2 < schemas.length; ++i2) { - const type2 = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); - obj.$_terms.items.push(type2); + const type = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); + obj.$_terms.items.push(type); } return obj.$_mutateRebuild(); }, - validate(value, { schema: schema3, error: error2, state: state3, prefs, errorsArray }) { - const requireds = schema3.$_terms._requireds.slice(); - const ordereds = schema3.$_terms.ordered.slice(); - const inclusions = [...schema3.$_terms._inclusions, ...requireds]; + validate(value, { schema: schema2, error: error2, state: state3, prefs, errorsArray }) { + const requireds = schema2.$_terms._requireds.slice(); + const ordereds = schema2.$_terms.ordered.slice(); + const inclusions = [...schema2.$_terms._inclusions, ...requireds]; const wasArray = !value[Common.symbols.arraySingle]; delete value[Common.symbols.arraySingle]; const errors = errorsArray(); @@ -60865,7 +60864,7 @@ var require_array2 = __commonJS({ let isValid = false; const key = wasArray ? i2 : new Number(i2); const path17 = [...state3.path, key]; - if (!schema3._flags.sparse && item === void 0) { + if (!schema2._flags.sparse && item === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize(path17))); if (prefs.abortEarly) { return errors; @@ -60874,7 +60873,7 @@ var require_array2 = __commonJS({ continue; } const ancestors = [value, ...state3.ancestors]; - for (const exclusion of schema3.$_terms._exclusions) { + for (const exclusion of schema2.$_terms._exclusions) { if (!exclusion.$_match(item, state3.localize(path17, ancestors, exclusion), prefs, { presence: "ignore" })) { continue; } @@ -60889,7 +60888,7 @@ var require_array2 = __commonJS({ if (errored) { continue; } - if (schema3.$_terms.ordered.length) { + if (schema2.$_terms.ordered.length) { if (ordereds.length) { const ordered = ordereds.shift(); const res = ordered.$_validate(item, state3.localize(path17, ancestors, ordered), prefs); @@ -60898,7 +60897,7 @@ var require_array2 = __commonJS({ internals.fastSplice(value, i2); --i2; --il; - } else if (!schema3._flags.sparse && res.value === void 0) { + } else if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize( path17))); if (prefs.abortEarly) { @@ -60915,8 +60914,8 @@ var require_array2 = __commonJS({ } } continue; - } else if (!schema3.$_terms.items.length) { - errors.push(error2("array.orderedLength", { pos: i2, limit: schema3.$_terms.ordered.length })); + } else if (!schema2.$_terms.items.length) { + errors.push(error2("array.orderedLength", { pos: i2, limit: schema2.$_terms.ordered.length })); if (prefs.abortEarly) { return errors; } @@ -60937,7 +60936,7 @@ var require_array2 = __commonJS({ internals.fastSplice(requireds, j); --j; --jl; - if (!schema3._flags.sparse && res.value === void 0) { + if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize(path17))); if (prefs.abortEarly) { return errors; @@ -60967,7 +60966,7 @@ var require_array2 = __commonJS({ internals.fastSplice(value, i2); --i2; --il; - } else if (!schema3._flags.sparse && res.value === void 0) { + } else if (!schema2._flags.sparse && res.value === void 0) { errors.push(error2("array.sparse", { key, path: path17, pos: i2, value: void 0 }, state3.localize( path17))); errored = true; @@ -60998,7 +60997,7 @@ var require_array2 = __commonJS({ if (errored) { continue; } - if ((schema3.$_terms._inclusions.length || schema3.$_terms._requireds.length) && !isValid) { + if ((schema2.$_terms._inclusions.length || schema2.$_terms._requireds.length) && !isValid) { if (stripUnknown) { internals.fastSplice(value, i2); --i2; @@ -61012,10 +61011,10 @@ var require_array2 = __commonJS({ } } if (requireds.length) { - internals.fillMissedErrors(schema3, errors, requireds, value, state3, prefs); + internals.fillMissedErrors(schema2, errors, requireds, value, state3, prefs); } if (ordereds.length) { - internals.fillOrderedErrors(schema3, errors, ordereds, value, state3, prefs); + internals.fillOrderedErrors(schema2, errors, ordereds, value, state3, prefs); if (!errors.length) { internals.fillDefault(ordereds, value, state3, prefs); } @@ -61072,10 +61071,10 @@ var require_array2 = __commonJS({ Common.verifyFlat(schemas, "ordered"); const obj = this.$_addRule("items"); for (let i2 = 0; i2 < schemas.length; ++i2) { - const type2 = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); - internals.validateSingle(type2, obj); - obj.$_mutateRegister(type2); - obj.$_terms.ordered.push(type2); + const type = Common.tryWithPath(() => this.$_compile(schemas[i2]), i2, { append: true }); + internals.validateSingle(type, obj); + obj.$_mutateRegister(type); + obj.$_terms.ordered.push(type); } return obj.$_mutateRebuild(); } @@ -61099,8 +61098,8 @@ var require_array2 = __commonJS({ } return this.$_addRule({ name: "sort", args: { options: settings } }); }, - validate(value, { error: error2, state: state3, prefs, schema: schema3 }, { options }) { - const { value: sorted2, errors } = internals.sort(schema3, value, options, state3, prefs); + validate(value, { error: error2, state: state3, prefs, schema: schema2 }, { options }) { + const { value: sorted2, errors } = internals.sort(schema2, value, options, state3, prefs); if (errors) { return errors; } @@ -61139,7 +61138,7 @@ be a function or a string"); } return this.$_addRule(rule); }, - validate(value, { state: state3, error: error2, schema: schema3 }, { comparator: raw, options }, { comparator, + validate(value, { state: state3, error: error2, schema: schema2 }, { comparator: raw, options }, { comparator, path: path17 }) { const found = { string: /* @__PURE__ */ Object.create(null), @@ -61229,22 +61228,22 @@ be a function or a string"); } } }, - rebuild(schema3) { - schema3.$_terms._inclusions = []; - schema3.$_terms._exclusions = []; - schema3.$_terms._requireds = []; - for (const type2 of schema3.$_terms.items) { - internals.validateSingle(type2, schema3); - if (type2._flags.presence === "required") { - schema3.$_terms._requireds.push(type2); - } else if (type2._flags.presence === "forbidden") { - schema3.$_terms._exclusions.push(type2); + rebuild(schema2) { + schema2.$_terms._inclusions = []; + schema2.$_terms._exclusions = []; + schema2.$_terms._requireds = []; + for (const type of schema2.$_terms.items) { + internals.validateSingle(type, schema2); + if (type._flags.presence === "required") { + schema2.$_terms._requireds.push(type); + } else if (type._flags.presence === "forbidden") { + schema2.$_terms._exclusions.push(type); } else { - schema3.$_terms._inclusions.push(type2); + schema2.$_terms._inclusions.push(type); } } - for (const type2 of schema3.$_terms.ordered) { - internals.validateSingle(type2, schema3); + for (const type of schema2.$_terms.ordered) { + internals.validateSingle(type, schema2); } }, manifest: { @@ -61279,7 +61278,7 @@ d value(s)", "array.unique": "{{#label}} contains a duplicate value" } }); - internals.fillMissedErrors = function(schema3, errors, requireds, value, state3, prefs) { + internals.fillMissedErrors = function(schema2, errors, requireds, value, state3, prefs) { const knownMisses = []; let unknownMisses = 0; for (const required of requireds) { @@ -61292,16 +61291,16 @@ d value(s)", } if (knownMisses.length) { if (unknownMisses) { - errors.push(schema3.$_createError("array.includesRequiredBoth", value, { knownMisses, unknownMisses }, state3, + errors.push(schema2.$_createError("array.includesRequiredBoth", value, { knownMisses, unknownMisses }, state3, prefs)); } else { - errors.push(schema3.$_createError("array.includesRequiredKnowns", value, { knownMisses }, state3, prefs)); + errors.push(schema2.$_createError("array.includesRequiredKnowns", value, { knownMisses }, state3, prefs)); } } else { - errors.push(schema3.$_createError("array.includesRequiredUnknowns", value, { unknownMisses }, state3, prefs)); + errors.push(schema2.$_createError("array.includesRequiredUnknowns", value, { unknownMisses }, state3, prefs)); } }; - internals.fillOrderedErrors = function(schema3, errors, ordereds, value, state3, prefs) { + internals.fillOrderedErrors = function(schema2, errors, ordereds, value, state3, prefs) { const requiredOrdereds = []; for (const ordered of ordereds) { if (ordered._flags.presence === "required") { @@ -61309,7 +61308,7 @@ d value(s)", } } if (requiredOrdereds.length) { - internals.fillMissedErrors(schema3, errors, requiredOrdereds, value, state3, prefs); + internals.fillMissedErrors(schema2, errors, requiredOrdereds, value, state3, prefs); } }; internals.fillDefault = function(ordereds, value, state3, prefs) { @@ -61338,13 +61337,13 @@ d value(s)", } --arr.length; }; - internals.validateSingle = function(type2, obj) { - if (type2.type === "array" || type2._flags._arrayItems) { + internals.validateSingle = function(type, obj) { + if (type.type === "array" || type._flags._arrayItems) { assert4(!obj._flags.single, "Cannot specify array item with single rule enabled"); obj.$_setFlag("_arrayItems", true, { clone: false }); } }; - internals.sort = function(schema3, value, settings, state3, prefs) { + internals.sort = function(schema2, value, settings, state3, prefs) { const order = settings.order === "ascending" ? 1 : -1; const aFirst = -1 * order; const bFirst = order; @@ -61361,14 +61360,14 @@ d value(s)", if (compare !== null) { return compare; } - const type2 = typeof a; - if (type2 !== typeof b) { - throw schema3.$_createError("array.sort.mismatching", value, null, state3, prefs); + const type = typeof a; + if (type !== typeof b) { + throw schema2.$_createError("array.sort.mismatching", value, null, state3, prefs); } - if (type2 !== "number" && type2 !== "string") { - throw schema3.$_createError("array.sort.unsupported", value, { type: type2 }, state3, prefs); + if (type !== "number" && type !== "string") { + throw schema2.$_createError("array.sort.unsupported", value, { type }, state3, prefs); } - if (type2 === "number") { + if (type === "number") { return (a - b) * order; } return a < b ? aFirst : bFirst; @@ -61406,7 +61405,7 @@ var require_boolean = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Values = require_values(); var internals = {}; internals.isBool = function(value) { @@ -61427,18 +61426,18 @@ var require_boolean = __commonJS({ manifest: "values" } }, - coerce(value, { schema: schema3 }) { + coerce(value, { schema: schema2 }) { if (typeof value === "boolean") { return; } if (typeof value === "string") { const trimmedValue = value.trim(); - const normalized = schema3._flags.sensitive ? trimmedValue : trimmedValue.toLowerCase(); + const normalized = schema2._flags.sensitive ? trimmedValue : trimmedValue.toLowerCase(); value = normalized === "true" ? true : normalized === "false" ? false : value; } if (typeof value !== "boolean") { - value = schema3.$_terms.truthy && schema3.$_terms.truthy.has(value, null, null, !schema3._flags.sensitive) || (schema3. - $_terms.falsy && schema3.$_terms.falsy.has(value, null, null, !schema3._flags.sensitive) ? false : value); + value = schema2.$_terms.truthy && schema2.$_terms.truthy.has(value, null, null, !schema2._flags.sensitive) || (schema2. + $_terms.falsy && schema2.$_terms.falsy.has(value, null, null, !schema2._flags.sensitive) ? false : value); } return { value }; }, @@ -61518,7 +61517,7 @@ var require_date = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Template = require_template(); var internals = { formats: ["iso", "javascript", "unix"] @@ -61530,21 +61529,21 @@ var require_date = __commonJS({ type: "date", coerce: { from: ["number", "string"], - method(value, { schema: schema3 }) { - return { value: internals.parse(value, schema3._flags.format) || value }; + method(value, { schema: schema2 }) { + return { value: internals.parse(value, schema2._flags.format) || value }; } }, - validate(value, { schema: schema3, error: error2, prefs }) { + validate(value, { schema: schema2, error: error2, prefs }) { if (value instanceof Date && !isNaN(value.getTime())) { return; } - const format = schema3._flags.format; + const format = schema2._flags.format; if (!prefs.convert || !format || typeof value !== "string") { return { value, errors: error2("date.base") }; } return { value, errors: error2("date.format", { format }) }; }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "string"; res.format = "date-time"; return res; @@ -61631,9 +61630,9 @@ var require_date = __commonJS({ } }, timestamp: { - method(type2 = "javascript") { - assert4(["javascript", "unix"].includes(type2), '"type" must be one of "javascript, unix"'); - return this.format(type2); + method(type = "javascript") { + assert4(["javascript", "unix"].includes(type), '"type" must be one of "javascript, unix"'); + return this.format(type); } } }, @@ -61777,14 +61776,14 @@ var require_lib4 = __commonJS({ const graphAfters = /* @__PURE__ */ Object.create(null); const groups = /* @__PURE__ */ Object.create(null); for (const item of this._items) { - const seq2 = item.seq; + const seq = item.seq; const group = item.group; groups[group] = groups[group] ?? []; - groups[group].push(seq2); - graph[seq2] = item.before; + groups[group].push(seq); + graph[seq] = item.before; for (const after of item.after) { graphAfters[after] = graphAfters[after] ?? []; - graphAfters[after].push(seq2); + graphAfters[after].push(seq); } } for (const node in graph) { @@ -61872,7 +61871,7 @@ var require_keys = __commonJS({ var { applyToDefaults, assert: assert4, clone: Clone } = require_lib(); var Topo = require_lib4(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Ref = require_ref2(); @@ -61901,15 +61900,15 @@ var require_keys = __commonJS({ patterns: { init: null }, renames: { init: null } }, - args(schema3, keys) { - return schema3.keys(keys); + args(schema2, keys) { + return schema2.keys(keys); }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "object"; - if (schema3.$_terms.keys) { + if (schema2.$_terms.keys) { res.properties = {}; const required = []; - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { const jsonSchema = child2.schema.$_jsonSchema(mode, options); res.properties[child2.key] = jsonSchema; if (child2.schema._flags.presence === "required" || mode === "output" && child2.schema._flags.default !== void 0) { @@ -61920,9 +61919,9 @@ var require_keys = __commonJS({ res.required = required.sort(); } } - if (schema3.$_terms.patterns) { + if (schema2.$_terms.patterns) { const patternProperties = {}; - for (const pattern of schema3.$_terms.patterns) { + for (const pattern of schema2.$_terms.patterns) { if (pattern.regex) { patternProperties[pattern.regex.source] = pattern.rule.$_jsonSchema(mode, options); } else { @@ -61939,35 +61938,35 @@ var require_keys = __commonJS({ } } if (res.additionalProperties === void 0) { - const additionalProperties = schema3._flags.unknown === true || schema3._flags.unknown === void 0 && !schema3. - $_terms.keys && !schema3.$_terms.patterns && !schema3._flags.only; + const additionalProperties = schema2._flags.unknown === true || schema2._flags.unknown === void 0 && !schema2. + $_terms.keys && !schema2.$_terms.patterns && !schema2._flags.only; if (additionalProperties === false) { res.additionalProperties = false; } } return res; }, - validate(value, { schema: schema3, error: error2, state: state3, prefs }) { - if (!value || typeof value !== schema3.$_property("typeof") || Array.isArray(value)) { - return { value, errors: error2("object.base", { type: schema3.$_property("typeof") }) }; + validate(value, { schema: schema2, error: error2, state: state3, prefs }) { + if (!value || typeof value !== schema2.$_property("typeof") || Array.isArray(value)) { + return { value, errors: error2("object.base", { type: schema2.$_property("typeof") }) }; } - if (!schema3.$_terms.renames && !schema3.$_terms.dependencies && !schema3.$_terms.keys && // null allows any keys - !schema3.$_terms.patterns && !schema3.$_terms.externals) { + if (!schema2.$_terms.renames && !schema2.$_terms.dependencies && !schema2.$_terms.keys && // null allows any keys + !schema2.$_terms.patterns && !schema2.$_terms.externals) { return; } value = internals.clone(value, prefs); const errors = []; - if (schema3.$_terms.renames && !internals.rename(schema3, value, state3, prefs, errors)) { + if (schema2.$_terms.renames && !internals.rename(schema2, value, state3, prefs, errors)) { return { value, errors }; } - if (!schema3.$_terms.keys && // null allows any keys - !schema3.$_terms.patterns && !schema3.$_terms.dependencies) { + if (!schema2.$_terms.keys && // null allows any keys + !schema2.$_terms.patterns && !schema2.$_terms.dependencies) { return { value, errors }; } const unprocessed = new Set(Object.keys(value)); - if (schema3.$_terms.keys) { + if (schema2.$_terms.keys) { const ancestors = [value, ...state3.ancestors]; - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { const key = child2.key; const item = value[key]; unprocessed.delete(key); @@ -61988,21 +61987,21 @@ var require_keys = __commonJS({ } } } - if (unprocessed.size || schema3._flags._hasPatternMatch) { - const early = internals.unknown(schema3, value, unprocessed, errors, state3, prefs); + if (unprocessed.size || schema2._flags._hasPatternMatch) { + const early = internals.unknown(schema2, value, unprocessed, errors, state3, prefs); if (early) { return early; } } - if (schema3.$_terms.dependencies) { - for (const dep of schema3.$_terms.dependencies) { + if (schema2.$_terms.dependencies) { + for (const dep of schema2.$_terms.dependencies) { if (dep.key !== null && internals.isPresent(dep.options)(dep.key.resolve(value, state3, prefs, null, { shadow: false })) === false) { continue; } - const failed = internals.dependencies[dep.rel](schema3, dep, value, state3, prefs); + const failed = internals.dependencies[dep.rel](schema2, dep, value, state3, prefs); if (failed) { - const report = schema3.$_createError(failed.code, value, failed.context, state3, prefs); + const report = schema2.$_createError(failed.code, value, failed.context, state3, prefs); if (prefs.abortEarly) { return { value, errors: report }; } @@ -62020,29 +62019,29 @@ var require_keys = __commonJS({ } }, append: { - method(schema3) { - if (schema3 === null || schema3 === void 0 || Object.keys(schema3).length === 0) { + method(schema2) { + if (schema2 === null || schema2 === void 0 || Object.keys(schema2).length === 0) { return this; } - return this.keys(schema3); + return this.keys(schema2); } }, assert: { - method(subject, schema3, message) { + method(subject, schema2, message) { if (!Template.isTemplate(subject)) { subject = Compile.ref(subject); } assert4(message === void 0 || typeof message === "string", "Message must be a string"); - schema3 = this.$_compile(schema3, { appendPath: true }); - const obj = this.$_addRule({ name: "assert", args: { subject, schema: schema3, message } }); + schema2 = this.$_compile(schema2, { appendPath: true }); + const obj = this.$_addRule({ name: "assert", args: { subject, schema: schema2, message } }); obj.$_mutateRegister(subject); - obj.$_mutateRegister(schema3); + obj.$_mutateRegister(schema2); return obj; }, - validate(value, { error: error2, prefs, state: state3 }, { subject, schema: schema3, message }) { + validate(value, { error: error2, prefs, state: state3 }, { subject, schema: schema2, message }) { const about = subject.resolve(value, state3, prefs); const path17 = Ref.isRef(subject) ? subject.absolute(state3) : []; - if (schema3.$_match(about, state3.localize(path17, [value, ...state3.ancestors], schema3), prefs)) { + if (schema2.$_match(about, state3.localize(path17, [value, ...state3.ancestors], schema2), prefs)) { return value; } return error2("object.assert", { subject, message }); @@ -62065,19 +62064,19 @@ var require_keys = __commonJS({ args: ["constructor", "name"] }, keys: { - method(schema3) { - assert4(schema3 === void 0 || typeof schema3 === "object", "Object schema must be a valid object"); - assert4(!Common.isSchema(schema3), "Object schema cannot be a joi schema"); + method(schema2) { + assert4(schema2 === void 0 || typeof schema2 === "object", "Object schema must be a valid object"); + assert4(!Common.isSchema(schema2), "Object schema cannot be a joi schema"); const obj = this.clone(); - if (!schema3) { + if (!schema2) { obj.$_terms.keys = null; - } else if (!Object.keys(schema3).length) { + } else if (!Object.keys(schema2).length) { obj.$_terms.keys = new internals.Keys(); } else { - obj.$_terms.keys = obj.$_terms.keys ? obj.$_terms.keys.filter((child2) => !schema3.hasOwnProperty(child2.key)) : + obj.$_terms.keys = obj.$_terms.keys ? obj.$_terms.keys.filter((child2) => !schema2.hasOwnProperty(child2.key)) : new internals.Keys(); - for (const key in schema3) { - Common.tryWithPath(() => obj.$_terms.keys.push({ key, schema: this.$_compile(schema3[key]) }), key); + for (const key in schema2) { + Common.tryWithPath(() => obj.$_terms.keys.push({ key, schema: this.$_compile(schema2[key]) }), key); } } return obj.$_mutateRebuild(); @@ -62143,21 +62142,21 @@ var require_keys = __commonJS({ } }, pattern: { - method(pattern, schema3, options = {}) { + method(pattern, schema2, options = {}) { const isRegExp2 = pattern instanceof RegExp; if (!isRegExp2) { pattern = this.$_compile(pattern, { appendPath: true }); } - assert4(schema3 !== void 0, "Invalid rule"); + assert4(schema2 !== void 0, "Invalid rule"); Common.assertOptions(options, ["fallthrough", "matches"]); if (isRegExp2) { assert4(!pattern.flags.includes("g") && !pattern.flags.includes("y"), "pattern should not use global or st\ icky mode"); } - schema3 = this.$_compile(schema3, { appendPath: true }); + schema2 = this.$_compile(schema2, { appendPath: true }); const obj = this.clone(); obj.$_terms.patterns = obj.$_terms.patterns || []; - const config = { [isRegExp2 ? "regex" : "schema"]: pattern, rule: schema3 }; + const config = { [isRegExp2 ? "regex" : "schema"]: pattern, rule: schema2 }; if (options.matches) { config.matches = this.$_compile(options.matches); if (config.matches.type !== "array") { @@ -62170,7 +62169,7 @@ icky mode"); config.fallthrough = true; } obj.$_terms.patterns.push(config); - obj.$_mutateRegister(schema3); + obj.$_mutateRegister(schema2); return obj; } }, @@ -62219,14 +62218,14 @@ icky mode"); } }, schema: { - method(type2 = "any") { - return this.$_addRule({ name: "schema", args: { type: type2 } }); + method(type = "any") { + return this.$_addRule({ name: "schema", args: { type } }); }, - validate(value, helpers, { type: type2 }) { - if (Common.isSchema(value) && (type2 === "any" || value.type === type2)) { + validate(value, helpers, { type }) { + if (Common.isSchema(value) && (type === "any" || value.type === type)) { return value; } - return helpers.error("object.schema", { type: type2 }); + return helpers.error("object.schema", { type }); } }, unknown: { @@ -62279,14 +62278,14 @@ icky mode"); return false; } }, - rebuild(schema3) { - if (schema3.$_terms.keys) { + rebuild(schema2) { + if (schema2.$_terms.keys) { const topo = new Topo.Sorter(); - for (const child2 of schema3.$_terms.keys) { + for (const child2 of schema2.$_terms.keys) { Common.tryWithPath(() => topo.add(child2, { after: child2.schema.$_rootReferences(), group: child2.key }), child2. key); } - schema3.$_terms.keys = new internals.Keys(...topo.nodes); + schema2.$_terms.keys = new internals.Keys(...topo.nodes); } }, manifest: { @@ -62300,8 +62299,8 @@ icky mode"); } } if (desc.patterns) { - for (const { regex, schema: schema3, rule, fallthrough, matches } of desc.patterns) { - obj = obj.pattern(regex || schema3, rule, { fallthrough, matches }); + for (const { regex, schema: schema2, rule, fallthrough, matches } of desc.patterns) { + obj = obj.pattern(regex || schema2, rule, { fallthrough, matches }); } } if (desc.renames) { @@ -62356,7 +62355,7 @@ exists", Object.assign(clone, value); return clone; }; - internals.dependency = function(schema3, rel, key, peers, options) { + internals.dependency = function(schema2, rel, key, peers, options) { assert4(key === null || typeof key === "string", rel, "key must be a strings"); if (!options) { options = peers.length > 1 && typeof peers[peers.length - 1] === "object" ? peers.pop() : {}; @@ -62372,13 +62371,13 @@ exists", if (key !== null) { key = Compile.ref(key, { separator, ancestor: 0, prefix: false }); } - const obj = schema3.clone(); + const obj = schema2.clone(); obj.$_terms.dependencies = obj.$_terms.dependencies || []; obj.$_terms.dependencies.push(new internals.Dependency(rel, key, paths, peers, options)); return obj; }; internals.dependencies = { - and(schema3, dep, value, state3, prefs) { + and(schema2, dep, value, state3, prefs) { const missing = []; const present = []; const count = dep.peers.length; @@ -62395,14 +62394,14 @@ exists", code: "object.and", context: { present, - presentWithLabels: internals.keysToLabels(schema3, present), + presentWithLabels: internals.keysToLabels(schema2, present), missing, - missingWithLabels: internals.keysToLabels(schema3, missing) + missingWithLabels: internals.keysToLabels(schema2, missing) } }; } }, - nand(schema3, dep, value, state3, prefs) { + nand(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62419,13 +62418,13 @@ exists", code: "object.nand", context: { main, - mainWithLabel: internals.keysToLabels(schema3, main), + mainWithLabel: internals.keysToLabels(schema2, main), peers: values, - peersWithLabels: internals.keysToLabels(schema3, values) + peersWithLabels: internals.keysToLabels(schema2, values) } }; }, - or(schema3, dep, value, state3, prefs) { + or(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false }))) { @@ -62436,11 +62435,11 @@ exists", code: "object.missing", context: { peers: dep.paths, - peersWithLabels: internals.keysToLabels(schema3, dep.paths) + peersWithLabels: internals.keysToLabels(schema2, dep.paths) } }; }, - oxor(schema3, dep, value, state3, prefs) { + oxor(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62451,12 +62450,12 @@ exists", if (!present.length || present.length === 1) { return; } - const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema3, dep.paths) }; + const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema2, dep.paths) }; context3.present = present; - context3.presentWithLabels = internals.keysToLabels(schema3, present); + context3.presentWithLabels = internals.keysToLabels(schema2, present); return { code: "object.oxor", context: context3 }; }, - with(schema3, dep, value, state3, prefs) { + with(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false })) === false) { @@ -62464,15 +62463,15 @@ exists", code: "object.with", context: { main: dep.key.key, - mainWithLabel: internals.keysToLabels(schema3, dep.key.key), + mainWithLabel: internals.keysToLabels(schema2, dep.key.key), peer: peer.key, - peerWithLabel: internals.keysToLabels(schema3, peer.key) + peerWithLabel: internals.keysToLabels(schema2, peer.key) } }; } } }, - without(schema3, dep, value, state3, prefs) { + without(schema2, dep, value, state3, prefs) { const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { if (isPresent(peer.resolve(value, state3, prefs, null, { shadow: false }))) { @@ -62480,15 +62479,15 @@ exists", code: "object.without", context: { main: dep.key.key, - mainWithLabel: internals.keysToLabels(schema3, dep.key.key), + mainWithLabel: internals.keysToLabels(schema2, dep.key.key), peer: peer.key, - peerWithLabel: internals.keysToLabels(schema3, peer.key) + peerWithLabel: internals.keysToLabels(schema2, peer.key) } }; } } }, - xor(schema3, dep, value, state3, prefs) { + xor(schema2, dep, value, state3, prefs) { const present = []; const isPresent = internals.isPresent(dep.options); for (const peer of dep.peers) { @@ -62499,27 +62498,27 @@ exists", if (present.length === 1) { return; } - const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema3, dep.paths) }; + const context3 = { peers: dep.paths, peersWithLabels: internals.keysToLabels(schema2, dep.paths) }; if (present.length === 0) { return { code: "object.missing", context: context3 }; } context3.present = present; - context3.presentWithLabels = internals.keysToLabels(schema3, present); + context3.presentWithLabels = internals.keysToLabels(schema2, present); return { code: "object.xor", context: context3 }; } }; - internals.keysToLabels = function(schema3, keys) { + internals.keysToLabels = function(schema2, keys) { if (Array.isArray(keys)) { - return keys.map((key) => schema3.$_mapLabels(key)); + return keys.map((key) => schema2.$_mapLabels(key)); } - return schema3.$_mapLabels(keys); + return schema2.$_mapLabels(keys); }; internals.isPresent = function(options) { return typeof options.isPresent === "function" ? options.isPresent : (resolved) => resolved !== void 0; }; - internals.rename = function(schema3, value, state3, prefs, errors) { - const renamed2 = {}; - for (const rename2 of schema3.$_terms.renames) { + internals.rename = function(schema2, value, state3, prefs, errors) { + const renamed = {}; + for (const rename2 of schema2.$_terms.renames) { const matches = []; const pattern = typeof rename2.from !== "string"; if (!pattern) { @@ -62551,14 +62550,14 @@ exists", if (from === to) { continue; } - if (!rename2.options.multiple && renamed2[to]) { - errors.push(schema3.$_createError("object.rename.multiple", value, { from, to, pattern }, state3, prefs)); + if (!rename2.options.multiple && renamed[to]) { + errors.push(schema2.$_createError("object.rename.multiple", value, { from, to, pattern }, state3, prefs)); if (prefs.abortEarly) { return false; } } - if (Object.prototype.hasOwnProperty.call(value, to) && !rename2.options.override && !renamed2[to]) { - errors.push(schema3.$_createError("object.rename.override", value, { from, to, pattern }, state3, prefs)); + if (Object.prototype.hasOwnProperty.call(value, to) && !rename2.options.override && !renamed[to]) { + errors.push(schema2.$_createError("object.rename.override", value, { from, to, pattern }, state3, prefs)); if (prefs.abortEarly) { return false; } @@ -62568,7 +62567,7 @@ exists", } else { value[to] = value[from]; } - renamed2[to] = true; + renamed[to] = true; if (!rename2.options.alias) { delete value[from]; } @@ -62576,10 +62575,10 @@ exists", } return true; }; - internals.unknown = function(schema3, value, unprocessed, errors, state3, prefs) { - if (schema3.$_terms.patterns) { + internals.unknown = function(schema2, value, unprocessed, errors, state3, prefs) { + if (schema2.$_terms.patterns) { let hasMatches = false; - const matches = schema3.$_terms.patterns.map((pattern) => { + const matches = schema2.$_terms.patterns.map((pattern) => { if (pattern.matches) { hasMatches = true; return []; @@ -62589,8 +62588,8 @@ exists", for (const key of unprocessed) { const item = value[key]; const path17 = [...state3.path, key]; - for (let i2 = 0; i2 < schema3.$_terms.patterns.length; ++i2) { - const pattern = schema3.$_terms.patterns[i2]; + for (let i2 = 0; i2 < schema2.$_terms.patterns.length; ++i2) { + const pattern = schema2.$_terms.patterns[i2]; if (pattern.regex) { const match2 = pattern.regex.test(key); state3.mainstay.tracer.debug(state3, "rule", `pattern.${i2}`, match2 ? "pass" : "error"); @@ -62626,13 +62625,13 @@ exists", if (!match2) { continue; } - const stpm = schema3.$_terms.patterns[i2].matches; + const stpm = schema2.$_terms.patterns[i2].matches; const localState = state3.localize(state3.path, ancestors, stpm); const result = stpm.$_validate(match2, localState, prefs); if (result.errors) { const details = Errors.details(result.errors, { override: false }); details.matches = match2; - const report = schema3.$_createError("object.pattern.match", value, details, state3, prefs); + const report = schema2.$_createError("object.pattern.match", value, details, state3, prefs); if (prefs.abortEarly) { return { value, errors: report }; } @@ -62641,10 +62640,10 @@ exists", } } } - if (!unprocessed.size || !schema3.$_terms.keys && !schema3.$_terms.patterns) { + if (!unprocessed.size || !schema2.$_terms.keys && !schema2.$_terms.patterns) { return; } - if (prefs.stripUnknown && typeof schema3._flags.unknown === "undefined" || prefs.skipFunctions) { + if (prefs.stripUnknown && typeof schema2._flags.unknown === "undefined" || prefs.skipFunctions) { const stripUnknown = prefs.stripUnknown ? prefs.stripUnknown === true ? true : !!prefs.stripUnknown.objects : false; for (const key of unprocessed) { if (stripUnknown) { @@ -62655,11 +62654,11 @@ exists", } } } - const forbidUnknown = !Common.default(schema3._flags.unknown, prefs.allowUnknown); + const forbidUnknown = !Common.default(schema2._flags.unknown, prefs.allowUnknown); if (forbidUnknown) { for (const unprocessedKey of unprocessed) { const localState = state3.localize([...state3.path, unprocessedKey], []); - const report = schema3.$_createError("object.unknown", value[unprocessedKey], { child: unprocessedKey }, localState, + const report = schema2.$_createError("object.unknown", value[unprocessedKey], { child: unprocessedKey }, localState, prefs, { flags: false }); if (prefs.abortEarly) { return { value, errors: report }; @@ -62791,7 +62790,7 @@ var require_link = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var internals = {}; @@ -62803,14 +62802,14 @@ var require_link = __commonJS({ terms: { link: { init: null, manifest: "single", register: false } }, - args(schema3, ref) { - return schema3.ref(ref); + args(schema2, ref) { + return schema2.ref(ref); }, - jsonSchema(schema3, res, mode, options) { - if (!schema3.$_terms.link) { + jsonSchema(schema2, res, mode, options) { + if (!schema2.$_terms.link) { return res; } - const { ref } = schema3.$_terms.link[0]; + const { ref } = schema2.$_terms.link[0]; if (ref.ancestor === "root" || ref.ancestor > 0) { res.$ref = `#/${ref.path.map((p) => `properties/${p}`).join("/")}`; return res; @@ -62822,14 +62821,14 @@ var require_link = __commonJS({ } return res; }, - validate(value, { schema: schema3, state: state3, prefs, error: error2 }) { - assert4(schema3.$_terms.link, "Uninitialized link schema"); - const limit = schema3._flags.maxRecursion; - if (limit !== void 0 && state3.schemas.filter((entry) => entry.schema === schema3).length > limit) { + validate(value, { schema: schema2, state: state3, prefs, error: error2 }) { + assert4(schema2.$_terms.link, "Uninitialized link schema"); + const limit = schema2._flags.maxRecursion; + if (limit !== void 0 && state3.schemas.filter((entry) => entry.schema === schema2).length > limit) { return { value, errors: error2("link.maxRecursion", { limit }) }; } - const linked = internals.generate(schema3, value, state3, prefs); - const ref = schema3.$_terms.link[0].ref; + const linked = internals.generate(schema2, value, state3, prefs); + const ref = schema2.$_terms.link[0].ref; try { return linked.$_validate(value, state3.nest(linked, `link:${ref.display}:${linked.type}`), prefs); } catch (err) { @@ -62839,8 +62838,8 @@ var require_link = __commonJS({ return { value, errors: error2("link.depth") }; } }, - generate(schema3, value, state3, prefs) { - return internals.generate(schema3, value, state3, prefs); + generate(schema2, value, state3, prefs) { + return internals.generate(schema2, value, state3, prefs); }, rules: { ref: { @@ -62890,34 +62889,34 @@ var require_link = __commonJS({ } } }); - internals.generate = function(schema3, value, state3, prefs) { - let linked = state3.mainstay.links.get(schema3); + internals.generate = function(schema2, value, state3, prefs) { + let linked = state3.mainstay.links.get(schema2); if (linked) { return linked._generate(value, state3, prefs).schema; } - const ref = schema3.$_terms.link[0].ref; + const ref = schema2.$_terms.link[0].ref; const { perspective, path: path17 } = internals.perspective(ref, state3); - internals.assert(perspective, "which is outside of schema boundaries", ref, schema3, state3, prefs); + internals.assert(perspective, "which is outside of schema boundaries", ref, schema2, state3, prefs); try { linked = path17.length ? perspective.$_reach(path17) : perspective; } catch { - internals.assert(false, "to non-existing schema", ref, schema3, state3, prefs); + internals.assert(false, "to non-existing schema", ref, schema2, state3, prefs); } - internals.assert(linked.type !== "link", "which is another link", ref, schema3, state3, prefs); - if (!schema3._flags.relative) { - state3.mainstay.links.set(schema3, linked); + internals.assert(linked.type !== "link", "which is another link", ref, schema2, state3, prefs); + if (!schema2._flags.relative) { + state3.mainstay.links.set(schema2, linked); } return linked._generate(value, state3, prefs).schema; }; internals.perspective = function(ref, state3) { if (ref.type === "local") { - for (const { schema: schema3, key } of state3.schemas) { - const id = schema3._flags.id || key; + for (const { schema: schema2, key } of state3.schemas) { + const id = schema2._flags.id || key; if (id === ref.path[0]) { - return { perspective: schema3, path: ref.path.slice(1) }; + return { perspective: schema2, path: ref.path.slice(1) }; } - if (schema3.$_terms.shared) { - for (const shared of schema3.$_terms.shared) { + if (schema2.$_terms.shared) { + for (const shared of schema2.$_terms.shared) { if (shared._flags.id === ref.path[0]) { return { perspective: shared, path: ref.path.slice(1) }; } @@ -62931,11 +62930,11 @@ var require_link = __commonJS({ } return { perspective: state3.schemas[ref.ancestor] && state3.schemas[ref.ancestor].schema, path: ref.path }; }; - internals.assert = function(condition, message, ref, schema3, state3, prefs) { + internals.assert = function(condition, message, ref, schema2, state3, prefs) { if (condition) { return; } - assert4(false, `"${Errors.label(schema3._flags, state3, prefs)}" contains link reference "${ref.display}" ${message}`); + assert4(false, `"${Errors.label(schema2._flags, state3, prefs)}" contains link reference "${ref.display}" ${message}`); }; } }); @@ -62946,7 +62945,7 @@ var require_number = __commonJS({ "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var internals = { numberRx: /^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i, precisionRx: /(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/, @@ -62955,11 +62954,11 @@ var require_number = __commonJS({ dotRegex: /\./, trailingZerosRegex: /0+$/, decimalPlaces(value) { - const str2 = value.toString(); - const dindex = str2.indexOf("."); - const eindex = str2.indexOf("e"); - return (dindex < 0 ? 0 : (eindex < 0 ? str2.length : eindex) - dindex - 1) + (eindex < 0 ? 0 : Math.max(0, -parseInt( - str2.slice(eindex + 1)))); + const str = value.toString(); + const dindex = str.indexOf("."); + const eindex = str.indexOf("e"); + return (dindex < 0 ? 0 : (eindex < 0 ? str.length : eindex) - dindex - 1) + (eindex < 0 ? 0 : Math.max(0, -parseInt( + str.slice(eindex + 1)))); } }; module2.exports = Any.extend({ @@ -62969,7 +62968,7 @@ var require_number = __commonJS({ }, coerce: { from: "string", - method(value, { schema: schema3, error: error2 }) { + method(value, { schema: schema2, error: error2 }) { const matches = value.match(internals.numberRx); if (!matches) { return; @@ -62979,7 +62978,7 @@ var require_number = __commonJS({ if (result.value === 0) { result.value = 0; } - if (!schema3._flags.unsafe) { + if (!schema2._flags.unsafe) { if (value.match(/e/i)) { if (internals.extractSignificantDigits(value) !== internals.extractSignificantDigits(String(result.value))) { result.errors = error2("number.unsafe"); @@ -62999,7 +62998,7 @@ var require_number = __commonJS({ return result; } }, - validate(value, { schema: schema3, error: error2, prefs }) { + validate(value, { schema: schema2, error: error2, prefs }) { if (value === Infinity || value === -Infinity) { return { value, errors: error2("number.infinity") }; } @@ -63008,7 +63007,7 @@ var require_number = __commonJS({ } const result = { value }; if (prefs.convert) { - const rule = schema3.$_getRule("precision"); + const rule = schema2.$_getRule("precision"); if (rule) { const precision = Math.pow(10, rule.args.limit); result.value = Math.round(result.value * precision) / precision; @@ -63017,7 +63016,7 @@ var require_number = __commonJS({ if (result.value === 0) { result.value = 0; } - if (!schema3._flags.unsafe && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER)) { + if (!schema2._flags.unsafe && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER)) { result.errors = error2("number.unsafe"); } return result; @@ -63226,16 +63225,16 @@ rt"), return value.replace(internals.exponentialPartRegex, "").replace(internals.dotRegex, "").replace(internals.trailingZerosRegex, "").replace(internals.leadingSignAndZerosRegex, ""); }; - internals.normalizeDecimal = function(str2) { - str2 = str2.replace(/^\+/, "").replace(/\.0*$/, "").replace(/^(-?)\.([^\.]*)$/, "$10.$2").replace(/^(-?)0+([0-9])/, - "$1$2"); - if (str2.includes(".") && str2.endsWith("0")) { - str2 = str2.replace(/0+$/, ""); + internals.normalizeDecimal = function(str) { + str = str.replace(/^\+/, "").replace(/\.0*$/, "").replace(/^(-?)\.([^\.]*)$/, "$10.$2").replace(/^(-?)0+([0-9])/, "\ +$1$2"); + if (str.includes(".") && str.endsWith("0")) { + str = str.replace(/0+$/, ""); } - if (str2 === "-0") { + if (str === "-0") { return "0"; } - return str2; + return str; }; } }); @@ -63497,8 +63496,8 @@ var require_email = __commonJS({ if (ATEXT_RX.test(char)) { continue; } - const binary2 = toBinary(char); - if (!ATOM_RX.test(binary2)) { + const binary = toBinary(char); + if (!ATOM_RX.test(binary)) { return (0, errors_1.errorCode)("INVALID_LOCAL_CHARS"); } } @@ -64127,9 +64126,9 @@ var require_decode = __commonJS({ const high = resolveHex(string[percentPos + 1], 4); const low = resolveHex(string[percentPos + 2], 0); const byte = high | low; - const type2 = UTF8.data[byte]; - state3 = UTF8.data[256 + state3 + type2]; - codepoint = codepoint << 6 | byte & UTF8.data[364 + type2]; + const type = UTF8.data[byte]; + state3 = UTF8.data[256 + state3 + type]; + codepoint = codepoint << 6 | byte & UTF8.data[364 + type]; if (state3 === UTF8.accept) { decoded += string.slice(last2, startOfOctets); decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), @@ -65670,7 +65669,7 @@ var require_string3 = __commonJS({ var { isDomainValid, isEmailValid, ipRegex, uriRegex } = require_dist8(); var Tlds = require_commonjs3(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); var internals = { tlds: Tlds.tlds instanceof Set ? { tlds: { allow: Tlds.tlds, deny: null } } : false, // $lab:coverage:ignore$ @@ -65724,42 +65723,42 @@ var require_string3 = __commonJS({ }, coerce: { from: "string", - method(value, { schema: schema3, state: state3, prefs }) { - const normalize2 = schema3.$_getRule("normalize"); + method(value, { schema: schema2, state: state3, prefs }) { + const normalize2 = schema2.$_getRule("normalize"); if (normalize2) { value = value.normalize(normalize2.args.form); } - const casing = schema3.$_getRule("case"); + const casing = schema2.$_getRule("case"); if (casing) { value = casing.args.direction === "upper" ? value.toLocaleUpperCase() : value.toLocaleLowerCase(); } - const trim2 = schema3.$_getRule("trim"); + const trim2 = schema2.$_getRule("trim"); if (trim2 && trim2.args.enabled) { value = value.trim(); } - if (schema3.$_terms.replacements) { - for (const replacement of schema3.$_terms.replacements) { + if (schema2.$_terms.replacements) { + for (const replacement of schema2.$_terms.replacements) { value = value.replace(replacement.pattern, replacement.replacement); } } - const hex = schema3.$_getRule("hex"); + const hex = schema2.$_getRule("hex"); if (hex && hex.args.options.byteAligned && value.length % 2 !== 0) { value = `0${value}`; } - if (schema3.$_getRule("isoDate")) { + if (schema2.$_getRule("isoDate")) { const iso = internals.isoDate(value); if (iso) { value = iso; } } - if (schema3._flags.truncate) { - const rule = schema3.$_getRule("max"); + if (schema2._flags.truncate) { + const rule = schema2.$_getRule("max"); if (rule) { let limit = rule.args.limit; if (Common.isResolvable(limit)) { limit = limit.resolve(value, state3, prefs); if (!Common.limit(limit)) { - return { value, errors: schema3.$_createError("any.ref", limit, { ref: rule.args.limit, arg: "limit", reason: "\ + return { value, errors: schema2.$_createError("any.ref", limit, { ref: rule.args.limit, arg: "limit", reason: "\ must be a positive integer" }, state3, prefs) }; } } @@ -65769,23 +65768,23 @@ must be a positive integer" }, state3, prefs) }; return { value }; } }, - validate(value, { schema: schema3, error: error2 }) { + validate(value, { schema: schema2, error: error2 }) { if (typeof value !== "string") { return { value, errors: error2("string.base") }; } if (value === "") { - const min = schema3.$_getRule("min"); + const min = schema2.$_getRule("min"); if (min && min.args.limit === 0) { return; } return { value, errors: error2("string.empty") }; } }, - jsonSchema(schema3, res, mode, options) { - const noEmpty = !schema3._valids?.has("") && !schema3._flags.only; + jsonSchema(schema2, res, mode, options) { + const noEmpty = !schema2._valids?.has("") && !schema2._flags.only; if (noEmpty) { - const min = schema3.$_getRule("min"); - const length = schema3.$_getRule("length"); + const min = schema2.$_getRule("min"); + const length = schema2.$_getRule("length"); if ((!min || min.args.limit > 0) && (!length || length.args.limit > 0)) { res.minLength = 1; } @@ -65943,16 +65942,16 @@ olean"); if (options.version) { const versions = [].concat(options.version); assert4(versions.length >= 1, "version must have at least 1 valid version specified"); - const set2 = /* @__PURE__ */ new Set(); + const set = /* @__PURE__ */ new Set(); for (let i2 = 0; i2 < versions.length; ++i2) { const version3 = versions[i2]; assert4(typeof version3 === "string", "version at position " + i2 + " must be a string"); const versionNumber = internals.guidVersions[version3.toLowerCase()]; assert4(versionNumber, "version at position " + i2 + " must be one of " + Object.keys(internals.guidVersions). join(", ")); - assert4(!set2.has(versionNumber), "version at position " + i2 + " must not be a duplicate"); + assert4(!set.has(versionNumber), "version at position " + i2 + " must not be a duplicate"); versionNumbers += versionNumber; - set2.add(versionNumber); + set.add(versionNumber); } } assert4(internals.guidSeparators.has(options.separator), 'separator must be one of true, false, "-", or ":"'); @@ -66378,8 +66377,8 @@ inSegments", "tlds"]); internals.validateTlds(options.tlds.allow, "tlds.allow"); return options; }; - internals.validateTlds = function(set2, source) { - for (const tld of set2) { + internals.validateTlds = function(set, source) { + for (const tld of set) { assert4(isDomainValid(tld, { minDomainSegments: 1, maxDomainSegments: 1 }), `${source} must contain valid top le\ vel domain names`); } @@ -66397,9 +66396,9 @@ vel domain names`); } return date.toISOString(); }; - internals.length = function(schema3, name, limit, operator, encoding) { + internals.length = function(schema2, name, limit, operator, encoding) { assert4(!encoding || Buffer && Buffer.isEncoding(encoding), "Invalid encoding:", encoding); - return schema3.$_addRule({ name, method: "length", args: { limit, encoding }, operator }); + return schema2.$_addRule({ name, method: "length", args: { limit, encoding }, operator }); }; } }); @@ -66422,15 +66421,15 @@ var require_symbol = __commonJS({ map: { init: new internals.Map() } }, coerce: { - method(value, { schema: schema3, error: error2 }) { - const lookup = schema3.$_terms.map.get(value); + method(value, { schema: schema2, error: error2 }) { + const lookup = schema2.$_terms.map.get(value); if (lookup) { value = lookup; } - if (!schema3._flags.only || typeof value === "symbol") { + if (!schema2._flags.only || typeof value === "symbol") { return { value }; } - return { value, errors: error2("symbol.map", { map: schema3.$_terms.map }) }; + return { value, errors: error2("symbol.map", { map: schema2.$_terms.map }) }; } }, validate(value, { error: error2 }) { @@ -66468,13 +66467,13 @@ of type object, function, or Symbol"); return obj; } }, - jsonSchema(schema3, json2, mode, options) { - const map2 = schema3.$_terms.map; - if (!map2.size) { + jsonSchema(schema2, json, mode, options) { + const map = schema2.$_terms.map; + if (!map.size) { return {}; } return { - anyOf: Array.from(map2.keys()).map((key) => ({ const: key })) + anyOf: Array.from(map.keys()).map((key) => ({ const: key })) }; }, messages: { @@ -66486,20 +66485,20 @@ of type object, function, or Symbol"); }); // node_modules/joi/lib/types/binary.js -var require_binary2 = __commonJS({ +var require_binary3 = __commonJS({ "node_modules/joi/lib/types/binary.js"(exports2, module2) { "use strict"; var { assert: assert4 } = require_lib(); var Any = require_any(); - var Common = require_common4(); + var Common = require_common5(); module2.exports = Any.extend({ type: "binary", coerce: { from: ["string", "object"], - method(value, { schema: schema3 }) { + method(value, { schema: schema2 }) { if (typeof value === "string" || value !== null && value.type === "Buffer") { try { - return { value: Buffer.from(value, schema3._flags.encoding) }; + return { value: Buffer.from(value, schema2._flags.encoding) }; } catch { } } @@ -66510,7 +66509,7 @@ var require_binary2 = __commonJS({ return { value, errors: error2("binary.base") }; } }, - jsonSchema(schema3, res, mode, options) { + jsonSchema(schema2, res, mode, options) { res.type = "string"; res.format = "binary"; return res; @@ -66589,7 +66588,7 @@ var require_lib5 = __commonJS({ "use strict"; var { assert: assert4, clone } = require_lib(); var Cache = require_cache2(); - var Common = require_common4(); + var Common = require_common5(); var Compile = require_compile2(); var Errors = require_errors3(); var Extend = require_extend(); @@ -66619,17 +66618,17 @@ var require_lib5 = __commonJS({ } }; if (Buffer) { - internals.types.binary = require_binary2(); + internals.types.binary = require_binary3(); } internals.root = function() { const root = { _types: new Set(Object.keys(internals.types)) }; - for (const type2 of root._types) { - root[type2] = function(...args) { - assert4(!args.length || ["alternatives", "link", "object"].includes(type2), "The", type2, "type does not allow\ - arguments"); - return internals.generate(this, internals.types[type2], args); + for (const type of root._types) { + root[type] = function(...args) { + assert4(!args.length || ["alternatives", "link", "object"].includes(type), "The", type, "type does not allow a\ +rguments"); + return internals.generate(this, internals.types[type], args); }; } for (const method of ["allow", "custom", "disallow", "equal", "exist", "forbidden", "invalid", "not", "only", "opt\ @@ -66653,11 +66652,11 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] ValidationError: Errors.ValidationError, version: Common.version, cache: Cache.provider, - assert(value, schema3, ...args) { - internals.assert(value, schema3, true, args); + assert(value, schema2, ...args) { + internals.assert(value, schema2, true, args); }, - attempt(value, schema3, ...args) { - return internals.assert(value, schema3, false, args); + attempt(value, schema2, ...args) { + return internals.assert(value, schema2, false, args); }, build(desc) { assert4(typeof Manifest.build === "function", "Manifest functionality disabled"); @@ -66666,17 +66665,17 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] checkPreferences(prefs) { Common.checkPreferences(prefs); }, - compile(schema3, options) { - return Compile.compile(this, schema3, options); + compile(schema2, options) { + return Compile.compile(this, schema2, options); }, defaults(modifier) { assert4(typeof modifier === "function", "modifier must be a function"); const joi2 = Object.assign({}, this); - for (const type2 of joi2._types) { - const schema3 = modifier(joi2[type2]()); - assert4(Common.isSchema(schema3), "modifier must return a valid schema object"); - joi2[type2] = function(...args) { - return internals.generate(this, schema3, args); + for (const type of joi2._types) { + const schema2 = modifier(joi2[type]()); + assert4(Common.isSchema(schema2), "modifier must return a valid schema object"); + joi2[type] = function(...args) { + return internals.generate(this, schema2, args); }; } return joi2; @@ -66700,10 +66699,10 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] for (const item of expanded) { assert4(joi2[item.type] === void 0 || joi2._types.has(item.type), "Cannot override name", item.type); const base = item.base || this.any(); - const schema3 = Extend.type(base, item); + const schema2 = Extend.type(base, item); joi2._types.add(item.type); joi2[item.type] = function(...args) { - return internals.generate(this, schema3, args); + return internals.generate(this, schema2, args); }; } } @@ -66722,8 +66721,8 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] }, types() { const types2 = {}; - for (const type2 of this._types) { - types2[type2] = this[type2](); + for (const type of this._types) { + types2[type] = this[type](); } for (const target in internals.aliases) { types2[target] = this[target](); @@ -66731,10 +66730,10 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] return types2; } }; - internals.assert = function(value, schema3, annotate, args) { + internals.assert = function(value, schema2, annotate, args) { const message = args[0] instanceof Error || typeof args[0] === "string" ? args[0] : null; const options = message !== null ? args[1] : args[0]; - const result = schema3.validate(value, Common.preferences({ errors: { stack: true } }, options || {})); + const result = schema2.validate(value, Common.preferences({ errors: { stack: true } }, options || {})); let error2 = result.error; if (!error2) { return result.value; @@ -66749,24 +66748,24 @@ ional", "options", "prefs", "preferences", "required", "strip", "valid", "when"] error2.message = message ? `${message} ${display}` : display; throw error2; }; - internals.generate = function(root, schema3, args) { + internals.generate = function(root, schema2, args) { assert4(root, "Must be invoked on a Joi instance."); - schema3.$_root = root; - if (!schema3._definition.args || !args.length) { - return schema3; + schema2.$_root = root; + if (!schema2._definition.args || !args.length) { + return schema2; } - return schema3._definition.args(schema3, ...args); + return schema2._definition.args(schema2, ...args); }; internals.expandExtension = function(extension, joi2) { if (typeof extension.type === "string") { return [extension]; } const extended = []; - for (const type2 of joi2._types) { - if (extension.type.test(type2)) { + for (const type of joi2._types) { + if (extension.type.test(type)) { const item = Object.assign({}, extension); - item.type = type2; - item.base = joi2[type2](); + item.type = type; + item.base = joi2[type](); extended.push(item); } } @@ -67054,8 +67053,8 @@ function asArray(source) { return Array.isArray(source) ? source : [source]; } __name(asArray, "asArray"); -function asCamelCase(str2) { - return str2.replace(/[\s-]+(.)/g, (_all, chr) => { +function asCamelCase(str) { + return str.replace(/[\s-]+(.)/g, (_all, chr) => { return chr.toUpperCase(); }); } @@ -67128,8 +67127,8 @@ function filterType(input, filter2, def) { } __name(filterType, "filterType"); function filterPrimitives(input, omit) { - const type2 = r(input) ? "string" : typeof input; - return /number|string|boolean/.test(type2) && (!omit || !omit.includes(type2)); + const type = r(input) ? "string" : typeof input; + return /number|string|boolean/.test(type) && (!omit || !omit.includes(type)); } __name(filterPrimitives, "filterPrimitives"); function filterPlainObject(input) { @@ -68277,14 +68276,14 @@ var init_git_executor_chain = __esm({ return gitError; } async attemptRemoteTask(task, logger7) { - const binary2 = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); + const binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands)); const args = this._plugins.exec("spawn.args", [...task.commands], { ...pluginContext(task, task.commands), env: { ...this.env } }); const raw = await this.gitResponse( task, - binary2, + binary, args, this.outputHandler, logger7.step("SPAWN") @@ -69482,11 +69481,11 @@ function mergeTask(customArgs) { commands: ["merge", ...customArgs], format: "utf-8", parser(stdOut, stdErr) { - const merge3 = parseMergeResult(stdOut, stdErr); - if (merge3.failed) { - throw new GitResponseError(merge3); + const merge2 = parseMergeResult(stdOut, stdErr); + if (merge2.failed) { + throw new GitResponseError(merge2); } - return merge3; + return merge2; } }; } @@ -69532,8 +69531,8 @@ var init_parse_push = __esm({ local }; }), - new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type2]) => { - result.pushed.push(pushResultPushedItem(local, remote, type2)); + new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); }), new LineParser( /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, @@ -69774,9 +69773,9 @@ var init_StatusSummary = __esm({ result.renamed.push(renamedFile(file)); }), parser3("R", "M", (result, file) => { - const renamed2 = renamedFile(file); - result.renamed.push(renamed2); - result.modified.push(renamed2.to); + const renamed = renamedFile(file); + result.renamed.push(renamed); + result.modified.push(renamed.to); }), parser3("!", "!", (_result, _file) => { (_result.ignored = _result.ignored || []).push(_file); @@ -71933,7 +71932,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * For headers that must always be a single string (like Content-Type), use the * specialized _getExistingOrDefaultContentTypeHeader method instead. */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; @@ -71948,7 +71947,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } /** * Specialized version of _getExistingOrDefaultHeader for Content-Type header. @@ -71957,7 +71956,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; @@ -71984,7 +71983,7 @@ f you want to allow this behavior, set the allowRedirectDowngrade option to true if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } _getAgent(parsedUrl) { let agent; @@ -73062,8 +73061,8 @@ var ToolRunner = class extends events.EventEmitter { } return this.args; } - _endsWith(str2, end) { - return str2.endsWith(end); + _endsWith(str, end) { + return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); @@ -74186,14 +74185,14 @@ var { toString } = Object.prototype; var { getPrototypeOf } = Object; var { iterator, toStringTag } = Symbol; var kindOf = /* @__PURE__ */ ((cache2) => (thing) => { - const str2 = toString.call(thing); - return cache2[str2] || (cache2[str2] = str2.slice(8, -1).toLowerCase()); + const str = toString.call(thing); + return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); -var kindOfTest = /* @__PURE__ */ __name((type2) => { - type2 = type2.toLowerCase(); - return (thing) => kindOf(thing) === type2; +var kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; }, "kindOfTest"); -var typeOfTest = /* @__PURE__ */ __name((type2) => (thing) => typeof thing === type2, "typeOfTest"); +var typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); var { isArray } = Array; var isUndefined = typeOfTest("undefined"); function isBuffer(val) { @@ -74272,8 +74271,8 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [ "Response", "Headers" ].map(kindOfTest); -var trim = /* @__PURE__ */ __name((str2) => { - return str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +var trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); }, "trim"); function forEach2(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") { @@ -74420,13 +74419,13 @@ var toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilt } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }, "toFlatObject"); -var endsWith = /* @__PURE__ */ __name((str2, searchString, position) => { - str2 = String(str2); - if (position === void 0 || position > str2.length) { - position = str2.length; +var endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; } position -= searchString.length; - const lastIndex = str2.indexOf(searchString, position); + const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }, "endsWith"); var toArray = /* @__PURE__ */ __name((thing) => { @@ -74454,17 +74453,17 @@ var forEachEntry = /* @__PURE__ */ __name((obj, fn) => { fn.call(obj, pair[0], pair[1]); } }, "forEachEntry"); -var matchAll = /* @__PURE__ */ __name((regExp, str2) => { +var matchAll = /* @__PURE__ */ __name((regExp, str) => { let matches; const arr = []; - while ((matches = regExp.exec(str2)) !== null) { + while ((matches = regExp.exec(str)) !== null) { arr.push(matches); } return arr; }, "matchAll"); var isHTMLForm = kindOfTest("HTMLFormElement"); -var toCamelCase = /* @__PURE__ */ __name((str2) => { - return str2.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { +var toCamelCase = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { return p1.toUpperCase() + p2; }, "replacer")); }, "toCamelCase"); @@ -74679,24 +74678,24 @@ var parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { }, "default"); // node_modules/axios/lib/helpers/sanitizeHeaderValue.js -function trimSPorHTAB(str2) { +function trimSPorHTAB(str) { let start = 0; - let end = str2.length; + let end = str.length; while (start < end) { - const code = str2.charCodeAt(start); + const code = str.charCodeAt(start); if (code !== 9 && code !== 32) { break; } start += 1; } while (end > start) { - const code = str2.charCodeAt(end - 1); + const code = str.charCodeAt(end - 1); if (code !== 9 && code !== 32) { break; } end -= 1; } - return start === 0 && end === str2.length ? str2 : str2.slice(start, end); + return start === 0 && end === str.length ? str : str.slice(start, end); } __name(trimSPorHTAB, "trimSPorHTAB"); var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"); @@ -74734,18 +74733,18 @@ function normalizeValue(value) { return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); } __name(normalizeValue, "normalizeValue"); -function parseTokens(str2) { +function parseTokens(str) { const tokens = /* @__PURE__ */ Object.create(null); const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let match2; - while (match2 = tokensRE.exec(str2)) { + while (match2 = tokensRE.exec(str)) { tokens[match2[1]] = match2[2]; } return tokens; } __name(parseTokens, "parseTokens"); -var isValidHeaderName = /* @__PURE__ */ __name((str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim()), "isValidHea\ -derName"); +var isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeade\ +rName"); function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -74763,8 +74762,8 @@ function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) } __name(matchHeaderValue, "matchHeaderValue"); function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str2) => { - return char.toUpperCase() + str2; + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); } __name(formatHeader, "formatHeader"); @@ -75256,7 +75255,7 @@ __name(toFormData, "toFormData"); var toFormData_default = toFormData; // node_modules/axios/lib/helpers/AxiosURLSearchParams.js -function encode(str2) { +function encode(str) { const charMap = { "!": "%21", "'": "%27", @@ -75265,7 +75264,7 @@ function encode(str2) { "~": "%7E", "%20": "+" }; - return encodeURIComponent(str2).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { + return encodeURIComponent(str).replace(/[!'()~]|%20/g, /* @__PURE__ */ __name(function replacer(match2) { return charMap[match2]; }, "replacer")); } @@ -75413,14 +75412,14 @@ var ALPHABET = { ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT }; var generateString = /* @__PURE__ */ __name((size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str2 = ""; + let str = ""; const { length } = alphabet; const randomValues = new Uint32Array(size); import_crypto.default.randomFillSync(randomValues); for (let i2 = 0; i2 < size; i2++) { - str2 += alphabet[randomValues[i2] % length]; + str += alphabet[randomValues[i2] % length]; } - return str2; + return str; }, "generateString"); var node_default = { isNode: true, @@ -75840,13 +75839,13 @@ function fromDataURI(uri, asBlob, options) { if (!match2) { throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); } - const type2 = match2[1]; + const type = match2[1]; const params = match2[2]; const encoding = match2[3] ? "base64" : "utf8"; const body2 = match2[4]; let mime; - if (type2) { - mime = params ? type2 + params : type2; + if (type) { + mime = params ? type + params : type; } else if (params) { mime = "text/plain" + params; } @@ -76305,12 +76304,12 @@ var speedometer_default = speedometer; // node_modules/axios/lib/helpers/throttle.js function throttle(fn, freq) { - let timestamp2 = 0; + let timestamp = 0; let threshold = 1e3 / freq; let lastArgs; let timer; const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { - timestamp2 = now; + timestamp = now; lastArgs = null; if (timer) { clearTimeout(timer); @@ -76320,7 +76319,7 @@ function throttle(fn, freq) { }, "invoke"); const throttled = /* @__PURE__ */ __name((...args) => { const now = Date.now(); - const passed = now - timestamp2; + const passed = now - timestamp; if (passed >= threshold) { invoke(args, now); } else { @@ -77525,11 +77524,11 @@ function mergeConfig(config1, config2) { }; utils_default.forEach(Object.keys({ ...config1, ...config2 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; - const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0; const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0; - const configValue = merge3(a, b, prop); - utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue); + const configValue = merge2(a, b, prop); + utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue); }, "computeConfigValue")); return config; } @@ -77549,7 +77548,7 @@ function setFormDataHeaders2(headers, formHeaders, policy) { }); } __name(setFormDataHeaders2, "setFormDataHeaders"); -var encodeUTF8 = /* @__PURE__ */ __name((str2) => encodeURIComponent(str2).replace( +var encodeUTF8 = /* @__PURE__ */ __name((str) => encodeURIComponent(str).replace( /%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)) ), "encodeUTF8"); @@ -77899,8 +77898,8 @@ var factory = /* @__PURE__ */ __name((env2) => { return false; } const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); - const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str2) => encoder. - encode(str2))(new TextEncoder2()) : async (str2) => new Uint8Array(await new Request(str2).arrayBuffer())); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder. + encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { let duplexAccessed = false; const request = new Request(platform_default.origin, { @@ -77923,14 +77922,14 @@ var factory = /* @__PURE__ */ __name((env2) => { stream: supportsResponseStream && ((res) => res.body) }; isFetchSupported && (() => { - ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => { - !resolvers[type2] && (resolvers[type2] = (res, config) => { - let method = res && res[type2]; + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; if (method) { return method.call(res); } throw new AxiosError_default( - `Response type '${type2}' is not supported`, + `Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config ); @@ -78173,12 +78172,12 @@ var getFetch = /* @__PURE__ */ __name((config) => { let env2 = config && config.env || {}; const { fetch: fetch2, Request, Response } = env2; const seeds = [Request, Response, fetch2]; - let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + let len = seeds.length, i2 = len, seed, target, map = seedCache; while (i2--) { seed = seeds[i2]; - target = map2.get(seed); - target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); - map2 = target; + target = map.get(seed); + target === void 0 && map.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map = target; } return target; }, "getFetch"); @@ -78308,9 +78307,9 @@ __name(dispatchRequest, "dispatchRequest"); // node_modules/axios/lib/helpers/validator.js var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i2) => { - validators[type2] = /* @__PURE__ */ __name(function validator(thing) { - return typeof thing === type2 || "a" + (i2 < 1 ? "n " : " ") + type2; +["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; }, "validator"); }); var deprecatedWarnings = {}; @@ -78344,7 +78343,7 @@ validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) return true; }; }, "spelling"); -function assertOptions(options, schema3, allowUnknown) { +function assertOptions(options, schema2, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } @@ -78352,7 +78351,7 @@ function assertOptions(options, schema3, allowUnknown) { let i2 = keys.length; while (i2-- > 0) { const opt = keys[i2]; - const validator = Object.prototype.hasOwnProperty.call(schema3, opt) ? schema3[opt] : void 0; + const validator = Object.prototype.hasOwnProperty.call(schema2, opt) ? schema2[opt] : void 0; if (validator) { const value = options[opt]; const result = value === void 0 || validator(value, opt, options); @@ -78884,11 +78883,11 @@ __name(_v4, "_v4"); var v4_default = v4; // utils/src/load-binary.js -var find2 = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3 }) => Promise.resolve( +var find2 = /* @__PURE__ */ __name(async ({ tool, binary, version: version3 }) => Promise.resolve( find(tool, version3) /* process.arch), */ ).then( - (dir) => dir ? import_node_path2.default.join(dir, binary2) : "" + (dir) => dir ? import_node_path2.default.join(dir, binary) : "" ), "find"); var downloadToolWithAuth = /* @__PURE__ */ __name(async (url3, auth) => { const targetFile = import_node_path2.default.join(import_os3.default.tmpdir(), v4_default(), v4_default()); @@ -78916,7 +78915,7 @@ var internalDownload = /* @__PURE__ */ __name(async (url3, auth) => auth ? downl url3), "internalDownload"); var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { if (!cachedTool) { - const { tool, binary: binary2, version: version3, downloadUrl, auth } = options; + const { tool, binary, version: version3, downloadUrl, auth } = options; info(`Downloading ${tool} from ${downloadUrl}`); const downloadUuid = await internalDownload(downloadUrl, auth); const tmpDir = import_node_path2.default.dirname(downloadUuid); @@ -78927,7 +78926,7 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } else if (downloadUrl.endsWith(".7z")) { await extract7z(downloadUuid, tmpDir); } else { - const tmpFile = import_node_path2.default.join(tmpDir, binary2); + const tmpFile = import_node_path2.default.join(tmpDir, binary); await cp(downloadUuid, tmpFile); import_node_fs.default.chmodSync(tmpFile, "0777"); } @@ -78936,10 +78935,10 @@ var downloadIfMissing = /* @__PURE__ */ __name(async (options, cachedTool) => { } return cachedTool; }, "downloadIfMissing"); -var loadTool = /* @__PURE__ */ __name(async ({ tool, binary: binary2, version: version3, downloadUrl, auth }) => { +var loadTool = /* @__PURE__ */ __name(async ({ tool, binary, version: version3, downloadUrl, auth }) => { const options = { tool, - binary: binary2, + binary, version: version3, downloadUrl, auth @@ -79794,10 +79793,10 @@ __name(getServiceAccountEmailAndProject, "getServiceAccountEmailAndProject"); async function authenticateGcloud(credentials, exportCredentials) { setSecret(credentials); const jsonCredentials = parseCredentials(credentials); - const { type: type2, email } = validateCredentialsShape(jsonCredentials); + const { type, email } = validateCredentialsShape(jsonCredentials); const { project_id: projectId } = jsonCredentials; const authEntry = { - type: type2, + type, email, projectId, exportCredentials, @@ -80293,26 +80292,26 @@ t not contain globs.`); } else if (c3 === "*" || c3 === "?") { return ""; } else if (c3 === "[" && i2 + 1 < segment.length) { - let set2 = ""; + let set = ""; let closed = -1; for (let i22 = i2 + 1; i22 < segment.length; i22++) { const c22 = segment[i22]; if (c22 === "\\" && !IS_WINDOWS7 && i22 + 1 < segment.length) { - set2 += segment[++i22]; + set += segment[++i22]; continue; } else if (c22 === "]") { closed = i22; break; } else { - set2 += c22; + set += c22; } } if (closed >= 0) { - if (set2.length > 1) { + if (set.length > 1) { return ""; } - if (set2) { - literal += set2; + if (set) { + literal += set; i2 = closed; continue; } @@ -81167,8 +81166,8 @@ function normalizeName(name) { return name.toLowerCase(); } __name(normalizeName, "normalizeName"); -function* headerIterator(map2) { - for (const entry of map2.values()) { +function* headerIterator(map) { + for (const entry of map.values()) { yield [entry.name, entry.value]; } } @@ -82577,9 +82576,9 @@ function getDefaultProxySettings(proxyUrl) { } } const parsedUrl = new URL(proxyUrl); - const schema3 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + const schema2 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { - host: schema3 + parsedUrl.hostname, + host: schema2 + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password @@ -82896,16 +82895,16 @@ function getHeaderName2() { return "User-Agent"; } __name(getHeaderName2, "getHeaderName"); -async function setPlatformSpecificData2(map2) { +async function setPlatformSpecificData2(map) { if (import_node_process2.default && import_node_process2.default.versions) { const osInfo = `${import_node_os3.default.type()} ${import_node_os3.default.release()}; ${import_node_os3.default.arch()}`; const versions = import_node_process2.default.versions; if (versions.bun) { - map2.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { - map2.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { - map2.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", `${versions.node} (${osInfo})`); } } } @@ -84134,12 +84133,12 @@ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } __name(createSerializer, "createSerializer"); -function trimEnd(str2, ch) { - let len = str2.length; - while (len - 1 >= 0 && str2[len - 1] === ch) { +function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { --len; } - return str2.substr(0, len); + return str.substr(0, len); } __name(trimEnd, "trimEnd"); function bufferToBase64Url(buffer3) { @@ -84149,19 +84148,19 @@ function bufferToBase64Url(buffer3) { if (!(buffer3 instanceof Uint8Array)) { throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); } - const str2 = encodeByteArray(buffer3); - return trimEnd(str2, "=").replace(/\+/g, "-").replace(/\//g, "_"); + const str = encodeByteArray(buffer3); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } __name(bufferToBase64Url, "bufferToBase64Url"); -function base64UrlToByteArray(str2) { - if (!str2) { +function base64UrlToByteArray(str) { + if (!str) { return void 0; } - if (str2 && typeof str2.valueOf() !== "string") { + if (str && typeof str.valueOf() !== "string") { throw new Error("Please provide an input of type string for converting to Uint8Array"); } - str2 = str2.replace(/-/g, "+").replace(/_/g, "/"); - return decodeString(str2); + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return decodeString(str); } __name(base64UrlToByteArray, "base64UrlToByteArray"); function splitSerializeName(prop) { @@ -85315,8 +85314,8 @@ function simpleParseQueryParams(queryString) { return result; } queryString = queryString.slice(1); - const pairs2 = queryString.split("&"); - for (const pair of pairs2) { + const pairs = queryString.split("&"); + for (const pair of pairs) { const [name, value] = pair.split("=", 2); const existingValue = result.get(name); if (existingValue) { @@ -87519,10 +87518,10 @@ function validateEntityName(name) { __name(validateEntityName, "validateEntityName"); function mergeEntityMaps(...maps) { const out = /* @__PURE__ */ Object.create(null); - for (const map2 of maps) { - if (!map2) continue; - for (const key of Object.keys(map2)) { - const raw = map2[key]; + for (const map of maps) { + if (!map) continue; + for (const key of Object.keys(map)) { + const raw = map[key]; if (typeof raw === "string") { out[key] = raw; } else if (raw && typeof raw === "object" && raw.val !== void 0) { @@ -87618,13 +87617,13 @@ var EntityDecoder = class { * All keys are validated — throws on invalid characters. * @param {Record} map */ - setExternalEntities(map2) { - if (map2) { - for (const key of Object.keys(map2)) { + setExternalEntities(map) { + if (map) { + for (const key of Object.keys(map)) { validateEntityName(key); } } - this._externalMap = mergeEntityMaps(map2); + this._externalMap = mergeEntityMaps(map); } /** * Add a single persistent external entity. @@ -87645,10 +87644,10 @@ var EntityDecoder = class { * Also resets per-document expansion counters. * @param {Record} map */ - addInputEntities(map2) { + addInputEntities(map) { this._totalExpansions = 0; this._expandedLength = 0; - this._inputMap = mergeEntityMaps(map2); + this._inputMap = mergeEntityMaps(map); } // ------------------------------------------------------------------------- // Per-document reset @@ -87684,28 +87683,28 @@ var EntityDecoder = class { * @param {string} str * @returns {string} */ - decode(str2) { - if (typeof str2 !== "string" || str2.length === 0) return str2; - const original = str2; + decode(str) { + if (typeof str !== "string" || str.length === 0) return str; + const original = str; const chunks = []; - const len = str2.length; + const len = str.length; let last2 = 0; let i2 = 0; const limitExpansions = this._maxTotalExpansions > 0; const limitLength = this._maxExpandedLength > 0; const checkLimits = limitExpansions || limitLength; while (i2 < len) { - if (str2.charCodeAt(i2) !== 38) { + if (str.charCodeAt(i2) !== 38) { i2++; continue; } let j = i2 + 1; - while (j < len && str2.charCodeAt(j) !== 59 && j - i2 <= 32) j++; - if (j >= len || str2.charCodeAt(j) !== 59) { + while (j < len && str.charCodeAt(j) !== 59 && j - i2 <= 32) j++; + if (j >= len || str.charCodeAt(j) !== 59) { i2++; continue; } - const token = str2.slice(i2 + 1, j); + const token = str.slice(i2 + 1, j); if (token.length === 0) { i2++; continue; @@ -87737,7 +87736,7 @@ var EntityDecoder = class { i2++; continue; } - if (i2 > last2) chunks.push(str2.slice(last2, i2)); + if (i2 > last2) chunks.push(str.slice(last2, i2)); chunks.push(replacement); last2 = j + 1; i2 = last2; @@ -87763,8 +87762,8 @@ var EntityDecoder = class { } } } - if (last2 < len) chunks.push(str2.slice(last2)); - const result = chunks.length === 0 ? str2 : chunks.join(""); + if (last2 < len) chunks.push(str.slice(last2)); + const result = chunks.length === 0 ? str : chunks.join(""); return this._postCheck(result, original); } // ------------------------------------------------------------------------- @@ -88186,7 +88185,7 @@ var DocTypeReader = class { } return { notationName, publicIdentifier, systemIdentifier, index: --i2 }; } - readIdentifierVal(xmlData, i2, type2) { + readIdentifierVal(xmlData, i2, type) { let identifierVal = ""; const startChar = xmlData[i2]; if (startChar !== '"' && startChar !== "'") { @@ -88199,7 +88198,7 @@ var DocTypeReader = class { } identifierVal = xmlData.substring(startIndex, i2); if (xmlData[i2] !== startChar) { - throw new Error(`Unterminated ${type2} value`); + throw new Error(`Unterminated ${type} value`); } i2++; return [i2, identifierVal]; @@ -88323,9 +88322,9 @@ var skipWhitespace = /* @__PURE__ */ __name((data, index) => { } return index; }, "skipWhitespace"); -function hasSeq(data, seq2, i2) { - for (let j = 0; j < seq2.length; j++) { - if (seq2[j] !== data[i2 + j + 1]) return false; +function hasSeq(data, seq, i2) { + for (let j = 0; j < seq.length; j++) { + if (seq[j] !== data[i2 + j + 1]) return false; } return true; } @@ -88351,19 +88350,19 @@ var consider = { infinity: "original" // "null", "infinity" (Infinity type), "string" ("Infinity" (the string literal)) }; -function toNumber2(str2, options = {}) { +function toNumber2(str, options = {}) { options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (trimmedStr.length === 0) return str2; - else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; + if (!str || typeof str !== "string") return str; + let trimmedStr = str.trim(); + if (trimmedStr.length === 0) return str; + else if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; else if (trimmedStr === "0") return 0; else if (options.hex && hexRegex.test(trimmedStr)) { return parse_int(trimmedStr, 16); } else if (!isFinite(trimmedStr)) { - return handleInfinity(str2, Number(trimmedStr), options); + return handleInfinity(str, Number(trimmedStr), options); } else if (trimmedStr.includes("e") || trimmedStr.includes("E")) { - return resolveEnotation(str2, trimmedStr, options); + return resolveEnotation(str, trimmedStr, options); } else { const match2 = numRegex.exec(trimmedStr); if (match2) { @@ -88372,39 +88371,39 @@ function toNumber2(str2, options = {}) { let numTrimmedByZeros = trimZeros(match2[3]); const decimalAdjacentToLeadingZeros = sign ? ( // 0., -00., 000. - str2[leadingZeros.length + 1] === "." - ) : str2[leadingZeros.length] === "."; + str[leadingZeros.length + 1] === "." + ) : str[leadingZeros.length] === "."; if (!options.leadingZeros && (leadingZeros.length > 1 || leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros)) { - return str2; + return str; } else { const num = Number(trimmedStr); const parsedStr = String(num); if (num === 0) return num; if (parsedStr.search(/[eE]/) !== -1) { if (options.eNotation) return num; - else return str2; + else return str; } else if (trimmedStr.indexOf(".") !== -1) { if (parsedStr === "0") return num; else if (parsedStr === numTrimmedByZeros) return num; else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num; - else return str2; + else return str; } let n = leadingZeros ? numTrimmedByZeros : trimmedStr; if (leadingZeros) { - return n === parsedStr || sign + n === parsedStr ? num : str2; + return n === parsedStr || sign + n === parsedStr ? num : str; } else { - return n === parsedStr || n === sign + parsedStr ? num : str2; + return n === parsedStr || n === sign + parsedStr ? num : str; } } } else { - return str2; + return str; } } } __name(toNumber2, "toNumber"); var eNotationRegx = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; -function resolveEnotation(str2, trimmedStr, options) { - if (!options.eNotation) return str2; +function resolveEnotation(str, trimmedStr, options) { + if (!options.eNotation) return str; const notation = trimmedStr.match(eNotationRegx); if (notation) { let sign = notation[1] || ""; @@ -88412,21 +88411,21 @@ function resolveEnotation(str2, trimmedStr, options) { const leadingZeros = notation[2]; const eAdjacentToLeadingZeros = sign ? ( // 0E. - str2[leadingZeros.length + 1] === eChar - ) : str2[leadingZeros.length] === eChar; - if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str2; + str[leadingZeros.length + 1] === eChar + ) : str[leadingZeros.length] === eChar; + if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str; else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) { return Number(trimmedStr); } else if (leadingZeros.length > 0) { if (options.leadingZeros && !eAdjacentToLeadingZeros) { trimmedStr = (notation[1] || "") + notation[3]; return Number(trimmedStr); - } else return str2; + } else return str; } else { return Number(trimmedStr); } } else { - return str2; + return str; } } __name(resolveEnotation, "resolveEnotation"); @@ -88448,7 +88447,7 @@ function parse_int(numStr, base) { else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); } __name(parse_int, "parse_int"); -function handleInfinity(str2, num, options) { +function handleInfinity(str, num, options) { const isPositive = num === Infinity; switch (options.infinity.toLowerCase()) { case "null": @@ -88460,7 +88459,7 @@ function handleInfinity(str2, num, options) { return isPositive ? "Infinity" : "-Infinity"; case "original": default: - return str2; + return str; } } __name(handleInfinity, "handleInfinity"); @@ -89233,7 +89232,7 @@ var Matcher = class { snapshot() { return { path: this.path.map((node) => ({ ...node })), - siblingStacks: this.siblingStacks.map((map2) => new Map(map2)) + siblingStacks: this.siblingStacks.map((map) => new Map(map)) }; } /** @@ -89243,7 +89242,7 @@ var Matcher = class { restore(snapshot2) { this._pathStringCache = null; this.path = snapshot2.path.map((node) => ({ ...node })); - this.siblingStacks = snapshot2.siblingStacks.map((map2) => new Map(map2)); + this.siblingStacks = snapshot2.siblingStacks.map((map) => new Map(map)); } /** * Return the read-only {@link MatcherView} for this matcher. @@ -89744,12 +89743,12 @@ function tagExpWithClosingIndex(xmlData, i2, closingChar = ">") { } } __name(tagExpWithClosingIndex, "tagExpWithClosingIndex"); -function findClosingIndex(xmlData, str2, i2, errMsg) { - const closingIndex = xmlData.indexOf(str2, i2); +function findClosingIndex(xmlData, str, i2, errMsg) { + const closingIndex = xmlData.indexOf(str, i2); if (closingIndex === -1) { throw new Error(errMsg); } else { - return closingIndex + str2.length - 1; + return closingIndex + str.length - 1; } } __name(findClosingIndex, "findClosingIndex"); @@ -90785,16 +90784,16 @@ function stringifyXML(obj, opts = {}) { return `${xmlData}`.replace(/\n/g, ""); } __name(stringifyXML, "stringifyXML"); -async function parseXML(str2, opts = {}) { - if (!str2) { +async function parseXML(str, opts = {}) { + if (!str) { throw new Error("Document is empty"); } - const validation = XMLValidator.validate(str2); + const validation = XMLValidator.validate(str); if (validation !== true) { throw validation; } const parser4 = new XMLParser(getParserOptions(opts)); - const parsedXml = parser4.parse(str2); + const parsedXml = parser4.parse(str); if (parsedXml["?xml"]) { delete parsedXml["?xml"]; } @@ -107872,14 +107871,14 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -107900,7 +107899,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -107924,14 +107923,14 @@ function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKe ovided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -107952,7 +107951,7 @@ ovided."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", @@ -107978,14 +107977,14 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -108014,7 +108013,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -108039,14 +108038,14 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -108079,7 +108078,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -108104,14 +108103,14 @@ function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -108144,7 +108143,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -108171,14 +108170,14 @@ function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userD tion SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -108214,7 +108213,7 @@ tion SAS."); blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -109157,9 +109156,9 @@ var AvroParser = class _AvroParser { const readPairMethod = /* @__PURE__ */ __name((s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }, "readPairMethod"); - const pairs2 = await _AvroParser.readArray(stream6, readPairMethod, options); + const pairs = await _AvroParser.readArray(stream6, readPairMethod, options); const dict = {}; - for (const pair of pairs2) { + for (const pair of pairs) { dict[pair.key] = pair.value; } return dict; @@ -109208,17 +109207,17 @@ var AvroType = class _AvroType { * Determines the AvroType from the Avro Schema. */ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema3) { - if (typeof schema3 === "string") { - return _AvroType.fromStringSchema(schema3); - } else if (Array.isArray(schema3)) { - return _AvroType.fromArraySchema(schema3); + static fromSchema(schema2) { + if (typeof schema2 === "string") { + return _AvroType.fromStringSchema(schema2); + } else if (Array.isArray(schema2)) { + return _AvroType.fromArraySchema(schema2); } else { - return _AvroType.fromObjectSchema(schema3); + return _AvroType.fromObjectSchema(schema2); } } - static fromStringSchema(schema3) { - switch (schema3) { + static fromStringSchema(schema2) { + switch (schema2) { case AvroPrimitive.NULL: case AvroPrimitive.BOOLEAN: case AvroPrimitive.INT: @@ -109227,55 +109226,55 @@ var AvroType = class _AvroType { case AvroPrimitive.DOUBLE: case AvroPrimitive.BYTES: case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema3); + return new AvroPrimitiveType(schema2); default: - throw new Error(`Unexpected Avro type ${schema3}`); + throw new Error(`Unexpected Avro type ${schema2}`); } } - static fromArraySchema(schema3) { - return new AvroUnionType(schema3.map(_AvroType.fromSchema)); + static fromArraySchema(schema2) { + return new AvroUnionType(schema2.map(_AvroType.fromSchema)); } - static fromObjectSchema(schema3) { - const type2 = schema3.type; + static fromObjectSchema(schema2) { + const type = schema2.type; try { - return _AvroType.fromStringSchema(type2); + return _AvroType.fromStringSchema(type); } catch { } - switch (type2) { + switch (type) { case AvroComplex.RECORD: - if (schema3.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema3}`); + if (schema2.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema2}`); } - if (!schema3.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema3}`); + if (!schema2.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema2}`); } const fields = {}; - if (!schema3.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema3}`); + if (!schema2.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema2}`); } - for (const field of schema3.fields) { + for (const field of schema2.fields) { fields[field.name] = _AvroType.fromSchema(field.type); } - return new AvroRecordType(fields, schema3.name); + return new AvroRecordType(fields, schema2.name); case AvroComplex.ENUM: - if (schema3.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema3}`); + if (schema2.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema2}`); } - if (!schema3.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema3}`); + if (!schema2.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema2}`); } - return new AvroEnumType(schema3.symbols); + return new AvroEnumType(schema2.symbols); case AvroComplex.MAP: - if (!schema3.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema3}`); + if (!schema2.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema2}`); } - return new AvroMapType(_AvroType.fromSchema(schema3.values)); + return new AvroMapType(_AvroType.fromSchema(schema2.values)); case AvroComplex.ARRAY: // Unused today case AvroComplex.FIXED: // Unused today default: - throw new Error(`Unexpected Avro type ${type2} in ${schema3}`); + throw new Error(`Unexpected Avro type ${type} in ${schema2}`); } } }; @@ -109447,8 +109446,8 @@ var AvroReader = class { this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema3 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema3); + const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } @@ -109629,11 +109628,11 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { break; } const obj = avroNext.value; - const schema3 = obj.$schema; - if (typeof schema3 !== "string") { + const schema2 = obj.$schema; + if (typeof schema2 !== "string") { throw Error("Missing schema in avro record."); } - switch (schema3) { + switch (schema2) { case "com.microsoft.azure.storage.queryBlobContents.resultData": { const data = obj.data; @@ -109693,7 +109692,7 @@ var BlobQuickQueryStream = class extends import_node_stream4.Readable { } break; default: - throw Error(`Unknown schema ${schema3} in avro progress record.`); + throw Error(`Unknown schema ${schema2} in avro progress record.`); } } while (!avroNext.done && !this.avroPaused); } @@ -114277,8 +114276,8 @@ function getCacheApiUrl(resource) { return url3; } __name(getCacheApiUrl, "getCacheApiUrl"); -function createAcceptHeader(type2, apiVersion) { - return `${type2};api-version=${apiVersion}`; +function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } __name(createAcceptHeader, "createAcceptHeader"); function getRequestOptions() { @@ -115444,13 +115443,13 @@ function getTarPath() { } __name(getTarPath, "getTarPath"); function getTarArgs(tarPath_1, compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (tarPath, compressionMethod, type, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - switch (type2) { + switch (type) { case "create": args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "\ /"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path14.sep}`, "g"), "/"), "-P", "-C", workingDirectory. @@ -115479,14 +115478,14 @@ C", workingDirectory.replace(new RegExp(`\\${path14.sep}`, "g"), "/")); } __name(getTarArgs, "getTarArgs"); function getCommands(compressionMethod_1, type_1) { - return __awaiter20(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { + return __awaiter20(this, arguments, void 0, function* (compressionMethod, type, archivePath = "") { let args; const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); - const compressionArgs = type2 !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === ArchiveToolType.BSD && compressionMethod !== CompressionMethod.Gzip && IS_WINDOWS9; - if (BSD_TAR_ZSTD && type2 !== "create") { + if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; @@ -116238,8 +116237,8 @@ var accessSecretValue = /* @__PURE__ */ __name(async (projectId, name) => execGc ], "gcloud", true -).then(JSON.parse).then((json2) => json2.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), -"accessSecretValue"); +).then(JSON.parse).then((json) => json.payload.data).then((secret) => Buffer.from(secret, "base64").toString("utf8")), "\ +accessSecretValue"); var loadSecret = /* @__PURE__ */ __name(async (serviceAccountKey, name) => with_gcloud_default(serviceAccountKey, async (projectId) => { const value = await accessSecretValue(projectId, name).then((secret) => { setSecret(secret); @@ -116298,12 +116297,12 @@ function createApi({ name, url: url3, auth }) { authorization: `Bearer ${await fetchToken(auth)}` } }), "addToken"); - const formatError2 = /* @__PURE__ */ __name((err) => { + const formatError = /* @__PURE__ */ __name((err) => { const { status, data } = err.response; const msg = `${name} API call failed: [${status}] - ${data.message || data.error}`; throw new Error(msg); }, "formatError"); - instance.interceptors.request.use(addToken, formatError2); + instance.interceptors.request.use(addToken, formatError); return instance; } __name(createApi, "createApi"); @@ -116313,564 +116312,549 @@ var import_fast_glob2 = __toESM(require_out4(), 1); var import_fs3 = require("fs"); // node_modules/js-yaml/dist/js-yaml.mjs -function isNothing(subject) { - return typeof subject === "undefined" || subject === null; -} -__name(isNothing, "isNothing"); -function isObject5(subject) { - return typeof subject === "object" && subject !== null; -} -__name(isObject5, "isObject"); -function toArray2(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - return [sequence]; -} -__name(toArray2, "toArray"); -function extend3(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]; - } - } - return target; -} -__name(extend3, "extend"); -function repeat(string, count) { - var result = "", cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - return result; -} -__name(repeat, "repeat"); -function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; -} -__name(isNegativeZero, "isNegativeZero"); -var isNothing_1 = isNothing; -var isObject_1 = isObject5; -var toArray_1 = toArray2; -var repeat_1 = repeat; -var isNegativeZero_1 = isNegativeZero; -var extend_1 = extend3; -var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 -}; -function formatError(exception2, compact) { - var where2 = "", message = exception2.reason || "(unknown reason)"; - if (!exception2.mark) return message; - if (exception2.mark.name) { - where2 += 'in "' + exception2.mark.name + '" '; - } - where2 += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; - if (!compact && exception2.mark.snippet) { - where2 += "\n\n" + exception2.mark.snippet; - } - return message + " " + where2; -} -__name(formatError, "formatError"); -function YAMLException$1(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 || ""; +var __create2 = Object.create; +var __defProp3 = Object.defineProperty; +var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames3 = Object.getOwnPropertyNames; +var __getProtoOf2 = Object.getPrototypeOf; +var __hasOwnProp3 = Object.prototype.hasOwnProperty; +var __commonJSMin = /* @__PURE__ */ __name((cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), +mod.exports), "__commonJSMin"); +var __copyProps3 = /* @__PURE__ */ __name((to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames3(from), i2 = 0, n = keys. + length, key; i2 < n; i2++) { + key = keys[i2]; + if (!__hasOwnProp3.call(to, key) && key !== except) __defProp3(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable + }); } -} -__name(YAMLException$1, "YAMLException$1"); -YAMLException$1.prototype = Object.create(Error.prototype); -YAMLException$1.prototype.constructor = YAMLException$1; -YAMLException$1.prototype.toString = /* @__PURE__ */ __name(function toString5(compact) { - return this.name + ": " + formatError(this, compact); -}, "toString"); -var exception = YAMLException$1; -function getLine(buffer3, 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 to; +}, "__copyProps"); +var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : +{}, __copyProps3(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { + value: mod, + enumerable: true +}) : target, mod)), "__toESM"); +var require_common4 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + __name(isNothing, "isNothing"); + function isObject5(subject) { + return typeof subject === "object" && subject !== null; + } + __name(isObject5, "isObject"); + function toArray2(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + __name(toArray2, "toArray"); + function extend3(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + __name(extend3, "extend"); + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; } - return { - str: head + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, - pos: position - lineStart + head.length - // relative position - }; -} -__name(getLine, "getLine"); -function padStart2(string, max) { - return common.repeat(" ", max - string.length) + string; -} -__name(padStart2, "padStart"); -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 = "", i2, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - for (i2 = 1; i2 <= options.linesBefore; i2++) { - if (foundLineNo - i2 < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i2], - lineEnds[foundLineNo - i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), - maxLineLength - ); - result = common.repeat(" ", options.indent) + padStart2((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n" + result; - } - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(" ", options.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + - "\n"; - result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; - for (i2 = 1; i2 <= options.linesAfter; i2++) { - if (foundLineNo + i2 >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i2], - lineEnds[foundLineNo + i2], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), - maxLineLength - ); - result += common.repeat(" ", options.indent) + padStart2((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line. - str + "\n"; - } - return result.replace(/\n$/, ""); -} -__name(makeSnippet, "makeSnippet"); -var snippet = makeSnippet; -var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" -]; -var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" -]; -function compileStyleAliases(map2) { - var result = {}; - if (map2 !== null) { - Object.keys(map2).forEach(function(style) { - map2[style].forEach(function(alias) { + __name(repeat, "repeat"); + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + __name(isNegativeZero, "isNegativeZero"); + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject5; + module2.exports.toArray = toArray2; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend3; +})); +var require_exception = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + function formatError(exception, compact) { + let where2 = ""; + const message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) where2 += 'in "' + exception.mark.name + '" '; + where2 += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) where2 += "\n\n" + exception.mark.snippet; + return message + " " + where2; + } + __name(formatError, "formatError"); + function YAMLException2(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 = (/* @__PURE__ */ new Error()).stack || ""; + } + __name(YAMLException2, "YAMLException"); + YAMLException2.prototype = Object.create(Error.prototype); + YAMLException2.prototype.constructor = YAMLException2; + YAMLException2.prototype.toString = /* @__PURE__ */ __name(function toString5(compact) { + return this.name + ": " + formatError(this, compact); + }, "toString"); + module2.exports = YAMLException2; +})); +var require_snippet = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + function getLine(buffer3, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const 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 + buffer3.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + }; + } + __name(getLine, "getLine"); + function padStart2(string, max) { + return common.repeat(" ", max - string.length) + string; + } + __name(padStart2, "padStart"); + 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; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match2; + let 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; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i2 = 1; i2 <= options.linesBefore; i2++) { + if (foundLineNo - i2 < 0) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i2], lineEnds[foundLineNo - i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo - i2]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart2((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n" + result; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (let i2 = 1; i2 <= options.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) break; + const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i2], lineEnds[foundLineNo + i2], mark.position - (lineStarts[foundLineNo] - + lineStarts[foundLineNo + i2]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart2((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2. + str + "\n"; + } + return result.replace(/\n$/, ""); + } + __name(makeSnippet, "makeSnippet"); + module2.exports = makeSnippet; +})); +var require_type2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { result[String(alias)] = style; }); }); + return result; } - return result; -} -__name(compileStyleAliases, "compileStyleAliases"); -function Type$1(tag, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('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 exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} -__name(Type$1, "Type$1"); -var type = Type$1; -function compileList(schema3, name) { - var result = []; - schema3[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; - } + __name(compileStyleAliases, "compileStyleAliases"); + function Type2(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException2('Unknown option "' + name + '" is met \ +in definition of "' + tag + '" YAML type.'); }); - result[newIndex] = currentType; - }); - return result; -} -__name(compileList, "compileList"); -function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type2) { - if (type2.multi) { - result.multi[type2.kind].push(type2); - result.multi["fallback"].push(type2); - } else { - result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; - } + 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 YAMLException2('Unknown kind "' + this.kind + '" is specifi\ +ed for "' + tag + '" YAML type.'); + } + __name(Type2, "Type"); + module2.exports = Type2; +})); +var require_schema4 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var YAMLException2 = require_exception(); + var Type2 = require_type2(); + function compileList(schema2, name) { + const result = []; + schema2[name].forEach(function(currentType) { + let 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; } - __name(collectType, "collectType"); - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); + __name(compileList, "compileList"); + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + 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; + } + __name(collectType, "collectType"); + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; } - return result; -} -__name(compileMap, "compileMap"); -function Schema$1(definition) { - return this.extend(definition); -} -__name(Schema$1, "Schema$1"); -Schema$1.prototype.extend = /* @__PURE__ */ __name(function extend4(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 exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], e\ -xplicit: [...] })"); + __name(compileMap, "compileMap"); + function Schema2(definition) { + return this.extend(definition); + } + __name(Schema2, "Schema"); + Schema2.prototype.extend = /* @__PURE__ */ __name(function extend3(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type2) 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 YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implic\ +it: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException2("There is a non-scalar type in the impli\ +cit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can o\ +nly be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type2)) throw new YAMLException2("Specified list of YAML types (or a single Type object) con\ +tains a non-Type object."); + }); + const result = Object.create(Schema2.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; + }, "extend"); + module2.exports = Schema2; +})); +var require_str = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : ""; + }, "construct") + }); +})); +var require_seq2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : []; + }, "construct") + }); +})); +var require_map2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_type2())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: /* @__PURE__ */ __name(function(data) { + return data !== null ? data : {}; + }, "construct") + }); +})); +var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = new (require_schema4())({ explicit: [ + require_str(), + require_seq2(), + require_map2() + ] }); +})); +var require_null2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + __name(resolveYamlNull, "resolveYamlNull"); + function constructYamlNull() { + return null; } - implicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type$1.loadKind && type$1.loadKind !== "scalar") { - throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types\ - is not supported."); - } - if (type$1.multi) { - throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as expl\ -icit."); - } + __name(constructYamlNull, "constructYamlNull"); + function isNull(object) { + return object === null; + } + __name(isNull, "isNull"); + module2.exports = new Type2("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: /* @__PURE__ */ __name(function() { + return "~"; + }, "canonical"), + lowercase: /* @__PURE__ */ __name(function() { + return "null"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function() { + return "NULL"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function() { + return "Null"; + }, "camelcase"), + empty: /* @__PURE__ */ __name(function() { + return ""; + }, "empty") + }, + defaultStyle: "lowercase" }); - explicit.forEach(function(type$1) { - if (!(type$1 instanceof type)) { - throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } +})); +var require_bool3 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === + "False" || data === "FALSE"); + } + __name(resolveYamlBoolean, "resolveYamlBoolean"); + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + __name(constructYamlBoolean, "constructYamlBoolean"); + function isBoolean2(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + __name(isBoolean2, "isBoolean"); + module2.exports = new Type2("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean2, + represent: { + lowercase: /* @__PURE__ */ __name(function(object) { + return object ? "true" : "false"; + }, "lowercase"), + uppercase: /* @__PURE__ */ __name(function(object) { + return object ? "TRUE" : "FALSE"; + }, "uppercase"), + camelcase: /* @__PURE__ */ __name(function(object) { + return object ? "True" : "False"; + }, "camelcase") + }, + defaultStyle: "lowercase" }); - var result = Object.create(Schema$1.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; -}, "extend"); -var schema = Schema$1; -var str = new type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : ""; - }, "construct") -}); -var seq = new type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : []; - }, "construct") -}); -var map = new type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: /* @__PURE__ */ __name(function(data) { - return data !== null ? data : {}; - }, "construct") -}); -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); -function resolveYamlNull(data) { - if (data === null) return true; - var max = data.length; - return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); -} -__name(resolveYamlNull, "resolveYamlNull"); -function constructYamlNull() { - return null; -} -__name(constructYamlNull, "constructYamlNull"); -function isNull(object) { - return object === null; -} -__name(isNull, "isNull"); -var _null = new type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: /* @__PURE__ */ __name(function() { - return "~"; - }, "canonical"), - lowercase: /* @__PURE__ */ __name(function() { - return "null"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function() { - return "NULL"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function() { - return "Null"; - }, "camelcase"), - empty: /* @__PURE__ */ __name(function() { - return ""; - }, "empty") - }, - defaultStyle: "lowercase" -}); -function resolveYamlBoolean(data) { - if (data === null) return false; - var max = data.length; - return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === - "False" || data === "FALSE"); -} -__name(resolveYamlBoolean, "resolveYamlBoolean"); -function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; -} -__name(constructYamlBoolean, "constructYamlBoolean"); -function isBoolean2(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; -} -__name(isBoolean2, "isBoolean"); -var bool = new type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean2, - represent: { - lowercase: /* @__PURE__ */ __name(function(object) { - return object ? "true" : "false"; - }, "lowercase"), - uppercase: /* @__PURE__ */ __name(function(object) { - return object ? "TRUE" : "FALSE"; - }, "uppercase"), - camelcase: /* @__PURE__ */ __name(function(object) { - return object ? "True" : "False"; - }, "camelcase") - }, - defaultStyle: "lowercase" -}); -function isHexCode(c3) { - return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102; -} -__name(isHexCode, "isHexCode"); -function isOctCode(c3) { - return 48 <= c3 && c3 <= 55; -} -__name(isOctCode, "isOctCode"); -function isDecCode(c3) { - return 48 <= c3 && c3 <= 57; -} -__name(isDecCode, "isDecCode"); -function resolveYamlInteger(data) { - if (data === null) return false; - var max = data.length, index = 0, hasDigits = false, ch; - if (!max) return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; - } - if (ch === "0") { - if (index + 1 === max) return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max; 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 < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; +})); +var require_int3 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + function isHexCode(c3) { + return c3 >= 48 && c3 <= 57 || c3 >= 65 && c3 <= 70 || c3 >= 97 && c3 <= 102; + } + __name(isHexCode, "isHexCode"); + function isOctCode(c3) { + return c3 >= 48 && c3 <= 55; + } + __name(isOctCode, "isOctCode"); + function isDecCode(c3) { + return c3 >= 48 && c3 <= 57; + } + __name(isDecCode, "isDecCode"); + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); } - return hasDigits && ch !== "_"; - } - if (ch === "o") { - index++; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); } - return hasDigits && ch !== "_"; - } - } - if (ch === "_") return false; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + __name(resolveYamlInteger, "resolveYamlInteger"); + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + 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); + } + __name(parseYamlInteger, "parseYamlInteger"); + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + __name(constructYamlInteger, "constructYamlInteger"); + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + __name(isInteger, "isInteger"); + module2.exports = new Type2("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, "binary"), + octal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, "octal"), + decimal: /* @__PURE__ */ __name(function(obj) { + return obj.toString(10); + }, "decimal"), + hexadecimal: /* @__PURE__ */ __name(function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + }, "hexadecimal") + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] } - hasDigits = true; - } - if (!hasDigits || ch === "_") return false; - return true; -} -__name(resolveYamlInteger, "resolveYamlInteger"); -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); - } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") sign = -1; - value = value.slice(1); - ch = value[0]; - } - 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); -} -__name(constructYamlInteger, "constructYamlInteger"); -function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); -} -__name(isInteger, "isInteger"); -var int = new type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, "binary"), - octal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, "octal"), - decimal: /* @__PURE__ */ __name(function(obj) { - return obj.toString(10); - }, "decimal"), - /* eslint-disable max-len */ - hexadecimal: /* @__PURE__ */ __name(function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - }, "hexadecimal") - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } -}); -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; -} -__name(resolveYamlFloat, "resolveYamlFloat"); -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); -} -__name(constructYamlFloat, "constructYamlFloat"); -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; -function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { + }); +})); +var require_float3 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var Type2 = require_type2(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[\ +eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + __name(resolveYamlFloat, "resolveYamlFloat"); + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const 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); + } + __name(constructYamlFloat, "constructYamlFloat"); + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { case "lowercase": return ".nan"; case "uppercase": @@ -116878,8 +116862,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".NaN"; } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { + else if (Number.POSITIVE_INFINITY === object) switch (style) { case "lowercase": return ".inf"; case "uppercase": @@ -116887,8 +116870,7 @@ function representYamlFloat(object, style) { case "camelcase": return ".Inf"; } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { + else if (Number.NEGATIVE_INFINITY === object) switch (style) { case "lowercase": return "-.inf"; case "uppercase": @@ -116896,2206 +116878,2004 @@ function representYamlFloat(object, style) { 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; -} -__name(representYamlFloat, "representYamlFloat"); -function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); -} -__name(isFloat, "isFloat"); -var float = new type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" -}); -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); -var core = json; -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; -} -__name(resolveYamlTimestamp, "resolveYamlTimestamp"); -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; -} -__name(constructYamlTimestamp, "constructYamlTimestamp"); -function representYamlTimestamp(object) { - return object.toISOString(); -} -__name(representYamlTimestamp, "representYamlTimestamp"); -var timestamp = new type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); -function resolveYamlMerge(data) { - return data === "<<" || data === null; -} -__name(resolveYamlMerge, "resolveYamlMerge"); -var merge2 = new type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge -}); -var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; -function resolveYamlBinary(data) { - if (data === null) return false; - var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - code = map2.indexOf(data.charAt(idx)); - if (code > 64) continue; - if (code < 0) return false; - bitlen += 6; - } - return bitlen % 8 === 0; -} -__name(resolveYamlBinary, "resolveYamlBinary"); -function constructYamlBinary(data) { - var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; - for (idx = 0; idx < max; idx++) { - if (idx % 4 === 0 && idx) { + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + __name(representYamlFloat, "representYamlFloat"); + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + __name(isFloat, "isFloat"); + module2.exports = new Type2("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); +})); +var require_json = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_failsafe().extend({ implicit: [ + require_null2(), + require_bool3(), + require_int3(), + require_float3() + ] }); +})); +var require_core = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_json(); +})); +var require_timestamp2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ 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; + } + __name(resolveYamlTimestamp, "resolveYamlTimestamp"); + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match2 = YAML_DATE_REGEXP.exec(data); + if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); + if (match2 === null) throw new Error("Date resolve error"); + const year = +match2[1]; + const month = +match2[2] - 1; + const day = +match2[3]; + if (!match2[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match2[4]; + const minute = +match2[5]; + const second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match2[9]) { + const tzHour = +match2[10]; + const tzMinute = +(match2[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match2[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + __name(constructYamlTimestamp, "constructYamlTimestamp"); + function representYamlTimestamp(object) { + return object.toISOString(); + } + __name(representYamlTimestamp, "representYamlTimestamp"); + module2.exports = new Type2("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); +})); +var require_merge3 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + __name(resolveYamlMerge, "resolveYamlMerge"); + module2.exports = new Type2("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); +})); +var require_binary2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + __name(resolveYamlBinary, "resolveYamlBinary"); + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 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); + } + __name(constructYamlBinary, "constructYamlBinary"); + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; } - bits = bits << 6 | map2.indexOf(input.charAt(idx)); - } - tailbits = max % 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); -} -__name(constructYamlBinary, "constructYamlBinary"); -function representYamlBinary(object) { - var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - if (idx % 3 === 0 && idx) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } - bits = (bits << 8) + object[idx]; - } - tail = max % 3; - if (tail === 0) { - result += map2[bits >> 18 & 63]; - result += map2[bits >> 12 & 63]; - result += map2[bits >> 6 & 63]; - result += map2[bits & 63]; - } else if (tail === 2) { - result += map2[bits >> 10 & 63]; - result += map2[bits >> 4 & 63]; - result += map2[bits << 2 & 63]; - result += map2[64]; - } else if (tail === 1) { - result += map2[bits >> 2 & 63]; - result += map2[bits << 4 & 63]; - result += map2[64]; - result += map2[64]; + return result; } - return result; -} -__name(representYamlBinary, "representYamlBinary"); -function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; -} -__name(isBinary, "isBinary"); -var binary = new type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = 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$2.call(pair) !== "[object Object]") return false; - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - if (!pairHasKey) return false; - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; + __name(representYamlBinary, "representYamlBinary"); + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + __name(isBinary, "isBinary"); + module2.exports = new Type2("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); +})); +var require_omap2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; } - return true; -} -__name(resolveYamlOmap, "resolveYamlOmap"); -function constructYamlOmap(data) { - return data !== null ? data : []; -} -__name(constructYamlOmap, "constructYamlOmap"); -var omap = new type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); -var _toString$1 = Object.prototype.toString; -function resolveYamlPairs(data) { - if (data === null) return true; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString$1.call(pair) !== "[object Object]") return false; - keys = Object.keys(pair); - if (keys.length !== 1) return false; - result[index] = [keys[0], pair[keys[0]]]; + __name(resolveYamlOmap, "resolveYamlOmap"); + function constructYamlOmap(data) { + return data !== null ? data : []; } - return true; -} -__name(resolveYamlPairs, "resolveYamlPairs"); -function constructYamlPairs(data) { - if (data === null) return []; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys = Object.keys(pair); - result[index] = [keys[0], pair[keys[0]]]; + __name(constructYamlOmap, "constructYamlOmap"); + module2.exports = new Type2("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); +})); +var require_pairs2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; } - return result; -} -__name(constructYamlPairs, "constructYamlPairs"); -var pairs = new type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; -function resolveYamlSet(data) { - if (data === null) return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { + __name(resolveYamlPairs, "resolveYamlPairs"); + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + __name(constructYamlPairs, "constructYamlPairs"); + module2.exports = new Type2("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); +})); +var require_set2 = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var Type2 = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { if (object[key] !== null) return false; } + return true; } - return true; -} -__name(resolveYamlSet, "resolveYamlSet"); -function constructYamlSet(data) { - return data !== null ? data : {}; -} -__name(constructYamlSet, "constructYamlSet"); -var set = new type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet -}); -var _default = core.extend({ - implicit: [ - timestamp, - merge2 - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); -var _hasOwnProperty$1 = 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); -} -__name(_class, "_class"); -function is_EOL(c3) { - return c3 === 10 || c3 === 13; -} -__name(is_EOL, "is_EOL"); -function is_WHITE_SPACE(c3) { - return c3 === 9 || c3 === 32; -} -__name(is_WHITE_SPACE, "is_WHITE_SPACE"); -function is_WS_OR_EOL(c3) { - return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; -} -__name(is_WS_OR_EOL, "is_WS_OR_EOL"); -function is_FLOW_INDICATOR(c3) { - return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; -} -__name(is_FLOW_INDICATOR, "is_FLOW_INDICATOR"); -function fromHexCode(c3) { - var lc; - if (48 <= c3 && c3 <= 57) { - return c3 - 48; - } - lc = c3 | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; + __name(resolveYamlSet, "resolveYamlSet"); + function constructYamlSet(data) { + return data !== null ? data : {}; } - return -1; -} -__name(fromHexCode, "fromHexCode"); -function escapedHexLen(c3) { - if (c3 === 120) { - return 2; + __name(constructYamlSet, "constructYamlSet"); + module2.exports = new Type2("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); +})); +var require_default = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + module2.exports = require_core().extend({ + implicit: [require_timestamp2(), require_merge3()], + explicit: [ + require_binary2(), + require_omap2(), + require_pairs2(), + require_set2() + ] + }); +})); +var require_loader = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA2 = 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 = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + __name(_class, "_class"); + function isEol(c3) { + return c3 === 10 || c3 === 13; + } + __name(isEol, "isEol"); + function isWhiteSpace2(c3) { + return c3 === 9 || c3 === 32; + } + __name(isWhiteSpace2, "isWhiteSpace"); + function isWsOrEol(c3) { + return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; + } + __name(isWsOrEol, "isWsOrEol"); + function isFlowIndicator(c3) { + return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; + } + __name(isFlowIndicator, "isFlowIndicator"); + function fromHexCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + const lc = c3 | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; } - if (c3 === 117) { - return 4; + __name(fromHexCode, "fromHexCode"); + function escapedHexLen(c3) { + if (c3 === 120) return 2; + if (c3 === 117) return 4; + if (c3 === 85) return 8; + return 0; } - if (c3 === 85) { - return 8; + __name(escapedHexLen, "escapedHexLen"); + function fromDecimalCode(c3) { + if (c3 >= 48 && c3 <= 57) return c3 - 48; + return -1; } - return 0; -} -__name(escapedHexLen, "escapedHexLen"); -function fromDecimalCode(c3) { - if (48 <= c3 && c3 <= 57) { - return c3 - 48; + __name(fromDecimalCode, "fromDecimalCode"); + function simpleEscapeSequence(c3) { + switch (c3) { + case 48: + return "\0"; + case 97: + return "\x07"; + case 98: + return "\b"; + case 116: + return " "; + case 9: + return " "; + case 110: + return "\n"; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 101: + return "\x1B"; + case 32: + return " "; + case 34: + return '"'; + case 47: + return "/"; + case 92: + return "\\"; + case 78: + return "\x85"; + case 95: + return "\xA0"; + case 76: + return "\u2028"; + case 80: + return "\u2029"; + default: + return ""; + } } - return -1; -} -__name(fromDecimalCode, "fromDecimalCode"); -function simpleEscapeSequence(c3) { - return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : - c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === - 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "\x85" : c3 === 95 ? "\xA0" : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : ""; -} -__name(simpleEscapeSequence, "simpleEscapeSequence"); -function charFromCodepoint(c3) { - if (c3 <= 65535) { - return String.fromCharCode(c3); + __name(simpleEscapeSequence, "simpleEscapeSequence"); + function charFromCodepoint(c3) { + if (c3 <= 65535) return String.fromCharCode(c3); + return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320); } - return String.fromCharCode( - (c3 - 65536 >> 10) + 55296, - (c3 - 65536 & 1023) + 56320 - ); -} -__name(charFromCodepoint, "charFromCodepoint"); -function setProperty(object, key, value) { - if (key === "__proto__") { - Object.defineProperty(object, key, { + __name(charFromCodepoint, "charFromCodepoint"); + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { configurable: true, enumerable: true, writable: true, value }); - } else { - object[key] = value; - } -} -__name(setProperty, "setProperty"); -var simpleEscapeCheck = new Array(256); -var simpleEscapeMap = new Array(256); -for (i2 = 0; i2 < 256; i2++) { - simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; - simpleEscapeMap[i2] = simpleEscapeSequence(i2); -} -var i2; -function State$1(input, options) { - this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || _default; - 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 = []; -} -__name(State$1, "State$1"); -function generateError(state3, message) { - var mark = { - name: state3.filename, - buffer: state3.input.slice(0, -1), - // omit trailing \0 - position: state3.position, - line: state3.line, - column: state3.position - state3.lineStart - }; - mark.snippet = snippet(mark); - return new exception(message, mark); -} -__name(generateError, "generateError"); -function throwError(state3, message) { - throw generateError(state3, message); -} -__name(throwError, "throwError"); -function throwWarning(state3, message) { - if (state3.onWarning) { - state3.onWarning.call(null, generateError(state3, message)); - } -} -__name(throwWarning, "throwWarning"); -var directiveHandlers = { - YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { - var match2, major, minor; - if (state3.version !== null) { - throwError(state3, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state3, "YAML directive accepts exactly one argument"); - } - match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match2 === null) { - throwError(state3, "ill-formed argument of the YAML directive"); - } - major = parseInt(match2[1], 10); - minor = parseInt(match2[2], 10); - if (major !== 1) { - throwError(state3, "unacceptable YAML version of the document"); - } - state3.version = args[0]; - state3.checkLineBreaks = minor < 2; - if (minor !== 1 && minor !== 2) { - throwWarning(state3, "unsupported YAML version of the document"); - } - }, "handleYamlDirective"), - TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { - var handle, prefix2; - if (args.length !== 2) { - throwError(state3, "TAG directive accepts exactly two arguments"); - } - handle = args[0]; - prefix2 = args[1]; - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state3, "ill-formed tag handle (first argument) of the TAG directive"); - } - if (_hasOwnProperty$1.call(state3.tagMap, handle)) { - throwError(state3, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - if (!PATTERN_TAG_URI.test(prefix2)) { - throwError(state3, "ill-formed tag prefix (second argument) of the TAG directive"); - } - try { - prefix2 = decodeURIComponent(prefix2); - } catch (err) { - throwError(state3, "tag prefix is malformed: " + prefix2); - } - state3.tagMap[handle] = prefix2; - }, "handleTagDirective") -}; -function captureSegment(state3, start, end, checkJson) { - var _position, _length, _character, _result; - if (start < end) { - _result = state3.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(state3, "expected valid JSON character"); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state3, "the stream contains non-printable characters"); + else object[key] = value; + } + __name(setProperty, "setProperty"); + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i2 = 0; i2 < 256; i2++) { + simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; + simpleEscapeMap[i2] = simpleEscapeSequence(i2); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA2; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + 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.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + __name(State, "State"); + function generateError(state3, message) { + const mark = { + name: state3.filename, + buffer: state3.input.slice(0, -1), + position: state3.position, + line: state3.line, + column: state3.position - state3.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException2(message, mark); + } + __name(generateError, "generateError"); + function throwError(state3, message) { + throw generateError(state3, message); + } + __name(throwError, "throwError"); + function throwWarning(state3, message) { + if (state3.onWarning) state3.onWarning.call(null, generateError(state3, message)); + } + __name(throwWarning, "throwWarning"); + function storeAnchor(state3, name, value) { + const transactions = state3.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state3.anchorMap, name), + value: state3.anchorMap[name] + }; } - state3.result += _result; + state3.anchorMap[name] = value; } -} -__name(captureSegment, "captureSegment"); -function mergeMappings(state3, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - if (!common.isObject(source)) { - throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + __name(storeAnchor, "storeAnchor"); + function beginAnchorTransaction(state3) { + state3.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null)); } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty$1.call(destination, key)) { - setProperty(destination, key, source[key]); - overridableKeys[key] = true; + __name(beginAnchorTransaction, "beginAnchorTransaction"); + function commitAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const transactions = state3.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; } } -} -__name(mergeMappings, "mergeMappings"); -function storeMappingPair(state3, _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(state3, "nested arrays are not supported inside keys"); - } - if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { - keyNode[index] = "[object Object]"; - } + __name(commitAnchorTransaction, "commitAnchorTransaction"); + function rollbackAnchorTransaction(state3) { + const transaction = state3.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state3.anchorMap[names[index]] = entry.value; + else delete state3.anchorMap[names[index]]; } } - 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(state3, _result, valueNode[index], overridableKeys); + __name(rollbackAnchorTransaction, "rollbackAnchorTransaction"); + function snapshotState(state3) { + return { + position: state3.position, + line: state3.line, + lineStart: state3.lineStart, + lineIndent: state3.lineIndent, + firstTabInLine: state3.firstTabInLine, + tag: state3.tag, + anchor: state3.anchor, + kind: state3.kind, + result: state3.result + }; + } + __name(snapshotState, "snapshotState"); + function restoreState(state3, snapshot2) { + state3.position = snapshot2.position; + state3.line = snapshot2.line; + state3.lineStart = snapshot2.lineStart; + state3.lineIndent = snapshot2.lineIndent; + state3.firstTabInLine = snapshot2.firstTabInLine; + state3.tag = snapshot2.tag; + state3.anchor = snapshot2.anchor; + state3.kind = snapshot2.kind; + state3.result = snapshot2.result; + } + __name(restoreState, "restoreState"); + var directiveHandlers = { + YAML: /* @__PURE__ */ __name(function handleYamlDirective(state3, name, args) { + if (state3.version !== null) throwError(state3, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state3, "YAML directive accepts exactly one argument"); + const match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match2 === null) throwError(state3, "ill-formed argument of the YAML directive"); + const major = parseInt(match2[1], 10); + const minor = parseInt(match2[2], 10); + if (major !== 1) throwError(state3, "unacceptable YAML version of the document"); + state3.version = args[0]; + state3.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state3, "unsupported YAML version of the document"); + }, "handleYamlDirective"), + TAG: /* @__PURE__ */ __name(function handleTagDirective(state3, name, args) { + let prefix2; + if (args.length !== 2) throwError(state3, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix2 = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state3, "ill-formed tag handle (first argument) of the TAG direct\ +ive"); + if (_hasOwnProperty.call(state3.tagMap, handle)) throwError(state3, 'there is a previously declared suffix for "' + + handle + '" tag handle'); + if (!PATTERN_TAG_URI.test(prefix2)) throwError(state3, "ill-formed tag prefix (second argument) of the TAG directi\ +ve"); + try { + prefix2 = decodeURIComponent(prefix2); + } catch (err) { + throwError(state3, "tag prefix is malformed: " + prefix2); } - } else { - mergeMappings(state3, _result, valueNode, overridableKeys); - } - } else { - if (!state3.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { - state3.line = startLine || state3.line; - state3.lineStart = startLineStart || state3.lineStart; - state3.position = startPos || state3.position; - throwError(state3, "duplicated mapping key"); - } - setProperty(_result, keyNode, valueNode); - delete overridableKeys[keyNode]; - } - return _result; -} -__name(storeMappingPair, "storeMappingPair"); -function readLineBreak(state3) { - var ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 10) { - state3.position++; - } else if (ch === 13) { - state3.position++; - if (state3.input.charCodeAt(state3.position) === 10) { + state3.tagMap[handle] = prefix2; + }, "handleTagDirective") + }; + function captureSegment(state3, start, end, checkJson) { + if (start < end) { + const _result = state3.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state3, "expected valid JSON ch\ +aracter"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state3, "the stream contains non-printable characters"); + state3.result += _result; + } + } + __name(captureSegment, "captureSegment"); + function mergeMappings(state3, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state3, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + __name(mergeMappings, "mergeMappings"); + function storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state3, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Objec\ +t]"; + } + } + 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)) { + if (valueNode.length > state3.maxMergeSeqLength) throwError(state3, "merge sequence length exceeded maxMergeSeqLen\ +gth (" + state3.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state3, _result, src, overridableKeys); + } + } else mergeMappings(state3, _result, valueNode, overridableKeys); + else { + if (!state3.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state3.line = startLine || state3.line; + state3.lineStart = startLineStart || state3.lineStart; + state3.position = startPos || state3.position; + throwError(state3, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + __name(storeMappingPair, "storeMappingPair"); + function readLineBreak(state3) { + const ch = state3.input.charCodeAt(state3.position); + if (ch === 10) state3.position++; + else if (ch === 13) { state3.position++; - } - } else { - throwError(state3, "a line break is expected"); - } - state3.line += 1; - state3.lineStart = state3.position; - state3.firstTabInLine = -1; -} -__name(readLineBreak, "readLineBreak"); -function skipSeparationSpace(state3, allowComments, checkIndent) { - var lineBreaks = 0, ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 9 && state3.firstTabInLine === -1) { - state3.firstTabInLine = state3.position; - } - ch = state3.input.charCodeAt(++state3.position); - } - if (allowComments && ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 10 && ch !== 13 && ch !== 0); - } - if (is_EOL(ch)) { - readLineBreak(state3); - ch = state3.input.charCodeAt(state3.position); - lineBreaks++; - state3.lineIndent = 0; - while (ch === 32) { - state3.lineIndent++; + if (state3.input.charCodeAt(state3.position) === 10) state3.position++; + } else throwError(state3, "a line break is expected"); + state3.line += 1; + state3.lineStart = state3.position; + state3.firstTabInLine = -1; + } + __name(readLineBreak, "readLineBreak"); + function skipSeparationSpace(state3, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + while (isWhiteSpace2(ch)) { + if (ch === 9 && state3.firstTabInLine === -1) state3.firstTabInLine = state3.position; ch = state3.input.charCodeAt(++state3.position); } - } else { - break; + if (allowComments && ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state3); + ch = state3.input.charCodeAt(state3.position); + lineBreaks++; + state3.lineIndent = 0; + while (ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + } else break; } + if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) throwWarning(state3, "deficient inden\ +tation"); + return lineBreaks; } - if (checkIndent !== -1 && lineBreaks !== 0 && state3.lineIndent < checkIndent) { - throwWarning(state3, "deficient indentation"); - } - return lineBreaks; -} -__name(skipSeparationSpace, "skipSeparationSpace"); -function testDocumentSeparator(state3) { - var _position = state3.position, ch; - ch = state3.input.charCodeAt(_position); - if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + - 2)) { - _position += 3; - ch = state3.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + __name(skipSeparationSpace, "skipSeparationSpace"); + function testDocumentSeparator(state3) { + let _position = state3.position; + let ch = state3.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state3.input.charCodeAt(_position + 1) && ch === state3.input.charCodeAt(_position + + 2)) { + _position += 3; + ch = state3.input.charCodeAt(_position); + if (ch === 0 || isWsOrEol(ch)) return true; } - } - return false; -} -__name(testDocumentSeparator, "testDocumentSeparator"); -function writeFoldedLines(state3, count) { - if (count === 1) { - state3.result += " "; - } else if (count > 1) { - state3.result += common.repeat("\n", count - 1); - } -} -__name(writeFoldedLines, "writeFoldedLines"); -function readPlainScalar(state3, nodeIndent, withinFlowCollection) { - var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state3. - kind, _result = state3.result, ch; - ch = state3.input.charCodeAt(state3.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 = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - state3.kind = "scalar"; - state3.result = ""; - captureStart = captureEnd = state3.position; - hasPendingContent = false; - while (ch !== 0) { - if (ch === 58) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - } else if (ch === 35) { - preceding = state3.input.charCodeAt(state3.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; + __name(testDocumentSeparator, "testDocumentSeparator"); + function writeFoldedLines(state3, count) { + if (count === 1) state3.result += " "; + else if (count > 1) state3.result += common.repeat("\n", count - 1); + } + __name(writeFoldedLines, "writeFoldedLines"); + function readPlainScalar(state3, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state3.kind; + const _result = state3.result; + let ch = state3.input.charCodeAt(state3.position); + if (isWsOrEol(ch) || isFlowIndicator(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) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state3.kind = "scalar"; + state3.result = ""; + captureStart = captureEnd = state3.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state3.input.charCodeAt(state3.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state3.input.charCodeAt(state3.position - 1))) break; + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && isFlowIndicator( + ch)) break; + else if (isEol(ch)) { + _line = state3.line; + _lineStart = state3.lineStart; + _lineIndent = state3.lineIndent; + skipSeparationSpace(state3, false, -1); + if (state3.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state3.input.charCodeAt(state3.position); + continue; + } else { + state3.position = captureEnd; + state3.line = _line; + state3.lineStart = _lineStart; + state3.lineIndent = _lineIndent; + break; + } } - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3) || withinFlowCollection && is_FLOW_INDICATOR( - ch)) { - break; - } else if (is_EOL(ch)) { - _line = state3.line; - _lineStart = state3.lineStart; - _lineIndent = state3.lineIndent; - skipSeparationSpace(state3, false, -1); - if (state3.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state3.input.charCodeAt(state3.position); - continue; - } else { - state3.position = captureEnd; - state3.line = _line; - state3.lineStart = _lineStart; - state3.lineIndent = _lineIndent; - break; + if (hasPendingContent) { + captureSegment(state3, captureStart, captureEnd, false); + writeFoldedLines(state3, state3.line - _line); + captureStart = captureEnd = state3.position; + hasPendingContent = false; } + if (!isWhiteSpace2(ch)) captureEnd = state3.position + 1; + ch = state3.input.charCodeAt(++state3.position); } - if (hasPendingContent) { - captureSegment(state3, captureStart, captureEnd, false); - writeFoldedLines(state3, state3.line - _line); - captureStart = captureEnd = state3.position; - hasPendingContent = false; - } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state3.position + 1; - } - ch = state3.input.charCodeAt(++state3.position); - } - captureSegment(state3, captureStart, captureEnd, false); - if (state3.result) { - return true; - } - state3.kind = _kind; - state3.result = _result; - return false; -} -__name(readPlainScalar, "readPlainScalar"); -function readSingleQuotedScalar(state3, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 39) { + captureSegment(state3, captureStart, captureEnd, false); + if (state3.result) return true; + state3.kind = _kind; + state3.result = _result; return false; } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 39) { + __name(readPlainScalar, "readPlainScalar"); + function readSingleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 39) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 39) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); if (ch === 39) { captureStart = state3.position; state3.position++; captureEnd = state3.position; - } else { - return true; - } - } else if (is_EOL(ch)) { + } else return true; + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a single quoted scalar"); - } else { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a single quoted scalar"); + else { state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a single quoted scalar"); -} -__name(readSingleQuotedScalar, "readSingleQuotedScalar"); -function readDoubleQuotedScalar(state3, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 34) { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - state3.position++; - captureStart = captureEnd = state3.position; - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - if (ch === 34) { + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a single quoted scalar"); + } + __name(readSingleQuotedScalar, "readSingleQuotedScalar"); + function readDoubleQuotedScalar(state3, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 34) return false; + state3.kind = "scalar"; + state3.result = ""; + state3.position++; + captureStart = captureEnd = state3.position; + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) if (ch === 34) { captureSegment(state3, captureStart, state3.position, true); state3.position++; return true; } else if (ch === 92) { captureSegment(state3, captureStart, state3.position, true); ch = state3.input.charCodeAt(++state3.position); - if (is_EOL(ch)) { - skipSeparationSpace(state3, false, nodeIndent); - } else if (ch < 256 && simpleEscapeCheck[ch]) { + if (isEol(ch)) skipSeparationSpace(state3, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { state3.result += simpleEscapeMap[ch]; state3.position++; } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; + let hexLength = tmp; + let hexResult = 0; for (; hexLength > 0; hexLength--) { ch = state3.input.charCodeAt(++state3.position); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - } else { - throwError(state3, "expected hexadecimal character"); - } + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state3, "expected hexadecimal character"); } state3.result += charFromCodepoint(hexResult); state3.position++; - } else { - throwError(state3, "unknown escape sequence"); - } + } else throwError(state3, "unknown escape sequence"); captureStart = captureEnd = state3.position; - } else if (is_EOL(ch)) { + } else if (isEol(ch)) { captureSegment(state3, captureStart, captureEnd, true); writeFoldedLines(state3, skipSeparationSpace(state3, false, nodeIndent)); captureStart = captureEnd = state3.position; - } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - throwError(state3, "unexpected end of the document within a double quoted scalar"); - } else { - state3.position++; - captureEnd = state3.position; - } - } - throwError(state3, "unexpected end of the stream within a double quoted scalar"); -} -__name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); -function readFlowCollection(state3, nodeIndent) { - var readNext = true, _line, _lineStart, _pos, _tag = state3.tag, _result, _anchor = state3.anchor, following, terminator, - isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 91) { - terminator = 93; - isMapping = false; - _result = []; - } else if (ch === 123) { - terminator = 125; - isMapping = true; - _result = {}; - } else { - return false; - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(++state3.position); - while (ch !== 0) { - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === terminator) { + } else if (state3.position === state3.lineStart && testDocumentSeparator(state3)) throwError(state3, "unexpected end\ + of the document within a double quoted scalar"); + else { state3.position++; - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = isMapping ? "mapping" : "sequence"; - state3.result = _result; - return true; - } else if (!readNext) { - throwError(state3, "missed comma between flow collection entries"); - } else if (ch === 44) { - throwError(state3, "expected the node content, but found ','"); - } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - if (ch === 63) { - following = state3.input.charCodeAt(state3.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; + if (!isWhiteSpace2(ch)) captureEnd = state3.position; + } + throwError(state3, "unexpected end of the stream within a double quoted scalar"); + } + __name(readDoubleQuotedScalar, "readDoubleQuotedScalar"); + function readFlowCollection(state3, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state3.tag; + let _result; + const _anchor = state3.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0) { + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if (ch === terminator) { state3.position++; + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = isMapping ? "mapping" : "sequence"; + state3.result = _result; + return true; + } else if (!readNext) throwError(state3, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state3, "expected the node content, but found ','"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + if (isWsOrEol(state3.input.charCodeAt(state3.position + 1))) { + isPair = isExplicitPair = true; + state3.position++; + skipSeparationSpace(state3, true, nodeIndent); + } + } + _line = state3.line; + _lineStart = state3.lineStart; + _pos = state3.position; + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state3.tag; + keyNode = state3.result; + skipSeparationSpace(state3, true, nodeIndent); + ch = state3.input.charCodeAt(state3.position); + if ((isExplicitPair || state3.line === _line) && ch === 58) { + isPair = true; + ch = state3.input.charCodeAt(++state3.position); skipSeparationSpace(state3, true, nodeIndent); + composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state3.result; } - } - _line = state3.line; - _lineStart = state3.lineStart; - _pos = state3.position; - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state3.tag; - keyNode = state3.result; - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if ((isExplicitPair || state3.line === _line) && ch === 58) { - isPair = true; - ch = state3.input.charCodeAt(++state3.position); + if (isMapping) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + else if (isPair) _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, + _pos)); + else _result.push(keyNode); skipSeparationSpace(state3, true, nodeIndent); - composeNode(state3, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state3.result; - } - if (isMapping) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state3, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - skipSeparationSpace(state3, true, nodeIndent); - ch = state3.input.charCodeAt(state3.position); - if (ch === 44) { - readNext = true; + ch = state3.input.charCodeAt(state3.position); + if (ch === 44) { + readNext = true; + ch = state3.input.charCodeAt(++state3.position); + } else readNext = false; + } + throwError(state3, "unexpected end of the stream within a flow collection"); + } + __name(readFlowCollection, "readFlowCollection"); + function readBlockScalar(state3, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let ch = state3.input.charCodeAt(state3.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state3.kind = "scalar"; + state3.result = ""; + while (ch !== 0) { ch = state3.input.charCodeAt(++state3.position); - } else { - readNext = false; - } - } - throwError(state3, "unexpected end of the stream within a flow collection"); -} -__name(readFlowCollection, "readFlowCollection"); -function readBlockScalar(state3, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, - emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch === 124) { - folding = false; - } else if (ch === 62) { - folding = true; - } else { - return false; - } - state3.kind = "scalar"; - state3.result = ""; - while (ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); - if (ch === 43 || ch === 45) { - if (CHOMPING_CLIP === chomping) { - chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state3, "repeat of a chomping mode identifier"); - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state3, "bad explicit indentation width of a block scalar; it cannot be less than one"); - } else if (!detectedIndent) { + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state3, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state3, "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(state3, "repeat of an indentation width identifier"); - } - } else { - break; + } else throwError(state3, "repeat of an indentation width identifier"); + else break; } - } - if (is_WHITE_SPACE(ch)) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (is_WHITE_SPACE(ch)); - if (ch === 35) { - do { + if (isWhiteSpace2(ch)) { + do ch = state3.input.charCodeAt(++state3.position); - } while (!is_EOL(ch) && ch !== 0); - } - } - while (ch !== 0) { - readLineBreak(state3); - state3.lineIndent = 0; - ch = state3.input.charCodeAt(state3.position); - while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { - state3.lineIndent++; - ch = state3.input.charCodeAt(++state3.position); - } - if (!detectedIndent && state3.lineIndent > textIndent) { - textIndent = state3.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; - continue; + while (isWhiteSpace2(ch)); + if (ch === 35) do + ch = state3.input.charCodeAt(++state3.position); + while (!isEol(ch) && ch !== 0); } - if (state3.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { - state3.result += "\n"; + while (ch !== 0) { + readLineBreak(state3); + state3.lineIndent = 0; + ch = state3.input.charCodeAt(state3.position); + while ((!detectedIndent || state3.lineIndent < textIndent) && ch === 32) { + state3.lineIndent++; + ch = state3.input.charCodeAt(++state3.position); + } + if (!detectedIndent && state3.lineIndent > textIndent) textIndent = state3.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state3, "missing indentation for block scalar"); + if (state3.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state3.result += "\n"; } + break; } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { + if (folding) if (isWhiteSpace2(ch)) { atMoreIndented = true; state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (atMoreIndented) { atMoreIndented = false; state3.result += common.repeat("\n", emptyLines + 1); } else if (emptyLines === 0) { - if (didReadContent) { - state3.result += " "; - } - } else { - state3.result += common.repeat("\n", emptyLines); - } - } else { - state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + if (didReadContent) state3.result += " "; + } else state3.result += common.repeat("\n", emptyLines); + else state3.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state3.position; + while (!isEol(ch) && ch !== 0) ch = state3.input.charCodeAt(++state3.position); + captureSegment(state3, captureStart, state3.position, false); } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state3.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state3.input.charCodeAt(++state3.position); - } - captureSegment(state3, captureStart, state3.position, false); - } - return true; -} -__name(readBlockScalar, "readBlockScalar"); -function readBlockSequence(state3, nodeIndent) { - var _line, _tag = state3.tag, _anchor = state3.anchor, _result = [], following, detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; + return true; } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - if (ch !== 45) { - break; - } - following = state3.input.charCodeAt(state3.position + 1); - if (!is_WS_OR_EOL(following)) { - break; - } - detected = true; - state3.position++; - if (skipSeparationSpace(state3, true, -1)) { - if (state3.lineIndent <= nodeIndent) { - _result.push(null); - ch = state3.input.charCodeAt(state3.position); - continue; + __name(readBlockScalar, "readBlockScalar"); + function readBlockSequence(state3, nodeIndent) { + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = []; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); } + if (ch !== 45) break; + if (!isWsOrEol(state3.input.charCodeAt(state3.position + 1))) break; + detected = true; + state3.position++; + if (skipSeparationSpace(state3, true, -1)) { + if (state3.lineIndent <= nodeIndent) { + _result.push(null); + ch = state3.input.charCodeAt(state3.position); + continue; + } + } + const _line = state3.line; + composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state3.result); + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a sequence entry"); + else if (state3.lineIndent < nodeIndent) break; } - _line = state3.line; - composeNode(state3, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state3.result); - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a sequence entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "sequence"; + state3.result = _result; + return true; } + return false; } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "sequence"; - state3.result = _result; - return true; - } - return false; -} -__name(readBlockSequence, "readBlockSequence"); -function readBlockMapping(state3, nodeIndent, flowIndent) { - var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state3.tag, _anchor = state3.anchor, _result = {}, - overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, - detected = false, ch; - if (state3.firstTabInLine !== -1) return false; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = _result; - } - ch = state3.input.charCodeAt(state3.position); - while (ch !== 0) { - if (!atExplicitKey && state3.firstTabInLine !== -1) { - state3.position = state3.firstTabInLine; - throwError(state3, "tab characters must not be used in indentation"); - } - following = state3.input.charCodeAt(state3.position + 1); - _line = state3.line; - if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { - if (ch === 63) { - if (atExplicitKey) { - storeMappingPair(state3, _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(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty\ - line"); - } - state3.position += 1; - ch = following; - } else { - _keyLine = state3.line; - _keyLineStart = state3.lineStart; - _keyPos = state3.position; - if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - break; - } - if (state3.line === _line) { - ch = state3.input.charCodeAt(state3.position); - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 58) { - ch = state3.input.charCodeAt(++state3.position); - if (!is_WS_OR_EOL(ch)) { - throwError(state3, "a whitespace character is expected after the key-value separator within a block mapping"); - } + __name(readBlockSequence, "readBlockSequence"); + function readBlockMapping(state3, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state3.tag; + const _anchor = state3.anchor; + const _result = {}; + const overridableKeys = /* @__PURE__ */ Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state3.firstTabInLine !== -1) return false; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, _result); + let ch = state3.input.charCodeAt(state3.position); + while (ch !== 0) { + if (!atExplicitKey && state3.firstTabInLine !== -1) { + state3.position = state3.firstTabInLine; + throwError(state3, "tab characters must not be used in indentation"); + } + const following = state3.input.charCodeAt(state3.position + 1); + const _line = state3.line; + if ((ch === 63 || ch === 58) && isWsOrEol(following)) { + if (ch === 63) { if (atExplicitKey) { storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { atExplicitKey = false; - allowCompact = false; - keyTag = state3.tag; - keyNode = state3.result; - } else if (detected) { - throwError(state3, "can not read an implicit mapping pair; a colon is missed"); - } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } else if (detected) { - throwError(state3, "can not read a block mapping entry; a multiline key may not be an implicit key"); + allowCompact = true; + } else throwError(state3, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulate\ +d empty line"); + state3.position += 1; + ch = following; } else { - state3.tag = _tag; - state3.anchor = _anchor; - return true; - } - } - if (state3.line === _line || state3.lineIndent > nodeIndent) { - if (atExplicitKey) { _keyLine = state3.line; _keyLineStart = state3.lineStart; _keyPos = state3.position; + if (!composeNode(state3, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state3.line === _line) { + ch = state3.input.charCodeAt(state3.position); + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 58) { + ch = state3.input.charCodeAt(++state3.position); + if (!isWsOrEol(ch)) throwError(state3, "a whitespace character is expected after the key-value separator wit\ +hin a block mapping"); + if (atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state3.tag; + keyNode = state3.result; + } else if (detected) throwError(state3, "can not read an implicit mapping pair; a colon is missed"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } + } else if (detected) throwError(state3, "can not read a block mapping entry; a multiline key may not be an impli\ +cit key"); + else { + state3.tag = _tag; + state3.anchor = _anchor; + return true; + } } - if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (state3.line === _line || state3.lineIndent > nodeIndent) { if (atExplicitKey) { - keyNode = state3.result; - } else { - valueNode = state3.result; + _keyLine = state3.line; + _keyLineStart = state3.lineStart; + _keyPos = state3.position; + } + if (composeNode(state3, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state3. + result; + else valueNode = state3.result; + if (!atExplicitKey) { + storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; } + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); } - if (!atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); + if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) throwError(state3, "bad indentation of \ +a mapping entry"); + else if (state3.lineIndent < nodeIndent) break; } - if ((state3.line === _line || state3.lineIndent > nodeIndent) && ch !== 0) { - throwError(state3, "bad indentation of a mapping entry"); - } else if (state3.lineIndent < nodeIndent) { - break; + if (atExplicitKey) storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, + _keyPos); + if (detected) { + state3.tag = _tag; + state3.anchor = _anchor; + state3.kind = "mapping"; + state3.result = _result; } - } - if (atExplicitKey) { - storeMappingPair(state3, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - if (detected) { - state3.tag = _tag; - state3.anchor = _anchor; - state3.kind = "mapping"; - state3.result = _result; - } - return detected; -} -__name(readBlockMapping, "readBlockMapping"); -function readTagProperty(state3) { - var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 33) return false; - if (state3.tag !== null) { - throwError(state3, "duplication of a tag property"); - } - ch = state3.input.charCodeAt(++state3.position); - if (ch === 60) { - isVerbatim = true; + return detected; + } + __name(readBlockMapping, "readBlockMapping"); + function readTagProperty(state3) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 33) return false; + if (state3.tag !== null) throwError(state3, "duplication of a tag property"); ch = state3.input.charCodeAt(++state3.position); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; - ch = state3.input.charCodeAt(++state3.position); - } else { - tagHandle = "!"; - } - _position = state3.position; - if (isVerbatim) { - do { + if (ch === 60) { + isVerbatim = true; ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && ch !== 62); - if (state3.position < state3.length) { - tagName = state3.input.slice(_position, state3.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; ch = state3.input.charCodeAt(++state3.position); + } else tagHandle = "!"; + let _position = state3.position; + if (isVerbatim) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && ch !== 62); + if (state3.position < state3.length) { + tagName = state3.input.slice(_position, state3.position); + ch = state3.input.charCodeAt(++state3.position); + } else throwError(state3, "unexpected end of the stream within a verbatim tag"); } else { - throwError(state3, "unexpected end of the stream within a verbatim tag"); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (ch === 33) { - if (!isNamed) { + while (ch !== 0 && !isWsOrEol(ch)) { + if (ch === 33) if (!isNamed) { tagHandle = state3.input.slice(_position - 1, state3.position + 1); - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state3, "named tag handle cannot contain such characters"); - } + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state3, "named tag handle cannot contain such characters"); isNamed = true; _position = state3.position + 1; - } else { - throwError(state3, "tag suffix cannot contain exclamation marks"); - } + } else throwError(state3, "tag suffix cannot contain exclamation marks"); + ch = state3.input.charCodeAt(++state3.position); } - ch = state3.input.charCodeAt(++state3.position); + tagName = state3.input.slice(_position, state3.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state3, "tag suffix cannot contain flow indicator characters"); } - tagName = state3.input.slice(_position, state3.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state3, "tag suffix cannot contain flow indicator characters"); + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state3, "tag name cannot contain such characters: " + tagName); + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state3, "tag name is malformed: " + tagName); } + if (isVerbatim) state3.tag = tagName; + else if (_hasOwnProperty.call(state3.tagMap, tagHandle)) state3.tag = state3.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state3.tag = "!" + tagName; + else if (tagHandle === "!!") state3.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); + return true; } - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state3, "tag name cannot contain such characters: " + tagName); - } - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state3, "tag name is malformed: " + tagName); - } - if (isVerbatim) { - state3.tag = tagName; - } else if (_hasOwnProperty$1.call(state3.tagMap, tagHandle)) { - state3.tag = state3.tagMap[tagHandle] + tagName; - } else if (tagHandle === "!") { - state3.tag = "!" + tagName; - } else if (tagHandle === "!!") { - state3.tag = "tag:yaml.org,2002:" + tagName; - } else { - throwError(state3, 'undeclared tag handle "' + tagHandle + '"'); - } - return true; -} -__name(readTagProperty, "readTagProperty"); -function readAnchorProperty(state3) { - var _position, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 38) return false; - if (state3.anchor !== null) { - throwError(state3, "duplication of an anchor property"); - } - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readTagProperty, "readTagProperty"); + function readAnchorProperty(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 38) return false; + if (state3.anchor !== null) throwError(state3, "duplication of an anchor property"); ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an anchor node must contain at least one character"); + state3.anchor = state3.input.slice(_position, state3.position); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an anchor node must contain at least one character"); - } - state3.anchor = state3.input.slice(_position, state3.position); - return true; -} -__name(readAnchorProperty, "readAnchorProperty"); -function readAlias(state3) { - var _position, alias, ch; - ch = state3.input.charCodeAt(state3.position); - if (ch !== 42) return false; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + __name(readAnchorProperty, "readAnchorProperty"); + function readAlias(state3) { + let ch = state3.input.charCodeAt(state3.position); + if (ch !== 42) return false; ch = state3.input.charCodeAt(++state3.position); + const _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state3.input.charCodeAt(++state3.position); + if (state3.position === _position) throwError(state3, "name of an alias node must contain at least one character"); + const alias = state3.input.slice(_position, state3.position); + if (!_hasOwnProperty.call(state3.anchorMap, alias)) throwError(state3, 'unidentified alias "' + alias + '"'); + state3.result = state3.anchorMap[alias]; + skipSeparationSpace(state3, true, -1); + return true; } - if (state3.position === _position) { - throwError(state3, "name of an alias node must contain at least one character"); - } - alias = state3.input.slice(_position, state3.position); - if (!_hasOwnProperty$1.call(state3.anchorMap, alias)) { - throwError(state3, 'unidentified alias "' + alias + '"'); + __name(readAlias, "readAlias"); + function tryReadBlockMappingFromProperty(state3, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state3); + beginAnchorTransaction(state3); + restoreState(state3, propertyStart); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + if (readBlockMapping(state3, nodeIndent, flowIndent) && state3.kind === "mapping") { + commitAnchorTransaction(state3); + return true; + } + rollbackAnchorTransaction(state3); + restoreState(state3, fallbackState); + return false; } - state3.result = state3.anchorMap[alias]; - skipSeparationSpace(state3, true, -1); - return true; -} -__name(readAlias, "readAlias"); -function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, - typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; - if (state3.listener !== null) { - state3.listener("open", state3); - } - state3.tag = null; - state3.anchor = null; - state3.kind = null; - state3.result = null; - allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === - nodeContext; - if (allowToSeek) { - if (skipSeparationSpace(state3, true, -1)) { - atNewLine = true; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - if (indentStatus === 1) { - while (readTagProperty(state3) || readAnchorProperty(state3)) { + __name(tryReadBlockMappingFromProperty, "tryReadBlockMappingFromProperty"); + function composeNode(state3, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state3.depth >= state3.maxDepth) throwError(state3, "nesting exceeded maxDepth (" + state3.maxDepth + ")"); + state3.depth += 1; + if (state3.listener !== null) state3.listener("open", state3); + state3.tag = null; + state3.anchor = null; + state3.kind = null; + state3.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === + nodeContext; + if (allowToSeek) { if (skipSeparationSpace(state3, true, -1)) { atNewLine = true; - allowBlockCollections = allowBlockStyles; - if (state3.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state3.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state3.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; } } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - blockIndent = state3.position - state3.lineStart; - if (indentStatus === 1) { - if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, blockIndent, flowIndent)) || - readFlowCollection(state3, flowIndent)) { - hasContent = true; - } else { - if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || readDoubleQuotedScalar( - state3, flowIndent)) { - hasContent = true; - } else if (readAlias(state3)) { + if (indentStatus === 1) while (true) { + const ch = state3.input.charCodeAt(state3.position); + const propertyState = snapshotState(state3); + if (atNewLine && (ch === 33 && state3.tag !== null || ch === 38 && state3.anchor !== null)) break; + if (!readTagProperty(state3) && !readAnchorProperty(state3)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state3, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state3.lineIndent > parentIndent) indentStatus = 1; + else if (state3.lineIndent === parentIndent) indentStatus = 0; + else if (state3.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state3.position - state3.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state3, blockIndent) || readBlockMapping(state3, + blockIndent, flowIndent)) || readFlowCollection(state3, flowIndent)) hasContent = true; + else { + const ch = state3.input.charCodeAt(state3.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty( + state3, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true; + else if (allowBlockScalars && readBlockScalar(state3, flowIndent) || readSingleQuotedScalar(state3, flowIndent) || + readDoubleQuotedScalar(state3, flowIndent)) hasContent = true; + else if (readAlias(state3)) { hasContent = true; - if (state3.tag !== null || state3.anchor !== null) { - throwError(state3, "alias node should not have any properties"); - } + if (state3.tag !== null || state3.anchor !== null) throwError(state3, "alias node should not have any properti\ +es"); } else if (readPlainScalar(state3, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; - if (state3.tag === null) { - state3.tag = "?"; - } - } - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } else if (indentStatus === 0) { - hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); - } - } - if (state3.tag === null) { - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } else if (state3.tag === "?") { - if (state3.result !== null && state3.kind !== "scalar") { - throwError(state3, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state3.kind + '"'); - } - for (typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type2 = state3.implicitTypes[typeIndex]; - if (type2.resolve(state3.result)) { - state3.result = type2.construct(state3.result); - state3.tag = type2.tag; - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; + if (state3.tag === null) state3.tag = "?"; + } + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state3, blockIndent); + } + if (state3.tag === null) { + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } else if (state3.tag === "?") { + if (state3.result !== null && state3.kind !== "scalar") throwError(state3, 'unacceptable node kind for ! tag; i\ +t should be "scalar", not "' + state3.kind + '"'); + for (let typeIndex = 0, typeQuantity = state3.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state3.implicitTypes[typeIndex]; + if (type.resolve(state3.result)) { + state3.result = type.construct(state3.result); + state3.tag = type.tag; + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + break; } - break; } - } - } else if (state3.tag !== "!") { - if (_hasOwnProperty$1.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) { - type2 = state3.typeMap[state3.kind || "fallback"][state3.tag]; - } else { - type2 = null; - typeList = state3.typeMap.multi[state3.kind || "fallback"]; - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state3.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type2 = typeList[typeIndex]; + } else if (state3.tag !== "!") { + if (_hasOwnProperty.call(state3.typeMap[state3.kind || "fallback"], state3.tag)) type = state3.typeMap[state3.kind || + "fallback"][state3.tag]; + else { + type = null; + const typeList = state3.typeMap.multi[state3.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state3.tag. + slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; break; } } - } - if (!type2) { - throwError(state3, "unknown tag !<" + state3.tag + ">"); - } - if (state3.result !== null && type2.kind !== state3.kind) { - throwError(state3, "unacceptable node kind for !<" + state3.tag + '> tag; it should be "' + type2.kind + '", not "' + - state3.kind + '"'); - } - if (!type2.resolve(state3.result, state3.tag)) { - throwError(state3, "cannot resolve a node with !<" + state3.tag + "> explicit tag"); - } else { - state3.result = type2.construct(state3.result, state3.tag); - if (state3.anchor !== null) { - state3.anchorMap[state3.anchor] = state3.result; - } - } - } - if (state3.listener !== null) { - state3.listener("close", state3); - } - return state3.tag !== null || state3.anchor !== null || hasContent; -} -__name(composeNode, "composeNode"); -function readDocument(state3) { - var documentStart = state3.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; - state3.version = null; - state3.checkLineBreaks = state3.legacy; - state3.tagMap = /* @__PURE__ */ Object.create(null); - state3.anchorMap = /* @__PURE__ */ Object.create(null); - while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { - skipSeparationSpace(state3, true, -1); - ch = state3.input.charCodeAt(state3.position); - if (state3.lineIndent > 0 || ch !== 37) { - break; - } - hasDirectives = true; - ch = state3.input.charCodeAt(++state3.position); - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (!type) throwError(state3, "unknown tag !<" + state3.tag + ">"); + if (state3.result !== null && type.kind !== state3.kind) throwError(state3, "unacceptable node kind for !<" + state3. + tag + '> tag; it should be "' + type.kind + '", not "' + state3.kind + '"'); + if (!type.resolve(state3.result, state3.tag)) throwError(state3, "cannot resolve a node with !<" + state3.tag + ">\ + explicit tag"); + else { + state3.result = type.construct(state3.result, state3.tag); + if (state3.anchor !== null) storeAnchor(state3, state3.anchor, state3.result); + } + } + if (state3.listener !== null) state3.listener("close", state3); + state3.depth -= 1; + return state3.tag !== null || state3.anchor !== null || hasContent; + } + __name(composeNode, "composeNode"); + function readDocument(state3) { + const documentStart = state3.position; + let hasDirectives = false; + let ch; + state3.version = null; + state3.checkLineBreaks = state3.legacy; + state3.tagMap = /* @__PURE__ */ Object.create(null); + state3.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state3.input.charCodeAt(state3.position)) !== 0) { + skipSeparationSpace(state3, true, -1); + ch = state3.input.charCodeAt(state3.position); + if (state3.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; ch = state3.input.charCodeAt(++state3.position); - } - directiveName = state3.input.slice(_position, state3.position); - directiveArgs = []; - if (directiveName.length < 1) { - throwError(state3, "directive name must not be less than one character in length"); - } - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state3.input.charCodeAt(++state3.position); - } - if (ch === 35) { - do { - ch = state3.input.charCodeAt(++state3.position); - } while (ch !== 0 && !is_EOL(ch)); - break; - } - if (is_EOL(ch)) break; - _position = state3.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state3.input.charCodeAt(++state3.position); + let _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + const directiveName = state3.input.slice(_position, state3.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state3, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace2(ch)) ch = state3.input.charCodeAt(++state3.position); + if (ch === 35) { + do + ch = state3.input.charCodeAt(++state3.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state3.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state3.input.charCodeAt(++state3.position); + directiveArgs.push(state3.input.slice(_position, state3.position)); } - directiveArgs.push(state3.input.slice(_position, state3.position)); - } - if (ch !== 0) readLineBreak(state3); - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state3, directiveName, directiveArgs); - } else { - throwWarning(state3, 'unknown document directive "' + directiveName + '"'); + if (ch !== 0) readLineBreak(state3); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state3, directiveName, + directiveArgs); + else throwWarning(state3, 'unknown document directive "' + directiveName + '"'); } - } - skipSeparationSpace(state3, true, -1); - if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + - 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { - state3.position += 3; skipSeparationSpace(state3, true, -1); - } else if (hasDirectives) { - throwError(state3, "directives end mark is expected"); - } - composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state3, true, -1); - if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) { - throwWarning(state3, "non-ASCII line breaks are interpreted as content"); - } - state3.documents.push(state3.result); - if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { - if (state3.input.charCodeAt(state3.position) === 46) { + if (state3.lineIndent === 0 && state3.input.charCodeAt(state3.position) === 45 && state3.input.charCodeAt(state3.position + + 1) === 45 && state3.input.charCodeAt(state3.position + 2) === 45) { state3.position += 3; skipSeparationSpace(state3, true, -1); + } else if (hasDirectives) throwError(state3, "directives end mark is expected"); + composeNode(state3, state3.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state3, true, -1); + if (state3.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state3.input.slice(documentStart, state3.position))) + throwWarning(state3, "non-ASCII line breaks are interpreted as content"); + state3.documents.push(state3.result); + if (state3.position === state3.lineStart && testDocumentSeparator(state3)) { + if (state3.input.charCodeAt(state3.position) === 46) { + state3.position += 3; + skipSeparationSpace(state3, true, -1); + } + return; } - return; + if (state3.position < state3.length - 1) throwError(state3, "end of the stream or a document separator is expected"); } - if (state3.position < state3.length - 1) { - throwError(state3, "end of the stream or a document separator is expected"); - } else { - return; - } -} -__name(readDocument, "readDocument"); -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"; + __name(readDocument, "readDocument"); + 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"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state3 = new State(input, options); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state3.position = nullpos; + throwError(state3, "null byte is not allowed in input"); + } + state3.input += "\0"; + while (state3.input.charCodeAt(state3.position) === 32) { + state3.lineIndent += 1; + state3.position += 1; } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); + while (state3.position < state3.length - 1) readDocument(state3); + return state3.documents; + } + __name(loadDocuments, "loadDocuments"); + function loadAll2(input, iterator2, options) { + if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { + options = iterator2; + iterator2 = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator2 !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator2(documents[index]); + } + __name(loadAll2, "loadAll"); + function load2(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException2("expected a single document in the stream, but found more"); + } + __name(load2, "load"); + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; +})); +var require_dumper = /* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var common = require_common4(); + var YAMLException2 = require_exception(); + var DEFAULT_SCHEMA2 = 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(schema2, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema2.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; } + return result; } - var state3 = new State$1(input, options); - var nullpos = input.indexOf("\0"); - if (nullpos !== -1) { - state3.position = nullpos; - throwError(state3, "null byte is not allowed in input"); - } - state3.input += "\0"; - while (state3.input.charCodeAt(state3.position) === 32) { - state3.lineIndent += 1; - state3.position += 1; - } - while (state3.position < state3.length - 1) { - readDocument(state3); - } - return state3.documents; -} -__name(loadDocuments, "loadDocuments"); -function loadAll$1(input, iterator2, options) { - if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") { - options = iterator2; - iterator2 = null; - } - var documents = loadDocuments(input, options); - if (typeof iterator2 !== "function") { - return documents; - } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator2(documents[index]); - } -} -__name(loadAll$1, "loadAll$1"); -function load$1(input, options) { - var documents = loadDocuments(input, options); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception("expected a single document in the stream, but found more"); -} -__name(load$1, "load$1"); -var loadAll_1 = loadAll$1; -var load_1 = load$1; -var loader = { - loadAll: loadAll_1, - load: load_1 -}; -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(schema3, map2) { - var result, keys, index, length, tag, style, type2; - if (map2 === null) return {}; - result = {}; - keys = Object.keys(map2); - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map2[tag]); - if (tag.slice(0, 2) === "!!") { - tag = "tag:yaml.org,2002:" + tag.slice(2); - } - type2 = schema3.compiledTypeMap["fallback"][tag]; - if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) { - style = type2.styleAliases[style]; - } - result[tag] = style; - } - return result; -} -__name(compileStyleMap, "compileStyleMap"); -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 exception("code point within a string may not be greater than 0xFFFFFFFF"); - } - return "\\" + handle + common.repeat("0", length - string.length) + string; -} -__name(encodeHex, "encodeHex"); -var QUOTING_TYPE_SINGLE = 1; -var QUOTING_TYPE_DOUBLE = 2; -function State(options) { - this.schema = options["schema"] || _default; - 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; -} -__name(State, "State"); -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; + __name(compileStyleMap, "compileStyleMap"); + function encodeHex(character) { + let handle; + let length; + const 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 YAMLException2("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + __name(encodeHex, "encodeHex"); + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA2; + 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; + } + __name(State, "State"); + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const 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; } - if (line.length && line !== "\n") result += ind; - result += line; + return result; } - return result; -} -__name(indentString, "indentString"); -function generateNextLine(state3, level) { - return "\n" + common.repeat(" ", state3.indent * level); -} -__name(generateNextLine, "generateNextLine"); -function testImplicitResolving(state3, str2) { - var index, length, type2; - for (index = 0, length = state3.implicitTypes.length; index < length; index += 1) { - type2 = state3.implicitTypes[index]; - if (type2.resolve(str2)) { - return true; - } + __name(indentString, "indentString"); + function generateNextLine(state3, level) { + return "\n" + common.repeat(" ", state3.indent * level); } - return false; -} -__name(testImplicitResolving, "testImplicitResolving"); -function isWhitespace(c3) { - return c3 === CHAR_SPACE || c3 === CHAR_TAB; -} -__name(isWhitespace, "isWhitespace"); -function isPrintable(c3) { - return 32 <= c3 && c3 <= 126 || 161 <= c3 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || 57344 <= c3 && c3 <= 65533 && - c3 !== CHAR_BOM || 65536 <= c3 && c3 <= 1114111; -} -__name(isPrintable, "isPrintable"); -function isNsCharOrWhitespace(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; -} -__name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); -function isPlainSafe(c3, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); - return ( - // ns-plain-safe - (inblock ? ( - // c = flow-in - cIsNsCharOrWhitespace - ) : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && - c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || - isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar - ); -} -__name(isPlainSafe, "isPlainSafe"); -function isPlainSafeFirst(c3) { - return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== CHAR_COLON && - c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && - c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && - c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && - c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; -} -__name(isPlainSafeFirst, "isPlainSafeFirst"); -function isPlainSafeLast(c3) { - return !isWhitespace(c3) && c3 !== CHAR_COLON; -} -__name(isPlainSafeLast, "isPlainSafeLast"); -function codePointAt(string, pos) { - var first2 = string.charCodeAt(pos), second; - if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -} -__name(codePointAt, "codePointAt"); -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} -__name(needIndentIndicator, "needIndentIndicator"); -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 i2; - 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 (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + __name(generateNextLine, "generateNextLine"); + function testImplicitResolving(state3, str) { + for (let index = 0, length = state3.implicitTypes.length; index < length; index += 1) if (state3.implicitTypes[index]. + resolve(str)) return true; + return false; + } + __name(testImplicitResolving, "testImplicitResolving"); + function isWhitespace(c3) { + return c3 === CHAR_SPACE || c3 === CHAR_TAB; + } + __name(isWhitespace, "isWhitespace"); + function isPrintable(c3) { + return c3 >= 32 && c3 <= 126 || c3 >= 161 && c3 <= 55295 && c3 !== 8232 && c3 !== 8233 || c3 >= 57344 && c3 <= 65533 && + c3 !== CHAR_BOM || c3 >= 65536 && c3 <= 1114111; + } + __name(isPrintable, "isPrintable"); + function isNsCharOrWhitespace(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && c3 !== CHAR_CARRIAGE_RETURN && c3 !== CHAR_LINE_FEED; + } + __name(isNsCharOrWhitespace, "isNsCharOrWhitespace"); + function isPlainSafe(c3, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c3); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c3); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && + c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && c3 !== CHAR_RIGHT_CURLY_BRACKET) && c3 !== CHAR_SHARP && + !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c3 === CHAR_SHARP || prev === + CHAR_COLON && cIsNsChar; + } + __name(isPlainSafe, "isPlainSafe"); + function isPlainSafeFirst(c3) { + return isPrintable(c3) && c3 !== CHAR_BOM && !isWhitespace(c3) && c3 !== CHAR_MINUS && c3 !== CHAR_QUESTION && c3 !== + CHAR_COLON && c3 !== CHAR_COMMA && c3 !== CHAR_LEFT_SQUARE_BRACKET && c3 !== CHAR_RIGHT_SQUARE_BRACKET && c3 !== CHAR_LEFT_CURLY_BRACKET && + c3 !== CHAR_RIGHT_CURLY_BRACKET && c3 !== CHAR_SHARP && c3 !== CHAR_AMPERSAND && c3 !== CHAR_ASTERISK && c3 !== CHAR_EXCLAMATION && + c3 !== CHAR_VERTICAL_LINE && c3 !== CHAR_EQUALS && c3 !== CHAR_GREATER_THAN && c3 !== CHAR_SINGLE_QUOTE && c3 !== CHAR_DOUBLE_QUOTE && + c3 !== CHAR_PERCENT && c3 !== CHAR_COMMERCIAL_AT && c3 !== CHAR_GRAVE_ACCENT; + } + __name(isPlainSafeFirst, "isPlainSafeFirst"); + function isPlainSafeLast(c3) { + return !isWhitespace(c3) && c3 !== CHAR_COLON; + } + __name(isPlainSafeLast, "isPlainSafeLast"); + function codePointAt(string, pos) { + const first2 = string.charCodeAt(pos); + let second; + if (first2 >= 55296 && first2 <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first2 - 55296) * 1024 + second - 56320 + 65536; + } + return first2; + } + __name(codePointAt, "codePointAt"); + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + __name(needIndentIndicator, "needIndentIndicator"); + 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) { + let i2; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { char = codePointAt(string, i2); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. - i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; - previousLineBreak = i2; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } + if (!isPrintable(char)) return STYLE_DOUBLE; plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } - hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + - 1] !== " "); - } - if (!hasLineBreak && !hasFoldableLine) { - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } + else { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== + " "; + previousLineBreak = i2; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i2 - 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; } - 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; -} -__name(chooseScalarStyle, "chooseScalarStyle"); -function writeScalar(state3, string, level, iskey, inblock) { - state3.dump = (function() { - if (string.length === 0) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state3.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state3.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; - } - } - var indent = state3.indent * Math.max(1, level); - var lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); - var singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; - function testAmbiguity(string2) { - return testImplicitResolving(state3, string2); - } - __name(testAmbiguity, "testAmbiguity"); - switch (chooseScalarStyle( - string, - singleLineOnly, - state3.indent, - lineWidth, - testAmbiguity, - state3.quotingType, - state3.forceQuotes && !iskey, - inblock - )) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception("impossible error: invalid scalar style"); - } - })(); -} -__name(writeScalar, "writeScalar"); -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"; -} -__name(blockHeader, "blockHeader"); -function dropEndingNewline(string) { - return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; -} -__name(dropEndingNewline, "dropEndingNewline"); -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 prefix2 = match2[1], line = match2[2]; - moreIndented = line[0] === " "; - result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); - prevMoreIndented = moreIndented; + __name(chooseScalarStyle, "chooseScalarStyle"); + function writeScalar(state3, string, level, iskey, inblock) { + state3.dump = (function() { + if (string.length === 0) return state3.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + if (!state3.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state3.quotingType === + QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + const indent = state3.indent * Math.max(1, level); + const lineWidth = state3.lineWidth === -1 ? -1 : Math.max(Math.min(state3.lineWidth, 40), state3.lineWidth - indent); + const singleLineOnly = iskey || state3.flowLevel > -1 && level >= state3.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state3, string2); + } + __name(testAmbiguity, "testAmbiguity"); + switch (chooseScalarStyle(string, singleLineOnly, state3.indent, lineWidth, testAmbiguity, state3.quotingType, state3. + forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state3.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), + indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException2("impossible error: invalid scalar style"); + } + })(); } - return result; -} -__name(foldString, "foldString"); -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); -} -__name(foldLine, "foldLine"); -function escapeString(string) { - var result = ""; - var char = 0; - var escapeSeq; - for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { - char = codePointAt(string, i2); - escapeSeq = ESCAPE_SEQUENCES[char]; - if (!escapeSeq && isPrintable(char)) { - result += string[i2]; - if (char >= 65536) result += string[i2 + 1]; - } else { - result += escapeSeq || encodeHex(char); + __name(writeScalar, "writeScalar"); + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + + "\n"; + } + __name(blockHeader, "blockHeader"); + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + __name(dropEndingNewline, "dropEndingNewline"); + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = (function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + })(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match2; + while (match2 = lineRe.exec(string)) { + const prefix2 = match2[1]; + const line = match2[2]; + moreIndented = line[0] === " "; + result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; } + return result; } - return result; -} -__name(escapeString, "escapeString"); -function writeFlowSequence(state3, level, object) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, false, - false)) { - if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); - _result += state3.dump; - } - } - state3.tag = _tag; - state3.dump = "[" + _result + "]"; -} -__name(writeFlowSequence, "writeFlowSequence"); -function writeBlockSequence(state3, level, object, compact) { - var _result = "", _tag = state3.tag, index, length, value; - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - if (state3.replacer) { - value = state3.replacer.call(object, String(index), value); - } - if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, - level + 1, null, true, true, false, true)) { - if (!compact || _result !== "") { - _result += generateNextLine(state3, level); - } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - _result += "-"; - } else { - _result += "- "; - } - _result += state3.dump; + __name(foldString, "foldString"); + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match2; + let start = 0; + let end; + let curr = 0; + let next = 0; + let 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); + } + __name(foldLine, "foldLine"); + function escapeString(string) { + let result = ""; + let char = 0; + for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i2]; + if (char >= 65536) result += string[i2 + 1]; + } else result += escapeSeq || encodeHex(char); } + return result; } - state3.tag = _tag; - state3.dump = _result || "[]"; -} -__name(writeBlockSequence, "writeBlockSequence"); -function writeFlowMapping(state3, level, object) { - var _result = "", _tag = state3.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 (state3.condenseFlow) pairBuffer += '"'; - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level, objectKey, false, false)) { - continue; - } - if (state3.dump.length > 1024) pairBuffer += "? "; - pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); - if (!writeNode(state3, level, objectValue, false, false)) { - continue; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = "{" + _result + "}"; -} -__name(writeFlowMapping, "writeFlowMapping"); -function writeBlockMapping(state3, level, object, compact) { - var _result = "", _tag = state3.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, - pairBuffer; - if (state3.sortKeys === true) { - objectKeyList.sort(); - } else if (typeof state3.sortKeys === "function") { - objectKeyList.sort(state3.sortKeys); - } else if (state3.sortKeys) { - throw new exception("sortKeys must be a boolean or a function"); - } - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ""; - if (!compact || _result !== "") { - pairBuffer += generateNextLine(state3, level); - } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (state3.replacer) { - objectValue = state3.replacer.call(object, objectKey, objectValue); - } - if (!writeNode(state3, level + 1, objectKey, true, true, true)) { - continue; + __name(escapeString, "escapeString"); + function writeFlowSequence(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level, value, false, false) || typeof value === "undefined" && writeNode(state3, level, null, + false, false)) { + if (_result !== "") _result += "," + (!state3.condenseFlow ? " " : ""); + _result += state3.dump; + } } - explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; - if (explicitPair) { - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += "?"; - } else { - pairBuffer += "? "; + state3.tag = _tag; + state3.dump = "[" + _result + "]"; + } + __name(writeFlowSequence, "writeFlowSequence"); + function writeBlockSequence(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state3.replacer) value = state3.replacer.call(object, String(index), value); + if (writeNode(state3, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state3, + level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") _result += generateNextLine(state3, level); + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state3.dump; } } - pairBuffer += state3.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state3, level); + state3.tag = _tag; + state3.dump = _result || "[]"; + } + __name(writeBlockSequence, "writeBlockSequence"); + function writeFlowMapping(state3, level, object) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state3.condenseFlow) pairBuffer += '"'; + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level, objectKey, false, false)) continue; + if (state3.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state3.dump + (state3.condenseFlow ? '"' : "") + ":" + (state3.condenseFlow ? "" : " "); + if (!writeNode(state3, level, objectValue, false, false)) continue; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) { - continue; + state3.tag = _tag; + state3.dump = "{" + _result + "}"; + } + __name(writeFlowMapping, "writeFlowMapping"); + function writeBlockMapping(state3, level, object, compact) { + let _result = ""; + const _tag = state3.tag; + const objectKeyList = Object.keys(object); + if (state3.sortKeys === true) objectKeyList.sort(); + else if (typeof state3.sortKeys === "function") objectKeyList.sort(state3.sortKeys); + else if (state3.sortKeys) throw new YAMLException2("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state3, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state3.replacer) objectValue = state3.replacer.call(object, objectKey, objectValue); + if (!writeNode(state3, level + 1, objectKey, true, true, true)) continue; + const explicitPair = state3.tag !== null && state3.tag !== "?" || state3.dump && state3.dump.length > 1024; + if (explicitPair) if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state3.dump; + if (explicitPair) pairBuffer += generateNextLine(state3, level); + if (!writeNode(state3, level + 1, objectValue, true, explicitPair)) continue; + if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state3.dump; + _result += pairBuffer; } - if (state3.dump && CHAR_LINE_FEED === state3.dump.charCodeAt(0)) { - pairBuffer += ":"; - } else { - pairBuffer += ": "; - } - pairBuffer += state3.dump; - _result += pairBuffer; - } - state3.tag = _tag; - state3.dump = _result || "{}"; -} -__name(writeBlockMapping, "writeBlockMapping"); -function detectType(state3, object, explicit) { - var _result, typeList, index, length, type2, style; - typeList = explicit ? state3.explicitTypes : state3.implicitTypes; - for (index = 0, length = typeList.length; index < length; index += 1) { - type2 = typeList[index]; - if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2. - instanceOf) && (!type2.predicate || type2.predicate(object))) { - if (explicit) { - if (type2.multi && type2.representName) { - state3.tag = type2.representName(object); - } else { - state3.tag = type2.tag; - } - } else { - state3.tag = "?"; - } - if (type2.represent) { - style = state3.styleMap[type2.tag] || type2.defaultStyle; - if (_toString.call(type2.represent) === "[object Function]") { - _result = type2.represent(object, style); - } else if (_hasOwnProperty.call(type2.represent, style)) { - _result = type2.represent[style](object, style); - } else { - throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); + state3.tag = _tag; + state3.dump = _result || "{}"; + } + __name(writeBlockMapping, "writeBlockMapping"); + function detectType(state3, object, explicit) { + const typeList = explicit ? state3.explicitTypes : state3.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const 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) state3.tag = type.representName(object); + else state3.tag = type.tag; + else state3.tag = "?"; + if (type.represent) { + const style = state3.styleMap[type.tag] || type.defaultStyle; + let _result; + 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 YAMLException2("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + state3.dump = _result; } - state3.dump = _result; + return true; } - return true; } + return false; } - return false; -} -__name(detectType, "detectType"); -function writeNode(state3, level, object, block, compact, iskey, isblockseq) { - state3.tag = null; - state3.dump = object; - if (!detectType(state3, object, false)) { - detectType(state3, object, true); - } - var type2 = _toString.call(state3.dump); - var inblock = block; - var tagStr; - if (block) { - block = state3.flowLevel < 0 || state3.flowLevel > level; - } - var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate; - if (objectOrArray) { - duplicateIndex = state3.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) { - compact = false; - } - if (duplicate && state3.usedDuplicates[duplicateIndex]) { - state3.dump = "*ref_" + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) { - state3.usedDuplicates[duplicateIndex] = true; - } - if (type2 === "[object Object]") { - if (block && Object.keys(state3.dump).length !== 0) { + __name(detectType, "detectType"); + function writeNode(state3, level, object, block, compact, iskey, isblockseq) { + state3.tag = null; + state3.dump = object; + if (!detectType(state3, object, false)) detectType(state3, object, true); + const type = _toString.call(state3.dump); + const inblock = block; + if (block) block = state3.flowLevel < 0 || state3.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let duplicate; + if (objectOrArray) { + duplicateIndex = state3.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state3.tag !== null && state3.tag !== "?" || duplicate || state3.indent !== 2 && level > 0) compact = false; + if (duplicate && state3.usedDuplicates[duplicateIndex]) state3.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state3.usedDuplicates[duplicateIndex]) state3.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state3.dump).length !== 0) { writeBlockMapping(state3, level, state3.dump, compact); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowMapping(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object Array]") { - if (block && state3.dump.length !== 0) { - if (state3.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state3, level - 1, state3.dump, compact); - } else { - writeBlockSequence(state3, level, state3.dump, compact); - } - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + state3.dump; - } + else if (type === "[object Array]") if (block && state3.dump.length !== 0) { + if (state3.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state3, level - 1, state3.dump, compact); + else writeBlockSequence(state3, level, state3.dump, compact); + if (duplicate) state3.dump = "&ref_" + duplicateIndex + state3.dump; } else { writeFlowSequence(state3, level, state3.dump); - if (duplicate) { - state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; - } + if (duplicate) state3.dump = "&ref_" + duplicateIndex + " " + state3.dump; } - } else if (type2 === "[object String]") { - if (state3.tag !== "?") { - writeScalar(state3, state3.dump, level, iskey, inblock); + else if (type === "[object String]") { + if (state3.tag !== "?") writeScalar(state3, state3.dump, level, iskey, inblock); + } else if (type === "[object Undefined]") return false; + else { + if (state3.skipInvalid) return false; + throw new YAMLException2("unacceptable kind of an object to dump " + type); } - } else if (type2 === "[object Undefined]") { - return false; - } else { - if (state3.skipInvalid) return false; - throw new exception("unacceptable kind of an object to dump " + type2); - } - if (state3.tag !== null && state3.tag !== "?") { - tagStr = encodeURI( - state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag - ).replace(/!/g, "%21"); - if (state3.tag[0] === "!") { - tagStr = "!" + tagStr; - } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { - tagStr = "!!" + tagStr.slice(18); - } else { - tagStr = "!<" + tagStr + ">"; + if (state3.tag !== null && state3.tag !== "?") { + let tagStr = encodeURI(state3.tag[0] === "!" ? state3.tag.slice(1) : state3.tag).replace(/!/g, "%21"); + if (state3.tag[0] === "!") tagStr = "!" + tagStr; + else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18); + else tagStr = "!<" + tagStr + ">"; + state3.dump = tagStr + " " + state3.dump; } - state3.dump = tagStr + " " + state3.dump; } + return true; } - return true; -} -__name(writeNode, "writeNode"); -function getDuplicateReferences(object, state3) { - var objects = [], duplicatesIndexes = [], index, length; - inspectNode(object, objects, duplicatesIndexes); - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state3.duplicates.push(objects[duplicatesIndexes[index]]); - } - state3.usedDuplicates = new Array(length); -} -__name(getDuplicateReferences, "getDuplicateReferences"); -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); - } + __name(writeNode, "writeNode"); + function getDuplicateReferences(object, state3) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state3.duplicates.push(objects[duplicatesIndexes[index]]); + state3.usedDuplicates = new Array(length); + } + __name(getDuplicateReferences, "getDuplicateReferences"); + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); } else { - objectKeyList = Object.keys(object); - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + objects.push(object); + if (Array.isArray(object)) for (let i2 = 0, length = object.length; i2 < length; i2 += 1) inspectNode(object[i2], + objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) inspectNode(object[objectKeyList[i2]], objects, + duplicatesIndexes); } } } } -} -__name(inspectNode, "inspectNode"); -function dump$1(input, options) { - options = options || {}; - var state3 = new State(options); - if (!state3.noRefs) getDuplicateReferences(input, state3); - var value = input; - if (state3.replacer) { - value = state3.replacer.call({ "": value }, "", value); + __name(inspectNode, "inspectNode"); + function dump2(input, options) { + options = options || {}; + const state3 = new State(options); + if (!state3.noRefs) getDuplicateReferences(input, state3); + let value = input; + if (state3.replacer) value = state3.replacer.call({ "": value }, "", value); + if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; + return ""; } - if (writeNode(state3, 0, value, true, true)) return state3.dump + "\n"; - return ""; -} -__name(dump$1, "dump$1"); -var dump_1 = dump$1; -var dumper = { - dump: dump_1 -}; -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."); + __name(dump2, "dump"); + module2.exports.dump = dump2; +})); +var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin(((exports2, module2) => { + var loader = 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 saf\ +e by default."); + }; + } + __name(renamed, "renamed"); + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema4(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.dump = dumper.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.types = { + binary: require_binary2(), + float: require_float3(), + map: require_map2(), + null: require_null2(), + pairs: require_pairs2(), + set: require_set2(), + timestamp: require_timestamp2(), + bool: require_bool3(), + int: require_int3(), + merge: require_merge3(), + omap: require_omap2(), + seq: require_seq2(), + str: require_str() }; -} -__name(renamed, "renamed"); -var Type = type; -var Schema = schema; -var FAILSAFE_SCHEMA = failsafe; -var JSON_SCHEMA = json; -var CORE_SCHEMA = core; -var DEFAULT_SCHEMA = _default; -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var YAMLException = exception; -var types = { - binary, - float, - map, - null: _null, - pairs, - set, - timestamp, - bool, - int, - merge: merge2, - omap, - seq, - str -}; -var safeLoad = renamed("safeLoad", "load"); -var safeLoadAll = renamed("safeLoadAll", "loadAll"); -var safeDump = renamed("safeDump", "dump"); -var jsYaml = { - Type, - Schema, - FAILSAFE_SCHEMA, - JSON_SCHEMA, - CORE_SCHEMA, - DEFAULT_SCHEMA, - load, - loadAll, - dump, - YAMLException, - types, - safeLoad, - safeLoadAll, - safeDump -}; + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); +})))(), 1); +var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, +safeLoad, safeLoadAll, safeDump } = import_js_yaml.default; +var index_vite_proxy_tmp_default = import_js_yaml.default; // external-events/src/utils/load-sync-definitions.js function loadDefinition(path17) { info(`Loading ${path17} config file`); - return jsYaml.load((0, import_fs3.readFileSync)(path17, "utf-8"), { filename: path17 }); + return index_vite_proxy_tmp_default.load((0, import_fs3.readFileSync)(path17, "utf-8"), { filename: path17 }); } __name(loadDefinition, "loadDefinition"); function validateSystemPrefixUnique(defs) { @@ -119154,7 +118934,7 @@ __name(loadDefinitions, "loadDefinitions"); // external-events/src/validate/validate-exe-config.js var import_joi = __toESM(require_lib5(), 1); -var schema2 = import_joi.default.object({ +var schema = import_joi.default.object({ version: import_joi.default.number().equal(1), "system-prefix": import_joi.default.string().regex(/^[a-z0-9]{3}$/).required(), "event-sources": import_joi.default.array().items( @@ -119198,7 +118978,7 @@ var schema2 = import_joi.default.object({ ).required() }); function validateExeConfig(data) { - const { error: error2 } = schema2.validate(data, { abortEarly: false }); + const { error: error2 } = schema.validate(data, { abortEarly: false }); if (!error2) { return []; } @@ -119328,5 +119108,5 @@ run-parallel/index.js: (*! run-parallel. MIT License. Feross Aboukhadijeh *) js-yaml/dist/js-yaml.mjs: - (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + (*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT *) */