@redocly/cli 2.35.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +8 -9
- package/lib/chunks/{2ACFK2AA.js → 35B2IXV3.js} +1 -1
- package/lib/chunks/{JL6XAXTH.js → 4QGHXAYN.js} +2 -2
- package/lib/chunks/{HYYETV7F.js → 7PWB3SB5.js} +1 -1
- package/lib/chunks/{FLGNQ4P2.js → FMJFZCNQ.js} +430 -298
- package/lib/chunks/{YMIVTRT4.js → K6PX5SU7.js} +7 -5
- package/lib/chunks/{O5NRRTPS.js → R5E5LXAJ.js} +1 -1
- package/lib/chunks/{JT6WVBVX.js → SBGJND3Q.js} +4 -4
- package/lib/chunks/{ZH7E3R54.js → SHVJYD75.js} +1 -1
- package/lib/chunks/{ZKG4D7JN.js → UVIPIXTL.js} +71 -71
- package/lib/chunks/{TGF4B4QI.js → XTSKVMID.js} +676 -394
- package/lib/index.js +83 -19
- package/package.json +1 -1
|
@@ -4,13 +4,14 @@ import {
|
|
|
4
4
|
exitWithError,
|
|
5
5
|
getExecutionTime,
|
|
6
6
|
getFallbackApisOrExit
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./R5E5LXAJ.js";
|
|
8
8
|
import {
|
|
9
9
|
require_dist
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./SHVJYD75.js";
|
|
11
11
|
import {
|
|
12
|
+
redocStandaloneSri,
|
|
12
13
|
redocVersion
|
|
13
|
-
} from "./
|
|
14
|
+
} from "./K6PX5SU7.js";
|
|
14
15
|
import {
|
|
15
16
|
require_json_pointer,
|
|
16
17
|
require_openapi_sampler
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
require_fast_deep_equal,
|
|
22
23
|
require_json_schema_traverse,
|
|
23
24
|
require_pluralize
|
|
24
|
-
} from "./
|
|
25
|
+
} from "./UVIPIXTL.js";
|
|
25
26
|
import {
|
|
26
27
|
__commonJS,
|
|
27
28
|
__esm,
|
|
@@ -2957,6 +2958,8 @@ var require_Alias = __commonJS({
|
|
|
2957
2958
|
* instance of the `source` anchor before this node.
|
|
2958
2959
|
*/
|
|
2959
2960
|
resolve(doc, ctx) {
|
|
2961
|
+
if (ctx?.maxAliasCount === 0)
|
|
2962
|
+
throw new ReferenceError("Alias resolution is disabled");
|
|
2960
2963
|
let nodes;
|
|
2961
2964
|
if (ctx?.aliasResolveCache) {
|
|
2962
2965
|
nodes = ctx.aliasResolveCache;
|
|
@@ -4029,18 +4032,18 @@ var require_merge = __commonJS({
|
|
|
4029
4032
|
};
|
|
4030
4033
|
var isMergeKey = (ctx, key2) => (merge.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
4031
4034
|
function addMergeToJSMap(ctx, map, value) {
|
|
4032
|
-
|
|
4033
|
-
if (identity.isSeq(
|
|
4034
|
-
for (const it of
|
|
4035
|
+
const source = resolveAliasValue(ctx, value);
|
|
4036
|
+
if (identity.isSeq(source))
|
|
4037
|
+
for (const it of source.items)
|
|
4035
4038
|
mergeValue(ctx, map, it);
|
|
4036
|
-
else if (Array.isArray(
|
|
4037
|
-
for (const it of
|
|
4039
|
+
else if (Array.isArray(source))
|
|
4040
|
+
for (const it of source)
|
|
4038
4041
|
mergeValue(ctx, map, it);
|
|
4039
4042
|
else
|
|
4040
|
-
mergeValue(ctx, map,
|
|
4043
|
+
mergeValue(ctx, map, source);
|
|
4041
4044
|
}
|
|
4042
4045
|
function mergeValue(ctx, map, value) {
|
|
4043
|
-
const source = ctx
|
|
4046
|
+
const source = resolveAliasValue(ctx, value);
|
|
4044
4047
|
if (!identity.isMap(source))
|
|
4045
4048
|
throw new Error("Merge sources must be maps or map aliases");
|
|
4046
4049
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -4061,6 +4064,9 @@ var require_merge = __commonJS({
|
|
|
4061
4064
|
}
|
|
4062
4065
|
return map;
|
|
4063
4066
|
}
|
|
4067
|
+
function resolveAliasValue(ctx, value) {
|
|
4068
|
+
return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
4069
|
+
}
|
|
4064
4070
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
4065
4071
|
exports.isMergeKey = isMergeKey;
|
|
4066
4072
|
exports.merge = merge;
|
|
@@ -4698,7 +4704,7 @@ var require_stringifyNumber = __commonJS({
|
|
|
4698
4704
|
if (!isFinite(num))
|
|
4699
4705
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
4700
4706
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
4701
|
-
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") &&
|
|
4707
|
+
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
4702
4708
|
let i = n.indexOf(".");
|
|
4703
4709
|
if (i < 0) {
|
|
4704
4710
|
i = n.length;
|
|
@@ -7070,7 +7076,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
7070
7076
|
while (next === " " || next === " ")
|
|
7071
7077
|
next = source[++i + 1];
|
|
7072
7078
|
} else if (next === "x" || next === "u" || next === "U") {
|
|
7073
|
-
const length =
|
|
7079
|
+
const length = next === "x" ? 2 : next === "u" ? 4 : 8;
|
|
7074
7080
|
res += parseCharCode(source, i + 1, length, onError);
|
|
7075
7081
|
i += length;
|
|
7076
7082
|
} else {
|
|
@@ -7145,12 +7151,13 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
7145
7151
|
const cc = source.substr(offset, length);
|
|
7146
7152
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
7147
7153
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
7148
|
-
|
|
7154
|
+
try {
|
|
7155
|
+
return String.fromCodePoint(code);
|
|
7156
|
+
} catch {
|
|
7149
7157
|
const raw = source.substr(offset - 2, length + 2);
|
|
7150
7158
|
onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
|
|
7151
7159
|
return raw;
|
|
7152
7160
|
}
|
|
7153
|
-
return String.fromCodePoint(code);
|
|
7154
7161
|
}
|
|
7155
7162
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
7156
7163
|
}
|
|
@@ -7500,8 +7507,10 @@ ${cb}` : comment;
|
|
|
7500
7507
|
}
|
|
7501
7508
|
}
|
|
7502
7509
|
if (afterDoc) {
|
|
7503
|
-
|
|
7504
|
-
|
|
7510
|
+
for (let i = 0; i < this.errors.length; ++i)
|
|
7511
|
+
doc.errors.push(this.errors[i]);
|
|
7512
|
+
for (let i = 0; i < this.warnings.length; ++i)
|
|
7513
|
+
doc.warnings.push(this.warnings[i]);
|
|
7505
7514
|
} else {
|
|
7506
7515
|
doc.errors = this.errors;
|
|
7507
7516
|
doc.warnings = this.warnings;
|
|
@@ -8234,7 +8243,7 @@ var require_lexer = __commonJS({
|
|
|
8234
8243
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
8235
8244
|
this.indentNext = this.indentValue + 1;
|
|
8236
8245
|
this.indentValue += n;
|
|
8237
|
-
return
|
|
8246
|
+
return "block-start";
|
|
8238
8247
|
}
|
|
8239
8248
|
return "doc";
|
|
8240
8249
|
}
|
|
@@ -8533,28 +8542,38 @@ var require_lexer = __commonJS({
|
|
|
8533
8542
|
return 0;
|
|
8534
8543
|
}
|
|
8535
8544
|
*pushIndicators() {
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8545
|
+
let n = 0;
|
|
8546
|
+
loop: while (true) {
|
|
8547
|
+
switch (this.charAt(0)) {
|
|
8548
|
+
case "!":
|
|
8549
|
+
n += yield* this.pushTag();
|
|
8550
|
+
n += yield* this.pushSpaces(true);
|
|
8551
|
+
continue loop;
|
|
8552
|
+
case "&":
|
|
8553
|
+
n += yield* this.pushUntil(isNotAnchorChar);
|
|
8554
|
+
n += yield* this.pushSpaces(true);
|
|
8555
|
+
continue loop;
|
|
8556
|
+
case "-":
|
|
8557
|
+
// this is an error
|
|
8558
|
+
case "?":
|
|
8559
|
+
// this is an error outside flow collections
|
|
8560
|
+
case ":": {
|
|
8561
|
+
const inFlow = this.flowLevel > 0;
|
|
8562
|
+
const ch1 = this.charAt(1);
|
|
8563
|
+
if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
|
|
8564
|
+
if (!inFlow)
|
|
8565
|
+
this.indentNext = this.indentValue + 1;
|
|
8566
|
+
else if (this.flowKey)
|
|
8567
|
+
this.flowKey = false;
|
|
8568
|
+
n += yield* this.pushCount(1);
|
|
8569
|
+
n += yield* this.pushSpaces(true);
|
|
8570
|
+
continue loop;
|
|
8571
|
+
}
|
|
8554
8572
|
}
|
|
8555
8573
|
}
|
|
8574
|
+
break loop;
|
|
8556
8575
|
}
|
|
8557
|
-
return
|
|
8576
|
+
return n;
|
|
8558
8577
|
}
|
|
8559
8578
|
*pushTag() {
|
|
8560
8579
|
if (this.charAt(1) === "<") {
|
|
@@ -8713,6 +8732,13 @@ var require_parser = __commonJS({
|
|
|
8713
8732
|
}
|
|
8714
8733
|
return prev.splice(i, prev.length);
|
|
8715
8734
|
}
|
|
8735
|
+
function arrayPushArray(target, source) {
|
|
8736
|
+
if (source.length < 1e5)
|
|
8737
|
+
Array.prototype.push.apply(target, source);
|
|
8738
|
+
else
|
|
8739
|
+
for (let i = 0; i < source.length; ++i)
|
|
8740
|
+
target.push(source[i]);
|
|
8741
|
+
}
|
|
8716
8742
|
function fixFlowSeqItems(fc) {
|
|
8717
8743
|
if (fc.start.type === "flow-seq-start") {
|
|
8718
8744
|
for (const it of fc.items) {
|
|
@@ -8722,11 +8748,11 @@ var require_parser = __commonJS({
|
|
|
8722
8748
|
delete it.key;
|
|
8723
8749
|
if (isFlowToken(it.value)) {
|
|
8724
8750
|
if (it.value.end)
|
|
8725
|
-
|
|
8751
|
+
arrayPushArray(it.value.end, it.sep);
|
|
8726
8752
|
else
|
|
8727
8753
|
it.value.end = it.sep;
|
|
8728
8754
|
} else
|
|
8729
|
-
|
|
8755
|
+
arrayPushArray(it.start, it.sep);
|
|
8730
8756
|
delete it.sep;
|
|
8731
8757
|
}
|
|
8732
8758
|
}
|
|
@@ -9081,7 +9107,7 @@ var require_parser = __commonJS({
|
|
|
9081
9107
|
const prev = map.items[map.items.length - 2];
|
|
9082
9108
|
const end = prev?.value?.end;
|
|
9083
9109
|
if (Array.isArray(end)) {
|
|
9084
|
-
|
|
9110
|
+
arrayPushArray(end, it.start);
|
|
9085
9111
|
end.push(this.sourceToken);
|
|
9086
9112
|
map.items.pop();
|
|
9087
9113
|
return;
|
|
@@ -9269,7 +9295,7 @@ var require_parser = __commonJS({
|
|
|
9269
9295
|
const prev = seq.items[seq.items.length - 2];
|
|
9270
9296
|
const end = prev?.value?.end;
|
|
9271
9297
|
if (Array.isArray(end)) {
|
|
9272
|
-
|
|
9298
|
+
arrayPushArray(end, it.start);
|
|
9273
9299
|
end.push(this.sourceToken);
|
|
9274
9300
|
seq.items.pop();
|
|
9275
9301
|
return;
|
|
@@ -23907,19 +23933,18 @@ var require_common = __commonJS({
|
|
|
23907
23933
|
return [sequence];
|
|
23908
23934
|
}
|
|
23909
23935
|
function extend(target, source) {
|
|
23910
|
-
var index, length, key2, sourceKeys;
|
|
23911
23936
|
if (source) {
|
|
23912
|
-
sourceKeys = Object.keys(source);
|
|
23913
|
-
for (index = 0, length = sourceKeys.length; index < length; index += 1) {
|
|
23914
|
-
key2 = sourceKeys[index];
|
|
23937
|
+
const sourceKeys = Object.keys(source);
|
|
23938
|
+
for (let index = 0, length = sourceKeys.length; index < length; index += 1) {
|
|
23939
|
+
const key2 = sourceKeys[index];
|
|
23915
23940
|
target[key2] = source[key2];
|
|
23916
23941
|
}
|
|
23917
23942
|
}
|
|
23918
23943
|
return target;
|
|
23919
23944
|
}
|
|
23920
23945
|
function repeat(string, count) {
|
|
23921
|
-
|
|
23922
|
-
for (cycle = 0; cycle < count; cycle += 1) {
|
|
23946
|
+
let result = "";
|
|
23947
|
+
for (let cycle = 0; cycle < count; cycle += 1) {
|
|
23923
23948
|
result += string;
|
|
23924
23949
|
}
|
|
23925
23950
|
return result;
|
|
@@ -23941,7 +23966,8 @@ var require_exception = __commonJS({
|
|
|
23941
23966
|
"../../node_modules/js-yaml/lib/exception.js"(exports, module) {
|
|
23942
23967
|
"use strict";
|
|
23943
23968
|
function formatError(exception, compact) {
|
|
23944
|
-
|
|
23969
|
+
let where = "";
|
|
23970
|
+
const message = exception.reason || "(unknown reason)";
|
|
23945
23971
|
if (!exception.mark) return message;
|
|
23946
23972
|
if (exception.mark.name) {
|
|
23947
23973
|
where += 'in "' + exception.mark.name + '" ';
|
|
@@ -23979,9 +24005,9 @@ var require_snippet = __commonJS({
|
|
|
23979
24005
|
"use strict";
|
|
23980
24006
|
var common = require_common();
|
|
23981
24007
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
24008
|
+
let head = "";
|
|
24009
|
+
let tail = "";
|
|
24010
|
+
const maxHalfLength = Math.floor(maxLineLength / 2) - 1;
|
|
23985
24011
|
if (position - lineStart > maxHalfLength) {
|
|
23986
24012
|
head = " ... ";
|
|
23987
24013
|
lineStart = position - maxHalfLength + head.length;
|
|
@@ -24006,11 +24032,11 @@ var require_snippet = __commonJS({
|
|
|
24006
24032
|
if (typeof options.indent !== "number") options.indent = 1;
|
|
24007
24033
|
if (typeof options.linesBefore !== "number") options.linesBefore = 3;
|
|
24008
24034
|
if (typeof options.linesAfter !== "number") options.linesAfter = 2;
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24035
|
+
const re = /\r?\n|\r|\0/g;
|
|
24036
|
+
const lineStarts = [0];
|
|
24037
|
+
const lineEnds = [];
|
|
24038
|
+
let match;
|
|
24039
|
+
let foundLineNo = -1;
|
|
24014
24040
|
while (match = re.exec(mark.buffer)) {
|
|
24015
24041
|
lineEnds.push(match.index);
|
|
24016
24042
|
lineStarts.push(match.index + match[0].length);
|
|
@@ -24019,33 +24045,33 @@ var require_snippet = __commonJS({
|
|
|
24019
24045
|
}
|
|
24020
24046
|
}
|
|
24021
24047
|
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
for (i = 1; i <= options.linesBefore; i++) {
|
|
24048
|
+
let result = "";
|
|
24049
|
+
const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
|
|
24050
|
+
const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
|
|
24051
|
+
for (let i = 1; i <= options.linesBefore; i++) {
|
|
24026
24052
|
if (foundLineNo - i < 0) break;
|
|
24027
|
-
|
|
24053
|
+
const line2 = getLine(
|
|
24028
24054
|
mark.buffer,
|
|
24029
24055
|
lineStarts[foundLineNo - i],
|
|
24030
24056
|
lineEnds[foundLineNo - i],
|
|
24031
24057
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
|
|
24032
24058
|
maxLineLength
|
|
24033
24059
|
);
|
|
24034
|
-
result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " +
|
|
24060
|
+
result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result;
|
|
24035
24061
|
}
|
|
24036
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
24062
|
+
const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
24037
24063
|
result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
|
|
24038
24064
|
result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
|
|
24039
|
-
for (i = 1; i <= options.linesAfter; i++) {
|
|
24065
|
+
for (let i = 1; i <= options.linesAfter; i++) {
|
|
24040
24066
|
if (foundLineNo + i >= lineEnds.length) break;
|
|
24041
|
-
|
|
24067
|
+
const line2 = getLine(
|
|
24042
24068
|
mark.buffer,
|
|
24043
24069
|
lineStarts[foundLineNo + i],
|
|
24044
24070
|
lineEnds[foundLineNo + i],
|
|
24045
24071
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
|
|
24046
24072
|
maxLineLength
|
|
24047
24073
|
);
|
|
24048
|
-
result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " +
|
|
24074
|
+
result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
|
|
24049
24075
|
}
|
|
24050
24076
|
return result.replace(/\n$/, "");
|
|
24051
24077
|
}
|
|
@@ -24076,7 +24102,7 @@ var require_type = __commonJS({
|
|
|
24076
24102
|
"mapping"
|
|
24077
24103
|
];
|
|
24078
24104
|
function compileStyleAliases(map) {
|
|
24079
|
-
|
|
24105
|
+
const result = {};
|
|
24080
24106
|
if (map !== null) {
|
|
24081
24107
|
Object.keys(map).forEach(function(style) {
|
|
24082
24108
|
map[style].forEach(function(alias) {
|
|
@@ -24124,9 +24150,9 @@ var require_schema4 = __commonJS({
|
|
|
24124
24150
|
var YAMLException = require_exception();
|
|
24125
24151
|
var Type = require_type();
|
|
24126
24152
|
function compileList(schema, name) {
|
|
24127
|
-
|
|
24153
|
+
const result = [];
|
|
24128
24154
|
schema[name].forEach(function(currentType) {
|
|
24129
|
-
|
|
24155
|
+
let newIndex = result.length;
|
|
24130
24156
|
result.forEach(function(previousType, previousIndex) {
|
|
24131
24157
|
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
|
|
24132
24158
|
newIndex = previousIndex;
|
|
@@ -24137,7 +24163,7 @@ var require_schema4 = __commonJS({
|
|
|
24137
24163
|
return result;
|
|
24138
24164
|
}
|
|
24139
24165
|
function compileMap() {
|
|
24140
|
-
|
|
24166
|
+
const result = {
|
|
24141
24167
|
scalar: {},
|
|
24142
24168
|
sequence: {},
|
|
24143
24169
|
mapping: {},
|
|
@@ -24148,7 +24174,7 @@ var require_schema4 = __commonJS({
|
|
|
24148
24174
|
mapping: [],
|
|
24149
24175
|
fallback: []
|
|
24150
24176
|
}
|
|
24151
|
-
}
|
|
24177
|
+
};
|
|
24152
24178
|
function collectType(type) {
|
|
24153
24179
|
if (type.multi) {
|
|
24154
24180
|
result.multi[type.kind].push(type);
|
|
@@ -24157,7 +24183,7 @@ var require_schema4 = __commonJS({
|
|
|
24157
24183
|
result[type.kind][type.tag] = result["fallback"][type.tag] = type;
|
|
24158
24184
|
}
|
|
24159
24185
|
}
|
|
24160
|
-
for (index = 0, length = arguments.length; index < length; index += 1) {
|
|
24186
|
+
for (let index = 0, length = arguments.length; index < length; index += 1) {
|
|
24161
24187
|
arguments[index].forEach(collectType);
|
|
24162
24188
|
}
|
|
24163
24189
|
return result;
|
|
@@ -24166,8 +24192,8 @@ var require_schema4 = __commonJS({
|
|
|
24166
24192
|
return this.extend(definition);
|
|
24167
24193
|
}
|
|
24168
24194
|
Schema.prototype.extend = function extend(definition) {
|
|
24169
|
-
|
|
24170
|
-
|
|
24195
|
+
let implicit = [];
|
|
24196
|
+
let explicit = [];
|
|
24171
24197
|
if (definition instanceof Type) {
|
|
24172
24198
|
explicit.push(definition);
|
|
24173
24199
|
} else if (Array.isArray(definition)) {
|
|
@@ -24194,7 +24220,7 @@ var require_schema4 = __commonJS({
|
|
|
24194
24220
|
throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
24195
24221
|
}
|
|
24196
24222
|
});
|
|
24197
|
-
|
|
24223
|
+
const result = Object.create(Schema.prototype);
|
|
24198
24224
|
result.implicit = (this.implicit || []).concat(implicit);
|
|
24199
24225
|
result.explicit = (this.explicit || []).concat(explicit);
|
|
24200
24226
|
result.compiledImplicit = compileList(result, "implicit");
|
|
@@ -24270,7 +24296,7 @@ var require_null2 = __commonJS({
|
|
|
24270
24296
|
var Type = require_type();
|
|
24271
24297
|
function resolveYamlNull(data) {
|
|
24272
24298
|
if (data === null) return true;
|
|
24273
|
-
|
|
24299
|
+
const max = data.length;
|
|
24274
24300
|
return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
|
|
24275
24301
|
}
|
|
24276
24302
|
function constructYamlNull() {
|
|
@@ -24313,7 +24339,7 @@ var require_bool3 = __commonJS({
|
|
|
24313
24339
|
var Type = require_type();
|
|
24314
24340
|
function resolveYamlBoolean(data) {
|
|
24315
24341
|
if (data === null) return false;
|
|
24316
|
-
|
|
24342
|
+
const max = data.length;
|
|
24317
24343
|
return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
|
|
24318
24344
|
}
|
|
24319
24345
|
function constructYamlBoolean(data) {
|
|
@@ -24350,19 +24376,21 @@ var require_int3 = __commonJS({
|
|
|
24350
24376
|
var common = require_common();
|
|
24351
24377
|
var Type = require_type();
|
|
24352
24378
|
function isHexCode(c) {
|
|
24353
|
-
return
|
|
24379
|
+
return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102;
|
|
24354
24380
|
}
|
|
24355
24381
|
function isOctCode(c) {
|
|
24356
|
-
return
|
|
24382
|
+
return c >= 48 && c <= 55;
|
|
24357
24383
|
}
|
|
24358
24384
|
function isDecCode(c) {
|
|
24359
|
-
return
|
|
24385
|
+
return c >= 48 && c <= 57;
|
|
24360
24386
|
}
|
|
24361
24387
|
function resolveYamlInteger(data) {
|
|
24362
24388
|
if (data === null) return false;
|
|
24363
|
-
|
|
24389
|
+
const max = data.length;
|
|
24390
|
+
let index = 0;
|
|
24391
|
+
let hasDigits = false;
|
|
24364
24392
|
if (!max) return false;
|
|
24365
|
-
ch = data[index];
|
|
24393
|
+
let ch = data[index];
|
|
24366
24394
|
if (ch === "-" || ch === "+") {
|
|
24367
24395
|
ch = data[++index];
|
|
24368
24396
|
}
|
|
@@ -24373,51 +24401,41 @@ var require_int3 = __commonJS({
|
|
|
24373
24401
|
index++;
|
|
24374
24402
|
for (; index < max; index++) {
|
|
24375
24403
|
ch = data[index];
|
|
24376
|
-
if (ch === "_") continue;
|
|
24377
24404
|
if (ch !== "0" && ch !== "1") return false;
|
|
24378
24405
|
hasDigits = true;
|
|
24379
24406
|
}
|
|
24380
|
-
return hasDigits &&
|
|
24407
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
24381
24408
|
}
|
|
24382
24409
|
if (ch === "x") {
|
|
24383
24410
|
index++;
|
|
24384
24411
|
for (; index < max; index++) {
|
|
24385
|
-
ch = data[index];
|
|
24386
|
-
if (ch === "_") continue;
|
|
24387
24412
|
if (!isHexCode(data.charCodeAt(index))) return false;
|
|
24388
24413
|
hasDigits = true;
|
|
24389
24414
|
}
|
|
24390
|
-
return hasDigits &&
|
|
24415
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
24391
24416
|
}
|
|
24392
24417
|
if (ch === "o") {
|
|
24393
24418
|
index++;
|
|
24394
24419
|
for (; index < max; index++) {
|
|
24395
|
-
ch = data[index];
|
|
24396
|
-
if (ch === "_") continue;
|
|
24397
24420
|
if (!isOctCode(data.charCodeAt(index))) return false;
|
|
24398
24421
|
hasDigits = true;
|
|
24399
24422
|
}
|
|
24400
|
-
return hasDigits &&
|
|
24423
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
24401
24424
|
}
|
|
24402
24425
|
}
|
|
24403
|
-
if (ch === "_") return false;
|
|
24404
24426
|
for (; index < max; index++) {
|
|
24405
|
-
ch = data[index];
|
|
24406
|
-
if (ch === "_") continue;
|
|
24407
24427
|
if (!isDecCode(data.charCodeAt(index))) {
|
|
24408
24428
|
return false;
|
|
24409
24429
|
}
|
|
24410
24430
|
hasDigits = true;
|
|
24411
24431
|
}
|
|
24412
|
-
if (!hasDigits
|
|
24413
|
-
return
|
|
24432
|
+
if (!hasDigits) return false;
|
|
24433
|
+
return Number.isFinite(parseYamlInteger(data));
|
|
24414
24434
|
}
|
|
24415
|
-
function
|
|
24416
|
-
|
|
24417
|
-
|
|
24418
|
-
|
|
24419
|
-
}
|
|
24420
|
-
ch = value[0];
|
|
24435
|
+
function parseYamlInteger(data) {
|
|
24436
|
+
let value = data;
|
|
24437
|
+
let sign = 1;
|
|
24438
|
+
let ch = value[0];
|
|
24421
24439
|
if (ch === "-" || ch === "+") {
|
|
24422
24440
|
if (ch === "-") sign = -1;
|
|
24423
24441
|
value = value.slice(1);
|
|
@@ -24431,6 +24449,9 @@ var require_int3 = __commonJS({
|
|
|
24431
24449
|
}
|
|
24432
24450
|
return sign * parseInt(value, 10);
|
|
24433
24451
|
}
|
|
24452
|
+
function constructYamlInteger(data) {
|
|
24453
|
+
return parseYamlInteger(data);
|
|
24454
|
+
}
|
|
24434
24455
|
function isInteger(object) {
|
|
24435
24456
|
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
|
24436
24457
|
}
|
|
@@ -24449,7 +24470,6 @@ var require_int3 = __commonJS({
|
|
|
24449
24470
|
decimal: function(obj) {
|
|
24450
24471
|
return obj.toString(10);
|
|
24451
24472
|
},
|
|
24452
|
-
/* eslint-disable max-len */
|
|
24453
24473
|
hexadecimal: function(obj) {
|
|
24454
24474
|
return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
|
|
24455
24475
|
}
|
|
@@ -24473,21 +24493,24 @@ var require_float3 = __commonJS({
|
|
|
24473
24493
|
var Type = require_type();
|
|
24474
24494
|
var YAML_FLOAT_PATTERN = new RegExp(
|
|
24475
24495
|
// 2.5e4, 2.5 and integers
|
|
24476
|
-
"^(?:[-+]?(?:[0-9]
|
|
24496
|
+
"^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
24497
|
+
);
|
|
24498
|
+
var YAML_FLOAT_SPECIAL_PATTERN = new RegExp(
|
|
24499
|
+
"^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
24477
24500
|
);
|
|
24478
24501
|
function resolveYamlFloat(data) {
|
|
24479
24502
|
if (data === null) return false;
|
|
24480
|
-
if (!YAML_FLOAT_PATTERN.test(data)
|
|
24481
|
-
// Probably should update regexp & check speed
|
|
24482
|
-
data[data.length - 1] === "_") {
|
|
24503
|
+
if (!YAML_FLOAT_PATTERN.test(data)) {
|
|
24483
24504
|
return false;
|
|
24484
24505
|
}
|
|
24485
|
-
|
|
24506
|
+
if (Number.isFinite(parseFloat(data, 10))) {
|
|
24507
|
+
return true;
|
|
24508
|
+
}
|
|
24509
|
+
return YAML_FLOAT_SPECIAL_PATTERN.test(data);
|
|
24486
24510
|
}
|
|
24487
24511
|
function constructYamlFloat(data) {
|
|
24488
|
-
|
|
24489
|
-
|
|
24490
|
-
sign = value[0] === "-" ? -1 : 1;
|
|
24512
|
+
let value = data.toLowerCase();
|
|
24513
|
+
const sign = value[0] === "-" ? -1 : 1;
|
|
24491
24514
|
if ("+-".indexOf(value[0]) >= 0) {
|
|
24492
24515
|
value = value.slice(1);
|
|
24493
24516
|
}
|
|
@@ -24500,7 +24523,6 @@ var require_float3 = __commonJS({
|
|
|
24500
24523
|
}
|
|
24501
24524
|
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
24502
24525
|
function representYamlFloat(object, style) {
|
|
24503
|
-
var res;
|
|
24504
24526
|
if (isNaN(object)) {
|
|
24505
24527
|
switch (style) {
|
|
24506
24528
|
case "lowercase":
|
|
@@ -24531,7 +24553,7 @@ var require_float3 = __commonJS({
|
|
|
24531
24553
|
} else if (common.isNegativeZero(object)) {
|
|
24532
24554
|
return "-0.0";
|
|
24533
24555
|
}
|
|
24534
|
-
res = object.toString(10);
|
|
24556
|
+
const res = object.toString(10);
|
|
24535
24557
|
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
24536
24558
|
}
|
|
24537
24559
|
function isFloat(object) {
|
|
@@ -24589,19 +24611,20 @@ var require_timestamp2 = __commonJS({
|
|
|
24589
24611
|
return false;
|
|
24590
24612
|
}
|
|
24591
24613
|
function constructYamlTimestamp(data) {
|
|
24592
|
-
|
|
24593
|
-
|
|
24614
|
+
let fraction = 0;
|
|
24615
|
+
let delta = null;
|
|
24616
|
+
let match = YAML_DATE_REGEXP.exec(data);
|
|
24594
24617
|
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
|
|
24595
24618
|
if (match === null) throw new Error("Date resolve error");
|
|
24596
|
-
year = +match[1];
|
|
24597
|
-
month = +match[2] - 1;
|
|
24598
|
-
day = +match[3];
|
|
24619
|
+
const year = +match[1];
|
|
24620
|
+
const month = +match[2] - 1;
|
|
24621
|
+
const day = +match[3];
|
|
24599
24622
|
if (!match[4]) {
|
|
24600
24623
|
return new Date(Date.UTC(year, month, day));
|
|
24601
24624
|
}
|
|
24602
|
-
hour = +match[4];
|
|
24603
|
-
minute = +match[5];
|
|
24604
|
-
second = +match[6];
|
|
24625
|
+
const hour = +match[4];
|
|
24626
|
+
const minute = +match[5];
|
|
24627
|
+
const second = +match[6];
|
|
24605
24628
|
if (match[7]) {
|
|
24606
24629
|
fraction = match[7].slice(0, 3);
|
|
24607
24630
|
while (fraction.length < 3) {
|
|
@@ -24610,12 +24633,12 @@ var require_timestamp2 = __commonJS({
|
|
|
24610
24633
|
fraction = +fraction;
|
|
24611
24634
|
}
|
|
24612
24635
|
if (match[9]) {
|
|
24613
|
-
|
|
24614
|
-
|
|
24615
|
-
delta = (
|
|
24636
|
+
const tzHour = +match[10];
|
|
24637
|
+
const tzMinute = +(match[11] || 0);
|
|
24638
|
+
delta = (tzHour * 60 + tzMinute) * 6e4;
|
|
24616
24639
|
if (match[9] === "-") delta = -delta;
|
|
24617
24640
|
}
|
|
24618
|
-
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
24641
|
+
const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
24619
24642
|
if (delta) date.setTime(date.getTime() - delta);
|
|
24620
24643
|
return date;
|
|
24621
24644
|
}
|
|
@@ -24655,9 +24678,11 @@ var require_binary2 = __commonJS({
|
|
|
24655
24678
|
var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
24656
24679
|
function resolveYamlBinary(data) {
|
|
24657
24680
|
if (data === null) return false;
|
|
24658
|
-
|
|
24659
|
-
|
|
24660
|
-
|
|
24681
|
+
let bitlen = 0;
|
|
24682
|
+
const max = data.length;
|
|
24683
|
+
const map = BASE64_MAP;
|
|
24684
|
+
for (let idx = 0; idx < max; idx++) {
|
|
24685
|
+
const code = map.indexOf(data.charAt(idx));
|
|
24661
24686
|
if (code > 64) continue;
|
|
24662
24687
|
if (code < 0) return false;
|
|
24663
24688
|
bitlen += 6;
|
|
@@ -24665,8 +24690,12 @@ var require_binary2 = __commonJS({
|
|
|
24665
24690
|
return bitlen % 8 === 0;
|
|
24666
24691
|
}
|
|
24667
24692
|
function constructYamlBinary(data) {
|
|
24668
|
-
|
|
24669
|
-
|
|
24693
|
+
const input = data.replace(/[\r\n=]/g, "");
|
|
24694
|
+
const max = input.length;
|
|
24695
|
+
const map = BASE64_MAP;
|
|
24696
|
+
let bits = 0;
|
|
24697
|
+
const result = [];
|
|
24698
|
+
for (let idx = 0; idx < max; idx++) {
|
|
24670
24699
|
if (idx % 4 === 0 && idx) {
|
|
24671
24700
|
result.push(bits >> 16 & 255);
|
|
24672
24701
|
result.push(bits >> 8 & 255);
|
|
@@ -24674,7 +24703,7 @@ var require_binary2 = __commonJS({
|
|
|
24674
24703
|
}
|
|
24675
24704
|
bits = bits << 6 | map.indexOf(input.charAt(idx));
|
|
24676
24705
|
}
|
|
24677
|
-
tailbits = max % 4 * 6;
|
|
24706
|
+
const tailbits = max % 4 * 6;
|
|
24678
24707
|
if (tailbits === 0) {
|
|
24679
24708
|
result.push(bits >> 16 & 255);
|
|
24680
24709
|
result.push(bits >> 8 & 255);
|
|
@@ -24688,8 +24717,11 @@ var require_binary2 = __commonJS({
|
|
|
24688
24717
|
return new Uint8Array(result);
|
|
24689
24718
|
}
|
|
24690
24719
|
function representYamlBinary(object) {
|
|
24691
|
-
|
|
24692
|
-
|
|
24720
|
+
let result = "";
|
|
24721
|
+
let bits = 0;
|
|
24722
|
+
const max = object.length;
|
|
24723
|
+
const map = BASE64_MAP;
|
|
24724
|
+
for (let idx = 0; idx < max; idx++) {
|
|
24693
24725
|
if (idx % 3 === 0 && idx) {
|
|
24694
24726
|
result += map[bits >> 18 & 63];
|
|
24695
24727
|
result += map[bits >> 12 & 63];
|
|
@@ -24698,7 +24730,7 @@ var require_binary2 = __commonJS({
|
|
|
24698
24730
|
}
|
|
24699
24731
|
bits = (bits << 8) + object[idx];
|
|
24700
24732
|
}
|
|
24701
|
-
tail = max % 3;
|
|
24733
|
+
const tail = max % 3;
|
|
24702
24734
|
if (tail === 0) {
|
|
24703
24735
|
result += map[bits >> 18 & 63];
|
|
24704
24736
|
result += map[bits >> 12 & 63];
|
|
@@ -24739,11 +24771,13 @@ var require_omap2 = __commonJS({
|
|
|
24739
24771
|
var _toString = Object.prototype.toString;
|
|
24740
24772
|
function resolveYamlOmap(data) {
|
|
24741
24773
|
if (data === null) return true;
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
|
|
24745
|
-
|
|
24774
|
+
const objectKeys = [];
|
|
24775
|
+
const object = data;
|
|
24776
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
24777
|
+
const pair = object[index];
|
|
24778
|
+
let pairHasKey = false;
|
|
24746
24779
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
24780
|
+
let pairKey;
|
|
24747
24781
|
for (pairKey in pair) {
|
|
24748
24782
|
if (_hasOwnProperty.call(pair, pairKey)) {
|
|
24749
24783
|
if (!pairHasKey) pairHasKey = true;
|
|
@@ -24775,12 +24809,12 @@ var require_pairs2 = __commonJS({
|
|
|
24775
24809
|
var _toString = Object.prototype.toString;
|
|
24776
24810
|
function resolveYamlPairs(data) {
|
|
24777
24811
|
if (data === null) return true;
|
|
24778
|
-
|
|
24779
|
-
result = new Array(object.length);
|
|
24780
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
24781
|
-
pair = object[index];
|
|
24812
|
+
const object = data;
|
|
24813
|
+
const result = new Array(object.length);
|
|
24814
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
24815
|
+
const pair = object[index];
|
|
24782
24816
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
24783
|
-
keys = Object.keys(pair);
|
|
24817
|
+
const keys = Object.keys(pair);
|
|
24784
24818
|
if (keys.length !== 1) return false;
|
|
24785
24819
|
result[index] = [keys[0], pair[keys[0]]];
|
|
24786
24820
|
}
|
|
@@ -24788,11 +24822,11 @@ var require_pairs2 = __commonJS({
|
|
|
24788
24822
|
}
|
|
24789
24823
|
function constructYamlPairs(data) {
|
|
24790
24824
|
if (data === null) return [];
|
|
24791
|
-
|
|
24792
|
-
result = new Array(object.length);
|
|
24793
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
24794
|
-
pair = object[index];
|
|
24795
|
-
keys = Object.keys(pair);
|
|
24825
|
+
const object = data;
|
|
24826
|
+
const result = new Array(object.length);
|
|
24827
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
24828
|
+
const pair = object[index];
|
|
24829
|
+
const keys = Object.keys(pair);
|
|
24796
24830
|
result[index] = [keys[0], pair[keys[0]]];
|
|
24797
24831
|
}
|
|
24798
24832
|
return result;
|
|
@@ -24813,8 +24847,8 @@ var require_set2 = __commonJS({
|
|
|
24813
24847
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
24814
24848
|
function resolveYamlSet(data) {
|
|
24815
24849
|
if (data === null) return true;
|
|
24816
|
-
|
|
24817
|
-
for (key2 in object) {
|
|
24850
|
+
const object = data;
|
|
24851
|
+
for (const key2 in object) {
|
|
24818
24852
|
if (_hasOwnProperty.call(object, key2)) {
|
|
24819
24853
|
if (object[key2] !== null) return false;
|
|
24820
24854
|
}
|
|
@@ -24869,31 +24903,30 @@ var require_loader = __commonJS({
|
|
|
24869
24903
|
var CHOMPING_KEEP = 3;
|
|
24870
24904
|
var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
24871
24905
|
var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
24872
|
-
var PATTERN_FLOW_INDICATORS = /[,\[\]
|
|
24873
|
-
var PATTERN_TAG_HANDLE = /^(?:!|!!|![
|
|
24874
|
-
var PATTERN_TAG_URI = /^(?:!|[^,\[\]
|
|
24906
|
+
var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
|
|
24907
|
+
var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
|
|
24908
|
+
var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
|
|
24875
24909
|
function _class(obj) {
|
|
24876
24910
|
return Object.prototype.toString.call(obj);
|
|
24877
24911
|
}
|
|
24878
|
-
function
|
|
24912
|
+
function isEol(c) {
|
|
24879
24913
|
return c === 10 || c === 13;
|
|
24880
24914
|
}
|
|
24881
|
-
function
|
|
24915
|
+
function isWhiteSpace(c) {
|
|
24882
24916
|
return c === 9 || c === 32;
|
|
24883
24917
|
}
|
|
24884
|
-
function
|
|
24918
|
+
function isWsOrEol(c) {
|
|
24885
24919
|
return c === 9 || c === 32 || c === 10 || c === 13;
|
|
24886
24920
|
}
|
|
24887
|
-
function
|
|
24921
|
+
function isFlowIndicator(c) {
|
|
24888
24922
|
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
|
24889
24923
|
}
|
|
24890
24924
|
function fromHexCode(c) {
|
|
24891
|
-
|
|
24892
|
-
if (48 <= c && c <= 57) {
|
|
24925
|
+
if (c >= 48 && c <= 57) {
|
|
24893
24926
|
return c - 48;
|
|
24894
24927
|
}
|
|
24895
|
-
lc = c | 32;
|
|
24896
|
-
if (
|
|
24928
|
+
const lc = c | 32;
|
|
24929
|
+
if (lc >= 97 && lc <= 102) {
|
|
24897
24930
|
return lc - 97 + 10;
|
|
24898
24931
|
}
|
|
24899
24932
|
return -1;
|
|
@@ -24911,13 +24944,52 @@ var require_loader = __commonJS({
|
|
|
24911
24944
|
return 0;
|
|
24912
24945
|
}
|
|
24913
24946
|
function fromDecimalCode(c) {
|
|
24914
|
-
if (
|
|
24947
|
+
if (c >= 48 && c <= 57) {
|
|
24915
24948
|
return c - 48;
|
|
24916
24949
|
}
|
|
24917
24950
|
return -1;
|
|
24918
24951
|
}
|
|
24919
24952
|
function simpleEscapeSequence(c) {
|
|
24920
|
-
|
|
24953
|
+
switch (c) {
|
|
24954
|
+
case 48:
|
|
24955
|
+
return "\0";
|
|
24956
|
+
case 97:
|
|
24957
|
+
return "\x07";
|
|
24958
|
+
case 98:
|
|
24959
|
+
return "\b";
|
|
24960
|
+
case 116:
|
|
24961
|
+
return " ";
|
|
24962
|
+
case 9:
|
|
24963
|
+
return " ";
|
|
24964
|
+
case 110:
|
|
24965
|
+
return "\n";
|
|
24966
|
+
case 118:
|
|
24967
|
+
return "\v";
|
|
24968
|
+
case 102:
|
|
24969
|
+
return "\f";
|
|
24970
|
+
case 114:
|
|
24971
|
+
return "\r";
|
|
24972
|
+
case 101:
|
|
24973
|
+
return "\x1B";
|
|
24974
|
+
case 32:
|
|
24975
|
+
return " ";
|
|
24976
|
+
case 34:
|
|
24977
|
+
return '"';
|
|
24978
|
+
case 47:
|
|
24979
|
+
return "/";
|
|
24980
|
+
case 92:
|
|
24981
|
+
return "\\";
|
|
24982
|
+
case 78:
|
|
24983
|
+
return "\x85";
|
|
24984
|
+
case 95:
|
|
24985
|
+
return "\xA0";
|
|
24986
|
+
case 76:
|
|
24987
|
+
return "\u2028";
|
|
24988
|
+
case 80:
|
|
24989
|
+
return "\u2029";
|
|
24990
|
+
default:
|
|
24991
|
+
return "";
|
|
24992
|
+
}
|
|
24921
24993
|
}
|
|
24922
24994
|
function charFromCodepoint(c) {
|
|
24923
24995
|
if (c <= 65535) {
|
|
@@ -24942,11 +25014,10 @@ var require_loader = __commonJS({
|
|
|
24942
25014
|
}
|
|
24943
25015
|
var simpleEscapeCheck = new Array(256);
|
|
24944
25016
|
var simpleEscapeMap = new Array(256);
|
|
24945
|
-
for (i = 0; i < 256; i++) {
|
|
25017
|
+
for (let i = 0; i < 256; i++) {
|
|
24946
25018
|
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
|
|
24947
25019
|
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
24948
25020
|
}
|
|
24949
|
-
var i;
|
|
24950
25021
|
function State(input, options) {
|
|
24951
25022
|
this.input = input;
|
|
24952
25023
|
this.filename = options["filename"] || null;
|
|
@@ -24955,6 +25026,8 @@ var require_loader = __commonJS({
|
|
|
24955
25026
|
this.legacy = options["legacy"] || false;
|
|
24956
25027
|
this.json = options["json"] || false;
|
|
24957
25028
|
this.listener = options["listener"] || null;
|
|
25029
|
+
this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
|
|
25030
|
+
this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20;
|
|
24958
25031
|
this.implicitTypes = this.schema.compiledImplicit;
|
|
24959
25032
|
this.typeMap = this.schema.compiledTypeMap;
|
|
24960
25033
|
this.length = input.length;
|
|
@@ -24962,11 +25035,13 @@ var require_loader = __commonJS({
|
|
|
24962
25035
|
this.line = 0;
|
|
24963
25036
|
this.lineStart = 0;
|
|
24964
25037
|
this.lineIndent = 0;
|
|
25038
|
+
this.depth = 0;
|
|
24965
25039
|
this.firstTabInLine = -1;
|
|
24966
25040
|
this.documents = [];
|
|
25041
|
+
this.anchorMapTransactions = [];
|
|
24967
25042
|
}
|
|
24968
25043
|
function generateError(state, message) {
|
|
24969
|
-
|
|
25044
|
+
const mark = {
|
|
24970
25045
|
name: state.filename,
|
|
24971
25046
|
buffer: state.input.slice(0, -1),
|
|
24972
25047
|
// omit trailing \0
|
|
@@ -24985,21 +25060,85 @@ var require_loader = __commonJS({
|
|
|
24985
25060
|
state.onWarning.call(null, generateError(state, message));
|
|
24986
25061
|
}
|
|
24987
25062
|
}
|
|
25063
|
+
function storeAnchor(state, name, value) {
|
|
25064
|
+
const transactions = state.anchorMapTransactions;
|
|
25065
|
+
if (transactions.length !== 0) {
|
|
25066
|
+
const transaction = transactions[transactions.length - 1];
|
|
25067
|
+
if (!_hasOwnProperty.call(transaction, name)) {
|
|
25068
|
+
transaction[name] = {
|
|
25069
|
+
existed: _hasOwnProperty.call(state.anchorMap, name),
|
|
25070
|
+
value: state.anchorMap[name]
|
|
25071
|
+
};
|
|
25072
|
+
}
|
|
25073
|
+
}
|
|
25074
|
+
state.anchorMap[name] = value;
|
|
25075
|
+
}
|
|
25076
|
+
function beginAnchorTransaction(state) {
|
|
25077
|
+
state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
|
|
25078
|
+
}
|
|
25079
|
+
function commitAnchorTransaction(state) {
|
|
25080
|
+
const transaction = state.anchorMapTransactions.pop();
|
|
25081
|
+
const transactions = state.anchorMapTransactions;
|
|
25082
|
+
if (transactions.length === 0) return;
|
|
25083
|
+
const parent = transactions[transactions.length - 1];
|
|
25084
|
+
const names = Object.keys(transaction);
|
|
25085
|
+
for (let index = 0, length = names.length; index < length; index += 1) {
|
|
25086
|
+
const name = names[index];
|
|
25087
|
+
if (!_hasOwnProperty.call(parent, name)) {
|
|
25088
|
+
parent[name] = transaction[name];
|
|
25089
|
+
}
|
|
25090
|
+
}
|
|
25091
|
+
}
|
|
25092
|
+
function rollbackAnchorTransaction(state) {
|
|
25093
|
+
const transaction = state.anchorMapTransactions.pop();
|
|
25094
|
+
const names = Object.keys(transaction);
|
|
25095
|
+
for (let index = names.length - 1; index >= 0; index -= 1) {
|
|
25096
|
+
const entry = transaction[names[index]];
|
|
25097
|
+
if (entry.existed) {
|
|
25098
|
+
state.anchorMap[names[index]] = entry.value;
|
|
25099
|
+
} else {
|
|
25100
|
+
delete state.anchorMap[names[index]];
|
|
25101
|
+
}
|
|
25102
|
+
}
|
|
25103
|
+
}
|
|
25104
|
+
function snapshotState(state) {
|
|
25105
|
+
return {
|
|
25106
|
+
position: state.position,
|
|
25107
|
+
line: state.line,
|
|
25108
|
+
lineStart: state.lineStart,
|
|
25109
|
+
lineIndent: state.lineIndent,
|
|
25110
|
+
firstTabInLine: state.firstTabInLine,
|
|
25111
|
+
tag: state.tag,
|
|
25112
|
+
anchor: state.anchor,
|
|
25113
|
+
kind: state.kind,
|
|
25114
|
+
result: state.result
|
|
25115
|
+
};
|
|
25116
|
+
}
|
|
25117
|
+
function restoreState(state, snapshot) {
|
|
25118
|
+
state.position = snapshot.position;
|
|
25119
|
+
state.line = snapshot.line;
|
|
25120
|
+
state.lineStart = snapshot.lineStart;
|
|
25121
|
+
state.lineIndent = snapshot.lineIndent;
|
|
25122
|
+
state.firstTabInLine = snapshot.firstTabInLine;
|
|
25123
|
+
state.tag = snapshot.tag;
|
|
25124
|
+
state.anchor = snapshot.anchor;
|
|
25125
|
+
state.kind = snapshot.kind;
|
|
25126
|
+
state.result = snapshot.result;
|
|
25127
|
+
}
|
|
24988
25128
|
var directiveHandlers = {
|
|
24989
25129
|
YAML: function handleYamlDirective(state, name, args) {
|
|
24990
|
-
var match, major, minor;
|
|
24991
25130
|
if (state.version !== null) {
|
|
24992
25131
|
throwError(state, "duplication of %YAML directive");
|
|
24993
25132
|
}
|
|
24994
25133
|
if (args.length !== 1) {
|
|
24995
25134
|
throwError(state, "YAML directive accepts exactly one argument");
|
|
24996
25135
|
}
|
|
24997
|
-
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
25136
|
+
const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
24998
25137
|
if (match === null) {
|
|
24999
25138
|
throwError(state, "ill-formed argument of the YAML directive");
|
|
25000
25139
|
}
|
|
25001
|
-
major = parseInt(match[1], 10);
|
|
25002
|
-
minor = parseInt(match[2], 10);
|
|
25140
|
+
const major = parseInt(match[1], 10);
|
|
25141
|
+
const minor = parseInt(match[2], 10);
|
|
25003
25142
|
if (major !== 1) {
|
|
25004
25143
|
throwError(state, "unacceptable YAML version of the document");
|
|
25005
25144
|
}
|
|
@@ -25010,11 +25149,11 @@ var require_loader = __commonJS({
|
|
|
25010
25149
|
}
|
|
25011
25150
|
},
|
|
25012
25151
|
TAG: function handleTagDirective(state, name, args) {
|
|
25013
|
-
|
|
25152
|
+
let prefix;
|
|
25014
25153
|
if (args.length !== 2) {
|
|
25015
25154
|
throwError(state, "TAG directive accepts exactly two arguments");
|
|
25016
25155
|
}
|
|
25017
|
-
handle = args[0];
|
|
25156
|
+
const handle = args[0];
|
|
25018
25157
|
prefix = args[1];
|
|
25019
25158
|
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
25020
25159
|
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
|
@@ -25034,13 +25173,12 @@ var require_loader = __commonJS({
|
|
|
25034
25173
|
}
|
|
25035
25174
|
};
|
|
25036
25175
|
function captureSegment(state, start, end, checkJson) {
|
|
25037
|
-
var _position, _length, _character, _result;
|
|
25038
25176
|
if (start < end) {
|
|
25039
|
-
_result = state.input.slice(start, end);
|
|
25177
|
+
const _result = state.input.slice(start, end);
|
|
25040
25178
|
if (checkJson) {
|
|
25041
|
-
for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
25042
|
-
_character = _result.charCodeAt(_position);
|
|
25043
|
-
if (!(_character === 9 ||
|
|
25179
|
+
for (let _position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
25180
|
+
const _character = _result.charCodeAt(_position);
|
|
25181
|
+
if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
|
|
25044
25182
|
throwError(state, "expected valid JSON character");
|
|
25045
25183
|
}
|
|
25046
25184
|
}
|
|
@@ -25051,13 +25189,12 @@ var require_loader = __commonJS({
|
|
|
25051
25189
|
}
|
|
25052
25190
|
}
|
|
25053
25191
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
25054
|
-
var sourceKeys, key2, index, quantity;
|
|
25055
25192
|
if (!common.isObject(source)) {
|
|
25056
25193
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
25057
25194
|
}
|
|
25058
|
-
sourceKeys = Object.keys(source);
|
|
25059
|
-
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
25060
|
-
key2 = sourceKeys[index];
|
|
25195
|
+
const sourceKeys = Object.keys(source);
|
|
25196
|
+
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
25197
|
+
const key2 = sourceKeys[index];
|
|
25061
25198
|
if (!_hasOwnProperty.call(destination, key2)) {
|
|
25062
25199
|
setProperty(destination, key2, source[key2]);
|
|
25063
25200
|
overridableKeys[key2] = true;
|
|
@@ -25065,10 +25202,9 @@ var require_loader = __commonJS({
|
|
|
25065
25202
|
}
|
|
25066
25203
|
}
|
|
25067
25204
|
function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
|
|
25068
|
-
var index, quantity;
|
|
25069
25205
|
if (Array.isArray(keyNode)) {
|
|
25070
25206
|
keyNode = Array.prototype.slice.call(keyNode);
|
|
25071
|
-
for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
25207
|
+
for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
25072
25208
|
if (Array.isArray(keyNode[index])) {
|
|
25073
25209
|
throwError(state, "nested arrays are not supported inside keys");
|
|
25074
25210
|
}
|
|
@@ -25086,8 +25222,15 @@ var require_loader = __commonJS({
|
|
|
25086
25222
|
}
|
|
25087
25223
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
25088
25224
|
if (Array.isArray(valueNode)) {
|
|
25089
|
-
|
|
25090
|
-
|
|
25225
|
+
if (valueNode.length > state.maxMergeSeqLength) {
|
|
25226
|
+
throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")");
|
|
25227
|
+
}
|
|
25228
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25229
|
+
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
25230
|
+
const src = valueNode[index];
|
|
25231
|
+
if (seen.has(src)) continue;
|
|
25232
|
+
seen.add(src);
|
|
25233
|
+
mergeMappings(state, _result, src, overridableKeys);
|
|
25091
25234
|
}
|
|
25092
25235
|
} else {
|
|
25093
25236
|
mergeMappings(state, _result, valueNode, overridableKeys);
|
|
@@ -25105,8 +25248,7 @@ var require_loader = __commonJS({
|
|
|
25105
25248
|
return _result;
|
|
25106
25249
|
}
|
|
25107
25250
|
function readLineBreak(state) {
|
|
25108
|
-
|
|
25109
|
-
ch = state.input.charCodeAt(state.position);
|
|
25251
|
+
const ch = state.input.charCodeAt(state.position);
|
|
25110
25252
|
if (ch === 10) {
|
|
25111
25253
|
state.position++;
|
|
25112
25254
|
} else if (ch === 13) {
|
|
@@ -25122,9 +25264,10 @@ var require_loader = __commonJS({
|
|
|
25122
25264
|
state.firstTabInLine = -1;
|
|
25123
25265
|
}
|
|
25124
25266
|
function skipSeparationSpace(state, allowComments, checkIndent) {
|
|
25125
|
-
|
|
25267
|
+
let lineBreaks = 0;
|
|
25268
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25126
25269
|
while (ch !== 0) {
|
|
25127
|
-
while (
|
|
25270
|
+
while (isWhiteSpace(ch)) {
|
|
25128
25271
|
if (ch === 9 && state.firstTabInLine === -1) {
|
|
25129
25272
|
state.firstTabInLine = state.position;
|
|
25130
25273
|
}
|
|
@@ -25135,7 +25278,7 @@ var require_loader = __commonJS({
|
|
|
25135
25278
|
ch = state.input.charCodeAt(++state.position);
|
|
25136
25279
|
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
25137
25280
|
}
|
|
25138
|
-
if (
|
|
25281
|
+
if (isEol(ch)) {
|
|
25139
25282
|
readLineBreak(state);
|
|
25140
25283
|
ch = state.input.charCodeAt(state.position);
|
|
25141
25284
|
lineBreaks++;
|
|
@@ -25154,12 +25297,12 @@ var require_loader = __commonJS({
|
|
|
25154
25297
|
return lineBreaks;
|
|
25155
25298
|
}
|
|
25156
25299
|
function testDocumentSeparator(state) {
|
|
25157
|
-
|
|
25158
|
-
ch = state.input.charCodeAt(_position);
|
|
25300
|
+
let _position = state.position;
|
|
25301
|
+
let ch = state.input.charCodeAt(_position);
|
|
25159
25302
|
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
|
25160
25303
|
_position += 3;
|
|
25161
25304
|
ch = state.input.charCodeAt(_position);
|
|
25162
|
-
if (ch === 0 ||
|
|
25305
|
+
if (ch === 0 || isWsOrEol(ch)) {
|
|
25163
25306
|
return true;
|
|
25164
25307
|
}
|
|
25165
25308
|
}
|
|
@@ -25173,14 +25316,21 @@ var require_loader = __commonJS({
|
|
|
25173
25316
|
}
|
|
25174
25317
|
}
|
|
25175
25318
|
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25319
|
+
let captureStart;
|
|
25320
|
+
let captureEnd;
|
|
25321
|
+
let hasPendingContent;
|
|
25322
|
+
let _line;
|
|
25323
|
+
let _lineStart;
|
|
25324
|
+
let _lineIndent;
|
|
25325
|
+
const _kind = state.kind;
|
|
25326
|
+
const _result = state.result;
|
|
25327
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25328
|
+
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) {
|
|
25179
25329
|
return false;
|
|
25180
25330
|
}
|
|
25181
25331
|
if (ch === 63 || ch === 45) {
|
|
25182
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
25183
|
-
if (
|
|
25332
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
25333
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
25184
25334
|
return false;
|
|
25185
25335
|
}
|
|
25186
25336
|
}
|
|
@@ -25190,18 +25340,18 @@ var require_loader = __commonJS({
|
|
|
25190
25340
|
hasPendingContent = false;
|
|
25191
25341
|
while (ch !== 0) {
|
|
25192
25342
|
if (ch === 58) {
|
|
25193
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
25194
|
-
if (
|
|
25343
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
25344
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
25195
25345
|
break;
|
|
25196
25346
|
}
|
|
25197
25347
|
} else if (ch === 35) {
|
|
25198
|
-
preceding = state.input.charCodeAt(state.position - 1);
|
|
25199
|
-
if (
|
|
25348
|
+
const preceding = state.input.charCodeAt(state.position - 1);
|
|
25349
|
+
if (isWsOrEol(preceding)) {
|
|
25200
25350
|
break;
|
|
25201
25351
|
}
|
|
25202
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection &&
|
|
25352
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
|
|
25203
25353
|
break;
|
|
25204
|
-
} else if (
|
|
25354
|
+
} else if (isEol(ch)) {
|
|
25205
25355
|
_line = state.line;
|
|
25206
25356
|
_lineStart = state.lineStart;
|
|
25207
25357
|
_lineIndent = state.lineIndent;
|
|
@@ -25224,7 +25374,7 @@ var require_loader = __commonJS({
|
|
|
25224
25374
|
captureStart = captureEnd = state.position;
|
|
25225
25375
|
hasPendingContent = false;
|
|
25226
25376
|
}
|
|
25227
|
-
if (!
|
|
25377
|
+
if (!isWhiteSpace(ch)) {
|
|
25228
25378
|
captureEnd = state.position + 1;
|
|
25229
25379
|
}
|
|
25230
25380
|
ch = state.input.charCodeAt(++state.position);
|
|
@@ -25238,8 +25388,9 @@ var require_loader = __commonJS({
|
|
|
25238
25388
|
return false;
|
|
25239
25389
|
}
|
|
25240
25390
|
function readSingleQuotedScalar(state, nodeIndent) {
|
|
25241
|
-
|
|
25242
|
-
|
|
25391
|
+
let captureStart;
|
|
25392
|
+
let captureEnd;
|
|
25393
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25243
25394
|
if (ch !== 39) {
|
|
25244
25395
|
return false;
|
|
25245
25396
|
}
|
|
@@ -25258,7 +25409,7 @@ var require_loader = __commonJS({
|
|
|
25258
25409
|
} else {
|
|
25259
25410
|
return true;
|
|
25260
25411
|
}
|
|
25261
|
-
} else if (
|
|
25412
|
+
} else if (isEol(ch)) {
|
|
25262
25413
|
captureSegment(state, captureStart, captureEnd, true);
|
|
25263
25414
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
25264
25415
|
captureStart = captureEnd = state.position;
|
|
@@ -25266,14 +25417,18 @@ var require_loader = __commonJS({
|
|
|
25266
25417
|
throwError(state, "unexpected end of the document within a single quoted scalar");
|
|
25267
25418
|
} else {
|
|
25268
25419
|
state.position++;
|
|
25269
|
-
|
|
25420
|
+
if (!isWhiteSpace(ch)) {
|
|
25421
|
+
captureEnd = state.position;
|
|
25422
|
+
}
|
|
25270
25423
|
}
|
|
25271
25424
|
}
|
|
25272
25425
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
25273
25426
|
}
|
|
25274
25427
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
25275
|
-
|
|
25276
|
-
|
|
25428
|
+
let captureStart;
|
|
25429
|
+
let captureEnd;
|
|
25430
|
+
let tmp;
|
|
25431
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25277
25432
|
if (ch !== 34) {
|
|
25278
25433
|
return false;
|
|
25279
25434
|
}
|
|
@@ -25289,14 +25444,14 @@ var require_loader = __commonJS({
|
|
|
25289
25444
|
} else if (ch === 92) {
|
|
25290
25445
|
captureSegment(state, captureStart, state.position, true);
|
|
25291
25446
|
ch = state.input.charCodeAt(++state.position);
|
|
25292
|
-
if (
|
|
25447
|
+
if (isEol(ch)) {
|
|
25293
25448
|
skipSeparationSpace(state, false, nodeIndent);
|
|
25294
25449
|
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
25295
25450
|
state.result += simpleEscapeMap[ch];
|
|
25296
25451
|
state.position++;
|
|
25297
25452
|
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
25298
|
-
hexLength = tmp;
|
|
25299
|
-
hexResult = 0;
|
|
25453
|
+
let hexLength = tmp;
|
|
25454
|
+
let hexResult = 0;
|
|
25300
25455
|
for (; hexLength > 0; hexLength--) {
|
|
25301
25456
|
ch = state.input.charCodeAt(++state.position);
|
|
25302
25457
|
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
@@ -25311,7 +25466,7 @@ var require_loader = __commonJS({
|
|
|
25311
25466
|
throwError(state, "unknown escape sequence");
|
|
25312
25467
|
}
|
|
25313
25468
|
captureStart = captureEnd = state.position;
|
|
25314
|
-
} else if (
|
|
25469
|
+
} else if (isEol(ch)) {
|
|
25315
25470
|
captureSegment(state, captureStart, captureEnd, true);
|
|
25316
25471
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
25317
25472
|
captureStart = captureEnd = state.position;
|
|
@@ -25319,14 +25474,30 @@ var require_loader = __commonJS({
|
|
|
25319
25474
|
throwError(state, "unexpected end of the document within a double quoted scalar");
|
|
25320
25475
|
} else {
|
|
25321
25476
|
state.position++;
|
|
25322
|
-
|
|
25477
|
+
if (!isWhiteSpace(ch)) {
|
|
25478
|
+
captureEnd = state.position;
|
|
25479
|
+
}
|
|
25323
25480
|
}
|
|
25324
25481
|
}
|
|
25325
25482
|
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
|
25326
25483
|
}
|
|
25327
25484
|
function readFlowCollection(state, nodeIndent) {
|
|
25328
|
-
|
|
25329
|
-
|
|
25485
|
+
let readNext = true;
|
|
25486
|
+
let _line;
|
|
25487
|
+
let _lineStart;
|
|
25488
|
+
let _pos;
|
|
25489
|
+
const _tag = state.tag;
|
|
25490
|
+
let _result;
|
|
25491
|
+
const _anchor = state.anchor;
|
|
25492
|
+
let terminator;
|
|
25493
|
+
let isPair;
|
|
25494
|
+
let isExplicitPair;
|
|
25495
|
+
let isMapping;
|
|
25496
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
25497
|
+
let keyNode;
|
|
25498
|
+
let keyTag;
|
|
25499
|
+
let valueNode;
|
|
25500
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25330
25501
|
if (ch === 91) {
|
|
25331
25502
|
terminator = 93;
|
|
25332
25503
|
isMapping = false;
|
|
@@ -25339,7 +25510,7 @@ var require_loader = __commonJS({
|
|
|
25339
25510
|
return false;
|
|
25340
25511
|
}
|
|
25341
25512
|
if (state.anchor !== null) {
|
|
25342
|
-
state
|
|
25513
|
+
storeAnchor(state, state.anchor, _result);
|
|
25343
25514
|
}
|
|
25344
25515
|
ch = state.input.charCodeAt(++state.position);
|
|
25345
25516
|
while (ch !== 0) {
|
|
@@ -25360,8 +25531,8 @@ var require_loader = __commonJS({
|
|
|
25360
25531
|
keyTag = keyNode = valueNode = null;
|
|
25361
25532
|
isPair = isExplicitPair = false;
|
|
25362
25533
|
if (ch === 63) {
|
|
25363
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
25364
|
-
if (
|
|
25534
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
25535
|
+
if (isWsOrEol(following)) {
|
|
25365
25536
|
isPair = isExplicitPair = true;
|
|
25366
25537
|
state.position++;
|
|
25367
25538
|
skipSeparationSpace(state, true, nodeIndent);
|
|
@@ -25401,8 +25572,15 @@ var require_loader = __commonJS({
|
|
|
25401
25572
|
throwError(state, "unexpected end of the stream within a flow collection");
|
|
25402
25573
|
}
|
|
25403
25574
|
function readBlockScalar(state, nodeIndent) {
|
|
25404
|
-
|
|
25405
|
-
|
|
25575
|
+
let folding;
|
|
25576
|
+
let chomping = CHOMPING_CLIP;
|
|
25577
|
+
let didReadContent = false;
|
|
25578
|
+
let detectedIndent = false;
|
|
25579
|
+
let textIndent = nodeIndent;
|
|
25580
|
+
let emptyLines = 0;
|
|
25581
|
+
let atMoreIndented = false;
|
|
25582
|
+
let tmp;
|
|
25583
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25406
25584
|
if (ch === 124) {
|
|
25407
25585
|
folding = false;
|
|
25408
25586
|
} else if (ch === 62) {
|
|
@@ -25433,14 +25611,14 @@ var require_loader = __commonJS({
|
|
|
25433
25611
|
break;
|
|
25434
25612
|
}
|
|
25435
25613
|
}
|
|
25436
|
-
if (
|
|
25614
|
+
if (isWhiteSpace(ch)) {
|
|
25437
25615
|
do {
|
|
25438
25616
|
ch = state.input.charCodeAt(++state.position);
|
|
25439
|
-
} while (
|
|
25617
|
+
} while (isWhiteSpace(ch));
|
|
25440
25618
|
if (ch === 35) {
|
|
25441
25619
|
do {
|
|
25442
25620
|
ch = state.input.charCodeAt(++state.position);
|
|
25443
|
-
} while (!
|
|
25621
|
+
} while (!isEol(ch) && ch !== 0);
|
|
25444
25622
|
}
|
|
25445
25623
|
}
|
|
25446
25624
|
while (ch !== 0) {
|
|
@@ -25454,10 +25632,13 @@ var require_loader = __commonJS({
|
|
|
25454
25632
|
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
25455
25633
|
textIndent = state.lineIndent;
|
|
25456
25634
|
}
|
|
25457
|
-
if (
|
|
25635
|
+
if (isEol(ch)) {
|
|
25458
25636
|
emptyLines++;
|
|
25459
25637
|
continue;
|
|
25460
25638
|
}
|
|
25639
|
+
if (!detectedIndent && textIndent === 0) {
|
|
25640
|
+
throwError(state, "missing indentation for block scalar");
|
|
25641
|
+
}
|
|
25461
25642
|
if (state.lineIndent < textIndent) {
|
|
25462
25643
|
if (chomping === CHOMPING_KEEP) {
|
|
25463
25644
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
@@ -25469,7 +25650,7 @@ var require_loader = __commonJS({
|
|
|
25469
25650
|
break;
|
|
25470
25651
|
}
|
|
25471
25652
|
if (folding) {
|
|
25472
|
-
if (
|
|
25653
|
+
if (isWhiteSpace(ch)) {
|
|
25473
25654
|
atMoreIndented = true;
|
|
25474
25655
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
25475
25656
|
} else if (atMoreIndented) {
|
|
@@ -25488,8 +25669,8 @@ var require_loader = __commonJS({
|
|
|
25488
25669
|
didReadContent = true;
|
|
25489
25670
|
detectedIndent = true;
|
|
25490
25671
|
emptyLines = 0;
|
|
25491
|
-
captureStart = state.position;
|
|
25492
|
-
while (!
|
|
25672
|
+
const captureStart = state.position;
|
|
25673
|
+
while (!isEol(ch) && ch !== 0) {
|
|
25493
25674
|
ch = state.input.charCodeAt(++state.position);
|
|
25494
25675
|
}
|
|
25495
25676
|
captureSegment(state, captureStart, state.position, false);
|
|
@@ -25497,12 +25678,15 @@ var require_loader = __commonJS({
|
|
|
25497
25678
|
return true;
|
|
25498
25679
|
}
|
|
25499
25680
|
function readBlockSequence(state, nodeIndent) {
|
|
25500
|
-
|
|
25681
|
+
const _tag = state.tag;
|
|
25682
|
+
const _anchor = state.anchor;
|
|
25683
|
+
const _result = [];
|
|
25684
|
+
let detected = false;
|
|
25501
25685
|
if (state.firstTabInLine !== -1) return false;
|
|
25502
25686
|
if (state.anchor !== null) {
|
|
25503
|
-
state
|
|
25687
|
+
storeAnchor(state, state.anchor, _result);
|
|
25504
25688
|
}
|
|
25505
|
-
ch = state.input.charCodeAt(state.position);
|
|
25689
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25506
25690
|
while (ch !== 0) {
|
|
25507
25691
|
if (state.firstTabInLine !== -1) {
|
|
25508
25692
|
state.position = state.firstTabInLine;
|
|
@@ -25511,8 +25695,8 @@ var require_loader = __commonJS({
|
|
|
25511
25695
|
if (ch !== 45) {
|
|
25512
25696
|
break;
|
|
25513
25697
|
}
|
|
25514
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
25515
|
-
if (!
|
|
25698
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
25699
|
+
if (!isWsOrEol(following)) {
|
|
25516
25700
|
break;
|
|
25517
25701
|
}
|
|
25518
25702
|
detected = true;
|
|
@@ -25524,7 +25708,7 @@ var require_loader = __commonJS({
|
|
|
25524
25708
|
continue;
|
|
25525
25709
|
}
|
|
25526
25710
|
}
|
|
25527
|
-
_line = state.line;
|
|
25711
|
+
const _line = state.line;
|
|
25528
25712
|
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
|
|
25529
25713
|
_result.push(state.result);
|
|
25530
25714
|
skipSeparationSpace(state, true, -1);
|
|
@@ -25545,20 +25729,32 @@ var require_loader = __commonJS({
|
|
|
25545
25729
|
return false;
|
|
25546
25730
|
}
|
|
25547
25731
|
function readBlockMapping(state, nodeIndent, flowIndent) {
|
|
25548
|
-
|
|
25732
|
+
let allowCompact;
|
|
25733
|
+
let _keyLine;
|
|
25734
|
+
let _keyLineStart;
|
|
25735
|
+
let _keyPos;
|
|
25736
|
+
const _tag = state.tag;
|
|
25737
|
+
const _anchor = state.anchor;
|
|
25738
|
+
const _result = {};
|
|
25739
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
25740
|
+
let keyTag = null;
|
|
25741
|
+
let keyNode = null;
|
|
25742
|
+
let valueNode = null;
|
|
25743
|
+
let atExplicitKey = false;
|
|
25744
|
+
let detected = false;
|
|
25549
25745
|
if (state.firstTabInLine !== -1) return false;
|
|
25550
25746
|
if (state.anchor !== null) {
|
|
25551
|
-
state
|
|
25747
|
+
storeAnchor(state, state.anchor, _result);
|
|
25552
25748
|
}
|
|
25553
|
-
ch = state.input.charCodeAt(state.position);
|
|
25749
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25554
25750
|
while (ch !== 0) {
|
|
25555
25751
|
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
25556
25752
|
state.position = state.firstTabInLine;
|
|
25557
25753
|
throwError(state, "tab characters must not be used in indentation");
|
|
25558
25754
|
}
|
|
25559
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
25560
|
-
_line = state.line;
|
|
25561
|
-
if ((ch === 63 || ch === 58) &&
|
|
25755
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
25756
|
+
const _line = state.line;
|
|
25757
|
+
if ((ch === 63 || ch === 58) && isWsOrEol(following)) {
|
|
25562
25758
|
if (ch === 63) {
|
|
25563
25759
|
if (atExplicitKey) {
|
|
25564
25760
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
@@ -25584,12 +25780,12 @@ var require_loader = __commonJS({
|
|
|
25584
25780
|
}
|
|
25585
25781
|
if (state.line === _line) {
|
|
25586
25782
|
ch = state.input.charCodeAt(state.position);
|
|
25587
|
-
while (
|
|
25783
|
+
while (isWhiteSpace(ch)) {
|
|
25588
25784
|
ch = state.input.charCodeAt(++state.position);
|
|
25589
25785
|
}
|
|
25590
25786
|
if (ch === 58) {
|
|
25591
25787
|
ch = state.input.charCodeAt(++state.position);
|
|
25592
|
-
if (!
|
|
25788
|
+
if (!isWsOrEol(ch)) {
|
|
25593
25789
|
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
|
25594
25790
|
}
|
|
25595
25791
|
if (atExplicitKey) {
|
|
@@ -25654,8 +25850,11 @@ var require_loader = __commonJS({
|
|
|
25654
25850
|
return detected;
|
|
25655
25851
|
}
|
|
25656
25852
|
function readTagProperty(state) {
|
|
25657
|
-
|
|
25658
|
-
|
|
25853
|
+
let isVerbatim = false;
|
|
25854
|
+
let isNamed = false;
|
|
25855
|
+
let tagHandle;
|
|
25856
|
+
let tagName;
|
|
25857
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25659
25858
|
if (ch !== 33) return false;
|
|
25660
25859
|
if (state.tag !== null) {
|
|
25661
25860
|
throwError(state, "duplication of a tag property");
|
|
@@ -25671,7 +25870,7 @@ var require_loader = __commonJS({
|
|
|
25671
25870
|
} else {
|
|
25672
25871
|
tagHandle = "!";
|
|
25673
25872
|
}
|
|
25674
|
-
_position = state.position;
|
|
25873
|
+
let _position = state.position;
|
|
25675
25874
|
if (isVerbatim) {
|
|
25676
25875
|
do {
|
|
25677
25876
|
ch = state.input.charCodeAt(++state.position);
|
|
@@ -25683,7 +25882,7 @@ var require_loader = __commonJS({
|
|
|
25683
25882
|
throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
25684
25883
|
}
|
|
25685
25884
|
} else {
|
|
25686
|
-
while (ch !== 0 && !
|
|
25885
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
25687
25886
|
if (ch === 33) {
|
|
25688
25887
|
if (!isNamed) {
|
|
25689
25888
|
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
@@ -25725,15 +25924,14 @@ var require_loader = __commonJS({
|
|
|
25725
25924
|
return true;
|
|
25726
25925
|
}
|
|
25727
25926
|
function readAnchorProperty(state) {
|
|
25728
|
-
|
|
25729
|
-
ch = state.input.charCodeAt(state.position);
|
|
25927
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25730
25928
|
if (ch !== 38) return false;
|
|
25731
25929
|
if (state.anchor !== null) {
|
|
25732
25930
|
throwError(state, "duplication of an anchor property");
|
|
25733
25931
|
}
|
|
25734
25932
|
ch = state.input.charCodeAt(++state.position);
|
|
25735
|
-
_position = state.position;
|
|
25736
|
-
while (ch !== 0 && !
|
|
25933
|
+
const _position = state.position;
|
|
25934
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
25737
25935
|
ch = state.input.charCodeAt(++state.position);
|
|
25738
25936
|
}
|
|
25739
25937
|
if (state.position === _position) {
|
|
@@ -25743,18 +25941,17 @@ var require_loader = __commonJS({
|
|
|
25743
25941
|
return true;
|
|
25744
25942
|
}
|
|
25745
25943
|
function readAlias(state) {
|
|
25746
|
-
|
|
25747
|
-
ch = state.input.charCodeAt(state.position);
|
|
25944
|
+
let ch = state.input.charCodeAt(state.position);
|
|
25748
25945
|
if (ch !== 42) return false;
|
|
25749
25946
|
ch = state.input.charCodeAt(++state.position);
|
|
25750
|
-
_position = state.position;
|
|
25751
|
-
while (ch !== 0 && !
|
|
25947
|
+
const _position = state.position;
|
|
25948
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
25752
25949
|
ch = state.input.charCodeAt(++state.position);
|
|
25753
25950
|
}
|
|
25754
25951
|
if (state.position === _position) {
|
|
25755
25952
|
throwError(state, "name of an alias node must contain at least one character");
|
|
25756
25953
|
}
|
|
25757
|
-
alias = state.input.slice(_position, state.position);
|
|
25954
|
+
const alias = state.input.slice(_position, state.position);
|
|
25758
25955
|
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
|
25759
25956
|
throwError(state, 'unidentified alias "' + alias + '"');
|
|
25760
25957
|
}
|
|
@@ -25762,8 +25959,36 @@ var require_loader = __commonJS({
|
|
|
25762
25959
|
skipSeparationSpace(state, true, -1);
|
|
25763
25960
|
return true;
|
|
25764
25961
|
}
|
|
25962
|
+
function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) {
|
|
25963
|
+
const fallbackState = snapshotState(state);
|
|
25964
|
+
beginAnchorTransaction(state);
|
|
25965
|
+
restoreState(state, propertyStart);
|
|
25966
|
+
state.tag = null;
|
|
25967
|
+
state.anchor = null;
|
|
25968
|
+
state.kind = null;
|
|
25969
|
+
state.result = null;
|
|
25970
|
+
if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") {
|
|
25971
|
+
commitAnchorTransaction(state);
|
|
25972
|
+
return true;
|
|
25973
|
+
}
|
|
25974
|
+
rollbackAnchorTransaction(state);
|
|
25975
|
+
restoreState(state, fallbackState);
|
|
25976
|
+
return false;
|
|
25977
|
+
}
|
|
25765
25978
|
function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
|
25766
|
-
|
|
25979
|
+
let allowBlockScalars;
|
|
25980
|
+
let allowBlockCollections;
|
|
25981
|
+
let indentStatus = 1;
|
|
25982
|
+
let atNewLine = false;
|
|
25983
|
+
let hasContent = false;
|
|
25984
|
+
let propertyStart = null;
|
|
25985
|
+
let type;
|
|
25986
|
+
let flowIndent;
|
|
25987
|
+
let blockIndent;
|
|
25988
|
+
if (state.depth >= state.maxDepth) {
|
|
25989
|
+
throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
|
|
25990
|
+
}
|
|
25991
|
+
state.depth += 1;
|
|
25767
25992
|
if (state.listener !== null) {
|
|
25768
25993
|
state.listener("open", state);
|
|
25769
25994
|
}
|
|
@@ -25771,7 +25996,7 @@ var require_loader = __commonJS({
|
|
|
25771
25996
|
state.anchor = null;
|
|
25772
25997
|
state.kind = null;
|
|
25773
25998
|
state.result = null;
|
|
25774
|
-
allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
25999
|
+
const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
25775
26000
|
if (allowToSeek) {
|
|
25776
26001
|
if (skipSeparationSpace(state, true, -1)) {
|
|
25777
26002
|
atNewLine = true;
|
|
@@ -25785,7 +26010,18 @@ var require_loader = __commonJS({
|
|
|
25785
26010
|
}
|
|
25786
26011
|
}
|
|
25787
26012
|
if (indentStatus === 1) {
|
|
25788
|
-
while (
|
|
26013
|
+
while (true) {
|
|
26014
|
+
const ch = state.input.charCodeAt(state.position);
|
|
26015
|
+
const propertyState = snapshotState(state);
|
|
26016
|
+
if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
|
|
26017
|
+
break;
|
|
26018
|
+
}
|
|
26019
|
+
if (!readTagProperty(state) && !readAnchorProperty(state)) {
|
|
26020
|
+
break;
|
|
26021
|
+
}
|
|
26022
|
+
if (propertyStart === null) {
|
|
26023
|
+
propertyStart = propertyState;
|
|
26024
|
+
}
|
|
25789
26025
|
if (skipSeparationSpace(state, true, -1)) {
|
|
25790
26026
|
atNewLine = true;
|
|
25791
26027
|
allowBlockCollections = allowBlockStyles;
|
|
@@ -25815,7 +26051,15 @@ var require_loader = __commonJS({
|
|
|
25815
26051
|
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
|
25816
26052
|
hasContent = true;
|
|
25817
26053
|
} else {
|
|
25818
|
-
|
|
26054
|
+
const ch = state.input.charCodeAt(state.position);
|
|
26055
|
+
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(
|
|
26056
|
+
state,
|
|
26057
|
+
propertyStart,
|
|
26058
|
+
propertyStart.position - propertyStart.lineStart,
|
|
26059
|
+
flowIndent
|
|
26060
|
+
)) {
|
|
26061
|
+
hasContent = true;
|
|
26062
|
+
} else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
|
25819
26063
|
hasContent = true;
|
|
25820
26064
|
} else if (readAlias(state)) {
|
|
25821
26065
|
hasContent = true;
|
|
@@ -25829,7 +26073,7 @@ var require_loader = __commonJS({
|
|
|
25829
26073
|
}
|
|
25830
26074
|
}
|
|
25831
26075
|
if (state.anchor !== null) {
|
|
25832
|
-
state
|
|
26076
|
+
storeAnchor(state, state.anchor, state.result);
|
|
25833
26077
|
}
|
|
25834
26078
|
}
|
|
25835
26079
|
} else if (indentStatus === 0) {
|
|
@@ -25838,19 +26082,19 @@ var require_loader = __commonJS({
|
|
|
25838
26082
|
}
|
|
25839
26083
|
if (state.tag === null) {
|
|
25840
26084
|
if (state.anchor !== null) {
|
|
25841
|
-
state
|
|
26085
|
+
storeAnchor(state, state.anchor, state.result);
|
|
25842
26086
|
}
|
|
25843
26087
|
} else if (state.tag === "?") {
|
|
25844
26088
|
if (state.result !== null && state.kind !== "scalar") {
|
|
25845
26089
|
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
|
25846
26090
|
}
|
|
25847
|
-
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
26091
|
+
for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
25848
26092
|
type = state.implicitTypes[typeIndex];
|
|
25849
26093
|
if (type.resolve(state.result)) {
|
|
25850
26094
|
state.result = type.construct(state.result);
|
|
25851
26095
|
state.tag = type.tag;
|
|
25852
26096
|
if (state.anchor !== null) {
|
|
25853
|
-
state
|
|
26097
|
+
storeAnchor(state, state.anchor, state.result);
|
|
25854
26098
|
}
|
|
25855
26099
|
break;
|
|
25856
26100
|
}
|
|
@@ -25860,8 +26104,8 @@ var require_loader = __commonJS({
|
|
|
25860
26104
|
type = state.typeMap[state.kind || "fallback"][state.tag];
|
|
25861
26105
|
} else {
|
|
25862
26106
|
type = null;
|
|
25863
|
-
typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
25864
|
-
for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
26107
|
+
const typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
26108
|
+
for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
25865
26109
|
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
25866
26110
|
type = typeList[typeIndex];
|
|
25867
26111
|
break;
|
|
@@ -25879,17 +26123,20 @@ var require_loader = __commonJS({
|
|
|
25879
26123
|
} else {
|
|
25880
26124
|
state.result = type.construct(state.result, state.tag);
|
|
25881
26125
|
if (state.anchor !== null) {
|
|
25882
|
-
state
|
|
26126
|
+
storeAnchor(state, state.anchor, state.result);
|
|
25883
26127
|
}
|
|
25884
26128
|
}
|
|
25885
26129
|
}
|
|
25886
26130
|
if (state.listener !== null) {
|
|
25887
26131
|
state.listener("close", state);
|
|
25888
26132
|
}
|
|
26133
|
+
state.depth -= 1;
|
|
25889
26134
|
return state.tag !== null || state.anchor !== null || hasContent;
|
|
25890
26135
|
}
|
|
25891
26136
|
function readDocument(state) {
|
|
25892
|
-
|
|
26137
|
+
const documentStart = state.position;
|
|
26138
|
+
let hasDirectives = false;
|
|
26139
|
+
let ch;
|
|
25893
26140
|
state.version = null;
|
|
25894
26141
|
state.checkLineBreaks = state.legacy;
|
|
25895
26142
|
state.tagMap = /* @__PURE__ */ Object.create(null);
|
|
@@ -25902,28 +26149,28 @@ var require_loader = __commonJS({
|
|
|
25902
26149
|
}
|
|
25903
26150
|
hasDirectives = true;
|
|
25904
26151
|
ch = state.input.charCodeAt(++state.position);
|
|
25905
|
-
_position = state.position;
|
|
25906
|
-
while (ch !== 0 && !
|
|
26152
|
+
let _position = state.position;
|
|
26153
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
25907
26154
|
ch = state.input.charCodeAt(++state.position);
|
|
25908
26155
|
}
|
|
25909
|
-
directiveName = state.input.slice(_position, state.position);
|
|
25910
|
-
directiveArgs = [];
|
|
26156
|
+
const directiveName = state.input.slice(_position, state.position);
|
|
26157
|
+
const directiveArgs = [];
|
|
25911
26158
|
if (directiveName.length < 1) {
|
|
25912
26159
|
throwError(state, "directive name must not be less than one character in length");
|
|
25913
26160
|
}
|
|
25914
26161
|
while (ch !== 0) {
|
|
25915
|
-
while (
|
|
26162
|
+
while (isWhiteSpace(ch)) {
|
|
25916
26163
|
ch = state.input.charCodeAt(++state.position);
|
|
25917
26164
|
}
|
|
25918
26165
|
if (ch === 35) {
|
|
25919
26166
|
do {
|
|
25920
26167
|
ch = state.input.charCodeAt(++state.position);
|
|
25921
|
-
} while (ch !== 0 && !
|
|
26168
|
+
} while (ch !== 0 && !isEol(ch));
|
|
25922
26169
|
break;
|
|
25923
26170
|
}
|
|
25924
|
-
if (
|
|
26171
|
+
if (isEol(ch)) break;
|
|
25925
26172
|
_position = state.position;
|
|
25926
|
-
while (ch !== 0 && !
|
|
26173
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
25927
26174
|
ch = state.input.charCodeAt(++state.position);
|
|
25928
26175
|
}
|
|
25929
26176
|
directiveArgs.push(state.input.slice(_position, state.position));
|
|
@@ -25957,8 +26204,6 @@ var require_loader = __commonJS({
|
|
|
25957
26204
|
}
|
|
25958
26205
|
if (state.position < state.length - 1) {
|
|
25959
26206
|
throwError(state, "end of the stream or a document separator is expected");
|
|
25960
|
-
} else {
|
|
25961
|
-
return;
|
|
25962
26207
|
}
|
|
25963
26208
|
}
|
|
25964
26209
|
function loadDocuments(input, options) {
|
|
@@ -25972,8 +26217,8 @@ var require_loader = __commonJS({
|
|
|
25972
26217
|
input = input.slice(1);
|
|
25973
26218
|
}
|
|
25974
26219
|
}
|
|
25975
|
-
|
|
25976
|
-
|
|
26220
|
+
const state = new State(input, options);
|
|
26221
|
+
const nullpos = input.indexOf("\0");
|
|
25977
26222
|
if (nullpos !== -1) {
|
|
25978
26223
|
state.position = nullpos;
|
|
25979
26224
|
throwError(state, "null byte is not allowed in input");
|
|
@@ -25993,16 +26238,16 @@ var require_loader = __commonJS({
|
|
|
25993
26238
|
options = iterator;
|
|
25994
26239
|
iterator = null;
|
|
25995
26240
|
}
|
|
25996
|
-
|
|
26241
|
+
const documents = loadDocuments(input, options);
|
|
25997
26242
|
if (typeof iterator !== "function") {
|
|
25998
26243
|
return documents;
|
|
25999
26244
|
}
|
|
26000
|
-
for (
|
|
26245
|
+
for (let index = 0, length = documents.length; index < length; index += 1) {
|
|
26001
26246
|
iterator(documents[index]);
|
|
26002
26247
|
}
|
|
26003
26248
|
}
|
|
26004
26249
|
function load(input, options) {
|
|
26005
|
-
|
|
26250
|
+
const documents = loadDocuments(input, options);
|
|
26006
26251
|
if (documents.length === 0) {
|
|
26007
26252
|
return void 0;
|
|
26008
26253
|
} else if (documents.length === 1) {
|
|
@@ -26085,17 +26330,16 @@ var require_dumper = __commonJS({
|
|
|
26085
26330
|
];
|
|
26086
26331
|
var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
26087
26332
|
function compileStyleMap(schema, map) {
|
|
26088
|
-
var result, keys, index, length, tag, style, type;
|
|
26089
26333
|
if (map === null) return {};
|
|
26090
|
-
result = {};
|
|
26091
|
-
keys = Object.keys(map);
|
|
26092
|
-
for (index = 0, length = keys.length; index < length; index += 1) {
|
|
26093
|
-
tag = keys[index];
|
|
26094
|
-
style = String(map[tag]);
|
|
26334
|
+
const result = {};
|
|
26335
|
+
const keys = Object.keys(map);
|
|
26336
|
+
for (let index = 0, length = keys.length; index < length; index += 1) {
|
|
26337
|
+
let tag = keys[index];
|
|
26338
|
+
let style = String(map[tag]);
|
|
26095
26339
|
if (tag.slice(0, 2) === "!!") {
|
|
26096
26340
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
26097
26341
|
}
|
|
26098
|
-
type = schema.compiledTypeMap["fallback"][tag];
|
|
26342
|
+
const type = schema.compiledTypeMap["fallback"][tag];
|
|
26099
26343
|
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
|
26100
26344
|
style = type.styleAliases[style];
|
|
26101
26345
|
}
|
|
@@ -26104,8 +26348,9 @@ var require_dumper = __commonJS({
|
|
|
26104
26348
|
return result;
|
|
26105
26349
|
}
|
|
26106
26350
|
function encodeHex(character) {
|
|
26107
|
-
|
|
26108
|
-
|
|
26351
|
+
let handle;
|
|
26352
|
+
let length;
|
|
26353
|
+
const string = character.toString(16).toUpperCase();
|
|
26109
26354
|
if (character <= 255) {
|
|
26110
26355
|
handle = "x";
|
|
26111
26356
|
length = 2;
|
|
@@ -26145,9 +26390,13 @@ var require_dumper = __commonJS({
|
|
|
26145
26390
|
this.usedDuplicates = null;
|
|
26146
26391
|
}
|
|
26147
26392
|
function indentString(string, spaces) {
|
|
26148
|
-
|
|
26393
|
+
const ind = common.repeat(" ", spaces);
|
|
26394
|
+
let position = 0;
|
|
26395
|
+
let result = "";
|
|
26396
|
+
const length = string.length;
|
|
26149
26397
|
while (position < length) {
|
|
26150
|
-
|
|
26398
|
+
let line;
|
|
26399
|
+
const next = string.indexOf("\n", position);
|
|
26151
26400
|
if (next === -1) {
|
|
26152
26401
|
line = string.slice(position);
|
|
26153
26402
|
position = length;
|
|
@@ -26164,9 +26413,8 @@ var require_dumper = __commonJS({
|
|
|
26164
26413
|
return "\n" + common.repeat(" ", state.indent * level);
|
|
26165
26414
|
}
|
|
26166
26415
|
function testImplicitResolving(state, str) {
|
|
26167
|
-
|
|
26168
|
-
|
|
26169
|
-
type = state.implicitTypes[index];
|
|
26416
|
+
for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) {
|
|
26417
|
+
const type = state.implicitTypes[index];
|
|
26170
26418
|
if (type.resolve(str)) {
|
|
26171
26419
|
return true;
|
|
26172
26420
|
}
|
|
@@ -26177,30 +26425,39 @@ var require_dumper = __commonJS({
|
|
|
26177
26425
|
return c === CHAR_SPACE || c === CHAR_TAB;
|
|
26178
26426
|
}
|
|
26179
26427
|
function isPrintable(c) {
|
|
26180
|
-
return
|
|
26428
|
+
return c >= 32 && c <= 126 || c >= 161 && c <= 55295 && c !== 8232 && c !== 8233 || c >= 57344 && c <= 65533 && c !== CHAR_BOM || c >= 65536 && c <= 1114111;
|
|
26181
26429
|
}
|
|
26182
26430
|
function isNsCharOrWhitespace(c) {
|
|
26183
|
-
return isPrintable(c) && c !== CHAR_BOM &&
|
|
26431
|
+
return isPrintable(c) && c !== CHAR_BOM && // - b-char
|
|
26432
|
+
c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
|
|
26184
26433
|
}
|
|
26185
26434
|
function isPlainSafe(c, prev, inblock) {
|
|
26186
|
-
|
|
26187
|
-
|
|
26435
|
+
const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
|
|
26436
|
+
const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
|
|
26188
26437
|
return (
|
|
26189
26438
|
// ns-plain-safe
|
|
26190
|
-
(inblock ?
|
|
26191
|
-
|
|
26192
|
-
|
|
26193
|
-
|
|
26439
|
+
(inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && // - c-flow-indicator
|
|
26440
|
+
c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && // ns-plain-char
|
|
26441
|
+
c !== CHAR_SHARP && // false on '#'
|
|
26442
|
+
!(prev === CHAR_COLON && !cIsNsChar) || // false on ': '
|
|
26443
|
+
isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || // change to true on '[^ ]#'
|
|
26444
|
+
prev === CHAR_COLON && cIsNsChar
|
|
26194
26445
|
);
|
|
26195
26446
|
}
|
|
26196
26447
|
function isPlainSafeFirst(c) {
|
|
26197
|
-
return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) &&
|
|
26448
|
+
return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && // - s-white
|
|
26449
|
+
// - (c-indicator ::=
|
|
26450
|
+
// “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
|
|
26451
|
+
c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
|
|
26452
|
+
c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && // | “%” | “@” | “`”)
|
|
26453
|
+
c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|
|
26198
26454
|
}
|
|
26199
26455
|
function isPlainSafeLast(c) {
|
|
26200
26456
|
return !isWhitespace(c) && c !== CHAR_COLON;
|
|
26201
26457
|
}
|
|
26202
26458
|
function codePointAt(string, pos) {
|
|
26203
|
-
|
|
26459
|
+
const first = string.charCodeAt(pos);
|
|
26460
|
+
let second;
|
|
26204
26461
|
if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
|
|
26205
26462
|
second = string.charCodeAt(pos + 1);
|
|
26206
26463
|
if (second >= 56320 && second <= 57343) {
|
|
@@ -26210,7 +26467,7 @@ var require_dumper = __commonJS({
|
|
|
26210
26467
|
return first;
|
|
26211
26468
|
}
|
|
26212
26469
|
function needIndentIndicator(string) {
|
|
26213
|
-
|
|
26470
|
+
const leadingSpaceRe = /^\n* /;
|
|
26214
26471
|
return leadingSpaceRe.test(string);
|
|
26215
26472
|
}
|
|
26216
26473
|
var STYLE_PLAIN = 1;
|
|
@@ -26219,14 +26476,14 @@ var require_dumper = __commonJS({
|
|
|
26219
26476
|
var STYLE_FOLDED = 4;
|
|
26220
26477
|
var STYLE_DOUBLE = 5;
|
|
26221
26478
|
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
|
|
26222
|
-
|
|
26223
|
-
|
|
26224
|
-
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26229
|
-
|
|
26479
|
+
let i;
|
|
26480
|
+
let char = 0;
|
|
26481
|
+
let prevChar = null;
|
|
26482
|
+
let hasLineBreak = false;
|
|
26483
|
+
let hasFoldableLine = false;
|
|
26484
|
+
const shouldTrackWidth = lineWidth !== -1;
|
|
26485
|
+
let previousLineBreak = -1;
|
|
26486
|
+
let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
|
|
26230
26487
|
if (singleLineOnly || forceQuotes) {
|
|
26231
26488
|
for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
26232
26489
|
char = codePointAt(string, i);
|
|
@@ -26278,9 +26535,10 @@ var require_dumper = __commonJS({
|
|
|
26278
26535
|
return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
|
|
26279
26536
|
}
|
|
26280
26537
|
}
|
|
26281
|
-
|
|
26282
|
-
|
|
26283
|
-
|
|
26538
|
+
const indent = state.indent * Math.max(1, level);
|
|
26539
|
+
const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
|
|
26540
|
+
const singleLineOnly = iskey || // No block styles in flow mode.
|
|
26541
|
+
state.flowLevel > -1 && level >= state.flowLevel;
|
|
26284
26542
|
function testAmbiguity(string2) {
|
|
26285
26543
|
return testImplicitResolving(state, string2);
|
|
26286
26544
|
}
|
|
@@ -26310,28 +26568,29 @@ var require_dumper = __commonJS({
|
|
|
26310
26568
|
})();
|
|
26311
26569
|
}
|
|
26312
26570
|
function blockHeader(string, indentPerLevel) {
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
|
|
26571
|
+
const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
|
26572
|
+
const clip = string[string.length - 1] === "\n";
|
|
26573
|
+
const keep = clip && (string[string.length - 2] === "\n" || string === "\n");
|
|
26574
|
+
const chomp = keep ? "+" : clip ? "" : "-";
|
|
26317
26575
|
return indentIndicator + chomp + "\n";
|
|
26318
26576
|
}
|
|
26319
26577
|
function dropEndingNewline(string) {
|
|
26320
26578
|
return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
|
|
26321
26579
|
}
|
|
26322
26580
|
function foldString(string, width) {
|
|
26323
|
-
|
|
26324
|
-
|
|
26325
|
-
|
|
26581
|
+
const lineRe = /(\n+)([^\n]*)/g;
|
|
26582
|
+
let result = (function() {
|
|
26583
|
+
let nextLF = string.indexOf("\n");
|
|
26326
26584
|
nextLF = nextLF !== -1 ? nextLF : string.length;
|
|
26327
26585
|
lineRe.lastIndex = nextLF;
|
|
26328
26586
|
return foldLine(string.slice(0, nextLF), width);
|
|
26329
26587
|
})();
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
|
|
26588
|
+
let prevMoreIndented = string[0] === "\n" || string[0] === " ";
|
|
26589
|
+
let moreIndented;
|
|
26590
|
+
let match;
|
|
26333
26591
|
while (match = lineRe.exec(string)) {
|
|
26334
|
-
|
|
26592
|
+
const prefix = match[1];
|
|
26593
|
+
const line = match[2];
|
|
26335
26594
|
moreIndented = line[0] === " ";
|
|
26336
26595
|
result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
|
|
26337
26596
|
prevMoreIndented = moreIndented;
|
|
@@ -26340,10 +26599,13 @@ var require_dumper = __commonJS({
|
|
|
26340
26599
|
}
|
|
26341
26600
|
function foldLine(line, width) {
|
|
26342
26601
|
if (line === "" || line[0] === " ") return line;
|
|
26343
|
-
|
|
26344
|
-
|
|
26345
|
-
|
|
26346
|
-
|
|
26602
|
+
const breakRe = / [^ ]/g;
|
|
26603
|
+
let match;
|
|
26604
|
+
let start = 0;
|
|
26605
|
+
let end;
|
|
26606
|
+
let curr = 0;
|
|
26607
|
+
let next = 0;
|
|
26608
|
+
let result = "";
|
|
26347
26609
|
while (match = breakRe.exec(line)) {
|
|
26348
26610
|
next = match.index;
|
|
26349
26611
|
if (next - start > width) {
|
|
@@ -26362,12 +26624,11 @@ var require_dumper = __commonJS({
|
|
|
26362
26624
|
return result.slice(1);
|
|
26363
26625
|
}
|
|
26364
26626
|
function escapeString(string) {
|
|
26365
|
-
|
|
26366
|
-
|
|
26367
|
-
|
|
26368
|
-
for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
26627
|
+
let result = "";
|
|
26628
|
+
let char = 0;
|
|
26629
|
+
for (let i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
26369
26630
|
char = codePointAt(string, i);
|
|
26370
|
-
escapeSeq = ESCAPE_SEQUENCES[char];
|
|
26631
|
+
const escapeSeq = ESCAPE_SEQUENCES[char];
|
|
26371
26632
|
if (!escapeSeq && isPrintable(char)) {
|
|
26372
26633
|
result += string[i];
|
|
26373
26634
|
if (char >= 65536) result += string[i + 1];
|
|
@@ -26378,9 +26639,10 @@ var require_dumper = __commonJS({
|
|
|
26378
26639
|
return result;
|
|
26379
26640
|
}
|
|
26380
26641
|
function writeFlowSequence(state, level, object) {
|
|
26381
|
-
|
|
26382
|
-
|
|
26383
|
-
|
|
26642
|
+
let _result = "";
|
|
26643
|
+
const _tag = state.tag;
|
|
26644
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
26645
|
+
let value = object[index];
|
|
26384
26646
|
if (state.replacer) {
|
|
26385
26647
|
value = state.replacer.call(object, String(index), value);
|
|
26386
26648
|
}
|
|
@@ -26393,9 +26655,10 @@ var require_dumper = __commonJS({
|
|
|
26393
26655
|
state.dump = "[" + _result + "]";
|
|
26394
26656
|
}
|
|
26395
26657
|
function writeBlockSequence(state, level, object, compact) {
|
|
26396
|
-
|
|
26397
|
-
|
|
26398
|
-
|
|
26658
|
+
let _result = "";
|
|
26659
|
+
const _tag = state.tag;
|
|
26660
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
26661
|
+
let value = object[index];
|
|
26399
26662
|
if (state.replacer) {
|
|
26400
26663
|
value = state.replacer.call(object, String(index), value);
|
|
26401
26664
|
}
|
|
@@ -26415,13 +26678,15 @@ var require_dumper = __commonJS({
|
|
|
26415
26678
|
state.dump = _result || "[]";
|
|
26416
26679
|
}
|
|
26417
26680
|
function writeFlowMapping(state, level, object) {
|
|
26418
|
-
|
|
26419
|
-
|
|
26420
|
-
|
|
26681
|
+
let _result = "";
|
|
26682
|
+
const _tag = state.tag;
|
|
26683
|
+
const objectKeyList = Object.keys(object);
|
|
26684
|
+
for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
26685
|
+
let pairBuffer = "";
|
|
26421
26686
|
if (_result !== "") pairBuffer += ", ";
|
|
26422
26687
|
if (state.condenseFlow) pairBuffer += '"';
|
|
26423
|
-
objectKey = objectKeyList[index];
|
|
26424
|
-
objectValue = object[objectKey];
|
|
26688
|
+
const objectKey = objectKeyList[index];
|
|
26689
|
+
let objectValue = object[objectKey];
|
|
26425
26690
|
if (state.replacer) {
|
|
26426
26691
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
26427
26692
|
}
|
|
@@ -26440,7 +26705,9 @@ var require_dumper = __commonJS({
|
|
|
26440
26705
|
state.dump = "{" + _result + "}";
|
|
26441
26706
|
}
|
|
26442
26707
|
function writeBlockMapping(state, level, object, compact) {
|
|
26443
|
-
|
|
26708
|
+
let _result = "";
|
|
26709
|
+
const _tag = state.tag;
|
|
26710
|
+
const objectKeyList = Object.keys(object);
|
|
26444
26711
|
if (state.sortKeys === true) {
|
|
26445
26712
|
objectKeyList.sort();
|
|
26446
26713
|
} else if (typeof state.sortKeys === "function") {
|
|
@@ -26448,20 +26715,20 @@ var require_dumper = __commonJS({
|
|
|
26448
26715
|
} else if (state.sortKeys) {
|
|
26449
26716
|
throw new YAMLException("sortKeys must be a boolean or a function");
|
|
26450
26717
|
}
|
|
26451
|
-
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
26452
|
-
pairBuffer = "";
|
|
26718
|
+
for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
26719
|
+
let pairBuffer = "";
|
|
26453
26720
|
if (!compact || _result !== "") {
|
|
26454
26721
|
pairBuffer += generateNextLine(state, level);
|
|
26455
26722
|
}
|
|
26456
|
-
objectKey = objectKeyList[index];
|
|
26457
|
-
objectValue = object[objectKey];
|
|
26723
|
+
const objectKey = objectKeyList[index];
|
|
26724
|
+
let objectValue = object[objectKey];
|
|
26458
26725
|
if (state.replacer) {
|
|
26459
26726
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
26460
26727
|
}
|
|
26461
26728
|
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
|
|
26462
26729
|
continue;
|
|
26463
26730
|
}
|
|
26464
|
-
explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
26731
|
+
const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
26465
26732
|
if (explicitPair) {
|
|
26466
26733
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
26467
26734
|
pairBuffer += "?";
|
|
@@ -26488,10 +26755,9 @@ var require_dumper = __commonJS({
|
|
|
26488
26755
|
state.dump = _result || "{}";
|
|
26489
26756
|
}
|
|
26490
26757
|
function detectType(state, object, explicit) {
|
|
26491
|
-
|
|
26492
|
-
|
|
26493
|
-
|
|
26494
|
-
type = typeList[index];
|
|
26758
|
+
const typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
26759
|
+
for (let index = 0, length = typeList.length; index < length; index += 1) {
|
|
26760
|
+
const type = typeList[index];
|
|
26495
26761
|
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
|
26496
26762
|
if (explicit) {
|
|
26497
26763
|
if (type.multi && type.representName) {
|
|
@@ -26503,7 +26769,8 @@ var require_dumper = __commonJS({
|
|
|
26503
26769
|
state.tag = "?";
|
|
26504
26770
|
}
|
|
26505
26771
|
if (type.represent) {
|
|
26506
|
-
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
26772
|
+
const style = state.styleMap[type.tag] || type.defaultStyle;
|
|
26773
|
+
let _result;
|
|
26507
26774
|
if (_toString.call(type.represent) === "[object Function]") {
|
|
26508
26775
|
_result = type.represent(object, style);
|
|
26509
26776
|
} else if (_hasOwnProperty.call(type.represent, style)) {
|
|
@@ -26524,13 +26791,14 @@ var require_dumper = __commonJS({
|
|
|
26524
26791
|
if (!detectType(state, object, false)) {
|
|
26525
26792
|
detectType(state, object, true);
|
|
26526
26793
|
}
|
|
26527
|
-
|
|
26528
|
-
|
|
26529
|
-
var tagStr;
|
|
26794
|
+
const type = _toString.call(state.dump);
|
|
26795
|
+
const inblock = block;
|
|
26530
26796
|
if (block) {
|
|
26531
26797
|
block = state.flowLevel < 0 || state.flowLevel > level;
|
|
26532
26798
|
}
|
|
26533
|
-
|
|
26799
|
+
const objectOrArray = type === "[object Object]" || type === "[object Array]";
|
|
26800
|
+
let duplicateIndex;
|
|
26801
|
+
let duplicate;
|
|
26534
26802
|
if (objectOrArray) {
|
|
26535
26803
|
duplicateIndex = state.duplicates.indexOf(object);
|
|
26536
26804
|
duplicate = duplicateIndex !== -1;
|
|
@@ -26583,7 +26851,7 @@ var require_dumper = __commonJS({
|
|
|
26583
26851
|
throw new YAMLException("unacceptable kind of an object to dump " + type);
|
|
26584
26852
|
}
|
|
26585
26853
|
if (state.tag !== null && state.tag !== "?") {
|
|
26586
|
-
tagStr = encodeURI(
|
|
26854
|
+
let tagStr = encodeURI(
|
|
26587
26855
|
state.tag[0] === "!" ? state.tag.slice(1) : state.tag
|
|
26588
26856
|
).replace(/!/g, "%21");
|
|
26589
26857
|
if (state.tag[0] === "!") {
|
|
@@ -26599,17 +26867,18 @@ var require_dumper = __commonJS({
|
|
|
26599
26867
|
return true;
|
|
26600
26868
|
}
|
|
26601
26869
|
function getDuplicateReferences(object, state) {
|
|
26602
|
-
|
|
26870
|
+
const objects = [];
|
|
26871
|
+
const duplicatesIndexes = [];
|
|
26603
26872
|
inspectNode(object, objects, duplicatesIndexes);
|
|
26604
|
-
|
|
26873
|
+
const length = duplicatesIndexes.length;
|
|
26874
|
+
for (let index = 0; index < length; index += 1) {
|
|
26605
26875
|
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
|
26606
26876
|
}
|
|
26607
26877
|
state.usedDuplicates = new Array(length);
|
|
26608
26878
|
}
|
|
26609
26879
|
function inspectNode(object, objects, duplicatesIndexes) {
|
|
26610
|
-
var objectKeyList, index, length;
|
|
26611
26880
|
if (object !== null && typeof object === "object") {
|
|
26612
|
-
index = objects.indexOf(object);
|
|
26881
|
+
const index = objects.indexOf(object);
|
|
26613
26882
|
if (index !== -1) {
|
|
26614
26883
|
if (duplicatesIndexes.indexOf(index) === -1) {
|
|
26615
26884
|
duplicatesIndexes.push(index);
|
|
@@ -26617,13 +26886,13 @@ var require_dumper = __commonJS({
|
|
|
26617
26886
|
} else {
|
|
26618
26887
|
objects.push(object);
|
|
26619
26888
|
if (Array.isArray(object)) {
|
|
26620
|
-
for (
|
|
26621
|
-
inspectNode(object[
|
|
26889
|
+
for (let i = 0, length = object.length; i < length; i += 1) {
|
|
26890
|
+
inspectNode(object[i], objects, duplicatesIndexes);
|
|
26622
26891
|
}
|
|
26623
26892
|
} else {
|
|
26624
|
-
objectKeyList = Object.keys(object);
|
|
26625
|
-
for (
|
|
26626
|
-
inspectNode(object[objectKeyList[
|
|
26893
|
+
const objectKeyList = Object.keys(object);
|
|
26894
|
+
for (let i = 0, length = objectKeyList.length; i < length; i += 1) {
|
|
26895
|
+
inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes);
|
|
26627
26896
|
}
|
|
26628
26897
|
}
|
|
26629
26898
|
}
|
|
@@ -26631,9 +26900,9 @@ var require_dumper = __commonJS({
|
|
|
26631
26900
|
}
|
|
26632
26901
|
function dump(input, options) {
|
|
26633
26902
|
options = options || {};
|
|
26634
|
-
|
|
26903
|
+
const state = new State(options);
|
|
26635
26904
|
if (!state.noRefs) getDuplicateReferences(input, state);
|
|
26636
|
-
|
|
26905
|
+
let value = input;
|
|
26637
26906
|
if (state.replacer) {
|
|
26638
26907
|
value = state.replacer.call({ "": value }, "", value);
|
|
26639
26908
|
}
|
|
@@ -49838,7 +50107,7 @@ var require_purify_cjs = __commonJS({
|
|
|
49838
50107
|
function createDOMPurify() {
|
|
49839
50108
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
49840
50109
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
49841
|
-
DOMPurify.version = "3.4.
|
|
50110
|
+
DOMPurify.version = "3.4.11";
|
|
49842
50111
|
DOMPurify.removed = [];
|
|
49843
50112
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
49844
50113
|
DOMPurify.isSupported = false;
|
|
@@ -49957,6 +50226,8 @@ var require_purify_cjs = __commonJS({
|
|
|
49957
50226
|
let SAFE_FOR_XML = true;
|
|
49958
50227
|
let WHOLE_DOCUMENT = false;
|
|
49959
50228
|
let SET_CONFIG = false;
|
|
50229
|
+
let SET_CONFIG_ALLOWED_TAGS = null;
|
|
50230
|
+
let SET_CONFIG_ALLOWED_ATTR = null;
|
|
49960
50231
|
let FORCE_BODY = false;
|
|
49961
50232
|
let RETURN_DOM = false;
|
|
49962
50233
|
let RETURN_DOM_FRAGMENT = false;
|
|
@@ -50202,12 +50473,6 @@ var require_purify_cjs = __commonJS({
|
|
|
50202
50473
|
emptyHTML = _createTrustedHTML("");
|
|
50203
50474
|
}
|
|
50204
50475
|
}
|
|
50205
|
-
if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
50206
|
-
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
50207
|
-
}
|
|
50208
|
-
if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
50209
|
-
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
50210
|
-
}
|
|
50211
50476
|
if (freeze) {
|
|
50212
50477
|
freeze(cfg);
|
|
50213
50478
|
}
|
|
@@ -50800,9 +51065,18 @@ var require_purify_cjs = __commonJS({
|
|
|
50800
51065
|
if (!DOMPurify.isSupported) {
|
|
50801
51066
|
return dirty;
|
|
50802
51067
|
}
|
|
50803
|
-
if (
|
|
51068
|
+
if (SET_CONFIG) {
|
|
51069
|
+
ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
|
|
51070
|
+
ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
|
|
51071
|
+
} else {
|
|
50804
51072
|
_parseConfig(cfg);
|
|
50805
51073
|
}
|
|
51074
|
+
if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {
|
|
51075
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
51076
|
+
}
|
|
51077
|
+
if (hooks.uponSanitizeAttribute.length > 0) {
|
|
51078
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
51079
|
+
}
|
|
50806
51080
|
DOMPurify.removed = [];
|
|
50807
51081
|
const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
|
|
50808
51082
|
if (inPlace) {
|
|
@@ -50902,10 +51176,14 @@ var require_purify_cjs = __commonJS({
|
|
|
50902
51176
|
let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
50903
51177
|
_parseConfig(cfg);
|
|
50904
51178
|
SET_CONFIG = true;
|
|
51179
|
+
SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
|
|
51180
|
+
SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
|
|
50905
51181
|
};
|
|
50906
51182
|
DOMPurify.clearConfig = function() {
|
|
50907
51183
|
CONFIG = null;
|
|
50908
51184
|
SET_CONFIG = false;
|
|
51185
|
+
SET_CONFIG_ALLOWED_TAGS = null;
|
|
51186
|
+
SET_CONFIG_ALLOWED_ATTR = null;
|
|
50909
51187
|
trustedTypesPolicy = defaultTrustedTypesPolicy;
|
|
50910
51188
|
emptyHTML = "";
|
|
50911
51189
|
};
|
|
@@ -50921,9 +51199,15 @@ var require_purify_cjs = __commonJS({
|
|
|
50921
51199
|
if (typeof hookFunction !== "function") {
|
|
50922
51200
|
return;
|
|
50923
51201
|
}
|
|
51202
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
51203
|
+
return;
|
|
51204
|
+
}
|
|
50924
51205
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
50925
51206
|
};
|
|
50926
51207
|
DOMPurify.removeHook = function(entryPoint, hookFunction) {
|
|
51208
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
51209
|
+
return void 0;
|
|
51210
|
+
}
|
|
50927
51211
|
if (hookFunction !== void 0) {
|
|
50928
51212
|
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
50929
51213
|
return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
@@ -50931,6 +51215,9 @@ var require_purify_cjs = __commonJS({
|
|
|
50931
51215
|
return arrayPop(hooks[entryPoint]);
|
|
50932
51216
|
};
|
|
50933
51217
|
DOMPurify.removeHooks = function(entryPoint) {
|
|
51218
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
51219
|
+
return;
|
|
51220
|
+
}
|
|
50934
51221
|
hooks[entryPoint] = [];
|
|
50935
51222
|
};
|
|
50936
51223
|
DOMPurify.removeAllHooks = function() {
|
|
@@ -91917,7 +92204,7 @@ async function getPageHTML(api, pathToApi, {
|
|
|
91917
92204
|
templateFileName,
|
|
91918
92205
|
templateOptions,
|
|
91919
92206
|
redocOptions = {},
|
|
91920
|
-
|
|
92207
|
+
redocVersion: redocVersion2
|
|
91921
92208
|
}, configPath) {
|
|
91922
92209
|
logger.info("Prerendering docs\n");
|
|
91923
92210
|
const apiUrl = redocOptions.specUrl || (isAbsoluteUrl(pathToApi) ? pathToApi : void 0);
|
|
@@ -91939,7 +92226,7 @@ async function getPageHTML(api, pathToApi, {
|
|
|
91939
92226
|
Redoc.${"hydrate(__redoc_state, container)"};
|
|
91940
92227
|
|
|
91941
92228
|
</script>`,
|
|
91942
|
-
redocHead: `<script src="https://cdn.redocly.com/redoc/v${
|
|
92229
|
+
redocHead: `<script src="https://cdn.redocly.com/redoc/v${redocVersion2}/bundles/redoc.standalone.js" integrity="${redocStandaloneSri}" crossorigin="anonymous"></script>` + css,
|
|
91943
92230
|
title: title || api.info.title || "ReDoc documentation",
|
|
91944
92231
|
disableGoogleFont,
|
|
91945
92232
|
templateOptions
|
|
@@ -91978,12 +92265,7 @@ var handlerBuildCommand = async ({
|
|
|
91978
92265
|
isAbsoluteUrl(pathToApi) ? pathToApi : resolve2(pathToApi)
|
|
91979
92266
|
);
|
|
91980
92267
|
collectSpecData?.(api);
|
|
91981
|
-
const pageHTML = await getPageHTML(
|
|
91982
|
-
api,
|
|
91983
|
-
pathToApi,
|
|
91984
|
-
{ ...options, redocCurrentVersion: redocVersion },
|
|
91985
|
-
argv.config
|
|
91986
|
-
);
|
|
92268
|
+
const pageHTML = await getPageHTML(api, pathToApi, { ...options, redocVersion }, argv.config);
|
|
91987
92269
|
mkdirSync(dirname2(options.output), { recursive: true });
|
|
91988
92270
|
writeFileSync(options.output, pageHTML);
|
|
91989
92271
|
const sizeInKiB = Math.ceil(Buffer.byteLength(pageHTML) / 1024);
|
|
@@ -92137,7 +92419,7 @@ perfect-scrollbar/dist/perfect-scrollbar.common.js:
|
|
|
92137
92419
|
*)
|
|
92138
92420
|
|
|
92139
92421
|
dompurify/dist/purify.cjs.js:
|
|
92140
|
-
(*! @license DOMPurify 3.4.
|
|
92422
|
+
(*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE *)
|
|
92141
92423
|
|
|
92142
92424
|
react-dom/cjs/react-dom.production.js:
|
|
92143
92425
|
(**
|