@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3
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/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue2/arc-BqlAOiZb.js +78 -0
- package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue2/array-TB8zN_HT.js +5 -0
- package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue2/channel-edTl5mpN.js +3 -0
- package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue2/chunk-DNh5sLlG.js +18 -0
- package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue2/clone-Bbr3WSpg.js +7 -0
- package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue2/dist-xWJvauxf.js +49 -0
- package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue2/flatten-CfPhNHUL.js +34 -0
- package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue2/index.es.min.js +26703 -786
- package/dist/vue2/index.umd.min.js +2796 -9
- package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue2/init-hAkIK9Bd.js +13 -0
- package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue2/katex-CEAw-xiA.js +22097 -0
- package/dist/vue2/katex-D8o5-F7C.js +2 -0
- package/dist/vue2/line-wvheYP7S.js +30 -0
- package/dist/vue2/linear-STTevhnH.js +250 -0
- package/dist/vue2/math-DF_v6dOl.js +8 -0
- package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue2/path-CW_-_Ti7.js +79 -0
- package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue2/src-VlKYSsxJ.js +1975 -0
- package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue3/arc-BqlAOiZb.js +78 -0
- package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue3/array-TB8zN_HT.js +5 -0
- package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue3/channel-edTl5mpN.js +3 -0
- package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue3/chunk-DNh5sLlG.js +18 -0
- package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue3/clone-Bbr3WSpg.js +7 -0
- package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue3/dist-xWJvauxf.js +49 -0
- package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue3/flatten-CfPhNHUL.js +34 -0
- package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue3/index.es.min.js +26730 -813
- package/dist/vue3/index.umd.min.js +2796 -9
- package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue3/init-hAkIK9Bd.js +13 -0
- package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue3/katex-CEAw-xiA.js +22097 -0
- package/dist/vue3/katex-D8o5-F7C.js +2 -0
- package/dist/vue3/line-wvheYP7S.js +30 -0
- package/dist/vue3/linear-STTevhnH.js +250 -0
- package/dist/vue3/math-DF_v6dOl.js +8 -0
- package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue3/path-CW_-_Ti7.js +79 -0
- package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue3/src-VlKYSsxJ.js +1975 -0
- package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/package.json +3 -3
|
@@ -0,0 +1,1140 @@
|
|
|
1
|
+
import { h as __name } from "./src-VlKYSsxJ.js";
|
|
2
|
+
function isNothing(c) {
|
|
3
|
+
return c == null;
|
|
4
|
+
}
|
|
5
|
+
__name(isNothing, "isNothing");
|
|
6
|
+
function isObject(c) {
|
|
7
|
+
return typeof c == "object" && !!c;
|
|
8
|
+
}
|
|
9
|
+
__name(isObject, "isObject");
|
|
10
|
+
function toArray(c) {
|
|
11
|
+
return Array.isArray(c) ? c : isNothing(c) ? [] : [c];
|
|
12
|
+
}
|
|
13
|
+
__name(toArray, "toArray");
|
|
14
|
+
function extend(c, I) {
|
|
15
|
+
var L, R, z, B;
|
|
16
|
+
if (I) for (B = Object.keys(I), L = 0, R = B.length; L < R; L += 1) z = B[L], c[z] = I[z];
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
__name(extend, "extend");
|
|
20
|
+
function repeat(c, I) {
|
|
21
|
+
var L = "", R;
|
|
22
|
+
for (R = 0; R < I; R += 1) L += c;
|
|
23
|
+
return L;
|
|
24
|
+
}
|
|
25
|
+
__name(repeat, "repeat");
|
|
26
|
+
function isNegativeZero(c) {
|
|
27
|
+
return c === 0 && 1 / c == -Infinity;
|
|
28
|
+
}
|
|
29
|
+
__name(isNegativeZero, "isNegativeZero");
|
|
30
|
+
var common = {
|
|
31
|
+
isNothing,
|
|
32
|
+
isObject,
|
|
33
|
+
toArray,
|
|
34
|
+
repeat,
|
|
35
|
+
isNegativeZero,
|
|
36
|
+
extend
|
|
37
|
+
};
|
|
38
|
+
function formatError(c, I) {
|
|
39
|
+
var L = "", R = c.reason || "(unknown reason)";
|
|
40
|
+
return c.mark ? (c.mark.name && (L += "in \"" + c.mark.name + "\" "), L += "(" + (c.mark.line + 1) + ":" + (c.mark.column + 1) + ")", !I && c.mark.snippet && (L += "\n\n" + c.mark.snippet), R + " " + L) : R;
|
|
41
|
+
}
|
|
42
|
+
__name(formatError, "formatError");
|
|
43
|
+
function YAMLException$1(c, I) {
|
|
44
|
+
Error.call(this), this.name = "YAMLException", this.reason = c, this.mark = I, this.message = formatError(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
|
|
45
|
+
}
|
|
46
|
+
__name(YAMLException$1, "YAMLException$1"), YAMLException$1.prototype = Object.create(Error.prototype), YAMLException$1.prototype.constructor = YAMLException$1, YAMLException$1.prototype.toString = /* @__PURE__ */ __name(function(c) {
|
|
47
|
+
return this.name + ": " + formatError(this, c);
|
|
48
|
+
}, "toString");
|
|
49
|
+
var exception = YAMLException$1;
|
|
50
|
+
function getLine(c, I, L, R, z) {
|
|
51
|
+
var B = "", V = "", H = Math.floor(z / 2) - 1;
|
|
52
|
+
return R - I > H && (B = " ... ", I = R - H + B.length), L - R > H && (V = " ...", L = R + H - V.length), {
|
|
53
|
+
str: B + c.slice(I, L).replace(/\t/g, "→") + V,
|
|
54
|
+
pos: R - I + B.length
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
__name(getLine, "getLine");
|
|
58
|
+
function padStart(c, I) {
|
|
59
|
+
return common.repeat(" ", I - c.length) + c;
|
|
60
|
+
}
|
|
61
|
+
__name(padStart, "padStart");
|
|
62
|
+
function makeSnippet(c, I) {
|
|
63
|
+
if (I = Object.create(I || null), !c.buffer) return null;
|
|
64
|
+
I.maxLength ||= 79, typeof I.indent != "number" && (I.indent = 1), typeof I.linesBefore != "number" && (I.linesBefore = 3), typeof I.linesAfter != "number" && (I.linesAfter = 2);
|
|
65
|
+
for (var L = /\r?\n|\r|\0/g, R = [0], z = [], B, V = -1; B = L.exec(c.buffer);) z.push(B.index), R.push(B.index + B[0].length), c.position <= B.index && V < 0 && (V = R.length - 2);
|
|
66
|
+
V < 0 && (V = R.length - 1);
|
|
67
|
+
var U = "", W, G, J = Math.min(c.line + I.linesAfter, z.length).toString().length, Y = I.maxLength - (I.indent + J + 3);
|
|
68
|
+
for (W = 1; W <= I.linesBefore && !(V - W < 0); W++) G = getLine(c.buffer, R[V - W], z[V - W], c.position - (R[V] - R[V - W]), Y), U = common.repeat(" ", I.indent) + padStart((c.line - W + 1).toString(), J) + " | " + G.str + "\n" + U;
|
|
69
|
+
for (G = getLine(c.buffer, R[V], z[V], c.position, Y), U += common.repeat(" ", I.indent) + padStart((c.line + 1).toString(), J) + " | " + G.str + "\n", U += common.repeat("-", I.indent + J + 3 + G.pos) + "^\n", W = 1; W <= I.linesAfter && !(V + W >= z.length); W++) G = getLine(c.buffer, R[V + W], z[V + W], c.position - (R[V] - R[V + W]), Y), U += common.repeat(" ", I.indent) + padStart((c.line + W + 1).toString(), J) + " | " + G.str + "\n";
|
|
70
|
+
return U.replace(/\n$/, "");
|
|
71
|
+
}
|
|
72
|
+
__name(makeSnippet, "makeSnippet");
|
|
73
|
+
var snippet = makeSnippet, TYPE_CONSTRUCTOR_OPTIONS = [
|
|
74
|
+
"kind",
|
|
75
|
+
"multi",
|
|
76
|
+
"resolve",
|
|
77
|
+
"construct",
|
|
78
|
+
"instanceOf",
|
|
79
|
+
"predicate",
|
|
80
|
+
"represent",
|
|
81
|
+
"representName",
|
|
82
|
+
"defaultStyle",
|
|
83
|
+
"styleAliases"
|
|
84
|
+
], YAML_NODE_KINDS = [
|
|
85
|
+
"scalar",
|
|
86
|
+
"sequence",
|
|
87
|
+
"mapping"
|
|
88
|
+
];
|
|
89
|
+
function compileStyleAliases(c) {
|
|
90
|
+
var I = {};
|
|
91
|
+
return c !== null && Object.keys(c).forEach(function(L) {
|
|
92
|
+
c[L].forEach(function(c) {
|
|
93
|
+
I[String(c)] = L;
|
|
94
|
+
});
|
|
95
|
+
}), I;
|
|
96
|
+
}
|
|
97
|
+
__name(compileStyleAliases, "compileStyleAliases");
|
|
98
|
+
function Type$1(c, I) {
|
|
99
|
+
if (I ||= {}, Object.keys(I).forEach(function(I) {
|
|
100
|
+
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(I) === -1) throw new exception("Unknown option \"" + I + "\" is met in definition of \"" + c + "\" YAML type.");
|
|
101
|
+
}), this.options = I, this.tag = c, this.kind = I.kind || null, this.resolve = I.resolve || function() {
|
|
102
|
+
return !0;
|
|
103
|
+
}, this.construct = I.construct || function(c) {
|
|
104
|
+
return c;
|
|
105
|
+
}, this.instanceOf = I.instanceOf || null, this.predicate = I.predicate || null, this.represent = I.represent || null, this.representName = I.representName || null, this.defaultStyle = I.defaultStyle || null, this.multi = I.multi || !1, this.styleAliases = compileStyleAliases(I.styleAliases || null), YAML_NODE_KINDS.indexOf(this.kind) === -1) throw new exception("Unknown kind \"" + this.kind + "\" is specified for \"" + c + "\" YAML type.");
|
|
106
|
+
}
|
|
107
|
+
__name(Type$1, "Type$1");
|
|
108
|
+
var type = Type$1;
|
|
109
|
+
function compileList(c, I) {
|
|
110
|
+
var L = [];
|
|
111
|
+
return c[I].forEach(function(c) {
|
|
112
|
+
var I = L.length;
|
|
113
|
+
L.forEach(function(L, R) {
|
|
114
|
+
L.tag === c.tag && L.kind === c.kind && L.multi === c.multi && (I = R);
|
|
115
|
+
}), L[I] = c;
|
|
116
|
+
}), L;
|
|
117
|
+
}
|
|
118
|
+
__name(compileList, "compileList");
|
|
119
|
+
function compileMap() {
|
|
120
|
+
var I = {
|
|
121
|
+
scalar: {},
|
|
122
|
+
sequence: {},
|
|
123
|
+
mapping: {},
|
|
124
|
+
fallback: {},
|
|
125
|
+
multi: {
|
|
126
|
+
scalar: [],
|
|
127
|
+
sequence: [],
|
|
128
|
+
mapping: [],
|
|
129
|
+
fallback: []
|
|
130
|
+
}
|
|
131
|
+
}, L, R;
|
|
132
|
+
function z(c) {
|
|
133
|
+
c.multi ? (I.multi[c.kind].push(c), I.multi.fallback.push(c)) : I[c.kind][c.tag] = I.fallback[c.tag] = c;
|
|
134
|
+
}
|
|
135
|
+
for (__name(z, "collectType"), L = 0, R = arguments.length; L < R; L += 1) arguments[L].forEach(z);
|
|
136
|
+
return I;
|
|
137
|
+
}
|
|
138
|
+
__name(compileMap, "compileMap");
|
|
139
|
+
function Schema$1(c) {
|
|
140
|
+
return this.extend(c);
|
|
141
|
+
}
|
|
142
|
+
__name(Schema$1, "Schema$1"), Schema$1.prototype.extend = /* @__PURE__ */ __name(function(c) {
|
|
143
|
+
var I = [], L = [];
|
|
144
|
+
if (c instanceof type) L.push(c);
|
|
145
|
+
else if (Array.isArray(c)) L = L.concat(c);
|
|
146
|
+
else if (c && (Array.isArray(c.implicit) || Array.isArray(c.explicit))) c.implicit && (I = I.concat(c.implicit)), c.explicit && (L = L.concat(c.explicit));
|
|
147
|
+
else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
148
|
+
I.forEach(function(c) {
|
|
149
|
+
if (!(c instanceof type)) throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
150
|
+
if (c.loadKind && c.loadKind !== "scalar") throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
151
|
+
if (c.multi) throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
152
|
+
}), L.forEach(function(c) {
|
|
153
|
+
if (!(c instanceof type)) throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
154
|
+
});
|
|
155
|
+
var R = Object.create(Schema$1.prototype);
|
|
156
|
+
return R.implicit = (this.implicit || []).concat(I), R.explicit = (this.explicit || []).concat(L), R.compiledImplicit = compileList(R, "implicit"), R.compiledExplicit = compileList(R, "explicit"), R.compiledTypeMap = compileMap(R.compiledImplicit, R.compiledExplicit), R;
|
|
157
|
+
}, "extend");
|
|
158
|
+
var failsafe = new Schema$1({ explicit: [
|
|
159
|
+
new type("tag:yaml.org,2002:str", {
|
|
160
|
+
kind: "scalar",
|
|
161
|
+
construct: /* @__PURE__ */ __name(function(c) {
|
|
162
|
+
return c === null ? "" : c;
|
|
163
|
+
}, "construct")
|
|
164
|
+
}),
|
|
165
|
+
new type("tag:yaml.org,2002:seq", {
|
|
166
|
+
kind: "sequence",
|
|
167
|
+
construct: /* @__PURE__ */ __name(function(c) {
|
|
168
|
+
return c === null ? [] : c;
|
|
169
|
+
}, "construct")
|
|
170
|
+
}),
|
|
171
|
+
new type("tag:yaml.org,2002:map", {
|
|
172
|
+
kind: "mapping",
|
|
173
|
+
construct: /* @__PURE__ */ __name(function(c) {
|
|
174
|
+
return c === null ? {} : c;
|
|
175
|
+
}, "construct")
|
|
176
|
+
})
|
|
177
|
+
] });
|
|
178
|
+
function resolveYamlNull(c) {
|
|
179
|
+
if (c === null) return !0;
|
|
180
|
+
var I = c.length;
|
|
181
|
+
return I === 1 && c === "~" || I === 4 && (c === "null" || c === "Null" || c === "NULL");
|
|
182
|
+
}
|
|
183
|
+
__name(resolveYamlNull, "resolveYamlNull");
|
|
184
|
+
function constructYamlNull() {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
__name(constructYamlNull, "constructYamlNull");
|
|
188
|
+
function isNull(c) {
|
|
189
|
+
return c === null;
|
|
190
|
+
}
|
|
191
|
+
__name(isNull, "isNull");
|
|
192
|
+
var _null = new type("tag:yaml.org,2002:null", {
|
|
193
|
+
kind: "scalar",
|
|
194
|
+
resolve: resolveYamlNull,
|
|
195
|
+
construct: constructYamlNull,
|
|
196
|
+
predicate: isNull,
|
|
197
|
+
represent: {
|
|
198
|
+
canonical: /* @__PURE__ */ __name(function() {
|
|
199
|
+
return "~";
|
|
200
|
+
}, "canonical"),
|
|
201
|
+
lowercase: /* @__PURE__ */ __name(function() {
|
|
202
|
+
return "null";
|
|
203
|
+
}, "lowercase"),
|
|
204
|
+
uppercase: /* @__PURE__ */ __name(function() {
|
|
205
|
+
return "NULL";
|
|
206
|
+
}, "uppercase"),
|
|
207
|
+
camelcase: /* @__PURE__ */ __name(function() {
|
|
208
|
+
return "Null";
|
|
209
|
+
}, "camelcase"),
|
|
210
|
+
empty: /* @__PURE__ */ __name(function() {
|
|
211
|
+
return "";
|
|
212
|
+
}, "empty")
|
|
213
|
+
},
|
|
214
|
+
defaultStyle: "lowercase"
|
|
215
|
+
});
|
|
216
|
+
function resolveYamlBoolean(c) {
|
|
217
|
+
if (c === null) return !1;
|
|
218
|
+
var I = c.length;
|
|
219
|
+
return I === 4 && (c === "true" || c === "True" || c === "TRUE") || I === 5 && (c === "false" || c === "False" || c === "FALSE");
|
|
220
|
+
}
|
|
221
|
+
__name(resolveYamlBoolean, "resolveYamlBoolean");
|
|
222
|
+
function constructYamlBoolean(c) {
|
|
223
|
+
return c === "true" || c === "True" || c === "TRUE";
|
|
224
|
+
}
|
|
225
|
+
__name(constructYamlBoolean, "constructYamlBoolean");
|
|
226
|
+
function isBoolean(c) {
|
|
227
|
+
return Object.prototype.toString.call(c) === "[object Boolean]";
|
|
228
|
+
}
|
|
229
|
+
__name(isBoolean, "isBoolean");
|
|
230
|
+
var bool = new type("tag:yaml.org,2002:bool", {
|
|
231
|
+
kind: "scalar",
|
|
232
|
+
resolve: resolveYamlBoolean,
|
|
233
|
+
construct: constructYamlBoolean,
|
|
234
|
+
predicate: isBoolean,
|
|
235
|
+
represent: {
|
|
236
|
+
lowercase: /* @__PURE__ */ __name(function(c) {
|
|
237
|
+
return c ? "true" : "false";
|
|
238
|
+
}, "lowercase"),
|
|
239
|
+
uppercase: /* @__PURE__ */ __name(function(c) {
|
|
240
|
+
return c ? "TRUE" : "FALSE";
|
|
241
|
+
}, "uppercase"),
|
|
242
|
+
camelcase: /* @__PURE__ */ __name(function(c) {
|
|
243
|
+
return c ? "True" : "False";
|
|
244
|
+
}, "camelcase")
|
|
245
|
+
},
|
|
246
|
+
defaultStyle: "lowercase"
|
|
247
|
+
});
|
|
248
|
+
function isHexCode(c) {
|
|
249
|
+
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
|
250
|
+
}
|
|
251
|
+
__name(isHexCode, "isHexCode");
|
|
252
|
+
function isOctCode(c) {
|
|
253
|
+
return 48 <= c && c <= 55;
|
|
254
|
+
}
|
|
255
|
+
__name(isOctCode, "isOctCode");
|
|
256
|
+
function isDecCode(c) {
|
|
257
|
+
return 48 <= c && c <= 57;
|
|
258
|
+
}
|
|
259
|
+
__name(isDecCode, "isDecCode");
|
|
260
|
+
function resolveYamlInteger(c) {
|
|
261
|
+
if (c === null) return !1;
|
|
262
|
+
var I = c.length, L = 0, R = !1, z;
|
|
263
|
+
if (!I) return !1;
|
|
264
|
+
if (z = c[L], (z === "-" || z === "+") && (z = c[++L]), z === "0") {
|
|
265
|
+
if (L + 1 === I) return !0;
|
|
266
|
+
if (z = c[++L], z === "b") {
|
|
267
|
+
for (L++; L < I; L++) if (z = c[L], z !== "_") {
|
|
268
|
+
if (z !== "0" && z !== "1") return !1;
|
|
269
|
+
R = !0;
|
|
270
|
+
}
|
|
271
|
+
return R && z !== "_";
|
|
272
|
+
}
|
|
273
|
+
if (z === "x") {
|
|
274
|
+
for (L++; L < I; L++) if (z = c[L], z !== "_") {
|
|
275
|
+
if (!isHexCode(c.charCodeAt(L))) return !1;
|
|
276
|
+
R = !0;
|
|
277
|
+
}
|
|
278
|
+
return R && z !== "_";
|
|
279
|
+
}
|
|
280
|
+
if (z === "o") {
|
|
281
|
+
for (L++; L < I; L++) if (z = c[L], z !== "_") {
|
|
282
|
+
if (!isOctCode(c.charCodeAt(L))) return !1;
|
|
283
|
+
R = !0;
|
|
284
|
+
}
|
|
285
|
+
return R && z !== "_";
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (z === "_") return !1;
|
|
289
|
+
for (; L < I; L++) if (z = c[L], z !== "_") {
|
|
290
|
+
if (!isDecCode(c.charCodeAt(L))) return !1;
|
|
291
|
+
R = !0;
|
|
292
|
+
}
|
|
293
|
+
return !(!R || z === "_");
|
|
294
|
+
}
|
|
295
|
+
__name(resolveYamlInteger, "resolveYamlInteger");
|
|
296
|
+
function constructYamlInteger(c) {
|
|
297
|
+
var I = c, L = 1, R;
|
|
298
|
+
if (I.indexOf("_") !== -1 && (I = I.replace(/_/g, "")), R = I[0], (R === "-" || R === "+") && (R === "-" && (L = -1), I = I.slice(1), R = I[0]), I === "0") return 0;
|
|
299
|
+
if (R === "0") {
|
|
300
|
+
if (I[1] === "b") return L * parseInt(I.slice(2), 2);
|
|
301
|
+
if (I[1] === "x") return L * parseInt(I.slice(2), 16);
|
|
302
|
+
if (I[1] === "o") return L * parseInt(I.slice(2), 8);
|
|
303
|
+
}
|
|
304
|
+
return L * parseInt(I, 10);
|
|
305
|
+
}
|
|
306
|
+
__name(constructYamlInteger, "constructYamlInteger");
|
|
307
|
+
function isInteger(c) {
|
|
308
|
+
return Object.prototype.toString.call(c) === "[object Number]" && c % 1 == 0 && !common.isNegativeZero(c);
|
|
309
|
+
}
|
|
310
|
+
__name(isInteger, "isInteger");
|
|
311
|
+
var int = new type("tag:yaml.org,2002:int", {
|
|
312
|
+
kind: "scalar",
|
|
313
|
+
resolve: resolveYamlInteger,
|
|
314
|
+
construct: constructYamlInteger,
|
|
315
|
+
predicate: isInteger,
|
|
316
|
+
represent: {
|
|
317
|
+
binary: /* @__PURE__ */ __name(function(c) {
|
|
318
|
+
return c >= 0 ? "0b" + c.toString(2) : "-0b" + c.toString(2).slice(1);
|
|
319
|
+
}, "binary"),
|
|
320
|
+
octal: /* @__PURE__ */ __name(function(c) {
|
|
321
|
+
return c >= 0 ? "0o" + c.toString(8) : "-0o" + c.toString(8).slice(1);
|
|
322
|
+
}, "octal"),
|
|
323
|
+
decimal: /* @__PURE__ */ __name(function(c) {
|
|
324
|
+
return c.toString(10);
|
|
325
|
+
}, "decimal"),
|
|
326
|
+
hexadecimal: /* @__PURE__ */ __name(function(c) {
|
|
327
|
+
return c >= 0 ? "0x" + c.toString(16).toUpperCase() : "-0x" + c.toString(16).toUpperCase().slice(1);
|
|
328
|
+
}, "hexadecimal")
|
|
329
|
+
},
|
|
330
|
+
defaultStyle: "decimal",
|
|
331
|
+
styleAliases: {
|
|
332
|
+
binary: [2, "bin"],
|
|
333
|
+
octal: [8, "oct"],
|
|
334
|
+
decimal: [10, "dec"],
|
|
335
|
+
hexadecimal: [16, "hex"]
|
|
336
|
+
}
|
|
337
|
+
}), YAML_FLOAT_PATTERN = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
338
|
+
function resolveYamlFloat(c) {
|
|
339
|
+
return !(c === null || !YAML_FLOAT_PATTERN.test(c) || c[c.length - 1] === "_");
|
|
340
|
+
}
|
|
341
|
+
__name(resolveYamlFloat, "resolveYamlFloat");
|
|
342
|
+
function constructYamlFloat(c) {
|
|
343
|
+
var I = c.replace(/_/g, "").toLowerCase(), L = I[0] === "-" ? -1 : 1;
|
|
344
|
+
return "+-".indexOf(I[0]) >= 0 && (I = I.slice(1)), I === ".inf" ? L === 1 ? Infinity : -Infinity : I === ".nan" ? NaN : L * parseFloat(I, 10);
|
|
345
|
+
}
|
|
346
|
+
__name(constructYamlFloat, "constructYamlFloat");
|
|
347
|
+
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
348
|
+
function representYamlFloat(c, I) {
|
|
349
|
+
var L;
|
|
350
|
+
if (isNaN(c)) switch (I) {
|
|
351
|
+
case "lowercase": return ".nan";
|
|
352
|
+
case "uppercase": return ".NAN";
|
|
353
|
+
case "camelcase": return ".NaN";
|
|
354
|
+
}
|
|
355
|
+
else if (c === Infinity) switch (I) {
|
|
356
|
+
case "lowercase": return ".inf";
|
|
357
|
+
case "uppercase": return ".INF";
|
|
358
|
+
case "camelcase": return ".Inf";
|
|
359
|
+
}
|
|
360
|
+
else if (c === -Infinity) switch (I) {
|
|
361
|
+
case "lowercase": return "-.inf";
|
|
362
|
+
case "uppercase": return "-.INF";
|
|
363
|
+
case "camelcase": return "-.Inf";
|
|
364
|
+
}
|
|
365
|
+
else if (common.isNegativeZero(c)) return "-0.0";
|
|
366
|
+
return L = c.toString(10), SCIENTIFIC_WITHOUT_DOT.test(L) ? L.replace("e", ".e") : L;
|
|
367
|
+
}
|
|
368
|
+
__name(representYamlFloat, "representYamlFloat");
|
|
369
|
+
function isFloat(c) {
|
|
370
|
+
return Object.prototype.toString.call(c) === "[object Number]" && (c % 1 != 0 || common.isNegativeZero(c));
|
|
371
|
+
}
|
|
372
|
+
__name(isFloat, "isFloat");
|
|
373
|
+
var float = new type("tag:yaml.org,2002:float", {
|
|
374
|
+
kind: "scalar",
|
|
375
|
+
resolve: resolveYamlFloat,
|
|
376
|
+
construct: constructYamlFloat,
|
|
377
|
+
predicate: isFloat,
|
|
378
|
+
represent: representYamlFloat,
|
|
379
|
+
defaultStyle: "lowercase"
|
|
380
|
+
}), json = failsafe.extend({ implicit: [
|
|
381
|
+
_null,
|
|
382
|
+
bool,
|
|
383
|
+
int,
|
|
384
|
+
float
|
|
385
|
+
] }), core = json, YAML_DATE_REGEXP = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
|
|
386
|
+
function resolveYamlTimestamp(c) {
|
|
387
|
+
return c === null ? !1 : YAML_DATE_REGEXP.exec(c) !== null || YAML_TIMESTAMP_REGEXP.exec(c) !== null;
|
|
388
|
+
}
|
|
389
|
+
__name(resolveYamlTimestamp, "resolveYamlTimestamp");
|
|
390
|
+
function constructYamlTimestamp(c) {
|
|
391
|
+
var I, L, R, z, B, V, H, U = 0, W = null, G, K, q;
|
|
392
|
+
if (I = YAML_DATE_REGEXP.exec(c), I === null && (I = YAML_TIMESTAMP_REGEXP.exec(c)), I === null) throw Error("Date resolve error");
|
|
393
|
+
if (L = +I[1], R = I[2] - 1, z = +I[3], !I[4]) return new Date(Date.UTC(L, R, z));
|
|
394
|
+
if (B = +I[4], V = +I[5], H = +I[6], I[7]) {
|
|
395
|
+
for (U = I[7].slice(0, 3); U.length < 3;) U += "0";
|
|
396
|
+
U = +U;
|
|
397
|
+
}
|
|
398
|
+
return I[9] && (G = +I[10], K = +(I[11] || 0), W = (G * 60 + K) * 6e4, I[9] === "-" && (W = -W)), q = new Date(Date.UTC(L, R, z, B, V, H, U)), W && q.setTime(q.getTime() - W), q;
|
|
399
|
+
}
|
|
400
|
+
__name(constructYamlTimestamp, "constructYamlTimestamp");
|
|
401
|
+
function representYamlTimestamp(c) {
|
|
402
|
+
return c.toISOString();
|
|
403
|
+
}
|
|
404
|
+
__name(representYamlTimestamp, "representYamlTimestamp");
|
|
405
|
+
var timestamp = new type("tag:yaml.org,2002:timestamp", {
|
|
406
|
+
kind: "scalar",
|
|
407
|
+
resolve: resolveYamlTimestamp,
|
|
408
|
+
construct: constructYamlTimestamp,
|
|
409
|
+
instanceOf: Date,
|
|
410
|
+
represent: representYamlTimestamp
|
|
411
|
+
});
|
|
412
|
+
function resolveYamlMerge(c) {
|
|
413
|
+
return c === "<<" || c === null;
|
|
414
|
+
}
|
|
415
|
+
__name(resolveYamlMerge, "resolveYamlMerge");
|
|
416
|
+
var merge = new type("tag:yaml.org,2002:merge", {
|
|
417
|
+
kind: "scalar",
|
|
418
|
+
resolve: resolveYamlMerge
|
|
419
|
+
}), BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
420
|
+
function resolveYamlBinary(c) {
|
|
421
|
+
if (c === null) return !1;
|
|
422
|
+
var I, L, R = 0, z = c.length, B = BASE64_MAP;
|
|
423
|
+
for (L = 0; L < z; L++) if (I = B.indexOf(c.charAt(L)), !(I > 64)) {
|
|
424
|
+
if (I < 0) return !1;
|
|
425
|
+
R += 6;
|
|
426
|
+
}
|
|
427
|
+
return R % 8 == 0;
|
|
428
|
+
}
|
|
429
|
+
__name(resolveYamlBinary, "resolveYamlBinary");
|
|
430
|
+
function constructYamlBinary(c) {
|
|
431
|
+
var I, L, R = c.replace(/[\r\n=]/g, ""), z = R.length, B = BASE64_MAP, V = 0, H = [];
|
|
432
|
+
for (I = 0; I < z; I++) I % 4 == 0 && I && (H.push(V >> 16 & 255), H.push(V >> 8 & 255), H.push(V & 255)), V = V << 6 | B.indexOf(R.charAt(I));
|
|
433
|
+
return L = z % 4 * 6, L === 0 ? (H.push(V >> 16 & 255), H.push(V >> 8 & 255), H.push(V & 255)) : L === 18 ? (H.push(V >> 10 & 255), H.push(V >> 2 & 255)) : L === 12 && H.push(V >> 4 & 255), new Uint8Array(H);
|
|
434
|
+
}
|
|
435
|
+
__name(constructYamlBinary, "constructYamlBinary");
|
|
436
|
+
function representYamlBinary(c) {
|
|
437
|
+
var I = "", L = 0, R, z, B = c.length, V = BASE64_MAP;
|
|
438
|
+
for (R = 0; R < B; R++) R % 3 == 0 && R && (I += V[L >> 18 & 63], I += V[L >> 12 & 63], I += V[L >> 6 & 63], I += V[L & 63]), L = (L << 8) + c[R];
|
|
439
|
+
return z = B % 3, z === 0 ? (I += V[L >> 18 & 63], I += V[L >> 12 & 63], I += V[L >> 6 & 63], I += V[L & 63]) : z === 2 ? (I += V[L >> 10 & 63], I += V[L >> 4 & 63], I += V[L << 2 & 63], I += V[64]) : z === 1 && (I += V[L >> 2 & 63], I += V[L << 4 & 63], I += V[64], I += V[64]), I;
|
|
440
|
+
}
|
|
441
|
+
__name(representYamlBinary, "representYamlBinary");
|
|
442
|
+
function isBinary(c) {
|
|
443
|
+
return Object.prototype.toString.call(c) === "[object Uint8Array]";
|
|
444
|
+
}
|
|
445
|
+
__name(isBinary, "isBinary");
|
|
446
|
+
var binary = new type("tag:yaml.org,2002:binary", {
|
|
447
|
+
kind: "scalar",
|
|
448
|
+
resolve: resolveYamlBinary,
|
|
449
|
+
construct: constructYamlBinary,
|
|
450
|
+
predicate: isBinary,
|
|
451
|
+
represent: representYamlBinary
|
|
452
|
+
}), _hasOwnProperty$3 = Object.prototype.hasOwnProperty, _toString$2 = Object.prototype.toString;
|
|
453
|
+
function resolveYamlOmap(c) {
|
|
454
|
+
if (c === null) return !0;
|
|
455
|
+
var I = [], L, R, z, B, V, H = c;
|
|
456
|
+
for (L = 0, R = H.length; L < R; L += 1) {
|
|
457
|
+
if (z = H[L], V = !1, _toString$2.call(z) !== "[object Object]") return !1;
|
|
458
|
+
for (B in z) if (_hasOwnProperty$3.call(z, B)) if (!V) V = !0;
|
|
459
|
+
else return !1;
|
|
460
|
+
if (!V) return !1;
|
|
461
|
+
if (I.indexOf(B) === -1) I.push(B);
|
|
462
|
+
else return !1;
|
|
463
|
+
}
|
|
464
|
+
return !0;
|
|
465
|
+
}
|
|
466
|
+
__name(resolveYamlOmap, "resolveYamlOmap");
|
|
467
|
+
function constructYamlOmap(c) {
|
|
468
|
+
return c === null ? [] : c;
|
|
469
|
+
}
|
|
470
|
+
__name(constructYamlOmap, "constructYamlOmap");
|
|
471
|
+
var omap = new type("tag:yaml.org,2002:omap", {
|
|
472
|
+
kind: "sequence",
|
|
473
|
+
resolve: resolveYamlOmap,
|
|
474
|
+
construct: constructYamlOmap
|
|
475
|
+
}), _toString$1 = Object.prototype.toString;
|
|
476
|
+
function resolveYamlPairs(c) {
|
|
477
|
+
if (c === null) return !0;
|
|
478
|
+
var I, L, R, z, B, V = c;
|
|
479
|
+
for (B = Array(V.length), I = 0, L = V.length; I < L; I += 1) {
|
|
480
|
+
if (R = V[I], _toString$1.call(R) !== "[object Object]" || (z = Object.keys(R), z.length !== 1)) return !1;
|
|
481
|
+
B[I] = [z[0], R[z[0]]];
|
|
482
|
+
}
|
|
483
|
+
return !0;
|
|
484
|
+
}
|
|
485
|
+
__name(resolveYamlPairs, "resolveYamlPairs");
|
|
486
|
+
function constructYamlPairs(c) {
|
|
487
|
+
if (c === null) return [];
|
|
488
|
+
var I, L, R, z, B, V = c;
|
|
489
|
+
for (B = Array(V.length), I = 0, L = V.length; I < L; I += 1) R = V[I], z = Object.keys(R), B[I] = [z[0], R[z[0]]];
|
|
490
|
+
return B;
|
|
491
|
+
}
|
|
492
|
+
__name(constructYamlPairs, "constructYamlPairs");
|
|
493
|
+
var pairs = new type("tag:yaml.org,2002:pairs", {
|
|
494
|
+
kind: "sequence",
|
|
495
|
+
resolve: resolveYamlPairs,
|
|
496
|
+
construct: constructYamlPairs
|
|
497
|
+
}), _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
498
|
+
function resolveYamlSet(c) {
|
|
499
|
+
if (c === null) return !0;
|
|
500
|
+
var I, L = c;
|
|
501
|
+
for (I in L) if (_hasOwnProperty$2.call(L, I) && L[I] !== null) return !1;
|
|
502
|
+
return !0;
|
|
503
|
+
}
|
|
504
|
+
__name(resolveYamlSet, "resolveYamlSet");
|
|
505
|
+
function constructYamlSet(c) {
|
|
506
|
+
return c === null ? {} : c;
|
|
507
|
+
}
|
|
508
|
+
__name(constructYamlSet, "constructYamlSet");
|
|
509
|
+
var set = new type("tag:yaml.org,2002:set", {
|
|
510
|
+
kind: "mapping",
|
|
511
|
+
resolve: resolveYamlSet,
|
|
512
|
+
construct: constructYamlSet
|
|
513
|
+
}), _default = core.extend({
|
|
514
|
+
implicit: [timestamp, merge],
|
|
515
|
+
explicit: [
|
|
516
|
+
binary,
|
|
517
|
+
omap,
|
|
518
|
+
pairs,
|
|
519
|
+
set
|
|
520
|
+
]
|
|
521
|
+
}), _hasOwnProperty$1 = Object.prototype.hasOwnProperty, CONTEXT_FLOW_IN = 1, CONTEXT_FLOW_OUT = 2, CONTEXT_BLOCK_IN = 3, CONTEXT_BLOCK_OUT = 4, CHOMPING_CLIP = 1, CHOMPING_STRIP = 2, CHOMPING_KEEP = 3, PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/, PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/, PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i, PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
522
|
+
function _class(c) {
|
|
523
|
+
return Object.prototype.toString.call(c);
|
|
524
|
+
}
|
|
525
|
+
__name(_class, "_class");
|
|
526
|
+
function is_EOL(c) {
|
|
527
|
+
return c === 10 || c === 13;
|
|
528
|
+
}
|
|
529
|
+
__name(is_EOL, "is_EOL");
|
|
530
|
+
function is_WHITE_SPACE(c) {
|
|
531
|
+
return c === 9 || c === 32;
|
|
532
|
+
}
|
|
533
|
+
__name(is_WHITE_SPACE, "is_WHITE_SPACE");
|
|
534
|
+
function is_WS_OR_EOL(c) {
|
|
535
|
+
return c === 9 || c === 32 || c === 10 || c === 13;
|
|
536
|
+
}
|
|
537
|
+
__name(is_WS_OR_EOL, "is_WS_OR_EOL");
|
|
538
|
+
function is_FLOW_INDICATOR(c) {
|
|
539
|
+
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
|
540
|
+
}
|
|
541
|
+
__name(is_FLOW_INDICATOR, "is_FLOW_INDICATOR");
|
|
542
|
+
function fromHexCode(c) {
|
|
543
|
+
var I;
|
|
544
|
+
return 48 <= c && c <= 57 ? c - 48 : (I = c | 32, 97 <= I && I <= 102 ? I - 97 + 10 : -1);
|
|
545
|
+
}
|
|
546
|
+
__name(fromHexCode, "fromHexCode");
|
|
547
|
+
function escapedHexLen(c) {
|
|
548
|
+
return c === 120 ? 2 : c === 117 ? 4 : c === 85 ? 8 : 0;
|
|
549
|
+
}
|
|
550
|
+
__name(escapedHexLen, "escapedHexLen");
|
|
551
|
+
function fromDecimalCode(c) {
|
|
552
|
+
return 48 <= c && c <= 57 ? c - 48 : -1;
|
|
553
|
+
}
|
|
554
|
+
__name(fromDecimalCode, "fromDecimalCode");
|
|
555
|
+
function simpleEscapeSequence(c) {
|
|
556
|
+
return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 || c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? "\"" : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "
" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
|
|
557
|
+
}
|
|
558
|
+
__name(simpleEscapeSequence, "simpleEscapeSequence");
|
|
559
|
+
function charFromCodepoint(c) {
|
|
560
|
+
return c <= 65535 ? String.fromCharCode(c) : String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
|
|
561
|
+
}
|
|
562
|
+
__name(charFromCodepoint, "charFromCodepoint");
|
|
563
|
+
var simpleEscapeCheck = Array(256), simpleEscapeMap = Array(256);
|
|
564
|
+
for (i = 0; i < 256; i++) simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0, simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
565
|
+
var i;
|
|
566
|
+
function State$1(c, I) {
|
|
567
|
+
this.input = c, this.filename = I.filename || null, this.schema = I.schema || _default, this.onWarning = I.onWarning || null, this.legacy = I.legacy || !1, this.json = I.json || !1, this.listener = I.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = c.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
568
|
+
}
|
|
569
|
+
__name(State$1, "State$1");
|
|
570
|
+
function generateError(c, I) {
|
|
571
|
+
var L = {
|
|
572
|
+
name: c.filename,
|
|
573
|
+
buffer: c.input.slice(0, -1),
|
|
574
|
+
position: c.position,
|
|
575
|
+
line: c.line,
|
|
576
|
+
column: c.position - c.lineStart
|
|
577
|
+
};
|
|
578
|
+
return L.snippet = snippet(L), new exception(I, L);
|
|
579
|
+
}
|
|
580
|
+
__name(generateError, "generateError");
|
|
581
|
+
function throwError(c, I) {
|
|
582
|
+
throw generateError(c, I);
|
|
583
|
+
}
|
|
584
|
+
__name(throwError, "throwError");
|
|
585
|
+
function throwWarning(c, I) {
|
|
586
|
+
c.onWarning && c.onWarning.call(null, generateError(c, I));
|
|
587
|
+
}
|
|
588
|
+
__name(throwWarning, "throwWarning");
|
|
589
|
+
var directiveHandlers = {
|
|
590
|
+
YAML: /* @__PURE__ */ __name(function(c, I, L) {
|
|
591
|
+
var R, z, B;
|
|
592
|
+
c.version !== null && throwError(c, "duplication of %YAML directive"), L.length !== 1 && throwError(c, "YAML directive accepts exactly one argument"), R = /^([0-9]+)\.([0-9]+)$/.exec(L[0]), R === null && throwError(c, "ill-formed argument of the YAML directive"), z = parseInt(R[1], 10), B = parseInt(R[2], 10), z !== 1 && throwError(c, "unacceptable YAML version of the document"), c.version = L[0], c.checkLineBreaks = B < 2, B !== 1 && B !== 2 && throwWarning(c, "unsupported YAML version of the document");
|
|
593
|
+
}, "handleYamlDirective"),
|
|
594
|
+
TAG: /* @__PURE__ */ __name(function(c, I, L) {
|
|
595
|
+
var R, z;
|
|
596
|
+
L.length !== 2 && throwError(c, "TAG directive accepts exactly two arguments"), R = L[0], z = L[1], PATTERN_TAG_HANDLE.test(R) || throwError(c, "ill-formed tag handle (first argument) of the TAG directive"), _hasOwnProperty$1.call(c.tagMap, R) && throwError(c, "there is a previously declared suffix for \"" + R + "\" tag handle"), PATTERN_TAG_URI.test(z) || throwError(c, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
597
|
+
try {
|
|
598
|
+
z = decodeURIComponent(z);
|
|
599
|
+
} catch {
|
|
600
|
+
throwError(c, "tag prefix is malformed: " + z);
|
|
601
|
+
}
|
|
602
|
+
c.tagMap[R] = z;
|
|
603
|
+
}, "handleTagDirective")
|
|
604
|
+
};
|
|
605
|
+
function captureSegment(c, I, L, R) {
|
|
606
|
+
var z, B, V, H;
|
|
607
|
+
if (I < L) {
|
|
608
|
+
if (H = c.input.slice(I, L), R) for (z = 0, B = H.length; z < B; z += 1) V = H.charCodeAt(z), V === 9 || 32 <= V && V <= 1114111 || throwError(c, "expected valid JSON character");
|
|
609
|
+
else PATTERN_NON_PRINTABLE.test(H) && throwError(c, "the stream contains non-printable characters");
|
|
610
|
+
c.result += H;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
__name(captureSegment, "captureSegment");
|
|
614
|
+
function mergeMappings(c, I, L, R) {
|
|
615
|
+
var z, B, V, U;
|
|
616
|
+
for (common.isObject(L) || throwError(c, "cannot merge mappings; the provided source object is unacceptable"), z = Object.keys(L), V = 0, U = z.length; V < U; V += 1) B = z[V], _hasOwnProperty$1.call(I, B) || (I[B] = L[B], R[B] = !0);
|
|
617
|
+
}
|
|
618
|
+
__name(mergeMappings, "mergeMappings");
|
|
619
|
+
function storeMappingPair(c, I, L, R, z, B, V, H, U) {
|
|
620
|
+
var W, G;
|
|
621
|
+
if (Array.isArray(z)) for (z = Array.prototype.slice.call(z), W = 0, G = z.length; W < G; W += 1) Array.isArray(z[W]) && throwError(c, "nested arrays are not supported inside keys"), typeof z == "object" && _class(z[W]) === "[object Object]" && (z[W] = "[object Object]");
|
|
622
|
+
if (typeof z == "object" && _class(z) === "[object Object]" && (z = "[object Object]"), z = String(z), I === null && (I = {}), R === "tag:yaml.org,2002:merge") if (Array.isArray(B)) for (W = 0, G = B.length; W < G; W += 1) mergeMappings(c, I, B[W], L);
|
|
623
|
+
else mergeMappings(c, I, B, L);
|
|
624
|
+
else !c.json && !_hasOwnProperty$1.call(L, z) && _hasOwnProperty$1.call(I, z) && (c.line = V || c.line, c.lineStart = H || c.lineStart, c.position = U || c.position, throwError(c, "duplicated mapping key")), z === "__proto__" ? Object.defineProperty(I, z, {
|
|
625
|
+
configurable: !0,
|
|
626
|
+
enumerable: !0,
|
|
627
|
+
writable: !0,
|
|
628
|
+
value: B
|
|
629
|
+
}) : I[z] = B, delete L[z];
|
|
630
|
+
return I;
|
|
631
|
+
}
|
|
632
|
+
__name(storeMappingPair, "storeMappingPair");
|
|
633
|
+
function readLineBreak(c) {
|
|
634
|
+
var I = c.input.charCodeAt(c.position);
|
|
635
|
+
I === 10 ? c.position++ : I === 13 ? (c.position++, c.input.charCodeAt(c.position) === 10 && c.position++) : throwError(c, "a line break is expected"), c.line += 1, c.lineStart = c.position, c.firstTabInLine = -1;
|
|
636
|
+
}
|
|
637
|
+
__name(readLineBreak, "readLineBreak");
|
|
638
|
+
function skipSeparationSpace(c, I, L) {
|
|
639
|
+
for (var R = 0, z = c.input.charCodeAt(c.position); z !== 0;) {
|
|
640
|
+
for (; is_WHITE_SPACE(z);) z === 9 && c.firstTabInLine === -1 && (c.firstTabInLine = c.position), z = c.input.charCodeAt(++c.position);
|
|
641
|
+
if (I && z === 35) do
|
|
642
|
+
z = c.input.charCodeAt(++c.position);
|
|
643
|
+
while (z !== 10 && z !== 13 && z !== 0);
|
|
644
|
+
if (is_EOL(z)) for (readLineBreak(c), z = c.input.charCodeAt(c.position), R++, c.lineIndent = 0; z === 32;) c.lineIndent++, z = c.input.charCodeAt(++c.position);
|
|
645
|
+
else break;
|
|
646
|
+
}
|
|
647
|
+
return L !== -1 && R !== 0 && c.lineIndent < L && throwWarning(c, "deficient indentation"), R;
|
|
648
|
+
}
|
|
649
|
+
__name(skipSeparationSpace, "skipSeparationSpace");
|
|
650
|
+
function testDocumentSeparator(c) {
|
|
651
|
+
var I = c.position, L = c.input.charCodeAt(I);
|
|
652
|
+
return !!((L === 45 || L === 46) && L === c.input.charCodeAt(I + 1) && L === c.input.charCodeAt(I + 2) && (I += 3, L = c.input.charCodeAt(I), L === 0 || is_WS_OR_EOL(L)));
|
|
653
|
+
}
|
|
654
|
+
__name(testDocumentSeparator, "testDocumentSeparator");
|
|
655
|
+
function writeFoldedLines(c, I) {
|
|
656
|
+
I === 1 ? c.result += " " : I > 1 && (c.result += common.repeat("\n", I - 1));
|
|
657
|
+
}
|
|
658
|
+
__name(writeFoldedLines, "writeFoldedLines");
|
|
659
|
+
function readPlainScalar(c, I, L) {
|
|
660
|
+
var R, z, B, V, H, U, W, G, K = c.kind, q = c.result, J = c.input.charCodeAt(c.position);
|
|
661
|
+
if (is_WS_OR_EOL(J) || is_FLOW_INDICATOR(J) || J === 35 || J === 38 || J === 42 || J === 33 || J === 124 || J === 62 || J === 39 || J === 34 || J === 37 || J === 64 || J === 96 || (J === 63 || J === 45) && (z = c.input.charCodeAt(c.position + 1), is_WS_OR_EOL(z) || L && is_FLOW_INDICATOR(z))) return !1;
|
|
662
|
+
for (c.kind = "scalar", c.result = "", B = V = c.position, H = !1; J !== 0;) {
|
|
663
|
+
if (J === 58) {
|
|
664
|
+
if (z = c.input.charCodeAt(c.position + 1), is_WS_OR_EOL(z) || L && is_FLOW_INDICATOR(z)) break;
|
|
665
|
+
} else if (J === 35) {
|
|
666
|
+
if (R = c.input.charCodeAt(c.position - 1), is_WS_OR_EOL(R)) break;
|
|
667
|
+
} else if (c.position === c.lineStart && testDocumentSeparator(c) || L && is_FLOW_INDICATOR(J)) break;
|
|
668
|
+
else if (is_EOL(J)) if (U = c.line, W = c.lineStart, G = c.lineIndent, skipSeparationSpace(c, !1, -1), c.lineIndent >= I) {
|
|
669
|
+
H = !0, J = c.input.charCodeAt(c.position);
|
|
670
|
+
continue;
|
|
671
|
+
} else {
|
|
672
|
+
c.position = V, c.line = U, c.lineStart = W, c.lineIndent = G;
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
H &&= (captureSegment(c, B, V, !1), writeFoldedLines(c, c.line - U), B = V = c.position, !1), is_WHITE_SPACE(J) || (V = c.position + 1), J = c.input.charCodeAt(++c.position);
|
|
676
|
+
}
|
|
677
|
+
return captureSegment(c, B, V, !1), c.result ? !0 : (c.kind = K, c.result = q, !1);
|
|
678
|
+
}
|
|
679
|
+
__name(readPlainScalar, "readPlainScalar");
|
|
680
|
+
function readSingleQuotedScalar(c, I) {
|
|
681
|
+
var L = c.input.charCodeAt(c.position), R, z;
|
|
682
|
+
if (L !== 39) return !1;
|
|
683
|
+
for (c.kind = "scalar", c.result = "", c.position++, R = z = c.position; (L = c.input.charCodeAt(c.position)) !== 0;) if (L === 39) if (captureSegment(c, R, c.position, !0), L = c.input.charCodeAt(++c.position), L === 39) R = c.position, c.position++, z = c.position;
|
|
684
|
+
else return !0;
|
|
685
|
+
else is_EOL(L) ? (captureSegment(c, R, z, !0), writeFoldedLines(c, skipSeparationSpace(c, !1, I)), R = z = c.position) : c.position === c.lineStart && testDocumentSeparator(c) ? throwError(c, "unexpected end of the document within a single quoted scalar") : (c.position++, z = c.position);
|
|
686
|
+
throwError(c, "unexpected end of the stream within a single quoted scalar");
|
|
687
|
+
}
|
|
688
|
+
__name(readSingleQuotedScalar, "readSingleQuotedScalar");
|
|
689
|
+
function readDoubleQuotedScalar(c, I) {
|
|
690
|
+
var L, R, z, B, V, H = c.input.charCodeAt(c.position);
|
|
691
|
+
if (H !== 34) return !1;
|
|
692
|
+
for (c.kind = "scalar", c.result = "", c.position++, L = R = c.position; (H = c.input.charCodeAt(c.position)) !== 0;) if (H === 34) return captureSegment(c, L, c.position, !0), c.position++, !0;
|
|
693
|
+
else if (H === 92) {
|
|
694
|
+
if (captureSegment(c, L, c.position, !0), H = c.input.charCodeAt(++c.position), is_EOL(H)) skipSeparationSpace(c, !1, I);
|
|
695
|
+
else if (H < 256 && simpleEscapeCheck[H]) c.result += simpleEscapeMap[H], c.position++;
|
|
696
|
+
else if ((V = escapedHexLen(H)) > 0) {
|
|
697
|
+
for (z = V, B = 0; z > 0; z--) H = c.input.charCodeAt(++c.position), (V = fromHexCode(H)) >= 0 ? B = (B << 4) + V : throwError(c, "expected hexadecimal character");
|
|
698
|
+
c.result += charFromCodepoint(B), c.position++;
|
|
699
|
+
} else throwError(c, "unknown escape sequence");
|
|
700
|
+
L = R = c.position;
|
|
701
|
+
} else is_EOL(H) ? (captureSegment(c, L, R, !0), writeFoldedLines(c, skipSeparationSpace(c, !1, I)), L = R = c.position) : c.position === c.lineStart && testDocumentSeparator(c) ? throwError(c, "unexpected end of the document within a double quoted scalar") : (c.position++, R = c.position);
|
|
702
|
+
throwError(c, "unexpected end of the stream within a double quoted scalar");
|
|
703
|
+
}
|
|
704
|
+
__name(readDoubleQuotedScalar, "readDoubleQuotedScalar");
|
|
705
|
+
function readFlowCollection(c, I) {
|
|
706
|
+
var L = !0, R, z, B, V = c.tag, H, U = c.anchor, W, G, K, q, J, Y = /* @__PURE__ */ Object.create(null), X, Z, Q, $ = c.input.charCodeAt(c.position);
|
|
707
|
+
if ($ === 91) G = 93, J = !1, H = [];
|
|
708
|
+
else if ($ === 123) G = 125, J = !0, H = {};
|
|
709
|
+
else return !1;
|
|
710
|
+
for (c.anchor !== null && (c.anchorMap[c.anchor] = H), $ = c.input.charCodeAt(++c.position); $ !== 0;) {
|
|
711
|
+
if (skipSeparationSpace(c, !0, I), $ = c.input.charCodeAt(c.position), $ === G) return c.position++, c.tag = V, c.anchor = U, c.kind = J ? "mapping" : "sequence", c.result = H, !0;
|
|
712
|
+
L ? $ === 44 && throwError(c, "expected the node content, but found ','") : throwError(c, "missed comma between flow collection entries"), Z = X = Q = null, K = q = !1, $ === 63 && (W = c.input.charCodeAt(c.position + 1), is_WS_OR_EOL(W) && (K = q = !0, c.position++, skipSeparationSpace(c, !0, I))), R = c.line, z = c.lineStart, B = c.position, composeNode(c, I, CONTEXT_FLOW_IN, !1, !0), Z = c.tag, X = c.result, skipSeparationSpace(c, !0, I), $ = c.input.charCodeAt(c.position), (q || c.line === R) && $ === 58 && (K = !0, $ = c.input.charCodeAt(++c.position), skipSeparationSpace(c, !0, I), composeNode(c, I, CONTEXT_FLOW_IN, !1, !0), Q = c.result), J ? storeMappingPair(c, H, Y, Z, X, Q, R, z, B) : K ? H.push(storeMappingPair(c, null, Y, Z, X, Q, R, z, B)) : H.push(X), skipSeparationSpace(c, !0, I), $ = c.input.charCodeAt(c.position), $ === 44 ? (L = !0, $ = c.input.charCodeAt(++c.position)) : L = !1;
|
|
713
|
+
}
|
|
714
|
+
throwError(c, "unexpected end of the stream within a flow collection");
|
|
715
|
+
}
|
|
716
|
+
__name(readFlowCollection, "readFlowCollection");
|
|
717
|
+
function readBlockScalar(c, I) {
|
|
718
|
+
var L, R, z = CHOMPING_CLIP, B = !1, V = !1, U = I, W = 0, G = !1, K, q = c.input.charCodeAt(c.position);
|
|
719
|
+
if (q === 124) R = !1;
|
|
720
|
+
else if (q === 62) R = !0;
|
|
721
|
+
else return !1;
|
|
722
|
+
for (c.kind = "scalar", c.result = ""; q !== 0;) if (q = c.input.charCodeAt(++c.position), q === 43 || q === 45) CHOMPING_CLIP === z ? z = q === 43 ? CHOMPING_KEEP : CHOMPING_STRIP : throwError(c, "repeat of a chomping mode identifier");
|
|
723
|
+
else if ((K = fromDecimalCode(q)) >= 0) K === 0 ? throwError(c, "bad explicit indentation width of a block scalar; it cannot be less than one") : V ? throwError(c, "repeat of an indentation width identifier") : (U = I + K - 1, V = !0);
|
|
724
|
+
else break;
|
|
725
|
+
if (is_WHITE_SPACE(q)) {
|
|
726
|
+
do
|
|
727
|
+
q = c.input.charCodeAt(++c.position);
|
|
728
|
+
while (is_WHITE_SPACE(q));
|
|
729
|
+
if (q === 35) do
|
|
730
|
+
q = c.input.charCodeAt(++c.position);
|
|
731
|
+
while (!is_EOL(q) && q !== 0);
|
|
732
|
+
}
|
|
733
|
+
for (; q !== 0;) {
|
|
734
|
+
for (readLineBreak(c), c.lineIndent = 0, q = c.input.charCodeAt(c.position); (!V || c.lineIndent < U) && q === 32;) c.lineIndent++, q = c.input.charCodeAt(++c.position);
|
|
735
|
+
if (!V && c.lineIndent > U && (U = c.lineIndent), is_EOL(q)) {
|
|
736
|
+
W++;
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
if (c.lineIndent < U) {
|
|
740
|
+
z === CHOMPING_KEEP ? c.result += common.repeat("\n", B ? 1 + W : W) : z === CHOMPING_CLIP && B && (c.result += "\n");
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
for (R ? is_WHITE_SPACE(q) ? (G = !0, c.result += common.repeat("\n", B ? 1 + W : W)) : G ? (G = !1, c.result += common.repeat("\n", W + 1)) : W === 0 ? B && (c.result += " ") : c.result += common.repeat("\n", W) : c.result += common.repeat("\n", B ? 1 + W : W), B = !0, V = !0, W = 0, L = c.position; !is_EOL(q) && q !== 0;) q = c.input.charCodeAt(++c.position);
|
|
744
|
+
captureSegment(c, L, c.position, !1);
|
|
745
|
+
}
|
|
746
|
+
return !0;
|
|
747
|
+
}
|
|
748
|
+
__name(readBlockScalar, "readBlockScalar");
|
|
749
|
+
function readBlockSequence(c, I) {
|
|
750
|
+
var L, R = c.tag, z = c.anchor, B = [], V, H = !1, U;
|
|
751
|
+
if (c.firstTabInLine !== -1) return !1;
|
|
752
|
+
for (c.anchor !== null && (c.anchorMap[c.anchor] = B), U = c.input.charCodeAt(c.position); U !== 0 && (c.firstTabInLine !== -1 && (c.position = c.firstTabInLine, throwError(c, "tab characters must not be used in indentation")), !(U !== 45 || (V = c.input.charCodeAt(c.position + 1), !is_WS_OR_EOL(V))));) {
|
|
753
|
+
if (H = !0, c.position++, skipSeparationSpace(c, !0, -1) && c.lineIndent <= I) {
|
|
754
|
+
B.push(null), U = c.input.charCodeAt(c.position);
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
if (L = c.line, composeNode(c, I, CONTEXT_BLOCK_IN, !1, !0), B.push(c.result), skipSeparationSpace(c, !0, -1), U = c.input.charCodeAt(c.position), (c.line === L || c.lineIndent > I) && U !== 0) throwError(c, "bad indentation of a sequence entry");
|
|
758
|
+
else if (c.lineIndent < I) break;
|
|
759
|
+
}
|
|
760
|
+
return H ? (c.tag = R, c.anchor = z, c.kind = "sequence", c.result = B, !0) : !1;
|
|
761
|
+
}
|
|
762
|
+
__name(readBlockSequence, "readBlockSequence");
|
|
763
|
+
function readBlockMapping(c, I, L) {
|
|
764
|
+
var R, z, B, V, H, U, W = c.tag, G = c.anchor, K = {}, q = /* @__PURE__ */ Object.create(null), J = null, Y = null, X = null, Z = !1, Q = !1, $;
|
|
765
|
+
if (c.firstTabInLine !== -1) return !1;
|
|
766
|
+
for (c.anchor !== null && (c.anchorMap[c.anchor] = K), $ = c.input.charCodeAt(c.position); $ !== 0;) {
|
|
767
|
+
if (!Z && c.firstTabInLine !== -1 && (c.position = c.firstTabInLine, throwError(c, "tab characters must not be used in indentation")), R = c.input.charCodeAt(c.position + 1), B = c.line, ($ === 63 || $ === 58) && is_WS_OR_EOL(R)) $ === 63 ? (Z && (storeMappingPair(c, K, q, J, Y, null, V, H, U), J = Y = X = null), Q = !0, Z = !0, z = !0) : Z ? (Z = !1, z = !0) : throwError(c, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), c.position += 1, $ = R;
|
|
768
|
+
else {
|
|
769
|
+
if (V = c.line, H = c.lineStart, U = c.position, !composeNode(c, L, CONTEXT_FLOW_OUT, !1, !0)) break;
|
|
770
|
+
if (c.line === B) {
|
|
771
|
+
for ($ = c.input.charCodeAt(c.position); is_WHITE_SPACE($);) $ = c.input.charCodeAt(++c.position);
|
|
772
|
+
if ($ === 58) $ = c.input.charCodeAt(++c.position), is_WS_OR_EOL($) || throwError(c, "a whitespace character is expected after the key-value separator within a block mapping"), Z && (storeMappingPair(c, K, q, J, Y, null, V, H, U), J = Y = X = null), Q = !0, Z = !1, z = !1, J = c.tag, Y = c.result;
|
|
773
|
+
else if (Q) throwError(c, "can not read an implicit mapping pair; a colon is missed");
|
|
774
|
+
else return c.tag = W, c.anchor = G, !0;
|
|
775
|
+
} else if (Q) throwError(c, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
776
|
+
else return c.tag = W, c.anchor = G, !0;
|
|
777
|
+
}
|
|
778
|
+
if ((c.line === B || c.lineIndent > I) && (Z && (V = c.line, H = c.lineStart, U = c.position), composeNode(c, I, CONTEXT_BLOCK_OUT, !0, z) && (Z ? Y = c.result : X = c.result), Z || (storeMappingPair(c, K, q, J, Y, X, V, H, U), J = Y = X = null), skipSeparationSpace(c, !0, -1), $ = c.input.charCodeAt(c.position)), (c.line === B || c.lineIndent > I) && $ !== 0) throwError(c, "bad indentation of a mapping entry");
|
|
779
|
+
else if (c.lineIndent < I) break;
|
|
780
|
+
}
|
|
781
|
+
return Z && storeMappingPair(c, K, q, J, Y, null, V, H, U), Q && (c.tag = W, c.anchor = G, c.kind = "mapping", c.result = K), Q;
|
|
782
|
+
}
|
|
783
|
+
__name(readBlockMapping, "readBlockMapping");
|
|
784
|
+
function readTagProperty(c) {
|
|
785
|
+
var I, L = !1, R = !1, z, B, V = c.input.charCodeAt(c.position);
|
|
786
|
+
if (V !== 33) return !1;
|
|
787
|
+
if (c.tag !== null && throwError(c, "duplication of a tag property"), V = c.input.charCodeAt(++c.position), V === 60 ? (L = !0, V = c.input.charCodeAt(++c.position)) : V === 33 ? (R = !0, z = "!!", V = c.input.charCodeAt(++c.position)) : z = "!", I = c.position, L) {
|
|
788
|
+
do
|
|
789
|
+
V = c.input.charCodeAt(++c.position);
|
|
790
|
+
while (V !== 0 && V !== 62);
|
|
791
|
+
c.position < c.length ? (B = c.input.slice(I, c.position), V = c.input.charCodeAt(++c.position)) : throwError(c, "unexpected end of the stream within a verbatim tag");
|
|
792
|
+
} else {
|
|
793
|
+
for (; V !== 0 && !is_WS_OR_EOL(V);) V === 33 && (R ? throwError(c, "tag suffix cannot contain exclamation marks") : (z = c.input.slice(I - 1, c.position + 1), PATTERN_TAG_HANDLE.test(z) || throwError(c, "named tag handle cannot contain such characters"), R = !0, I = c.position + 1)), V = c.input.charCodeAt(++c.position);
|
|
794
|
+
B = c.input.slice(I, c.position), PATTERN_FLOW_INDICATORS.test(B) && throwError(c, "tag suffix cannot contain flow indicator characters");
|
|
795
|
+
}
|
|
796
|
+
B && !PATTERN_TAG_URI.test(B) && throwError(c, "tag name cannot contain such characters: " + B);
|
|
797
|
+
try {
|
|
798
|
+
B = decodeURIComponent(B);
|
|
799
|
+
} catch {
|
|
800
|
+
throwError(c, "tag name is malformed: " + B);
|
|
801
|
+
}
|
|
802
|
+
return L ? c.tag = B : _hasOwnProperty$1.call(c.tagMap, z) ? c.tag = c.tagMap[z] + B : z === "!" ? c.tag = "!" + B : z === "!!" ? c.tag = "tag:yaml.org,2002:" + B : throwError(c, "undeclared tag handle \"" + z + "\""), !0;
|
|
803
|
+
}
|
|
804
|
+
__name(readTagProperty, "readTagProperty");
|
|
805
|
+
function readAnchorProperty(c) {
|
|
806
|
+
var I, L = c.input.charCodeAt(c.position);
|
|
807
|
+
if (L !== 38) return !1;
|
|
808
|
+
for (c.anchor !== null && throwError(c, "duplication of an anchor property"), L = c.input.charCodeAt(++c.position), I = c.position; L !== 0 && !is_WS_OR_EOL(L) && !is_FLOW_INDICATOR(L);) L = c.input.charCodeAt(++c.position);
|
|
809
|
+
return c.position === I && throwError(c, "name of an anchor node must contain at least one character"), c.anchor = c.input.slice(I, c.position), !0;
|
|
810
|
+
}
|
|
811
|
+
__name(readAnchorProperty, "readAnchorProperty");
|
|
812
|
+
function readAlias(c) {
|
|
813
|
+
var I, L, R = c.input.charCodeAt(c.position);
|
|
814
|
+
if (R !== 42) return !1;
|
|
815
|
+
for (R = c.input.charCodeAt(++c.position), I = c.position; R !== 0 && !is_WS_OR_EOL(R) && !is_FLOW_INDICATOR(R);) R = c.input.charCodeAt(++c.position);
|
|
816
|
+
return c.position === I && throwError(c, "name of an alias node must contain at least one character"), L = c.input.slice(I, c.position), _hasOwnProperty$1.call(c.anchorMap, L) || throwError(c, "unidentified alias \"" + L + "\""), c.result = c.anchorMap[L], skipSeparationSpace(c, !0, -1), !0;
|
|
817
|
+
}
|
|
818
|
+
__name(readAlias, "readAlias");
|
|
819
|
+
function composeNode(c, I, L, R, z) {
|
|
820
|
+
var B, V, H, U = 1, W = !1, G = !1, K, q, J, Y, X, Z;
|
|
821
|
+
if (c.listener !== null && c.listener("open", c), c.tag = null, c.anchor = null, c.kind = null, c.result = null, B = V = H = CONTEXT_BLOCK_OUT === L || CONTEXT_BLOCK_IN === L, R && skipSeparationSpace(c, !0, -1) && (W = !0, c.lineIndent > I ? U = 1 : c.lineIndent === I ? U = 0 : c.lineIndent < I && (U = -1)), U === 1) for (; readTagProperty(c) || readAnchorProperty(c);) skipSeparationSpace(c, !0, -1) ? (W = !0, H = B, c.lineIndent > I ? U = 1 : c.lineIndent === I ? U = 0 : c.lineIndent < I && (U = -1)) : H = !1;
|
|
822
|
+
if (H &&= W || z, (U === 1 || CONTEXT_BLOCK_OUT === L) && (X = CONTEXT_FLOW_IN === L || CONTEXT_FLOW_OUT === L ? I : I + 1, Z = c.position - c.lineStart, U === 1 ? H && (readBlockSequence(c, Z) || readBlockMapping(c, Z, X)) || readFlowCollection(c, X) ? G = !0 : (V && readBlockScalar(c, X) || readSingleQuotedScalar(c, X) || readDoubleQuotedScalar(c, X) ? G = !0 : readAlias(c) ? (G = !0, (c.tag !== null || c.anchor !== null) && throwError(c, "alias node should not have any properties")) : readPlainScalar(c, X, CONTEXT_FLOW_IN === L) && (G = !0, c.tag === null && (c.tag = "?")), c.anchor !== null && (c.anchorMap[c.anchor] = c.result)) : U === 0 && (G = H && readBlockSequence(c, Z))), c.tag === null) c.anchor !== null && (c.anchorMap[c.anchor] = c.result);
|
|
823
|
+
else if (c.tag === "?") {
|
|
824
|
+
for (c.result !== null && c.kind !== "scalar" && throwError(c, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + c.kind + "\""), K = 0, q = c.implicitTypes.length; K < q; K += 1) if (Y = c.implicitTypes[K], Y.resolve(c.result)) {
|
|
825
|
+
c.result = Y.construct(c.result), c.tag = Y.tag, c.anchor !== null && (c.anchorMap[c.anchor] = c.result);
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
} else if (c.tag !== "!") {
|
|
829
|
+
if (_hasOwnProperty$1.call(c.typeMap[c.kind || "fallback"], c.tag)) Y = c.typeMap[c.kind || "fallback"][c.tag];
|
|
830
|
+
else for (Y = null, J = c.typeMap.multi[c.kind || "fallback"], K = 0, q = J.length; K < q; K += 1) if (c.tag.slice(0, J[K].tag.length) === J[K].tag) {
|
|
831
|
+
Y = J[K];
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
Y || throwError(c, "unknown tag !<" + c.tag + ">"), c.result !== null && Y.kind !== c.kind && throwError(c, "unacceptable node kind for !<" + c.tag + "> tag; it should be \"" + Y.kind + "\", not \"" + c.kind + "\""), Y.resolve(c.result, c.tag) ? (c.result = Y.construct(c.result, c.tag), c.anchor !== null && (c.anchorMap[c.anchor] = c.result)) : throwError(c, "cannot resolve a node with !<" + c.tag + "> explicit tag");
|
|
835
|
+
}
|
|
836
|
+
return c.listener !== null && c.listener("close", c), c.tag !== null || c.anchor !== null || G;
|
|
837
|
+
}
|
|
838
|
+
__name(composeNode, "composeNode");
|
|
839
|
+
function readDocument(c) {
|
|
840
|
+
var I = c.position, L, R, z, B = !1, V;
|
|
841
|
+
for (c.version = null, c.checkLineBreaks = c.legacy, c.tagMap = /* @__PURE__ */ Object.create(null), c.anchorMap = /* @__PURE__ */ Object.create(null); (V = c.input.charCodeAt(c.position)) !== 0 && (skipSeparationSpace(c, !0, -1), V = c.input.charCodeAt(c.position), !(c.lineIndent > 0 || V !== 37));) {
|
|
842
|
+
for (B = !0, V = c.input.charCodeAt(++c.position), L = c.position; V !== 0 && !is_WS_OR_EOL(V);) V = c.input.charCodeAt(++c.position);
|
|
843
|
+
for (R = c.input.slice(L, c.position), z = [], R.length < 1 && throwError(c, "directive name must not be less than one character in length"); V !== 0;) {
|
|
844
|
+
for (; is_WHITE_SPACE(V);) V = c.input.charCodeAt(++c.position);
|
|
845
|
+
if (V === 35) {
|
|
846
|
+
do
|
|
847
|
+
V = c.input.charCodeAt(++c.position);
|
|
848
|
+
while (V !== 0 && !is_EOL(V));
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
if (is_EOL(V)) break;
|
|
852
|
+
for (L = c.position; V !== 0 && !is_WS_OR_EOL(V);) V = c.input.charCodeAt(++c.position);
|
|
853
|
+
z.push(c.input.slice(L, c.position));
|
|
854
|
+
}
|
|
855
|
+
V !== 0 && readLineBreak(c), _hasOwnProperty$1.call(directiveHandlers, R) ? directiveHandlers[R](c, R, z) : throwWarning(c, "unknown document directive \"" + R + "\"");
|
|
856
|
+
}
|
|
857
|
+
if (skipSeparationSpace(c, !0, -1), c.lineIndent === 0 && c.input.charCodeAt(c.position) === 45 && c.input.charCodeAt(c.position + 1) === 45 && c.input.charCodeAt(c.position + 2) === 45 ? (c.position += 3, skipSeparationSpace(c, !0, -1)) : B && throwError(c, "directives end mark is expected"), composeNode(c, c.lineIndent - 1, CONTEXT_BLOCK_OUT, !1, !0), skipSeparationSpace(c, !0, -1), c.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(c.input.slice(I, c.position)) && throwWarning(c, "non-ASCII line breaks are interpreted as content"), c.documents.push(c.result), c.position === c.lineStart && testDocumentSeparator(c)) {
|
|
858
|
+
c.input.charCodeAt(c.position) === 46 && (c.position += 3, skipSeparationSpace(c, !0, -1));
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
if (c.position < c.length - 1) throwError(c, "end of the stream or a document separator is expected");
|
|
862
|
+
else return;
|
|
863
|
+
}
|
|
864
|
+
__name(readDocument, "readDocument");
|
|
865
|
+
function loadDocuments(c, I) {
|
|
866
|
+
c = String(c), I ||= {}, c.length !== 0 && (c.charCodeAt(c.length - 1) !== 10 && c.charCodeAt(c.length - 1) !== 13 && (c += "\n"), c.charCodeAt(0) === 65279 && (c = c.slice(1)));
|
|
867
|
+
var L = new State$1(c, I), R = c.indexOf("\0");
|
|
868
|
+
for (R !== -1 && (L.position = R, throwError(L, "null byte is not allowed in input")), L.input += "\0"; L.input.charCodeAt(L.position) === 32;) L.lineIndent += 1, L.position += 1;
|
|
869
|
+
for (; L.position < L.length - 1;) readDocument(L);
|
|
870
|
+
return L.documents;
|
|
871
|
+
}
|
|
872
|
+
__name(loadDocuments, "loadDocuments");
|
|
873
|
+
function loadAll$1(c, I, L) {
|
|
874
|
+
typeof I == "object" && I && L === void 0 && (L = I, I = null);
|
|
875
|
+
var R = loadDocuments(c, L);
|
|
876
|
+
if (typeof I != "function") return R;
|
|
877
|
+
for (var z = 0, B = R.length; z < B; z += 1) I(R[z]);
|
|
878
|
+
}
|
|
879
|
+
__name(loadAll$1, "loadAll$1");
|
|
880
|
+
function load$1(c, I) {
|
|
881
|
+
var L = loadDocuments(c, I);
|
|
882
|
+
if (L.length !== 0) {
|
|
883
|
+
if (L.length === 1) return L[0];
|
|
884
|
+
throw new exception("expected a single document in the stream, but found more");
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
__name(load$1, "load$1");
|
|
888
|
+
var loader = {
|
|
889
|
+
loadAll: loadAll$1,
|
|
890
|
+
load: load$1
|
|
891
|
+
}, _toString = Object.prototype.toString, _hasOwnProperty = Object.prototype.hasOwnProperty, CHAR_BOM = 65279, CHAR_TAB = 9, CHAR_LINE_FEED = 10, CHAR_CARRIAGE_RETURN = 13, CHAR_SPACE = 32, CHAR_EXCLAMATION = 33, CHAR_DOUBLE_QUOTE = 34, CHAR_SHARP = 35, CHAR_PERCENT = 37, CHAR_AMPERSAND = 38, CHAR_SINGLE_QUOTE = 39, CHAR_ASTERISK = 42, CHAR_COMMA = 44, CHAR_MINUS = 45, CHAR_COLON = 58, CHAR_EQUALS = 61, CHAR_GREATER_THAN = 62, CHAR_QUESTION = 63, CHAR_COMMERCIAL_AT = 64, CHAR_LEFT_SQUARE_BRACKET = 91, CHAR_RIGHT_SQUARE_BRACKET = 93, CHAR_GRAVE_ACCENT = 96, CHAR_LEFT_CURLY_BRACKET = 123, CHAR_VERTICAL_LINE = 124, CHAR_RIGHT_CURLY_BRACKET = 125, ESCAPE_SEQUENCES = {};
|
|
892
|
+
ESCAPE_SEQUENCES[0] = "\\0", ESCAPE_SEQUENCES[7] = "\\a", ESCAPE_SEQUENCES[8] = "\\b", ESCAPE_SEQUENCES[9] = "\\t", ESCAPE_SEQUENCES[10] = "\\n", ESCAPE_SEQUENCES[11] = "\\v", ESCAPE_SEQUENCES[12] = "\\f", ESCAPE_SEQUENCES[13] = "\\r", ESCAPE_SEQUENCES[27] = "\\e", ESCAPE_SEQUENCES[34] = "\\\"", ESCAPE_SEQUENCES[92] = "\\\\", ESCAPE_SEQUENCES[133] = "\\N", ESCAPE_SEQUENCES[160] = "\\_", ESCAPE_SEQUENCES[8232] = "\\L", ESCAPE_SEQUENCES[8233] = "\\P";
|
|
893
|
+
var DEPRECATED_BOOLEANS_SYNTAX = [
|
|
894
|
+
"y",
|
|
895
|
+
"Y",
|
|
896
|
+
"yes",
|
|
897
|
+
"Yes",
|
|
898
|
+
"YES",
|
|
899
|
+
"on",
|
|
900
|
+
"On",
|
|
901
|
+
"ON",
|
|
902
|
+
"n",
|
|
903
|
+
"N",
|
|
904
|
+
"no",
|
|
905
|
+
"No",
|
|
906
|
+
"NO",
|
|
907
|
+
"off",
|
|
908
|
+
"Off",
|
|
909
|
+
"OFF"
|
|
910
|
+
], DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
911
|
+
function compileStyleMap(c, I) {
|
|
912
|
+
var L, R, z, B, V, H, U;
|
|
913
|
+
if (I === null) return {};
|
|
914
|
+
for (L = {}, R = Object.keys(I), z = 0, B = R.length; z < B; z += 1) V = R[z], H = String(I[V]), V.slice(0, 2) === "!!" && (V = "tag:yaml.org,2002:" + V.slice(2)), U = c.compiledTypeMap.fallback[V], U && _hasOwnProperty.call(U.styleAliases, H) && (H = U.styleAliases[H]), L[V] = H;
|
|
915
|
+
return L;
|
|
916
|
+
}
|
|
917
|
+
__name(compileStyleMap, "compileStyleMap");
|
|
918
|
+
function encodeHex(c) {
|
|
919
|
+
var I = c.toString(16).toUpperCase(), L, R;
|
|
920
|
+
if (c <= 255) L = "x", R = 2;
|
|
921
|
+
else if (c <= 65535) L = "u", R = 4;
|
|
922
|
+
else if (c <= 4294967295) L = "U", R = 8;
|
|
923
|
+
else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");
|
|
924
|
+
return "\\" + L + common.repeat("0", R - I.length) + I;
|
|
925
|
+
}
|
|
926
|
+
__name(encodeHex, "encodeHex");
|
|
927
|
+
var QUOTING_TYPE_SINGLE = 1, QUOTING_TYPE_DOUBLE = 2;
|
|
928
|
+
function State(c) {
|
|
929
|
+
this.schema = c.schema || _default, this.indent = Math.max(1, c.indent || 2), this.noArrayIndent = c.noArrayIndent || !1, this.skipInvalid = c.skipInvalid || !1, this.flowLevel = common.isNothing(c.flowLevel) ? -1 : c.flowLevel, this.styleMap = compileStyleMap(this.schema, c.styles || null), this.sortKeys = c.sortKeys || !1, this.lineWidth = c.lineWidth || 80, this.noRefs = c.noRefs || !1, this.noCompatMode = c.noCompatMode || !1, this.condenseFlow = c.condenseFlow || !1, this.quotingType = c.quotingType === "\"" ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE, this.forceQuotes = c.forceQuotes || !1, this.replacer = typeof c.replacer == "function" ? c.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
930
|
+
}
|
|
931
|
+
__name(State, "State");
|
|
932
|
+
function indentString(c, I) {
|
|
933
|
+
for (var L = common.repeat(" ", I), R = 0, z = -1, B = "", V, U = c.length; R < U;) z = c.indexOf("\n", R), z === -1 ? (V = c.slice(R), R = U) : (V = c.slice(R, z + 1), R = z + 1), V.length && V !== "\n" && (B += L), B += V;
|
|
934
|
+
return B;
|
|
935
|
+
}
|
|
936
|
+
__name(indentString, "indentString");
|
|
937
|
+
function generateNextLine(c, I) {
|
|
938
|
+
return "\n" + common.repeat(" ", c.indent * I);
|
|
939
|
+
}
|
|
940
|
+
__name(generateNextLine, "generateNextLine");
|
|
941
|
+
function testImplicitResolving(c, I) {
|
|
942
|
+
var L, R, z;
|
|
943
|
+
for (L = 0, R = c.implicitTypes.length; L < R; L += 1) if (z = c.implicitTypes[L], z.resolve(I)) return !0;
|
|
944
|
+
return !1;
|
|
945
|
+
}
|
|
946
|
+
__name(testImplicitResolving, "testImplicitResolving");
|
|
947
|
+
function isWhitespace(c) {
|
|
948
|
+
return c === CHAR_SPACE || c === CHAR_TAB;
|
|
949
|
+
}
|
|
950
|
+
__name(isWhitespace, "isWhitespace");
|
|
951
|
+
function isPrintable(c) {
|
|
952
|
+
return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
|
|
953
|
+
}
|
|
954
|
+
__name(isPrintable, "isPrintable");
|
|
955
|
+
function isNsCharOrWhitespace(c) {
|
|
956
|
+
return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
|
|
957
|
+
}
|
|
958
|
+
__name(isNsCharOrWhitespace, "isNsCharOrWhitespace");
|
|
959
|
+
function isPlainSafe(c, I, L) {
|
|
960
|
+
var R = isNsCharOrWhitespace(c), z = R && !isWhitespace(c);
|
|
961
|
+
return (L ? R : R && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(I === CHAR_COLON && !z) || isNsCharOrWhitespace(I) && !isWhitespace(I) && c === CHAR_SHARP || I === CHAR_COLON && z;
|
|
962
|
+
}
|
|
963
|
+
__name(isPlainSafe, "isPlainSafe");
|
|
964
|
+
function isPlainSafeFirst(c) {
|
|
965
|
+
return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|
|
966
|
+
}
|
|
967
|
+
__name(isPlainSafeFirst, "isPlainSafeFirst");
|
|
968
|
+
function isPlainSafeLast(c) {
|
|
969
|
+
return !isWhitespace(c) && c !== CHAR_COLON;
|
|
970
|
+
}
|
|
971
|
+
__name(isPlainSafeLast, "isPlainSafeLast");
|
|
972
|
+
function codePointAt(c, I) {
|
|
973
|
+
var L = c.charCodeAt(I), R;
|
|
974
|
+
return L >= 55296 && L <= 56319 && I + 1 < c.length && (R = c.charCodeAt(I + 1), R >= 56320 && R <= 57343) ? (L - 55296) * 1024 + R - 56320 + 65536 : L;
|
|
975
|
+
}
|
|
976
|
+
__name(codePointAt, "codePointAt");
|
|
977
|
+
function needIndentIndicator(c) {
|
|
978
|
+
return /^\n* /.test(c);
|
|
979
|
+
}
|
|
980
|
+
__name(needIndentIndicator, "needIndentIndicator");
|
|
981
|
+
var STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5;
|
|
982
|
+
function chooseScalarStyle(c, I, L, R, z, B, V, H) {
|
|
983
|
+
var U, W = 0, G = null, K = !1, q = !1, J = R !== -1, Y = -1, X = isPlainSafeFirst(codePointAt(c, 0)) && isPlainSafeLast(codePointAt(c, c.length - 1));
|
|
984
|
+
if (I || V) for (U = 0; U < c.length; W >= 65536 ? U += 2 : U++) {
|
|
985
|
+
if (W = codePointAt(c, U), !isPrintable(W)) return STYLE_DOUBLE;
|
|
986
|
+
X &&= isPlainSafe(W, G, H), G = W;
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
for (U = 0; U < c.length; W >= 65536 ? U += 2 : U++) {
|
|
990
|
+
if (W = codePointAt(c, U), W === CHAR_LINE_FEED) K = !0, J && (q ||= U - Y - 1 > R && c[Y + 1] !== " ", Y = U);
|
|
991
|
+
else if (!isPrintable(W)) return STYLE_DOUBLE;
|
|
992
|
+
X &&= isPlainSafe(W, G, H), G = W;
|
|
993
|
+
}
|
|
994
|
+
q ||= J && U - Y - 1 > R && c[Y + 1] !== " ";
|
|
995
|
+
}
|
|
996
|
+
return !K && !q ? X && !V && !z(c) ? STYLE_PLAIN : B === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE : L > 9 && needIndentIndicator(c) ? STYLE_DOUBLE : V ? B === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE : q ? STYLE_FOLDED : STYLE_LITERAL;
|
|
997
|
+
}
|
|
998
|
+
__name(chooseScalarStyle, "chooseScalarStyle");
|
|
999
|
+
function writeScalar(I, L, R, z, B) {
|
|
1000
|
+
I.dump = (function() {
|
|
1001
|
+
if (L.length === 0) return I.quotingType === QUOTING_TYPE_DOUBLE ? "\"\"" : "''";
|
|
1002
|
+
if (!I.noCompatMode && (DEPRECATED_BOOLEANS_SYNTAX.indexOf(L) !== -1 || DEPRECATED_BASE60_SYNTAX.test(L))) return I.quotingType === QUOTING_TYPE_DOUBLE ? "\"" + L + "\"" : "'" + L + "'";
|
|
1003
|
+
var V = I.indent * Math.max(1, R), H = I.lineWidth === -1 ? -1 : Math.max(Math.min(I.lineWidth, 40), I.lineWidth - V), U = z || I.flowLevel > -1 && R >= I.flowLevel;
|
|
1004
|
+
function W(c) {
|
|
1005
|
+
return testImplicitResolving(I, c);
|
|
1006
|
+
}
|
|
1007
|
+
switch (__name(W, "testAmbiguity"), chooseScalarStyle(L, U, I.indent, H, W, I.quotingType, I.forceQuotes && !z, B)) {
|
|
1008
|
+
case STYLE_PLAIN: return L;
|
|
1009
|
+
case STYLE_SINGLE: return "'" + L.replace(/'/g, "''") + "'";
|
|
1010
|
+
case STYLE_LITERAL: return "|" + blockHeader(L, I.indent) + dropEndingNewline(indentString(L, V));
|
|
1011
|
+
case STYLE_FOLDED: return ">" + blockHeader(L, I.indent) + dropEndingNewline(indentString(foldString(L, H), V));
|
|
1012
|
+
case STYLE_DOUBLE: return "\"" + escapeString(L) + "\"";
|
|
1013
|
+
default: throw new exception("impossible error: invalid scalar style");
|
|
1014
|
+
}
|
|
1015
|
+
})();
|
|
1016
|
+
}
|
|
1017
|
+
__name(writeScalar, "writeScalar");
|
|
1018
|
+
function blockHeader(c, I) {
|
|
1019
|
+
var L = needIndentIndicator(c) ? String(I) : "", R = c[c.length - 1] === "\n";
|
|
1020
|
+
return L + (R && (c[c.length - 2] === "\n" || c === "\n") ? "+" : R ? "" : "-") + "\n";
|
|
1021
|
+
}
|
|
1022
|
+
__name(blockHeader, "blockHeader");
|
|
1023
|
+
function dropEndingNewline(c) {
|
|
1024
|
+
return c[c.length - 1] === "\n" ? c.slice(0, -1) : c;
|
|
1025
|
+
}
|
|
1026
|
+
__name(dropEndingNewline, "dropEndingNewline");
|
|
1027
|
+
function foldString(c, I) {
|
|
1028
|
+
for (var L = /(\n+)([^\n]*)/g, R = (function() {
|
|
1029
|
+
var R = c.indexOf("\n");
|
|
1030
|
+
return R = R === -1 ? c.length : R, L.lastIndex = R, foldLine(c.slice(0, R), I);
|
|
1031
|
+
})(), z = c[0] === "\n" || c[0] === " ", B, V; V = L.exec(c);) {
|
|
1032
|
+
var H = V[1], U = V[2];
|
|
1033
|
+
B = U[0] === " ", R += H + (!z && !B && U !== "" ? "\n" : "") + foldLine(U, I), z = B;
|
|
1034
|
+
}
|
|
1035
|
+
return R;
|
|
1036
|
+
}
|
|
1037
|
+
__name(foldString, "foldString");
|
|
1038
|
+
function foldLine(c, I) {
|
|
1039
|
+
if (c === "" || c[0] === " ") return c;
|
|
1040
|
+
for (var L = / [^ ]/g, R, z = 0, B, V = 0, H = 0, U = ""; R = L.exec(c);) H = R.index, H - z > I && (B = V > z ? V : H, U += "\n" + c.slice(z, B), z = B + 1), V = H;
|
|
1041
|
+
return U += "\n", c.length - z > I && V > z ? U += c.slice(z, V) + "\n" + c.slice(V + 1) : U += c.slice(z), U.slice(1);
|
|
1042
|
+
}
|
|
1043
|
+
__name(foldLine, "foldLine");
|
|
1044
|
+
function escapeString(c) {
|
|
1045
|
+
for (var I = "", L = 0, R, z = 0; z < c.length; L >= 65536 ? z += 2 : z++) L = codePointAt(c, z), R = ESCAPE_SEQUENCES[L], !R && isPrintable(L) ? (I += c[z], L >= 65536 && (I += c[z + 1])) : I += R || encodeHex(L);
|
|
1046
|
+
return I;
|
|
1047
|
+
}
|
|
1048
|
+
__name(escapeString, "escapeString");
|
|
1049
|
+
function writeFlowSequence(c, I, L) {
|
|
1050
|
+
var R = "", z = c.tag, B, V, H;
|
|
1051
|
+
for (B = 0, V = L.length; B < V; B += 1) H = L[B], c.replacer && (H = c.replacer.call(L, String(B), H)), (writeNode(c, I, H, !1, !1) || H === void 0 && writeNode(c, I, null, !1, !1)) && (R !== "" && (R += "," + (c.condenseFlow ? "" : " ")), R += c.dump);
|
|
1052
|
+
c.tag = z, c.dump = "[" + R + "]";
|
|
1053
|
+
}
|
|
1054
|
+
__name(writeFlowSequence, "writeFlowSequence");
|
|
1055
|
+
function writeBlockSequence(c, I, L, R) {
|
|
1056
|
+
var z = "", B = c.tag, V, H, U;
|
|
1057
|
+
for (V = 0, H = L.length; V < H; V += 1) U = L[V], c.replacer && (U = c.replacer.call(L, String(V), U)), (writeNode(c, I + 1, U, !0, !0, !1, !0) || U === void 0 && writeNode(c, I + 1, null, !0, !0, !1, !0)) && ((!R || z !== "") && (z += generateNextLine(c, I)), c.dump && CHAR_LINE_FEED === c.dump.charCodeAt(0) ? z += "-" : z += "- ", z += c.dump);
|
|
1058
|
+
c.tag = B, c.dump = z || "[]";
|
|
1059
|
+
}
|
|
1060
|
+
__name(writeBlockSequence, "writeBlockSequence");
|
|
1061
|
+
function writeFlowMapping(c, I, L) {
|
|
1062
|
+
var R = "", z = c.tag, B = Object.keys(L), V, H, U, W, G;
|
|
1063
|
+
for (V = 0, H = B.length; V < H; V += 1) G = "", R !== "" && (G += ", "), c.condenseFlow && (G += "\""), U = B[V], W = L[U], c.replacer && (W = c.replacer.call(L, U, W)), writeNode(c, I, U, !1, !1) && (c.dump.length > 1024 && (G += "? "), G += c.dump + (c.condenseFlow ? "\"" : "") + ":" + (c.condenseFlow ? "" : " "), writeNode(c, I, W, !1, !1) && (G += c.dump, R += G));
|
|
1064
|
+
c.tag = z, c.dump = "{" + R + "}";
|
|
1065
|
+
}
|
|
1066
|
+
__name(writeFlowMapping, "writeFlowMapping");
|
|
1067
|
+
function writeBlockMapping(c, I, L, R) {
|
|
1068
|
+
var z = "", B = c.tag, V = Object.keys(L), H, U, W, K, q, J;
|
|
1069
|
+
if (c.sortKeys === !0) V.sort();
|
|
1070
|
+
else if (typeof c.sortKeys == "function") V.sort(c.sortKeys);
|
|
1071
|
+
else if (c.sortKeys) throw new exception("sortKeys must be a boolean or a function");
|
|
1072
|
+
for (H = 0, U = V.length; H < U; H += 1) J = "", (!R || z !== "") && (J += generateNextLine(c, I)), W = V[H], K = L[W], c.replacer && (K = c.replacer.call(L, W, K)), writeNode(c, I + 1, W, !0, !0, !0) && (q = c.tag !== null && c.tag !== "?" || c.dump && c.dump.length > 1024, q && (c.dump && CHAR_LINE_FEED === c.dump.charCodeAt(0) ? J += "?" : J += "? "), J += c.dump, q && (J += generateNextLine(c, I)), writeNode(c, I + 1, K, !0, q) && (c.dump && CHAR_LINE_FEED === c.dump.charCodeAt(0) ? J += ":" : J += ": ", J += c.dump, z += J));
|
|
1073
|
+
c.tag = B, c.dump = z || "{}";
|
|
1074
|
+
}
|
|
1075
|
+
__name(writeBlockMapping, "writeBlockMapping");
|
|
1076
|
+
function detectType(c, I, L) {
|
|
1077
|
+
var R, z = L ? c.explicitTypes : c.implicitTypes, B, V, H, U;
|
|
1078
|
+
for (B = 0, V = z.length; B < V; B += 1) if (H = z[B], (H.instanceOf || H.predicate) && (!H.instanceOf || typeof I == "object" && I instanceof H.instanceOf) && (!H.predicate || H.predicate(I))) {
|
|
1079
|
+
if (L ? H.multi && H.representName ? c.tag = H.representName(I) : c.tag = H.tag : c.tag = "?", H.represent) {
|
|
1080
|
+
if (U = c.styleMap[H.tag] || H.defaultStyle, _toString.call(H.represent) === "[object Function]") R = H.represent(I, U);
|
|
1081
|
+
else if (_hasOwnProperty.call(H.represent, U)) R = H.represent[U](I, U);
|
|
1082
|
+
else throw new exception("!<" + H.tag + "> tag resolver accepts not \"" + U + "\" style");
|
|
1083
|
+
c.dump = R;
|
|
1084
|
+
}
|
|
1085
|
+
return !0;
|
|
1086
|
+
}
|
|
1087
|
+
return !1;
|
|
1088
|
+
}
|
|
1089
|
+
__name(detectType, "detectType");
|
|
1090
|
+
function writeNode(c, I, L, R, z, B, V) {
|
|
1091
|
+
c.tag = null, c.dump = L, detectType(c, L, !1) || detectType(c, L, !0);
|
|
1092
|
+
var H = _toString.call(c.dump), U = R, W;
|
|
1093
|
+
R &&= c.flowLevel < 0 || c.flowLevel > I;
|
|
1094
|
+
var K = H === "[object Object]" || H === "[object Array]", q, J;
|
|
1095
|
+
if (K && (q = c.duplicates.indexOf(L), J = q !== -1), (c.tag !== null && c.tag !== "?" || J || c.indent !== 2 && I > 0) && (z = !1), J && c.usedDuplicates[q]) c.dump = "*ref_" + q;
|
|
1096
|
+
else {
|
|
1097
|
+
if (K && J && !c.usedDuplicates[q] && (c.usedDuplicates[q] = !0), H === "[object Object]") R && Object.keys(c.dump).length !== 0 ? (writeBlockMapping(c, I, c.dump, z), J && (c.dump = "&ref_" + q + c.dump)) : (writeFlowMapping(c, I, c.dump), J && (c.dump = "&ref_" + q + " " + c.dump));
|
|
1098
|
+
else if (H === "[object Array]") R && c.dump.length !== 0 ? (c.noArrayIndent && !V && I > 0 ? writeBlockSequence(c, I - 1, c.dump, z) : writeBlockSequence(c, I, c.dump, z), J && (c.dump = "&ref_" + q + c.dump)) : (writeFlowSequence(c, I, c.dump), J && (c.dump = "&ref_" + q + " " + c.dump));
|
|
1099
|
+
else if (H === "[object String]") c.tag !== "?" && writeScalar(c, c.dump, I, B, U);
|
|
1100
|
+
else if (H === "[object Undefined]") return !1;
|
|
1101
|
+
else {
|
|
1102
|
+
if (c.skipInvalid) return !1;
|
|
1103
|
+
throw new exception("unacceptable kind of an object to dump " + H);
|
|
1104
|
+
}
|
|
1105
|
+
c.tag !== null && c.tag !== "?" && (W = encodeURI(c.tag[0] === "!" ? c.tag.slice(1) : c.tag).replace(/!/g, "%21"), W = c.tag[0] === "!" ? "!" + W : W.slice(0, 18) === "tag:yaml.org,2002:" ? "!!" + W.slice(18) : "!<" + W + ">", c.dump = W + " " + c.dump);
|
|
1106
|
+
}
|
|
1107
|
+
return !0;
|
|
1108
|
+
}
|
|
1109
|
+
__name(writeNode, "writeNode");
|
|
1110
|
+
function getDuplicateReferences(c, I) {
|
|
1111
|
+
var L = [], R = [], z, B;
|
|
1112
|
+
for (inspectNode(c, L, R), z = 0, B = R.length; z < B; z += 1) I.duplicates.push(L[R[z]]);
|
|
1113
|
+
I.usedDuplicates = Array(B);
|
|
1114
|
+
}
|
|
1115
|
+
__name(getDuplicateReferences, "getDuplicateReferences");
|
|
1116
|
+
function inspectNode(c, I, L) {
|
|
1117
|
+
var R, z, B;
|
|
1118
|
+
if (typeof c == "object" && c) if (z = I.indexOf(c), z !== -1) L.indexOf(z) === -1 && L.push(z);
|
|
1119
|
+
else if (I.push(c), Array.isArray(c)) for (z = 0, B = c.length; z < B; z += 1) inspectNode(c[z], I, L);
|
|
1120
|
+
else for (R = Object.keys(c), z = 0, B = R.length; z < B; z += 1) inspectNode(c[R[z]], I, L);
|
|
1121
|
+
}
|
|
1122
|
+
__name(inspectNode, "inspectNode");
|
|
1123
|
+
function dump$1(c, I) {
|
|
1124
|
+
I ||= {};
|
|
1125
|
+
var L = new State(I);
|
|
1126
|
+
L.noRefs || getDuplicateReferences(c, L);
|
|
1127
|
+
var R = c;
|
|
1128
|
+
return L.replacer && (R = L.replacer.call({ "": R }, "", R)), writeNode(L, 0, R, !0, !0) ? L.dump + "\n" : "";
|
|
1129
|
+
}
|
|
1130
|
+
__name(dump$1, "dump$1");
|
|
1131
|
+
var dumper = { dump: dump$1 };
|
|
1132
|
+
function renamed(c, I) {
|
|
1133
|
+
return function() {
|
|
1134
|
+
throw Error("Function yaml." + c + " is removed in js-yaml 4. Use yaml." + I + " instead, which is now safe by default.");
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
__name(renamed, "renamed");
|
|
1138
|
+
var JSON_SCHEMA = json, load = loader.load;
|
|
1139
|
+
loader.loadAll, dumper.dump;
|
|
1140
|
+
export { load as n, JSON_SCHEMA as t };
|