@redocly/replay 0.27.0-next.8 → 0.27.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/dist/{replay-AiChatProvider-DHIxHTKX.js → replay-AiChatProvider-LQhrLIDL.js} +44 -44
- package/dist/{replay-AiChatProvider-O8HHQobN.js → replay-AiChatProvider-Oms5CFgT.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-DNMrzkJg.js → replay-AiChatSqliteDBStorage-3-p1mthX.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-DjUq9VX3.js → replay-AiChatSqliteDBStorage-GZibdHOQ.js} +1 -1
- package/dist/replay-AiPanel-BvwwBTh1.js +742 -0
- package/dist/{replay-AiPanel-CR815YqV.js → replay-AiPanel-lcDNvgo0.js} +973 -1176
- package/dist/replay-FileWatcher-ClVd_wG0.js +1 -0
- package/dist/replay-FileWatcher-DR-wJLe2.js +343 -0
- package/dist/replay-Observable-D6wKbFwB.js +31 -0
- package/dist/replay-Observable-bjJ6wkRB.js +1 -0
- package/dist/replay-SemanticSearchService-CCqwCRo6.js +1 -0
- package/dist/replay-SemanticSearchService-U1eXQGfF.js +723 -0
- package/dist/{replay-SqliteDBStorage-B3oYWXem.js → replay-SqliteDBStorage-Dn6DoVWW.js} +1 -1
- package/dist/{replay-SqliteDBStorage-CC9kLioX.js → replay-SqliteDBStorage-d_ZK6ScA.js} +1 -1
- package/dist/replay-TauriFileSystemAdapter-CpiUuG3T.js +99 -0
- package/dist/replay-TauriFileSystemAdapter-dwJ0xBYr.js +1 -0
- package/dist/replay-TauriRootStorage-CuVbYMXX.js +605 -0
- package/dist/replay-TauriRootStorage-DhzbAahU.js +1 -0
- package/dist/{replay-agent-loop-CTq5eJ4u.js → replay-agent-loop-BLSu4v_O.js} +1 -1
- package/dist/{replay-agent-loop-CCYOzyHo.js → replay-agent-loop-DgEHdXUt.js} +11 -11
- package/dist/{replay-ai-chat-mappers-C8y5UhCq.js → replay-ai-chat-mappers-BvfcEubB.js} +5 -5
- package/dist/{replay-ai-chat-mappers-B_wovMvG.js → replay-ai-chat-mappers-Dy2kJ7ZG.js} +1 -1
- package/dist/replay-core-BJmXmoC5.js +1 -0
- package/dist/replay-core-B_hiOZZr.js +10 -0
- package/dist/{replay-create-model-C5yvtnXA.js → replay-create-model-DNPFcOIp.js} +579 -578
- package/dist/{replay-create-model-CBCmuEKC.js → replay-create-model-bOIDB-e8.js} +10 -10
- package/dist/{replay-db-CCBQadnT.js → replay-db-BQGv3PGw.js} +1 -1
- package/dist/{replay-db-DfOjLqsq.js → replay-db-CMXZZs9v.js} +1 -1
- package/dist/{replay-external-resolver-BRouROm6.js → replay-external-resolver-mrykFC2h.js} +2 -2
- package/dist/{replay-external-resolver-B6tpqUZt.js → replay-external-resolver-n5OvQMRF.js} +1 -1
- package/dist/replay-index-3lwhSmvi.js +1 -0
- package/dist/{replay-index-BzzBKjHm.js → replay-index-Bc5RHu5L.js} +23771 -25420
- package/dist/replay-index-CFLu-XMV.js +25 -0
- package/dist/{replay-index-Xq6K7XSm.js → replay-index-CHGVyIdG.js} +1 -1
- package/dist/{replay-index-Cpkh9r0X.js → replay-index-CSR_qlua.js} +1 -1
- package/dist/replay-index-CepJ5Z0m.js +6875 -0
- package/dist/{replay-index-Bzttek8l.js → replay-index-CgCGhu4l.js} +6 -6
- package/dist/replay-index-DDjmUXWm.js +1 -0
- package/dist/replay-index-DiSy_1OY.js +21 -0
- package/dist/replay-index-Oct6Dygd.js +1 -0
- package/dist/{replay-index-B_OHqSlS.js → replay-index-QXosJxRc.js} +18 -18
- package/dist/replay-index-jkDlU0Lx.js +32 -0
- package/dist/{replay-lint-gtuMJgII.js → replay-lint-DoHQIATV.js} +122 -122
- package/dist/{replay-lint-DlDmPTBV.js → replay-lint-PWaLESz5.js} +8921 -8880
- package/dist/{replay-lint-graphql-DHOq8lRT.js → replay-lint-graphql-xh8VoAwd.js} +1 -1
- package/dist/{replay-lint-graphql-BQJ00lU4.js → replay-lint-graphql-zO8zunug.js} +1 -1
- package/dist/replay-periodic-revalidation-BoyLQHtg.js +1 -0
- package/dist/replay-periodic-revalidation-Dsp-n7ui.js +21 -0
- package/dist/replay-promise-map-limit-DRDkHc-b.js +1 -0
- package/dist/replay-promise-map-limit-Db_42GvV.js +14 -0
- package/dist/replay-resolve-B0AjmaE9.js +47 -0
- package/dist/{replay-resolve-DsgcWnjC.js → replay-resolve-MVe_8Ube.js} +1364 -1329
- package/dist/{replay-respect-run-7Cwe1_ri.js → replay-respect-run-BJsR4a4m.js} +1 -1
- package/dist/{replay-respect-run-D1zyh-5j.js → replay-respect-run-X4PSO6Fj.js} +3 -3
- package/dist/{replay-tauri-path-BAY3g5sW.js → replay-tauri-path-CkGiQWsb.js} +5 -5
- package/dist/{replay-tauri-path-CaVeI3a-.js → replay-tauri-path-D8FJsoZb.js} +1 -1
- package/dist/replay-useAiChatQueries-BXL-_N2Q.js +215 -0
- package/dist/{replay-useAiChatQueries-CxZNLVje.js → replay-useAiChatQueries-D7sHNAfV.js} +1078 -1022
- package/dist/{replay-validate-key-Cv0mvYDS.js → replay-validate-key-CmzSfORv.js} +1 -1
- package/dist/{replay-validate-key-Di8MCBz7.js → replay-validate-key-CtZEJRP7.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +11 -11
- package/package.json +10 -9
- package/dist/replay-AiPanel-CfYBCkrN.js +0 -868
- package/dist/replay-index-C6SJPGDO.js +0 -23
- package/dist/replay-index-CUs62_1f.js +0 -1
- package/dist/replay-index-Dfnqt_IZ.js +0 -6899
- package/dist/replay-resolve-DqFS69S_.js +0 -47
- package/dist/replay-useAiChatQueries-D99tAUpY.js +0 -215
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
function
|
|
1
|
+
import { g as hr, aR as Xe, aS as Re } from "./replay-index-Bc5RHu5L.js";
|
|
2
|
+
function gr(e) {
|
|
3
3
|
return !!e;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`,
|
|
5
|
+
var Et = {}, Ct, un;
|
|
6
|
+
function pt() {
|
|
7
|
+
if (un) return Ct;
|
|
8
|
+
un = 1;
|
|
9
|
+
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, S = `${r}{1,2}${u}`, m = `(?!${r})`, C = `(?!${c}${S})`, E = `(?!${r}{0,1}${u})`, I = `(?!${S})`, M = `[^.${a}]`, N = `${l}*?`, y = {
|
|
10
10
|
DOT_LITERAL: r,
|
|
11
11
|
PLUS_LITERAL: i,
|
|
12
12
|
QMARK_LITERAL: o,
|
|
@@ -14,17 +14,17 @@ function ut() {
|
|
|
14
14
|
ONE_CHAR: s,
|
|
15
15
|
QMARK: l,
|
|
16
16
|
END_ANCHOR: u,
|
|
17
|
-
DOTS_SLASH:
|
|
18
|
-
NO_DOT:
|
|
17
|
+
DOTS_SLASH: S,
|
|
18
|
+
NO_DOT: m,
|
|
19
19
|
NO_DOTS: C,
|
|
20
20
|
NO_DOT_SLASH: E,
|
|
21
|
-
NO_DOTS_SLASH:
|
|
22
|
-
QMARK_NO_DOT:
|
|
21
|
+
NO_DOTS_SLASH: I,
|
|
22
|
+
QMARK_NO_DOT: M,
|
|
23
23
|
STAR: N,
|
|
24
24
|
START_ANCHOR: c,
|
|
25
25
|
SEP: "/"
|
|
26
|
-
},
|
|
27
|
-
...
|
|
26
|
+
}, R = {
|
|
27
|
+
...y,
|
|
28
28
|
SLASH_LITERAL: `[${e}]`,
|
|
29
29
|
QMARK: t,
|
|
30
30
|
STAR: `${t}*?`,
|
|
@@ -37,7 +37,7 @@ function ut() {
|
|
|
37
37
|
START_ANCHOR: `(?:^|[${e}])`,
|
|
38
38
|
END_ANCHOR: `(?:[${e}]|$)`,
|
|
39
39
|
SEP: "\\"
|
|
40
|
-
},
|
|
40
|
+
}, f = {
|
|
41
41
|
__proto__: null,
|
|
42
42
|
alnum: "a-zA-Z0-9",
|
|
43
43
|
alpha: "a-zA-Z",
|
|
@@ -54,10 +54,10 @@ function ut() {
|
|
|
54
54
|
word: "A-Za-z0-9_",
|
|
55
55
|
xdigit: "A-Fa-f0-9"
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return Ct = {
|
|
58
58
|
DEFAULT_MAX_EXTGLOB_RECURSION: n,
|
|
59
59
|
MAX_LENGTH: 1024 * 64,
|
|
60
|
-
POSIX_REGEX_SOURCE:
|
|
60
|
+
POSIX_REGEX_SOURCE: f,
|
|
61
61
|
// regular expressions
|
|
62
62
|
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
63
63
|
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
@@ -164,9 +164,9 @@ function ut() {
|
|
|
164
164
|
/**
|
|
165
165
|
* Create EXTGLOB_CHARS
|
|
166
166
|
*/
|
|
167
|
-
extglobChars(
|
|
167
|
+
extglobChars(w) {
|
|
168
168
|
return {
|
|
169
|
-
"!": { type: "negate", open: "(?:(?!(?:", close: `))${
|
|
169
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${w.STAR})` },
|
|
170
170
|
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
171
171
|
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
172
172
|
"*": { type: "star", open: "(?:", close: ")*" },
|
|
@@ -176,20 +176,20 @@ function ut() {
|
|
|
176
176
|
/**
|
|
177
177
|
* Create GLOB_CHARS
|
|
178
178
|
*/
|
|
179
|
-
globChars(
|
|
180
|
-
return
|
|
179
|
+
globChars(w) {
|
|
180
|
+
return w === !0 ? R : y;
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, Ct;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
function
|
|
186
|
-
return
|
|
184
|
+
var fn;
|
|
185
|
+
function dt() {
|
|
186
|
+
return fn || (fn = 1, (function(e) {
|
|
187
187
|
const {
|
|
188
188
|
REGEX_BACKSLASH: t,
|
|
189
189
|
REGEX_REMOVE_BACKSLASH: n,
|
|
190
190
|
REGEX_SPECIAL_CHARS: r,
|
|
191
191
|
REGEX_SPECIAL_CHARS_GLOBAL: i
|
|
192
|
-
} = /* @__PURE__ */
|
|
192
|
+
} = /* @__PURE__ */ pt();
|
|
193
193
|
e.isObject = (o) => o !== null && typeof o == "object" && !Array.isArray(o), e.hasRegexChars = (o) => r.test(o), e.isRegexChar = (o) => o.length === 1 && e.hasRegexChars(o), e.escapeRegex = (o) => o.replace(i, "\\$1"), e.toPosixSlashes = (o) => o.replace(t, "/"), e.isWindows = () => {
|
|
194
194
|
if (typeof navigator < "u" && navigator.platform) {
|
|
195
195
|
const o = navigator.platform.toLowerCase();
|
|
@@ -210,13 +210,13 @@ function ft() {
|
|
|
210
210
|
const s = o.split(a ? /[\\/]/ : "/"), l = s[s.length - 1];
|
|
211
211
|
return l === "" ? s[s.length - 2] : l;
|
|
212
212
|
};
|
|
213
|
-
})(
|
|
213
|
+
})(Et)), Et;
|
|
214
214
|
}
|
|
215
|
-
var
|
|
216
|
-
function
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
const e = /* @__PURE__ */
|
|
215
|
+
var Tt, pn;
|
|
216
|
+
function mr() {
|
|
217
|
+
if (pn) return Tt;
|
|
218
|
+
pn = 1;
|
|
219
|
+
const e = /* @__PURE__ */ dt(), {
|
|
220
220
|
CHAR_ASTERISK: t,
|
|
221
221
|
/* * */
|
|
222
222
|
CHAR_AT: n,
|
|
@@ -237,52 +237,52 @@ function dr() {
|
|
|
237
237
|
/* ( */
|
|
238
238
|
CHAR_LEFT_SQUARE_BRACKET: c,
|
|
239
239
|
/* [ */
|
|
240
|
-
CHAR_PLUS:
|
|
240
|
+
CHAR_PLUS: S,
|
|
241
241
|
/* + */
|
|
242
|
-
CHAR_QUESTION_MARK:
|
|
242
|
+
CHAR_QUESTION_MARK: m,
|
|
243
243
|
/* ? */
|
|
244
244
|
CHAR_RIGHT_CURLY_BRACE: C,
|
|
245
245
|
/* } */
|
|
246
246
|
CHAR_RIGHT_PARENTHESES: E,
|
|
247
247
|
/* ) */
|
|
248
|
-
CHAR_RIGHT_SQUARE_BRACKET:
|
|
248
|
+
CHAR_RIGHT_SQUARE_BRACKET: I
|
|
249
249
|
/* ] */
|
|
250
|
-
} = /* @__PURE__ */
|
|
251
|
-
|
|
250
|
+
} = /* @__PURE__ */ pt(), M = (y) => y === s || y === r, N = (y) => {
|
|
251
|
+
y.isPrefix !== !0 && (y.depth = y.isGlobstar ? 1 / 0 : 1);
|
|
252
252
|
};
|
|
253
|
-
return
|
|
254
|
-
const
|
|
255
|
-
let W =
|
|
256
|
-
const
|
|
257
|
-
for (;
|
|
258
|
-
$ =
|
|
259
|
-
let
|
|
253
|
+
return Tt = (y, R) => {
|
|
254
|
+
const f = R || {}, w = y.length - 1, b = f.parts === !0 || f.scanToEnd === !0, A = [], g = [], x = [];
|
|
255
|
+
let W = y, L = -1, q = 0, ce = 0, se = !1, de = !1, j = !1, ye = !1, xe = !1, he = !1, U = !1, ge = !1, Ie = !1, ne = !1, J = 0, le, $, F = { value: "", depth: 0, isGlob: !1 };
|
|
256
|
+
const h = () => L >= w, ae = () => W.charCodeAt(L + 1), z = () => (le = $, W.charCodeAt(++L));
|
|
257
|
+
for (; L < w; ) {
|
|
258
|
+
$ = z();
|
|
259
|
+
let D;
|
|
260
260
|
if ($ === r) {
|
|
261
|
-
|
|
261
|
+
U = F.backslashes = !0, $ = z(), $ === l && (he = !0);
|
|
262
262
|
continue;
|
|
263
263
|
}
|
|
264
|
-
if (
|
|
265
|
-
for (
|
|
264
|
+
if (he === !0 || $ === l) {
|
|
265
|
+
for (J++; h() !== !0 && ($ = z()); ) {
|
|
266
266
|
if ($ === r) {
|
|
267
|
-
|
|
267
|
+
U = F.backslashes = !0, z();
|
|
268
268
|
continue;
|
|
269
269
|
}
|
|
270
270
|
if ($ === l) {
|
|
271
|
-
|
|
271
|
+
J++;
|
|
272
272
|
continue;
|
|
273
273
|
}
|
|
274
|
-
if (
|
|
275
|
-
if (
|
|
274
|
+
if (he !== !0 && $ === o && ($ = z()) === o) {
|
|
275
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, b === !0)
|
|
276
276
|
continue;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
|
-
if (
|
|
280
|
-
if (
|
|
279
|
+
if (he !== !0 && $ === i) {
|
|
280
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, b === !0)
|
|
281
281
|
continue;
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
284
|
-
if ($ === C && (
|
|
285
|
-
|
|
284
|
+
if ($ === C && (J--, J === 0)) {
|
|
285
|
+
he = !1, se = F.isBrace = !0, ne = !0;
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -291,23 +291,23 @@ function dr() {
|
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
293
|
if ($ === s) {
|
|
294
|
-
if (
|
|
295
|
-
if (
|
|
296
|
-
|
|
294
|
+
if (A.push(L), g.push(F), F = { value: "", depth: 0, isGlob: !1 }, ne === !0) continue;
|
|
295
|
+
if (le === o && L === q + 1) {
|
|
296
|
+
q += 2;
|
|
297
297
|
continue;
|
|
298
298
|
}
|
|
299
|
-
|
|
299
|
+
ce = L + 1;
|
|
300
300
|
continue;
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
if (j =
|
|
304
|
-
for (;
|
|
302
|
+
if (f.noext !== !0 && ($ === S || $ === n || $ === t || $ === m || $ === a) === !0 && ae() === u) {
|
|
303
|
+
if (j = F.isGlob = !0, ye = F.isExtglob = !0, ne = !0, $ === a && L === q && (Ie = !0), b === !0) {
|
|
304
|
+
for (; h() !== !0 && ($ = z()); ) {
|
|
305
305
|
if ($ === r) {
|
|
306
|
-
|
|
306
|
+
U = F.backslashes = !0, $ = z();
|
|
307
307
|
continue;
|
|
308
308
|
}
|
|
309
309
|
if ($ === E) {
|
|
310
|
-
j =
|
|
310
|
+
j = F.isGlob = !0, ne = !0;
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
@@ -316,23 +316,23 @@ function dr() {
|
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
if ($ === t) {
|
|
319
|
-
if (
|
|
319
|
+
if (le === t && (xe = F.isGlobstar = !0), j = F.isGlob = !0, ne = !0, b === !0)
|
|
320
320
|
continue;
|
|
321
321
|
break;
|
|
322
322
|
}
|
|
323
|
-
if ($ ===
|
|
324
|
-
if (j =
|
|
323
|
+
if ($ === m) {
|
|
324
|
+
if (j = F.isGlob = !0, ne = !0, b === !0)
|
|
325
325
|
continue;
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
328
328
|
if ($ === c) {
|
|
329
|
-
for (;
|
|
330
|
-
if (
|
|
331
|
-
|
|
329
|
+
for (; h() !== !0 && (D = z()); ) {
|
|
330
|
+
if (D === r) {
|
|
331
|
+
U = F.backslashes = !0, z();
|
|
332
332
|
continue;
|
|
333
333
|
}
|
|
334
|
-
if (
|
|
335
|
-
|
|
334
|
+
if (D === I) {
|
|
335
|
+
de = F.isBracket = !0, j = F.isGlob = !0, ne = !0;
|
|
336
336
|
break;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
@@ -340,19 +340,19 @@ function dr() {
|
|
|
340
340
|
continue;
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
|
-
if (
|
|
344
|
-
|
|
343
|
+
if (f.nonegate !== !0 && $ === a && L === q) {
|
|
344
|
+
ge = F.negated = !0, q++;
|
|
345
345
|
continue;
|
|
346
346
|
}
|
|
347
|
-
if (
|
|
348
|
-
if (j =
|
|
349
|
-
for (;
|
|
347
|
+
if (f.noparen !== !0 && $ === u) {
|
|
348
|
+
if (j = F.isGlob = !0, b === !0) {
|
|
349
|
+
for (; h() !== !0 && ($ = z()); ) {
|
|
350
350
|
if ($ === u) {
|
|
351
|
-
|
|
351
|
+
U = F.backslashes = !0, $ = z();
|
|
352
352
|
continue;
|
|
353
353
|
}
|
|
354
354
|
if ($ === E) {
|
|
355
|
-
|
|
355
|
+
ne = !0;
|
|
356
356
|
break;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -361,234 +361,244 @@ function dr() {
|
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
if (j === !0) {
|
|
364
|
-
if (
|
|
364
|
+
if (ne = !0, b === !0)
|
|
365
365
|
continue;
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
|
|
370
|
-
let
|
|
371
|
-
|
|
372
|
-
const
|
|
373
|
-
prefix:
|
|
374
|
-
input:
|
|
375
|
-
start:
|
|
376
|
-
base:
|
|
377
|
-
glob:
|
|
378
|
-
isBrace:
|
|
379
|
-
isBracket:
|
|
369
|
+
f.noext === !0 && (ye = !1, j = !1);
|
|
370
|
+
let X = W, d = "", p = "";
|
|
371
|
+
q > 0 && (d = W.slice(0, q), W = W.slice(q), ce -= q), X && j === !0 && ce > 0 ? (X = W.slice(0, ce), p = W.slice(ce)) : j === !0 ? (X = "", p = W) : X = W, X && X !== "" && X !== "/" && X !== W && M(X.charCodeAt(X.length - 1)) && (X = X.slice(0, -1)), f.unescape === !0 && (p && (p = e.removeBackslashes(p)), X && U === !0 && (X = e.removeBackslashes(X)));
|
|
372
|
+
const ue = {
|
|
373
|
+
prefix: d,
|
|
374
|
+
input: y,
|
|
375
|
+
start: q,
|
|
376
|
+
base: X,
|
|
377
|
+
glob: p,
|
|
378
|
+
isBrace: se,
|
|
379
|
+
isBracket: de,
|
|
380
380
|
isGlob: j,
|
|
381
|
-
isExtglob:
|
|
382
|
-
isGlobstar:
|
|
383
|
-
negated:
|
|
384
|
-
negatedExtglob:
|
|
381
|
+
isExtglob: ye,
|
|
382
|
+
isGlobstar: xe,
|
|
383
|
+
negated: ge,
|
|
384
|
+
negatedExtglob: Ie
|
|
385
385
|
};
|
|
386
|
-
if (
|
|
387
|
-
let
|
|
388
|
-
for (let
|
|
389
|
-
const
|
|
390
|
-
|
|
386
|
+
if (f.tokens === !0 && (ue.maxDepth = 0, M($) || g.push(F), ue.tokens = g), f.parts === !0 || f.tokens === !0) {
|
|
387
|
+
let D;
|
|
388
|
+
for (let V = 0; V < A.length; V++) {
|
|
389
|
+
const Se = D ? D + 1 : q, fe = A[V], Te = y.slice(Se, fe);
|
|
390
|
+
f.tokens && (V === 0 && q !== 0 ? (g[V].isPrefix = !0, g[V].value = d) : g[V].value = Te, N(g[V]), ue.maxDepth += g[V].depth), (V !== 0 || Te !== "") && x.push(Te), D = fe;
|
|
391
391
|
}
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
394
|
-
|
|
392
|
+
if (D && D + 1 < y.length) {
|
|
393
|
+
const V = y.slice(D + 1);
|
|
394
|
+
x.push(V), f.tokens && (g[g.length - 1].value = V, N(g[g.length - 1]), ue.maxDepth += g[g.length - 1].depth);
|
|
395
395
|
}
|
|
396
|
-
|
|
396
|
+
ue.slashes = A, ue.parts = x;
|
|
397
397
|
}
|
|
398
|
-
return
|
|
399
|
-
},
|
|
400
|
-
}
|
|
401
|
-
var
|
|
402
|
-
function
|
|
403
|
-
if (
|
|
404
|
-
|
|
405
|
-
const e = /* @__PURE__ */
|
|
398
|
+
return ue;
|
|
399
|
+
}, Tt;
|
|
400
|
+
}
|
|
401
|
+
var vt, dn;
|
|
402
|
+
function Ar() {
|
|
403
|
+
if (dn) return vt;
|
|
404
|
+
dn = 1;
|
|
405
|
+
const e = /* @__PURE__ */ pt(), t = /* @__PURE__ */ dt(), {
|
|
406
406
|
MAX_LENGTH: n,
|
|
407
407
|
POSIX_REGEX_SOURCE: r,
|
|
408
408
|
REGEX_NON_SPECIAL_CHARS: i,
|
|
409
409
|
REGEX_SPECIAL_CHARS_BACKREF: o,
|
|
410
410
|
REPLACEMENTS: a
|
|
411
|
-
} = e, s = (
|
|
411
|
+
} = e, s = (y, R) => {
|
|
412
412
|
if (typeof R.expandRange == "function")
|
|
413
|
-
return R.expandRange(...
|
|
414
|
-
|
|
415
|
-
const
|
|
413
|
+
return R.expandRange(...y, R);
|
|
414
|
+
y.sort();
|
|
415
|
+
const f = `[${y.join("-")}]`;
|
|
416
416
|
try {
|
|
417
|
-
new RegExp(
|
|
417
|
+
new RegExp(f);
|
|
418
418
|
} catch {
|
|
419
|
-
return
|
|
419
|
+
return y.map((b) => t.escapeRegex(b)).join("..");
|
|
420
420
|
}
|
|
421
|
-
return
|
|
422
|
-
}, l = (
|
|
421
|
+
return f;
|
|
422
|
+
}, l = (y, R) => `Missing ${y}: "${R}" - use "\\\\${R}" to match literal characters`, u = (y) => {
|
|
423
423
|
const R = [];
|
|
424
|
-
let
|
|
425
|
-
for (const
|
|
426
|
-
if (
|
|
427
|
-
|
|
424
|
+
let f = 0, w = 0, b = 0, A = "", g = !1;
|
|
425
|
+
for (const x of y) {
|
|
426
|
+
if (g === !0) {
|
|
427
|
+
A += x, g = !1;
|
|
428
428
|
continue;
|
|
429
429
|
}
|
|
430
|
-
if (
|
|
431
|
-
|
|
430
|
+
if (x === "\\") {
|
|
431
|
+
A += x, g = !0;
|
|
432
432
|
continue;
|
|
433
433
|
}
|
|
434
|
-
if (
|
|
435
|
-
|
|
434
|
+
if (x === '"') {
|
|
435
|
+
b = b === 1 ? 0 : 1, A += x;
|
|
436
436
|
continue;
|
|
437
437
|
}
|
|
438
|
-
if (
|
|
439
|
-
if (
|
|
440
|
-
|
|
441
|
-
else if (
|
|
442
|
-
|
|
443
|
-
else if (
|
|
444
|
-
if (
|
|
445
|
-
|
|
446
|
-
else if (
|
|
447
|
-
|
|
448
|
-
else if (
|
|
449
|
-
R.push(
|
|
438
|
+
if (b === 0) {
|
|
439
|
+
if (x === "[")
|
|
440
|
+
f++;
|
|
441
|
+
else if (x === "]" && f > 0)
|
|
442
|
+
f--;
|
|
443
|
+
else if (f === 0) {
|
|
444
|
+
if (x === "(")
|
|
445
|
+
w++;
|
|
446
|
+
else if (x === ")" && w > 0)
|
|
447
|
+
w--;
|
|
448
|
+
else if (x === "|" && w === 0) {
|
|
449
|
+
R.push(A), A = "";
|
|
450
450
|
continue;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
A += x;
|
|
455
455
|
}
|
|
456
|
-
return R.push(
|
|
457
|
-
}, c = (
|
|
456
|
+
return R.push(A), R;
|
|
457
|
+
}, c = (y) => {
|
|
458
458
|
let R = !1;
|
|
459
|
-
for (const
|
|
459
|
+
for (const f of y) {
|
|
460
460
|
if (R === !0) {
|
|
461
461
|
R = !1;
|
|
462
462
|
continue;
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
464
|
+
if (f === "\\") {
|
|
465
465
|
R = !0;
|
|
466
466
|
continue;
|
|
467
467
|
}
|
|
468
|
-
if (/[?*+@!()[\]{}]/.test(
|
|
468
|
+
if (/[?*+@!()[\]{}]/.test(f))
|
|
469
469
|
return !1;
|
|
470
470
|
}
|
|
471
471
|
return !0;
|
|
472
|
-
},
|
|
473
|
-
let R =
|
|
474
|
-
for (;
|
|
475
|
-
|
|
472
|
+
}, S = (y) => {
|
|
473
|
+
let R = y.trim(), f = !0;
|
|
474
|
+
for (; f === !0; )
|
|
475
|
+
f = !1, /^@\([^\\()[\]{}|]+\)$/.test(R) && (R = R.slice(2, -1), f = !0);
|
|
476
476
|
if (c(R))
|
|
477
477
|
return R.replace(/\\(.)/g, "$1");
|
|
478
|
-
},
|
|
479
|
-
const R =
|
|
480
|
-
for (let
|
|
481
|
-
for (let
|
|
482
|
-
const
|
|
483
|
-
if (!(!
|
|
478
|
+
}, m = (y) => {
|
|
479
|
+
const R = y.map(S).filter(Boolean);
|
|
480
|
+
for (let f = 0; f < R.length; f++)
|
|
481
|
+
for (let w = f + 1; w < R.length; w++) {
|
|
482
|
+
const b = R[f], A = R[w], g = b[0];
|
|
483
|
+
if (!(!g || b !== g.repeat(b.length) || A !== g.repeat(A.length)) && (b === A || b.startsWith(A) || A.startsWith(b)))
|
|
484
484
|
return !0;
|
|
485
485
|
}
|
|
486
486
|
return !1;
|
|
487
|
-
}, C = (
|
|
488
|
-
if (
|
|
487
|
+
}, C = (y, R = !0) => {
|
|
488
|
+
if (y[0] !== "+" && y[0] !== "*" || y[1] !== "(")
|
|
489
489
|
return;
|
|
490
|
-
let
|
|
491
|
-
for (let
|
|
492
|
-
const
|
|
493
|
-
if (
|
|
494
|
-
|
|
490
|
+
let f = 0, w = 0, b = 0, A = !1;
|
|
491
|
+
for (let g = 1; g < y.length; g++) {
|
|
492
|
+
const x = y[g];
|
|
493
|
+
if (A === !0) {
|
|
494
|
+
A = !1;
|
|
495
495
|
continue;
|
|
496
496
|
}
|
|
497
|
-
if (
|
|
498
|
-
|
|
497
|
+
if (x === "\\") {
|
|
498
|
+
A = !0;
|
|
499
499
|
continue;
|
|
500
500
|
}
|
|
501
|
-
if (
|
|
502
|
-
|
|
501
|
+
if (x === '"') {
|
|
502
|
+
b = b === 1 ? 0 : 1;
|
|
503
503
|
continue;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
506
|
-
if (
|
|
507
|
-
|
|
505
|
+
if (b !== 1) {
|
|
506
|
+
if (x === "[") {
|
|
507
|
+
f++;
|
|
508
508
|
continue;
|
|
509
509
|
}
|
|
510
|
-
if (
|
|
511
|
-
|
|
510
|
+
if (x === "]" && f > 0) {
|
|
511
|
+
f--;
|
|
512
512
|
continue;
|
|
513
513
|
}
|
|
514
|
-
if (!(
|
|
515
|
-
if (
|
|
516
|
-
|
|
514
|
+
if (!(f > 0)) {
|
|
515
|
+
if (x === "(") {
|
|
516
|
+
w++;
|
|
517
517
|
continue;
|
|
518
518
|
}
|
|
519
|
-
if (
|
|
520
|
-
return R === !0 &&
|
|
521
|
-
type:
|
|
522
|
-
body:
|
|
523
|
-
end:
|
|
519
|
+
if (x === ")" && (w--, w === 0))
|
|
520
|
+
return R === !0 && g !== y.length - 1 ? void 0 : {
|
|
521
|
+
type: y[0],
|
|
522
|
+
body: y.slice(2, g),
|
|
523
|
+
end: g
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
}, E = (
|
|
528
|
+
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`, I = (y) => {
|
|
529
529
|
let R = 0;
|
|
530
|
-
const
|
|
531
|
-
for (; R <
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
530
|
+
const f = [];
|
|
531
|
+
for (; R < y.length; ) {
|
|
532
|
+
const w = C(y.slice(R), !1);
|
|
533
|
+
if (!w || w.type !== "*")
|
|
534
534
|
return;
|
|
535
|
-
const b = u(
|
|
535
|
+
const b = u(w.body).map((g) => g.trim());
|
|
536
536
|
if (b.length !== 1)
|
|
537
537
|
return;
|
|
538
|
-
const
|
|
539
|
-
if (!
|
|
538
|
+
const A = S(b[0]);
|
|
539
|
+
if (!A || A.length !== 1)
|
|
540
540
|
return;
|
|
541
|
-
|
|
541
|
+
f.push(A), R += w.end + 1;
|
|
542
542
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
543
|
+
if (!(f.length < 1))
|
|
544
|
+
return f;
|
|
545
|
+
}, M = (y) => {
|
|
546
|
+
let R = 0, f = y.trim(), w = C(f);
|
|
547
|
+
for (; w; )
|
|
548
|
+
R++, f = w.body.trim(), w = C(f);
|
|
548
549
|
return R;
|
|
549
|
-
},
|
|
550
|
+
}, N = (y, R) => {
|
|
550
551
|
if (R.maxExtglobRecursion === !1)
|
|
551
552
|
return { risky: !1 };
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
553
|
+
const f = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION, w = u(y).map((x) => x.trim());
|
|
554
|
+
if (w.length > 1 && (w.some((x) => x === "") || w.some((x) => /^[*?]+$/.test(x)) || m(w)))
|
|
554
555
|
return { risky: !0 };
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
if (
|
|
556
|
+
const b = [];
|
|
557
|
+
let A = !1, g = !0;
|
|
558
|
+
for (const x of w) {
|
|
559
|
+
const W = I(x);
|
|
560
|
+
if (W) {
|
|
561
|
+
A = !0, b.push(...W);
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
const L = S(x);
|
|
565
|
+
if (L && L.length === 1) {
|
|
566
|
+
b.push(L);
|
|
567
|
+
continue;
|
|
568
|
+
}
|
|
569
|
+
if (g = !1, M(x) > f)
|
|
560
570
|
return { risky: !0 };
|
|
561
571
|
}
|
|
562
|
-
return { risky: !1 };
|
|
563
|
-
},
|
|
564
|
-
if (typeof
|
|
572
|
+
return A ? g ? { risky: !0, safeOutput: E([...new Set(b)]) } : { risky: !0 } : { risky: !1 };
|
|
573
|
+
}, k = (y, R) => {
|
|
574
|
+
if (typeof y != "string")
|
|
565
575
|
throw new TypeError("Expected a string");
|
|
566
|
-
|
|
567
|
-
const
|
|
568
|
-
let
|
|
569
|
-
if (
|
|
570
|
-
throw new SyntaxError(`Input length: ${
|
|
571
|
-
const
|
|
572
|
-
DOT_LITERAL:
|
|
573
|
-
PLUS_LITERAL:
|
|
574
|
-
SLASH_LITERAL:
|
|
575
|
-
ONE_CHAR:
|
|
576
|
-
DOTS_SLASH:
|
|
577
|
-
NO_DOT:
|
|
578
|
-
NO_DOT_SLASH:
|
|
579
|
-
NO_DOTS_SLASH:
|
|
580
|
-
QMARK:
|
|
581
|
-
QMARK_NO_DOT:
|
|
582
|
-
STAR:
|
|
583
|
-
START_ANCHOR:
|
|
584
|
-
} =
|
|
585
|
-
let
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
input:
|
|
576
|
+
y = a[y] || y;
|
|
577
|
+
const f = { ...R }, w = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n;
|
|
578
|
+
let b = y.length;
|
|
579
|
+
if (b > w)
|
|
580
|
+
throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${w}`);
|
|
581
|
+
const A = { type: "bos", value: "", output: f.prepend || "" }, g = [A], x = f.capture ? "" : "?:", W = e.globChars(f.windows), L = e.extglobChars(W), {
|
|
582
|
+
DOT_LITERAL: q,
|
|
583
|
+
PLUS_LITERAL: ce,
|
|
584
|
+
SLASH_LITERAL: se,
|
|
585
|
+
ONE_CHAR: de,
|
|
586
|
+
DOTS_SLASH: j,
|
|
587
|
+
NO_DOT: ye,
|
|
588
|
+
NO_DOT_SLASH: xe,
|
|
589
|
+
NO_DOTS_SLASH: he,
|
|
590
|
+
QMARK: U,
|
|
591
|
+
QMARK_NO_DOT: ge,
|
|
592
|
+
STAR: Ie,
|
|
593
|
+
START_ANCHOR: ne
|
|
594
|
+
} = W, J = (v) => `(${x}(?:(?!${ne}${v.dot ? j : q}).)*?)`, le = f.dot ? "" : ye, $ = f.dot ? U : ge;
|
|
595
|
+
let F = f.bash === !0 ? J(f) : Ie;
|
|
596
|
+
f.capture && (F = `(${F})`), typeof f.noext == "boolean" && (f.noextglob = f.noext);
|
|
597
|
+
const h = {
|
|
598
|
+
input: y,
|
|
589
599
|
index: -1,
|
|
590
600
|
start: 0,
|
|
591
|
-
dot:
|
|
601
|
+
dot: f.dot === !0,
|
|
592
602
|
consumed: "",
|
|
593
603
|
output: "",
|
|
594
604
|
prefix: "",
|
|
@@ -599,415 +609,415 @@ function hr() {
|
|
|
599
609
|
parens: 0,
|
|
600
610
|
quotes: 0,
|
|
601
611
|
globstar: !1,
|
|
602
|
-
tokens:
|
|
612
|
+
tokens: g
|
|
603
613
|
};
|
|
604
|
-
|
|
605
|
-
const
|
|
606
|
-
let d =
|
|
607
|
-
const ue = () =>
|
|
608
|
-
|
|
609
|
-
},
|
|
610
|
-
|
|
611
|
-
},
|
|
614
|
+
y = t.removePrefix(y, h), b = y.length;
|
|
615
|
+
const ae = [], z = [], X = [];
|
|
616
|
+
let d = A, p;
|
|
617
|
+
const ue = () => h.index === b - 1, D = h.peek = (v = 1) => y[h.index + v], V = h.advance = () => y[++h.index] || "", Se = () => y.slice(h.index + 1), fe = (v = "", Y = 0) => {
|
|
618
|
+
h.consumed += v, h.index += Y;
|
|
619
|
+
}, Te = (v) => {
|
|
620
|
+
h.output += v.output != null ? v.output : v.value, fe(v.value);
|
|
621
|
+
}, pr = () => {
|
|
612
622
|
let v = 1;
|
|
613
623
|
for (; D() === "!" && (D(2) !== "(" || D(3) === "?"); )
|
|
614
|
-
V(),
|
|
615
|
-
return v % 2 === 0 ? !1 : (
|
|
616
|
-
},
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
|
|
620
|
-
},
|
|
624
|
+
V(), h.start++, v++;
|
|
625
|
+
return v % 2 === 0 ? !1 : (h.negated = !0, h.start++, !0);
|
|
626
|
+
}, et = (v) => {
|
|
627
|
+
h[v]++, X.push(v);
|
|
628
|
+
}, ve = (v) => {
|
|
629
|
+
h[v]--, X.pop();
|
|
630
|
+
}, O = (v) => {
|
|
621
631
|
if (d.type === "globstar") {
|
|
622
|
-
const
|
|
623
|
-
v.type !== "slash" && v.type !== "paren" && !
|
|
632
|
+
const Y = h.braces > 0 && (v.type === "comma" || v.type === "brace"), T = v.extglob === !0 || ae.length && (v.type === "pipe" || v.type === "paren");
|
|
633
|
+
v.type !== "slash" && v.type !== "paren" && !Y && !T && (h.output = h.output.slice(0, -d.output.length), d.type = "star", d.value = "*", d.output = F, h.output += d.output);
|
|
624
634
|
}
|
|
625
|
-
if (
|
|
635
|
+
if (ae.length && v.type !== "paren" && (ae[ae.length - 1].inner += v.value), (v.value || v.output) && Te(v), d && d.type === "text" && v.type === "text") {
|
|
626
636
|
d.output = (d.output || d.value) + v.value, d.value += v.value;
|
|
627
637
|
return;
|
|
628
638
|
}
|
|
629
|
-
v.prev = d,
|
|
630
|
-
},
|
|
631
|
-
const T = { ...
|
|
632
|
-
T.prev = d, T.parens =
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
if ((v.type === "plus" || v.type === "star") &&
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
for (let
|
|
641
|
-
|
|
642
|
-
|
|
639
|
+
v.prev = d, g.push(v), d = v;
|
|
640
|
+
}, tt = (v, Y) => {
|
|
641
|
+
const T = { ...L[Y], conditions: 1, inner: "" };
|
|
642
|
+
T.prev = d, T.parens = h.parens, T.output = h.output, T.startIndex = h.index, T.tokensIndex = g.length;
|
|
643
|
+
const P = (f.capture ? "(" : "") + T.open;
|
|
644
|
+
et("parens"), O({ type: v, value: Y, output: h.output ? "" : de }), O({ type: "paren", extglob: !0, value: V(), output: P }), ae.push(T);
|
|
645
|
+
}, dr = (v) => {
|
|
646
|
+
const Y = y.slice(v.startIndex, h.index + 1), T = y.slice(v.startIndex + 2, h.index), P = N(T, f);
|
|
647
|
+
if ((v.type === "plus" || v.type === "star") && P.risky) {
|
|
648
|
+
const K = P.safeOutput ? (v.output ? "" : de) + (f.capture ? `(${P.safeOutput})` : P.safeOutput) : void 0, me = g[v.tokensIndex];
|
|
649
|
+
me.type = "text", me.value = Y, me.output = K || t.escapeRegex(Y);
|
|
650
|
+
for (let Ae = v.tokensIndex + 1; Ae < g.length; Ae++)
|
|
651
|
+
g[Ae].value = "", g[Ae].output = "", delete g[Ae].suffix;
|
|
652
|
+
h.output = v.output + me.output, h.backtrack = !0, O({ type: "paren", extglob: !0, value: p, output: "" }), ve("parens");
|
|
643
653
|
return;
|
|
644
654
|
}
|
|
645
|
-
let
|
|
655
|
+
let G = v.close + (f.capture ? ")" : ""), Q;
|
|
646
656
|
if (v.type === "negate") {
|
|
647
|
-
let
|
|
648
|
-
if (v.inner && v.inner.length > 1 && v.inner.includes("/") && (
|
|
649
|
-
const
|
|
650
|
-
|
|
657
|
+
let K = F;
|
|
658
|
+
if (v.inner && v.inner.length > 1 && v.inner.includes("/") && (K = J(f)), (K !== F || ue() || /^\)+$/.test(Se())) && (G = v.close = `)$))${K}`), v.inner.includes("*") && (Q = Se()) && /^\.[^\\/.]+$/.test(Q)) {
|
|
659
|
+
const me = k(Q, { ...R, fastpaths: !1 }).output;
|
|
660
|
+
G = v.close = `)${me})${K})`;
|
|
651
661
|
}
|
|
652
|
-
v.prev.type === "bos" && (
|
|
662
|
+
v.prev.type === "bos" && (h.negatedExtglob = !0);
|
|
653
663
|
}
|
|
654
|
-
|
|
664
|
+
O({ type: "paren", extglob: !0, value: p, output: G }), ve("parens");
|
|
655
665
|
};
|
|
656
|
-
if (
|
|
657
|
-
let v = !1,
|
|
658
|
-
return v === !0 && (
|
|
666
|
+
if (f.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(y)) {
|
|
667
|
+
let v = !1, Y = y.replace(o, (T, P, G, Q, K, me) => Q === "\\" ? (v = !0, T) : Q === "?" ? P ? P + Q + (K ? U.repeat(K.length) : "") : me === 0 ? $ + (K ? U.repeat(K.length) : "") : U.repeat(G.length) : Q === "." ? q.repeat(G.length) : Q === "*" ? P ? P + Q + (K ? F : "") : F : P ? T : `\\${T}`);
|
|
668
|
+
return v === !0 && (f.unescape === !0 ? Y = Y.replace(/\\/g, "") : Y = Y.replace(/\\+/g, (T) => T.length % 2 === 0 ? "\\\\" : T ? "\\" : "")), Y === y && f.contains === !0 ? (h.output = y, h) : (h.output = t.wrapOutput(Y, h, R), h);
|
|
659
669
|
}
|
|
660
670
|
for (; !ue(); ) {
|
|
661
|
-
if (
|
|
671
|
+
if (p = V(), p === "\0")
|
|
662
672
|
continue;
|
|
663
|
-
if (
|
|
673
|
+
if (p === "\\") {
|
|
664
674
|
const T = D();
|
|
665
|
-
if (T === "/" &&
|
|
675
|
+
if (T === "/" && f.bash !== !0 || T === "." || T === ";")
|
|
666
676
|
continue;
|
|
667
677
|
if (!T) {
|
|
668
|
-
|
|
678
|
+
p += "\\", O({ type: "text", value: p });
|
|
669
679
|
continue;
|
|
670
680
|
}
|
|
671
|
-
const
|
|
672
|
-
let
|
|
673
|
-
if (
|
|
674
|
-
|
|
681
|
+
const P = /^\\+/.exec(Se());
|
|
682
|
+
let G = 0;
|
|
683
|
+
if (P && P[0].length > 2 && (G = P[0].length, h.index += G, G % 2 !== 0 && (p += "\\")), f.unescape === !0 ? p = V() : p += V(), h.brackets === 0) {
|
|
684
|
+
O({ type: "text", value: p });
|
|
675
685
|
continue;
|
|
676
686
|
}
|
|
677
687
|
}
|
|
678
|
-
if (
|
|
679
|
-
if (
|
|
688
|
+
if (h.brackets > 0 && (p !== "]" || d.value === "[" || d.value === "[^")) {
|
|
689
|
+
if (f.posix !== !1 && p === ":") {
|
|
680
690
|
const T = d.value.slice(1);
|
|
681
691
|
if (T.includes("[") && (d.posix = !0, T.includes(":"))) {
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
684
|
-
d.value =
|
|
692
|
+
const P = d.value.lastIndexOf("["), G = d.value.slice(0, P), Q = d.value.slice(P + 2), K = r[Q];
|
|
693
|
+
if (K) {
|
|
694
|
+
d.value = G + K, h.backtrack = !0, V(), !A.output && g.indexOf(d) === 1 && (A.output = de);
|
|
685
695
|
continue;
|
|
686
696
|
}
|
|
687
697
|
}
|
|
688
698
|
}
|
|
689
|
-
(
|
|
699
|
+
(p === "[" && D() !== ":" || p === "-" && D() === "]") && (p = `\\${p}`), p === "]" && (d.value === "[" || d.value === "[^") && (p = `\\${p}`), f.posix === !0 && p === "!" && d.value === "[" && (p = "^"), d.value += p, Te({ value: p });
|
|
690
700
|
continue;
|
|
691
701
|
}
|
|
692
|
-
if (
|
|
693
|
-
|
|
702
|
+
if (h.quotes === 1 && p !== '"') {
|
|
703
|
+
p = t.escapeRegex(p), d.value += p, Te({ value: p });
|
|
694
704
|
continue;
|
|
695
705
|
}
|
|
696
|
-
if (
|
|
697
|
-
|
|
706
|
+
if (p === '"') {
|
|
707
|
+
h.quotes = h.quotes === 1 ? 0 : 1, f.keepQuotes === !0 && O({ type: "text", value: p });
|
|
698
708
|
continue;
|
|
699
709
|
}
|
|
700
|
-
if (
|
|
701
|
-
|
|
710
|
+
if (p === "(") {
|
|
711
|
+
et("parens"), O({ type: "paren", value: p });
|
|
702
712
|
continue;
|
|
703
713
|
}
|
|
704
|
-
if (
|
|
705
|
-
if (
|
|
714
|
+
if (p === ")") {
|
|
715
|
+
if (h.parens === 0 && f.strictBrackets === !0)
|
|
706
716
|
throw new SyntaxError(l("opening", "("));
|
|
707
|
-
const T =
|
|
708
|
-
if (T &&
|
|
709
|
-
|
|
717
|
+
const T = ae[ae.length - 1];
|
|
718
|
+
if (T && h.parens === T.parens + 1) {
|
|
719
|
+
dr(ae.pop());
|
|
710
720
|
continue;
|
|
711
721
|
}
|
|
712
|
-
|
|
722
|
+
O({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), ve("parens");
|
|
713
723
|
continue;
|
|
714
724
|
}
|
|
715
|
-
if (
|
|
716
|
-
if (
|
|
717
|
-
if (
|
|
725
|
+
if (p === "[") {
|
|
726
|
+
if (f.nobracket === !0 || !Se().includes("]")) {
|
|
727
|
+
if (f.nobracket !== !0 && f.strictBrackets === !0)
|
|
718
728
|
throw new SyntaxError(l("closing", "]"));
|
|
719
|
-
|
|
729
|
+
p = `\\${p}`;
|
|
720
730
|
} else
|
|
721
|
-
|
|
722
|
-
|
|
731
|
+
et("brackets");
|
|
732
|
+
O({ type: "bracket", value: p });
|
|
723
733
|
continue;
|
|
724
734
|
}
|
|
725
|
-
if (
|
|
726
|
-
if (
|
|
727
|
-
|
|
735
|
+
if (p === "]") {
|
|
736
|
+
if (f.nobracket === !0 || d && d.type === "bracket" && d.value.length === 1) {
|
|
737
|
+
O({ type: "text", value: p, output: `\\${p}` });
|
|
728
738
|
continue;
|
|
729
739
|
}
|
|
730
|
-
if (
|
|
731
|
-
if (
|
|
740
|
+
if (h.brackets === 0) {
|
|
741
|
+
if (f.strictBrackets === !0)
|
|
732
742
|
throw new SyntaxError(l("opening", "["));
|
|
733
|
-
|
|
743
|
+
O({ type: "text", value: p, output: `\\${p}` });
|
|
734
744
|
continue;
|
|
735
745
|
}
|
|
736
|
-
|
|
746
|
+
ve("brackets");
|
|
737
747
|
const T = d.value.slice(1);
|
|
738
|
-
if (d.posix !== !0 && T[0] === "^" && !T.includes("/") && (
|
|
748
|
+
if (d.posix !== !0 && T[0] === "^" && !T.includes("/") && (p = `/${p}`), d.value += p, Te({ value: p }), f.literalBrackets === !1 || t.hasRegexChars(T))
|
|
739
749
|
continue;
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
|
|
750
|
+
const P = t.escapeRegex(d.value);
|
|
751
|
+
if (h.output = h.output.slice(0, -d.value.length), f.literalBrackets === !0) {
|
|
752
|
+
h.output += P, d.value = P;
|
|
743
753
|
continue;
|
|
744
754
|
}
|
|
745
|
-
d.value = `(${
|
|
755
|
+
d.value = `(${x}${P}|${d.value})`, h.output += d.value;
|
|
746
756
|
continue;
|
|
747
757
|
}
|
|
748
|
-
if (
|
|
749
|
-
|
|
758
|
+
if (p === "{" && f.nobrace !== !0) {
|
|
759
|
+
et("braces");
|
|
750
760
|
const T = {
|
|
751
761
|
type: "brace",
|
|
752
|
-
value:
|
|
762
|
+
value: p,
|
|
753
763
|
output: "(",
|
|
754
|
-
outputIndex:
|
|
755
|
-
tokensIndex:
|
|
764
|
+
outputIndex: h.output.length,
|
|
765
|
+
tokensIndex: h.tokens.length
|
|
756
766
|
};
|
|
757
|
-
|
|
767
|
+
z.push(T), O(T);
|
|
758
768
|
continue;
|
|
759
769
|
}
|
|
760
|
-
if (
|
|
761
|
-
const T =
|
|
762
|
-
if (
|
|
763
|
-
|
|
770
|
+
if (p === "}") {
|
|
771
|
+
const T = z[z.length - 1];
|
|
772
|
+
if (f.nobrace === !0 || !T) {
|
|
773
|
+
O({ type: "text", value: p, output: p });
|
|
764
774
|
continue;
|
|
765
775
|
}
|
|
766
|
-
let
|
|
776
|
+
let P = ")";
|
|
767
777
|
if (T.dots === !0) {
|
|
768
|
-
const
|
|
769
|
-
for (let
|
|
770
|
-
|
|
771
|
-
|
|
778
|
+
const G = g.slice(), Q = [];
|
|
779
|
+
for (let K = G.length - 1; K >= 0 && (g.pop(), G[K].type !== "brace"); K--)
|
|
780
|
+
G[K].type !== "dots" && Q.unshift(G[K].value);
|
|
781
|
+
P = s(Q, f), h.backtrack = !0;
|
|
772
782
|
}
|
|
773
783
|
if (T.comma !== !0 && T.dots !== !0) {
|
|
774
|
-
const
|
|
775
|
-
T.value = T.output = "\\{",
|
|
776
|
-
for (const
|
|
777
|
-
|
|
784
|
+
const G = h.output.slice(0, T.outputIndex), Q = h.tokens.slice(T.tokensIndex);
|
|
785
|
+
T.value = T.output = "\\{", p = P = "\\}", h.output = G;
|
|
786
|
+
for (const K of Q)
|
|
787
|
+
h.output += K.output || K.value;
|
|
778
788
|
}
|
|
779
|
-
|
|
789
|
+
O({ type: "brace", value: p, output: P }), ve("braces"), z.pop();
|
|
780
790
|
continue;
|
|
781
791
|
}
|
|
782
|
-
if (
|
|
783
|
-
|
|
792
|
+
if (p === "|") {
|
|
793
|
+
ae.length > 0 && ae[ae.length - 1].conditions++, O({ type: "text", value: p });
|
|
784
794
|
continue;
|
|
785
795
|
}
|
|
786
|
-
if (
|
|
787
|
-
let T =
|
|
788
|
-
const
|
|
789
|
-
|
|
796
|
+
if (p === ",") {
|
|
797
|
+
let T = p;
|
|
798
|
+
const P = z[z.length - 1];
|
|
799
|
+
P && X[X.length - 1] === "braces" && (P.comma = !0, T = "|"), O({ type: "comma", value: p, output: T });
|
|
790
800
|
continue;
|
|
791
801
|
}
|
|
792
|
-
if (
|
|
793
|
-
if (d.type === "dot" &&
|
|
794
|
-
|
|
802
|
+
if (p === "/") {
|
|
803
|
+
if (d.type === "dot" && h.index === h.start + 1) {
|
|
804
|
+
h.start = h.index + 1, h.consumed = "", h.output = "", g.pop(), d = A;
|
|
795
805
|
continue;
|
|
796
806
|
}
|
|
797
|
-
|
|
807
|
+
O({ type: "slash", value: p, output: se });
|
|
798
808
|
continue;
|
|
799
809
|
}
|
|
800
|
-
if (
|
|
801
|
-
if (
|
|
802
|
-
d.value === "." && (d.output =
|
|
803
|
-
const T =
|
|
804
|
-
d.type = "dots", d.output +=
|
|
810
|
+
if (p === ".") {
|
|
811
|
+
if (h.braces > 0 && d.type === "dot") {
|
|
812
|
+
d.value === "." && (d.output = q);
|
|
813
|
+
const T = z[z.length - 1];
|
|
814
|
+
d.type = "dots", d.output += p, d.value += p, T.dots = !0;
|
|
805
815
|
continue;
|
|
806
816
|
}
|
|
807
|
-
if (
|
|
808
|
-
|
|
817
|
+
if (h.braces + h.parens === 0 && d.type !== "bos" && d.type !== "slash") {
|
|
818
|
+
O({ type: "text", value: p, output: q });
|
|
809
819
|
continue;
|
|
810
820
|
}
|
|
811
|
-
|
|
821
|
+
O({ type: "dot", value: p, output: q });
|
|
812
822
|
continue;
|
|
813
823
|
}
|
|
814
|
-
if (
|
|
815
|
-
if (!(d && d.value === "(") &&
|
|
816
|
-
|
|
824
|
+
if (p === "?") {
|
|
825
|
+
if (!(d && d.value === "(") && f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
826
|
+
tt("qmark", p);
|
|
817
827
|
continue;
|
|
818
828
|
}
|
|
819
829
|
if (d && d.type === "paren") {
|
|
820
|
-
const
|
|
821
|
-
let
|
|
822
|
-
(d.value === "(" && !/[!=<:]/.test(
|
|
830
|
+
const P = D();
|
|
831
|
+
let G = p;
|
|
832
|
+
(d.value === "(" && !/[!=<:]/.test(P) || P === "<" && !/<([!=]|\w+>)/.test(Se())) && (G = `\\${p}`), O({ type: "text", value: p, output: G });
|
|
823
833
|
continue;
|
|
824
834
|
}
|
|
825
|
-
if (
|
|
826
|
-
|
|
835
|
+
if (f.dot !== !0 && (d.type === "slash" || d.type === "bos")) {
|
|
836
|
+
O({ type: "qmark", value: p, output: ge });
|
|
827
837
|
continue;
|
|
828
838
|
}
|
|
829
|
-
|
|
839
|
+
O({ type: "qmark", value: p, output: U });
|
|
830
840
|
continue;
|
|
831
841
|
}
|
|
832
|
-
if (
|
|
833
|
-
if (
|
|
834
|
-
|
|
842
|
+
if (p === "!") {
|
|
843
|
+
if (f.noextglob !== !0 && D() === "(" && (D(2) !== "?" || !/[!=<:]/.test(D(3)))) {
|
|
844
|
+
tt("negate", p);
|
|
835
845
|
continue;
|
|
836
846
|
}
|
|
837
|
-
if (
|
|
838
|
-
|
|
847
|
+
if (f.nonegate !== !0 && h.index === 0) {
|
|
848
|
+
pr();
|
|
839
849
|
continue;
|
|
840
850
|
}
|
|
841
851
|
}
|
|
842
|
-
if (
|
|
843
|
-
if (
|
|
844
|
-
|
|
852
|
+
if (p === "+") {
|
|
853
|
+
if (f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
854
|
+
tt("plus", p);
|
|
845
855
|
continue;
|
|
846
856
|
}
|
|
847
|
-
if (d && d.value === "(" ||
|
|
848
|
-
|
|
857
|
+
if (d && d.value === "(" || f.regex === !1) {
|
|
858
|
+
O({ type: "plus", value: p, output: ce });
|
|
849
859
|
continue;
|
|
850
860
|
}
|
|
851
|
-
if (d && (d.type === "bracket" || d.type === "paren" || d.type === "brace") ||
|
|
852
|
-
|
|
861
|
+
if (d && (d.type === "bracket" || d.type === "paren" || d.type === "brace") || h.parens > 0) {
|
|
862
|
+
O({ type: "plus", value: p });
|
|
853
863
|
continue;
|
|
854
864
|
}
|
|
855
|
-
|
|
865
|
+
O({ type: "plus", value: ce });
|
|
856
866
|
continue;
|
|
857
867
|
}
|
|
858
|
-
if (
|
|
859
|
-
if (
|
|
860
|
-
|
|
868
|
+
if (p === "@") {
|
|
869
|
+
if (f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
870
|
+
O({ type: "at", extglob: !0, value: p, output: "" });
|
|
861
871
|
continue;
|
|
862
872
|
}
|
|
863
|
-
|
|
873
|
+
O({ type: "text", value: p });
|
|
864
874
|
continue;
|
|
865
875
|
}
|
|
866
|
-
if (
|
|
867
|
-
(
|
|
868
|
-
const T = i.exec(
|
|
869
|
-
T && (
|
|
876
|
+
if (p !== "*") {
|
|
877
|
+
(p === "$" || p === "^") && (p = `\\${p}`);
|
|
878
|
+
const T = i.exec(Se());
|
|
879
|
+
T && (p += T[0], h.index += T[0].length), O({ type: "text", value: p });
|
|
870
880
|
continue;
|
|
871
881
|
}
|
|
872
882
|
if (d && (d.type === "globstar" || d.star === !0)) {
|
|
873
|
-
d.type = "star", d.star = !0, d.value +=
|
|
883
|
+
d.type = "star", d.star = !0, d.value += p, d.output = F, h.backtrack = !0, h.globstar = !0, fe(p);
|
|
874
884
|
continue;
|
|
875
885
|
}
|
|
876
|
-
let v =
|
|
877
|
-
if (
|
|
878
|
-
|
|
886
|
+
let v = Se();
|
|
887
|
+
if (f.noextglob !== !0 && /^\([^?]/.test(v)) {
|
|
888
|
+
tt("star", p);
|
|
879
889
|
continue;
|
|
880
890
|
}
|
|
881
891
|
if (d.type === "star") {
|
|
882
|
-
if (
|
|
883
|
-
fe(
|
|
892
|
+
if (f.noglobstar === !0) {
|
|
893
|
+
fe(p);
|
|
884
894
|
continue;
|
|
885
895
|
}
|
|
886
|
-
const T = d.prev,
|
|
887
|
-
if (
|
|
888
|
-
|
|
896
|
+
const T = d.prev, P = T.prev, G = T.type === "slash" || T.type === "bos", Q = P && (P.type === "star" || P.type === "globstar");
|
|
897
|
+
if (f.bash === !0 && (!G || v[0] && v[0] !== "/")) {
|
|
898
|
+
O({ type: "star", value: p, output: "" });
|
|
889
899
|
continue;
|
|
890
900
|
}
|
|
891
|
-
const
|
|
892
|
-
if (!
|
|
893
|
-
|
|
901
|
+
const K = h.braces > 0 && (T.type === "comma" || T.type === "brace"), me = ae.length && (T.type === "pipe" || T.type === "paren");
|
|
902
|
+
if (!G && T.type !== "paren" && !K && !me) {
|
|
903
|
+
O({ type: "star", value: p, output: "" });
|
|
894
904
|
continue;
|
|
895
905
|
}
|
|
896
906
|
for (; v.slice(0, 3) === "/**"; ) {
|
|
897
|
-
const
|
|
898
|
-
if (
|
|
907
|
+
const Ae = y[h.index + 4];
|
|
908
|
+
if (Ae && Ae !== "/")
|
|
899
909
|
break;
|
|
900
910
|
v = v.slice(3), fe("/**", 3);
|
|
901
911
|
}
|
|
902
912
|
if (T.type === "bos" && ue()) {
|
|
903
|
-
d.type = "globstar", d.value +=
|
|
913
|
+
d.type = "globstar", d.value += p, d.output = J(f), h.output = d.output, h.globstar = !0, fe(p);
|
|
904
914
|
continue;
|
|
905
915
|
}
|
|
906
|
-
if (T.type === "slash" && T.prev.type !== "bos" && !
|
|
907
|
-
|
|
916
|
+
if (T.type === "slash" && T.prev.type !== "bos" && !Q && ue()) {
|
|
917
|
+
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = J(f) + (f.strictSlashes ? ")" : "|$)"), d.value += p, h.globstar = !0, h.output += T.output + d.output, fe(p);
|
|
908
918
|
continue;
|
|
909
919
|
}
|
|
910
920
|
if (T.type === "slash" && T.prev.type !== "bos" && v[0] === "/") {
|
|
911
|
-
const
|
|
912
|
-
|
|
921
|
+
const Ae = v[1] !== void 0 ? "|$" : "";
|
|
922
|
+
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = `${J(f)}${se}|${se}${Ae})`, d.value += p, h.output += T.output + d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
913
923
|
continue;
|
|
914
924
|
}
|
|
915
925
|
if (T.type === "bos" && v[0] === "/") {
|
|
916
|
-
d.type = "globstar", d.value +=
|
|
926
|
+
d.type = "globstar", d.value += p, d.output = `(?:^|${se}|${J(f)}${se})`, h.output = d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
917
927
|
continue;
|
|
918
928
|
}
|
|
919
|
-
|
|
929
|
+
h.output = h.output.slice(0, -d.output.length), d.type = "globstar", d.output = J(f), d.value += p, h.output += d.output, h.globstar = !0, fe(p);
|
|
920
930
|
continue;
|
|
921
931
|
}
|
|
922
|
-
const
|
|
923
|
-
if (
|
|
924
|
-
|
|
932
|
+
const Y = { type: "star", value: p, output: F };
|
|
933
|
+
if (f.bash === !0) {
|
|
934
|
+
Y.output = ".*?", (d.type === "bos" || d.type === "slash") && (Y.output = le + Y.output), O(Y);
|
|
925
935
|
continue;
|
|
926
936
|
}
|
|
927
|
-
if (d && (d.type === "bracket" || d.type === "paren") &&
|
|
928
|
-
|
|
937
|
+
if (d && (d.type === "bracket" || d.type === "paren") && f.regex === !0) {
|
|
938
|
+
Y.output = p, O(Y);
|
|
929
939
|
continue;
|
|
930
940
|
}
|
|
931
|
-
(
|
|
941
|
+
(h.index === h.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (h.output += xe, d.output += xe) : f.dot === !0 ? (h.output += he, d.output += he) : (h.output += le, d.output += le), D() !== "*" && (h.output += de, d.output += de)), O(Y);
|
|
932
942
|
}
|
|
933
|
-
for (;
|
|
934
|
-
if (
|
|
935
|
-
|
|
943
|
+
for (; h.brackets > 0; ) {
|
|
944
|
+
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "]"));
|
|
945
|
+
h.output = t.escapeLast(h.output, "["), ve("brackets");
|
|
936
946
|
}
|
|
937
|
-
for (;
|
|
938
|
-
if (
|
|
939
|
-
|
|
947
|
+
for (; h.parens > 0; ) {
|
|
948
|
+
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", ")"));
|
|
949
|
+
h.output = t.escapeLast(h.output, "("), ve("parens");
|
|
940
950
|
}
|
|
941
|
-
for (;
|
|
942
|
-
if (
|
|
943
|
-
|
|
951
|
+
for (; h.braces > 0; ) {
|
|
952
|
+
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "}"));
|
|
953
|
+
h.output = t.escapeLast(h.output, "{"), ve("braces");
|
|
944
954
|
}
|
|
945
|
-
if (
|
|
946
|
-
|
|
947
|
-
for (const v of
|
|
948
|
-
|
|
955
|
+
if (f.strictSlashes !== !0 && (d.type === "star" || d.type === "bracket") && O({ type: "maybe_slash", value: "", output: `${se}?` }), h.backtrack === !0) {
|
|
956
|
+
h.output = "";
|
|
957
|
+
for (const v of h.tokens)
|
|
958
|
+
h.output += v.output != null ? v.output : v.value, v.suffix && (h.output += v.suffix);
|
|
949
959
|
}
|
|
950
|
-
return
|
|
960
|
+
return h;
|
|
951
961
|
};
|
|
952
|
-
return
|
|
953
|
-
const
|
|
954
|
-
if (
|
|
955
|
-
throw new SyntaxError(`Input length: ${
|
|
956
|
-
|
|
962
|
+
return k.fastpaths = (y, R) => {
|
|
963
|
+
const f = { ...R }, w = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n, b = y.length;
|
|
964
|
+
if (b > w)
|
|
965
|
+
throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${w}`);
|
|
966
|
+
y = a[y] || y;
|
|
957
967
|
const {
|
|
958
|
-
DOT_LITERAL:
|
|
959
|
-
SLASH_LITERAL:
|
|
960
|
-
ONE_CHAR:
|
|
961
|
-
DOTS_SLASH:
|
|
962
|
-
NO_DOT:
|
|
963
|
-
NO_DOTS:
|
|
964
|
-
NO_DOTS_SLASH:
|
|
965
|
-
STAR:
|
|
966
|
-
START_ANCHOR:
|
|
967
|
-
} = e.globChars(
|
|
968
|
-
let
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
switch (
|
|
968
|
+
DOT_LITERAL: A,
|
|
969
|
+
SLASH_LITERAL: g,
|
|
970
|
+
ONE_CHAR: x,
|
|
971
|
+
DOTS_SLASH: W,
|
|
972
|
+
NO_DOT: L,
|
|
973
|
+
NO_DOTS: q,
|
|
974
|
+
NO_DOTS_SLASH: ce,
|
|
975
|
+
STAR: se,
|
|
976
|
+
START_ANCHOR: de
|
|
977
|
+
} = e.globChars(f.windows), j = f.dot ? q : L, ye = f.dot ? ce : L, xe = f.capture ? "" : "?:", he = { negated: !1, prefix: "" };
|
|
978
|
+
let U = f.bash === !0 ? ".*?" : se;
|
|
979
|
+
f.capture && (U = `(${U})`);
|
|
980
|
+
const ge = (le) => le.noglobstar === !0 ? U : `(${xe}(?:(?!${de}${le.dot ? W : A}).)*?)`, Ie = (le) => {
|
|
981
|
+
switch (le) {
|
|
972
982
|
case "*":
|
|
973
|
-
return `${
|
|
983
|
+
return `${j}${x}${U}`;
|
|
974
984
|
case ".*":
|
|
975
|
-
return `${
|
|
985
|
+
return `${A}${x}${U}`;
|
|
976
986
|
case "*.*":
|
|
977
|
-
return `${
|
|
987
|
+
return `${j}${U}${A}${x}${U}`;
|
|
978
988
|
case "*/*":
|
|
979
|
-
return `${
|
|
989
|
+
return `${j}${U}${g}${x}${ye}${U}`;
|
|
980
990
|
case "**":
|
|
981
|
-
return
|
|
991
|
+
return j + ge(f);
|
|
982
992
|
case "**/*":
|
|
983
|
-
return `(?:${
|
|
993
|
+
return `(?:${j}${ge(f)}${g})?${ye}${x}${U}`;
|
|
984
994
|
case "**/*.*":
|
|
985
|
-
return `(?:${
|
|
995
|
+
return `(?:${j}${ge(f)}${g})?${ye}${U}${A}${x}${U}`;
|
|
986
996
|
case "**/.*":
|
|
987
|
-
return `(?:${
|
|
997
|
+
return `(?:${j}${ge(f)}${g})?${A}${x}${U}`;
|
|
988
998
|
default: {
|
|
989
|
-
const
|
|
990
|
-
if (
|
|
991
|
-
const
|
|
992
|
-
return
|
|
999
|
+
const $ = /^(.*?)\.(\w+)$/.exec(le);
|
|
1000
|
+
if (!$) return;
|
|
1001
|
+
const F = Ie($[1]);
|
|
1002
|
+
return F ? F + A + $[2] : void 0;
|
|
993
1003
|
}
|
|
994
1004
|
}
|
|
995
|
-
},
|
|
996
|
-
let
|
|
997
|
-
return
|
|
998
|
-
},
|
|
1005
|
+
}, ne = t.removePrefix(y, he);
|
|
1006
|
+
let J = Ie(ne);
|
|
1007
|
+
return J && f.strictSlashes !== !0 && (J += `${g}?`), J;
|
|
1008
|
+
}, vt = k, vt;
|
|
999
1009
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
1004
|
-
const e = /* @__PURE__ */
|
|
1010
|
+
var bt, hn;
|
|
1011
|
+
function yr() {
|
|
1012
|
+
if (hn) return bt;
|
|
1013
|
+
hn = 1;
|
|
1014
|
+
const e = /* @__PURE__ */ mr(), t = /* @__PURE__ */ Ar(), n = /* @__PURE__ */ dt(), r = /* @__PURE__ */ pt(), i = (a) => a && typeof a == "object" && !Array.isArray(a), o = (a, s, l = !1) => {
|
|
1005
1015
|
if (Array.isArray(a)) {
|
|
1006
|
-
const
|
|
1007
|
-
return (
|
|
1008
|
-
for (const
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1016
|
+
const M = a.map((k) => o(k, s, l));
|
|
1017
|
+
return (k) => {
|
|
1018
|
+
for (const y of M) {
|
|
1019
|
+
const R = y(k);
|
|
1020
|
+
if (R) return R;
|
|
1011
1021
|
}
|
|
1012
1022
|
return !1;
|
|
1013
1023
|
};
|
|
@@ -1015,32 +1025,32 @@ function gr() {
|
|
|
1015
1025
|
const u = i(a) && a.tokens && a.input;
|
|
1016
1026
|
if (a === "" || typeof a != "string" && !u)
|
|
1017
1027
|
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1018
|
-
const c = s || {},
|
|
1019
|
-
delete
|
|
1028
|
+
const c = s || {}, S = c.windows, m = u ? o.compileRe(a, s) : o.makeRe(a, s, !1, !0), C = m.state;
|
|
1029
|
+
delete m.state;
|
|
1020
1030
|
let E = () => !1;
|
|
1021
1031
|
if (c.ignore) {
|
|
1022
|
-
const
|
|
1023
|
-
E = o(c.ignore,
|
|
1032
|
+
const M = { ...s, ignore: null, onMatch: null, onResult: null };
|
|
1033
|
+
E = o(c.ignore, M, l);
|
|
1024
1034
|
}
|
|
1025
|
-
const
|
|
1026
|
-
const { isMatch:
|
|
1027
|
-
return typeof c.onResult == "function" && c.onResult(
|
|
1035
|
+
const I = (M, N = !1) => {
|
|
1036
|
+
const { isMatch: k, match: y, output: R } = o.test(M, m, s, { glob: a, posix: S }), f = { glob: a, state: C, regex: m, posix: S, input: M, output: R, match: y, isMatch: k };
|
|
1037
|
+
return typeof c.onResult == "function" && c.onResult(f), k === !1 ? (f.isMatch = !1, N ? f : !1) : E(M) ? (typeof c.onIgnore == "function" && c.onIgnore(f), f.isMatch = !1, N ? f : !1) : (typeof c.onMatch == "function" && c.onMatch(f), N ? f : !0);
|
|
1028
1038
|
};
|
|
1029
|
-
return l && (
|
|
1039
|
+
return l && (I.state = C), I;
|
|
1030
1040
|
};
|
|
1031
1041
|
return o.test = (a, s, l, { glob: u, posix: c } = {}) => {
|
|
1032
1042
|
if (typeof a != "string")
|
|
1033
1043
|
throw new TypeError("Expected input to be a string");
|
|
1034
1044
|
if (a === "")
|
|
1035
1045
|
return { isMatch: !1, output: "" };
|
|
1036
|
-
const
|
|
1037
|
-
let C = a === u, E = C &&
|
|
1038
|
-
return C === !1 && (E =
|
|
1039
|
-
}, o.matchBase = (a, s, l) => (s instanceof RegExp ? s : o.makeRe(s, l)).test(n.basename(a)), o.isMatch = (a, s, l) => o(s, l)(a), o.parse = (a, s) => Array.isArray(a) ? a.map((l) => o.parse(l, s)) : t(a, { ...s, fastpaths: !1 }), o.scan = (a, s) => e(a, s), o.compileRe = (a, s, l = !1, u = !1) => {
|
|
1046
|
+
const S = l || {}, m = S.format || (c ? n.toPosixSlashes : null);
|
|
1047
|
+
let C = a === u, E = C && m ? m(a) : a;
|
|
1048
|
+
return C === !1 && (E = m ? m(a) : a, C = E === u), (C === !1 || S.capture === !0) && (S.matchBase === !0 || S.basename === !0 ? C = o.matchBase(a, s, l, c) : C = s.exec(E)), { isMatch: !!C, match: C, output: E };
|
|
1049
|
+
}, o.matchBase = (a, s, l, u = l && l.windows) => (s instanceof RegExp ? s : o.makeRe(s, l)).test(n.basename(a, { windows: u })), o.isMatch = (a, s, l) => o(s, l)(a), o.parse = (a, s) => Array.isArray(a) ? a.map((l) => o.parse(l, s)) : t(a, { ...s, fastpaths: !1 }), o.scan = (a, s) => e(a, s), o.compileRe = (a, s, l = !1, u = !1) => {
|
|
1040
1050
|
if (l === !0)
|
|
1041
1051
|
return a.output;
|
|
1042
|
-
const c = s || {},
|
|
1043
|
-
let C = `${
|
|
1052
|
+
const c = s || {}, S = c.contains ? "" : "^", m = c.contains ? "" : "$";
|
|
1053
|
+
let C = `${S}(?:${a.output})${m}`;
|
|
1044
1054
|
a && a.negated === !0 && (C = `^(?!${C}).*$`);
|
|
1045
1055
|
const E = o.toRegex(C, s);
|
|
1046
1056
|
return u === !0 && (E.state = a), E;
|
|
@@ -1057,24 +1067,24 @@ function gr() {
|
|
|
1057
1067
|
if (s && s.debug === !0) throw l;
|
|
1058
1068
|
return /$^/;
|
|
1059
1069
|
}
|
|
1060
|
-
}, o.constants = r,
|
|
1070
|
+
}, o.constants = r, bt = o, bt;
|
|
1061
1071
|
}
|
|
1062
|
-
var
|
|
1063
|
-
function
|
|
1064
|
-
if (
|
|
1065
|
-
|
|
1066
|
-
const e = /* @__PURE__ */
|
|
1072
|
+
var Rt, gn;
|
|
1073
|
+
function Sr() {
|
|
1074
|
+
if (gn) return Rt;
|
|
1075
|
+
gn = 1;
|
|
1076
|
+
const e = /* @__PURE__ */ yr(), t = /* @__PURE__ */ dt();
|
|
1067
1077
|
function n(r, i, o = !1) {
|
|
1068
1078
|
return i && (i.windows === null || i.windows === void 0) && (i = { ...i, windows: t.isWindows() }), e(r, i, o);
|
|
1069
1079
|
}
|
|
1070
|
-
return Object.assign(n, e),
|
|
1080
|
+
return Object.assign(n, e), Rt = n, Rt;
|
|
1071
1081
|
}
|
|
1072
|
-
var
|
|
1073
|
-
const
|
|
1074
|
-
async function
|
|
1082
|
+
var Er = /* @__PURE__ */ Sr();
|
|
1083
|
+
const Cr = /* @__PURE__ */ hr(Er), Tr = typeof window < "u" || typeof process > "u" || process?.platform === "browser", vr = Tr ? {} : process.env || {};
|
|
1084
|
+
async function br(e, t) {
|
|
1075
1085
|
const n = {};
|
|
1076
1086
|
for (const i of t.headers)
|
|
1077
|
-
|
|
1087
|
+
Rr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ? vr[i.envVariable] || "" : i.value);
|
|
1078
1088
|
const r = await (t.customFetch || fetch)(e, {
|
|
1079
1089
|
headers: n
|
|
1080
1090
|
});
|
|
@@ -1082,10 +1092,10 @@ async function Cr(e, t) {
|
|
|
1082
1092
|
throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);
|
|
1083
1093
|
return { body: await r.text(), mimeType: r.headers.get("content-type") };
|
|
1084
1094
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return t.match(/^https?:\/\//) || (e = e.replace(/^https?:\/\//, "")),
|
|
1095
|
+
function Rr(e, t) {
|
|
1096
|
+
return t.match(/^https?:\/\//) || (e = e.replace(/^https?:\/\//, "")), Cr.isMatch(e, t);
|
|
1087
1097
|
}
|
|
1088
|
-
function
|
|
1098
|
+
function ga(e, t = {}) {
|
|
1089
1099
|
return {
|
|
1090
1100
|
name: `${e}List`,
|
|
1091
1101
|
properties: {},
|
|
@@ -1093,7 +1103,7 @@ function fa(e, t = {}) {
|
|
|
1093
1103
|
...t
|
|
1094
1104
|
};
|
|
1095
1105
|
}
|
|
1096
|
-
function
|
|
1106
|
+
function ma(e, t = {}) {
|
|
1097
1107
|
return {
|
|
1098
1108
|
name: `${e}Map`,
|
|
1099
1109
|
properties: {},
|
|
@@ -1101,13 +1111,13 @@ function pa(e, t = {}) {
|
|
|
1101
1111
|
...t
|
|
1102
1112
|
};
|
|
1103
1113
|
}
|
|
1104
|
-
const
|
|
1114
|
+
const it = {
|
|
1105
1115
|
name: "SpecExtension",
|
|
1106
1116
|
properties: {},
|
|
1107
1117
|
// skip validation of additional properties for unknown extensions
|
|
1108
1118
|
additionalProperties: { resolvable: !0 }
|
|
1109
1119
|
};
|
|
1110
|
-
function
|
|
1120
|
+
function Aa(e, t = {}) {
|
|
1111
1121
|
const n = {};
|
|
1112
1122
|
for (const o of Object.keys(e))
|
|
1113
1123
|
n[o] = {
|
|
@@ -1116,7 +1126,7 @@ function da(e, t = {}) {
|
|
|
1116
1126
|
};
|
|
1117
1127
|
for (const o of Object.values(n))
|
|
1118
1128
|
r(o);
|
|
1119
|
-
return n.SpecExtension =
|
|
1129
|
+
return n.SpecExtension = it, n;
|
|
1120
1130
|
function r(o) {
|
|
1121
1131
|
if (o.additionalProperties && (o.additionalProperties = i(o.additionalProperties)), o.items && (o.items = i(o.items)), o.properties) {
|
|
1122
1132
|
const a = {};
|
|
@@ -1133,32 +1143,35 @@ function da(e, t = {}) {
|
|
|
1133
1143
|
if (!n[o])
|
|
1134
1144
|
throw new Error(`Unknown type name found: ${o}`);
|
|
1135
1145
|
return n[o];
|
|
1136
|
-
} else return typeof o == "function" ? (a, s) => i(o(a, s)) :
|
|
1146
|
+
} else return typeof o == "function" ? (a, s) => i(o(a, s)) : ot(o) ? (o = { ...o }, r(o), o) : o?.directResolveAs !== void 0 ? {
|
|
1137
1147
|
...o,
|
|
1138
1148
|
directResolveAs: i(o.directResolveAs) ?? void 0
|
|
1139
1149
|
} : o;
|
|
1140
1150
|
}
|
|
1141
1151
|
}
|
|
1142
|
-
function
|
|
1152
|
+
function ot(e) {
|
|
1143
1153
|
return typeof e?.name == "string";
|
|
1144
1154
|
}
|
|
1145
|
-
function
|
|
1155
|
+
function be(e, t) {
|
|
1146
1156
|
return e === "" && (e = "#/"), e[e.length - 1] === "/" ? e + t : e + "/" + t;
|
|
1147
1157
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1158
|
+
function at(e) {
|
|
1159
|
+
return Re(e) && typeof e.$ref == "string";
|
|
1150
1160
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1161
|
+
function _r(e) {
|
|
1162
|
+
return at(e) && Object.keys(e).length > 1;
|
|
1163
|
+
}
|
|
1164
|
+
function xr(e) {
|
|
1165
|
+
return Re(e) && typeof e.externalValue == "string";
|
|
1153
1166
|
}
|
|
1154
|
-
class
|
|
1167
|
+
class zt {
|
|
1155
1168
|
source;
|
|
1156
1169
|
pointer;
|
|
1157
1170
|
constructor(t, n) {
|
|
1158
1171
|
this.source = t, this.pointer = n;
|
|
1159
1172
|
}
|
|
1160
1173
|
child(t) {
|
|
1161
|
-
return new
|
|
1174
|
+
return new zt(this.source, be(this.pointer, (Array.isArray(t) ? t : [t]).map(Pe).join("/")));
|
|
1162
1175
|
}
|
|
1163
1176
|
key() {
|
|
1164
1177
|
return { ...this, reportOnKey: !0 };
|
|
@@ -1167,7 +1180,7 @@ class kn {
|
|
|
1167
1180
|
return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer);
|
|
1168
1181
|
}
|
|
1169
1182
|
}
|
|
1170
|
-
function
|
|
1183
|
+
function Ir(e) {
|
|
1171
1184
|
const t = e.indexOf("~") === -1 ? e : e.replaceAll("~1", "/").replaceAll("~0", "~");
|
|
1172
1185
|
try {
|
|
1173
1186
|
return decodeURIComponent(t);
|
|
@@ -1175,53 +1188,51 @@ function Rr(e) {
|
|
|
1175
1188
|
return t;
|
|
1176
1189
|
}
|
|
1177
1190
|
}
|
|
1178
|
-
function
|
|
1191
|
+
function Pe(e) {
|
|
1179
1192
|
return typeof e == "number" || e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
1180
1193
|
}
|
|
1181
|
-
function
|
|
1194
|
+
function wr(e) {
|
|
1182
1195
|
const [t, n = ""] = e.split("#/");
|
|
1183
1196
|
return {
|
|
1184
1197
|
uri: (t.endsWith("#") ? t.slice(0, -1) : t) || null,
|
|
1185
|
-
pointer:
|
|
1198
|
+
pointer: Nr(n)
|
|
1186
1199
|
};
|
|
1187
1200
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return e.split("/").map(
|
|
1201
|
+
function Nr(e) {
|
|
1202
|
+
return e.split("/").map(Ir).filter(gr);
|
|
1190
1203
|
}
|
|
1191
|
-
function
|
|
1204
|
+
function ya(e) {
|
|
1192
1205
|
const t = e.split("/");
|
|
1193
1206
|
return t[t.length - 1];
|
|
1194
1207
|
}
|
|
1195
|
-
function
|
|
1208
|
+
function Sa(e) {
|
|
1196
1209
|
const t = e.split(/[\/\\]/);
|
|
1197
1210
|
return t[t.length - 1].replace(/\.[^.]+$/, "");
|
|
1198
1211
|
}
|
|
1199
|
-
function
|
|
1212
|
+
function Fe(e) {
|
|
1200
1213
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://") || e.startsWith("data:");
|
|
1201
1214
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return Xe.extname(e) ?
|
|
1215
|
+
function Ea(e) {
|
|
1216
|
+
return Xe.extname(e) ? Fe(e) ? e.substring(0, e.lastIndexOf("/")) : Xe.dirname(e) : e;
|
|
1204
1217
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return
|
|
1218
|
+
function Ca(e, t) {
|
|
1219
|
+
return Fe(e) ? new URL(t, e.endsWith("/") ? e : `${e}/`).href : Xe.resolve(e, t);
|
|
1207
1220
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return typeof e == "string" && (e.startsWith("#") ||
|
|
1221
|
+
function Ta(e) {
|
|
1222
|
+
return typeof e == "string" && (e.startsWith("#") || Fe(e) || e.startsWith("./") || e.startsWith("../") || e.indexOf("/") > -1 || /\.(ya?ml|json)$/i.test(e));
|
|
1210
1223
|
}
|
|
1211
|
-
function
|
|
1224
|
+
function $r(e) {
|
|
1212
1225
|
return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e);
|
|
1213
1226
|
}
|
|
1214
|
-
function
|
|
1215
|
-
if (!
|
|
1227
|
+
function va(e, t, n) {
|
|
1228
|
+
if (!Re(t.node) && n.parent) {
|
|
1216
1229
|
n.parent[n.key] = t.node;
|
|
1217
|
-
|
|
1218
|
-
delete e.$ref;
|
|
1219
|
-
const r = Object.assign({}, t.node, e);
|
|
1220
|
-
Object.assign(e, r);
|
|
1230
|
+
return;
|
|
1221
1231
|
}
|
|
1232
|
+
delete e.$ref, Re(t.node) && Object.assign(e, { ...t.node, ...e });
|
|
1222
1233
|
}
|
|
1223
|
-
var
|
|
1224
|
-
function
|
|
1234
|
+
var H = /* @__PURE__ */ Symbol("NOT_RESOLVED"), Qt = /* @__PURE__ */ Symbol("MERGE_KEY");
|
|
1235
|
+
function ee(e, t) {
|
|
1225
1236
|
return {
|
|
1226
1237
|
tagName: e,
|
|
1227
1238
|
nodeKind: "scalar",
|
|
@@ -1234,7 +1245,7 @@ function te(e, t) {
|
|
|
1234
1245
|
representTagName: t.representTagName ?? null
|
|
1235
1246
|
};
|
|
1236
1247
|
}
|
|
1237
|
-
function
|
|
1248
|
+
function Zt(e, t) {
|
|
1238
1249
|
const n = t.finalize === void 0;
|
|
1239
1250
|
return {
|
|
1240
1251
|
tagName: e,
|
|
@@ -1250,7 +1261,7 @@ function Qt(e, t) {
|
|
|
1250
1261
|
representTagName: t.representTagName ?? null
|
|
1251
1262
|
};
|
|
1252
1263
|
}
|
|
1253
|
-
function
|
|
1264
|
+
function ht(e, t) {
|
|
1254
1265
|
const n = t.finalize === void 0;
|
|
1255
1266
|
return {
|
|
1256
1267
|
tagName: e,
|
|
@@ -1269,16 +1280,16 @@ function pt(e, t) {
|
|
|
1269
1280
|
representTagName: t.representTagName ?? null
|
|
1270
1281
|
};
|
|
1271
1282
|
}
|
|
1272
|
-
var
|
|
1283
|
+
var kr = ee("tag:yaml.org,2002:str", {
|
|
1273
1284
|
resolve: (e) => e,
|
|
1274
1285
|
identify: (e) => typeof e == "string"
|
|
1275
|
-
}),
|
|
1286
|
+
}), Lr = [
|
|
1276
1287
|
"",
|
|
1277
1288
|
"~",
|
|
1278
1289
|
"null",
|
|
1279
1290
|
"Null",
|
|
1280
1291
|
"NULL"
|
|
1281
|
-
],
|
|
1292
|
+
], Or = ee("tag:yaml.org,2002:null", {
|
|
1282
1293
|
implicit: !0,
|
|
1283
1294
|
implicitFirstChars: [
|
|
1284
1295
|
"",
|
|
@@ -1286,22 +1297,22 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1286
1297
|
"n",
|
|
1287
1298
|
"N"
|
|
1288
1299
|
],
|
|
1289
|
-
resolve: (e) =>
|
|
1300
|
+
resolve: (e) => Lr.indexOf(e) !== -1 ? null : H,
|
|
1290
1301
|
identify: (e) => e === null,
|
|
1291
1302
|
represent: () => "null"
|
|
1292
|
-
}),
|
|
1303
|
+
}), Pr = ee("tag:yaml.org,2002:null", {
|
|
1293
1304
|
implicit: !0,
|
|
1294
1305
|
implicitFirstChars: ["n"],
|
|
1295
|
-
resolve: (e, t) => e === "null" || t && e === "" ? null :
|
|
1306
|
+
resolve: (e, t) => e === "null" || t && e === "" ? null : H,
|
|
1296
1307
|
identify: (e) => e === null,
|
|
1297
1308
|
represent: () => "null"
|
|
1298
|
-
}),
|
|
1309
|
+
}), Fr = [
|
|
1299
1310
|
"",
|
|
1300
1311
|
"~",
|
|
1301
1312
|
"null",
|
|
1302
1313
|
"Null",
|
|
1303
1314
|
"NULL"
|
|
1304
|
-
],
|
|
1315
|
+
], Hr = ee("tag:yaml.org,2002:null", {
|
|
1305
1316
|
implicit: !0,
|
|
1306
1317
|
implicitFirstChars: [
|
|
1307
1318
|
"",
|
|
@@ -1309,18 +1320,18 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1309
1320
|
"n",
|
|
1310
1321
|
"N"
|
|
1311
1322
|
],
|
|
1312
|
-
resolve: (e) =>
|
|
1323
|
+
resolve: (e) => Fr.indexOf(e) !== -1 ? null : H,
|
|
1313
1324
|
identify: (e) => e === null,
|
|
1314
1325
|
represent: () => "null"
|
|
1315
|
-
}),
|
|
1326
|
+
}), Mr = [
|
|
1316
1327
|
"true",
|
|
1317
1328
|
"True",
|
|
1318
1329
|
"TRUE"
|
|
1319
|
-
],
|
|
1330
|
+
], Br = [
|
|
1320
1331
|
"false",
|
|
1321
1332
|
"False",
|
|
1322
1333
|
"FALSE"
|
|
1323
|
-
],
|
|
1334
|
+
], Dr = ee("tag:yaml.org,2002:bool", {
|
|
1324
1335
|
implicit: !0,
|
|
1325
1336
|
implicitFirstChars: [
|
|
1326
1337
|
"t",
|
|
@@ -1328,16 +1339,16 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1328
1339
|
"f",
|
|
1329
1340
|
"F"
|
|
1330
1341
|
],
|
|
1331
|
-
resolve: (e) =>
|
|
1342
|
+
resolve: (e) => Mr.indexOf(e) !== -1 ? !0 : Br.indexOf(e) !== -1 ? !1 : H,
|
|
1332
1343
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1333
1344
|
represent: (e) => e ? "true" : "false"
|
|
1334
|
-
}),
|
|
1345
|
+
}), Ur = ["true"], Kr = ["false"], qr = ee("tag:yaml.org,2002:bool", {
|
|
1335
1346
|
implicit: !0,
|
|
1336
1347
|
implicitFirstChars: ["t", "f"],
|
|
1337
|
-
resolve: (e) =>
|
|
1348
|
+
resolve: (e) => Ur.indexOf(e) !== -1 ? !0 : Kr.indexOf(e) !== -1 ? !1 : H,
|
|
1338
1349
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1339
1350
|
represent: (e) => e ? "true" : "false"
|
|
1340
|
-
}),
|
|
1351
|
+
}), Gr = [
|
|
1341
1352
|
"true",
|
|
1342
1353
|
"True",
|
|
1343
1354
|
"TRUE",
|
|
@@ -1349,7 +1360,7 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1349
1360
|
"on",
|
|
1350
1361
|
"On",
|
|
1351
1362
|
"ON"
|
|
1352
|
-
],
|
|
1363
|
+
], Yr = [
|
|
1353
1364
|
"false",
|
|
1354
1365
|
"False",
|
|
1355
1366
|
"FALSE",
|
|
@@ -1361,7 +1372,7 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1361
1372
|
"off",
|
|
1362
1373
|
"Off",
|
|
1363
1374
|
"OFF"
|
|
1364
|
-
],
|
|
1375
|
+
], Wr = ee("tag:yaml.org,2002:bool", {
|
|
1365
1376
|
implicit: !0,
|
|
1366
1377
|
implicitFirstChars: [
|
|
1367
1378
|
"y",
|
|
@@ -1375,51 +1386,51 @@ var Ir = te("tag:yaml.org,2002:str", {
|
|
|
1375
1386
|
"o",
|
|
1376
1387
|
"O"
|
|
1377
1388
|
],
|
|
1378
|
-
resolve: (e) =>
|
|
1389
|
+
resolve: (e) => Gr.indexOf(e) !== -1 ? !0 : Yr.indexOf(e) !== -1 ? !1 : H,
|
|
1379
1390
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1380
1391
|
represent: (e) => e ? "true" : "false"
|
|
1381
|
-
}),
|
|
1382
|
-
function
|
|
1392
|
+
}), jr = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"), Vr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
|
|
1393
|
+
function Xr(e) {
|
|
1383
1394
|
let t = e, n = 1;
|
|
1384
1395
|
return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10);
|
|
1385
1396
|
}
|
|
1386
|
-
function
|
|
1397
|
+
function zr(e, t) {
|
|
1387
1398
|
if (t) {
|
|
1388
|
-
if (!
|
|
1389
|
-
} else if (!
|
|
1390
|
-
const n =
|
|
1391
|
-
return Number.isFinite(n) ? n :
|
|
1399
|
+
if (!Vr.test(e)) return H;
|
|
1400
|
+
} else if (!jr.test(e)) return H;
|
|
1401
|
+
const n = Xr(e);
|
|
1402
|
+
return Number.isFinite(n) ? n : H;
|
|
1392
1403
|
}
|
|
1393
|
-
var
|
|
1404
|
+
var Fn = ee("tag:yaml.org,2002:int", {
|
|
1394
1405
|
implicit: !0,
|
|
1395
1406
|
implicitFirstChars: [
|
|
1396
1407
|
"-",
|
|
1397
1408
|
"+",
|
|
1398
1409
|
..."0123456789"
|
|
1399
1410
|
],
|
|
1400
|
-
resolve:
|
|
1411
|
+
resolve: zr,
|
|
1401
1412
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1402
1413
|
represent: (e) => e.toString(10)
|
|
1403
|
-
}),
|
|
1404
|
-
function
|
|
1414
|
+
}), Qr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"), Zr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
|
|
1415
|
+
function Jr(e) {
|
|
1405
1416
|
let t = e, n = 1;
|
|
1406
1417
|
return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10);
|
|
1407
1418
|
}
|
|
1408
|
-
function
|
|
1419
|
+
function ei(e, t) {
|
|
1409
1420
|
if (t) {
|
|
1410
|
-
if (!
|
|
1411
|
-
} else if (!
|
|
1412
|
-
const n =
|
|
1413
|
-
return Number.isFinite(n) ? n :
|
|
1421
|
+
if (!Zr.test(e)) return H;
|
|
1422
|
+
} else if (!Qr.test(e)) return H;
|
|
1423
|
+
const n = Jr(e);
|
|
1424
|
+
return Number.isFinite(n) ? n : H;
|
|
1414
1425
|
}
|
|
1415
|
-
var
|
|
1426
|
+
var ti = ee("tag:yaml.org,2002:int", {
|
|
1416
1427
|
implicit: !0,
|
|
1417
1428
|
implicitFirstChars: ["-", ..."0123456789"],
|
|
1418
|
-
resolve:
|
|
1429
|
+
resolve: ei,
|
|
1419
1430
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1420
1431
|
represent: (e) => e.toString(10)
|
|
1421
|
-
}),
|
|
1422
|
-
function
|
|
1432
|
+
}), ni = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");
|
|
1433
|
+
function ri(e) {
|
|
1423
1434
|
let t = e.replace(/_/g, ""), n = 1;
|
|
1424
1435
|
if ((t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b")) return n * parseInt(t.slice(2), 2);
|
|
1425
1436
|
if (t.startsWith("0x")) return n * parseInt(t.slice(2), 16);
|
|
@@ -1430,32 +1441,32 @@ function Jr(e) {
|
|
|
1430
1441
|
}
|
|
1431
1442
|
return t !== "0" && t[0] === "0" ? n * parseInt(t, 8) : n * parseInt(t, 10);
|
|
1432
1443
|
}
|
|
1433
|
-
function
|
|
1434
|
-
if (!
|
|
1435
|
-
const t =
|
|
1436
|
-
return Number.isFinite(t) ? t :
|
|
1444
|
+
function ii(e) {
|
|
1445
|
+
if (!ni.test(e)) return H;
|
|
1446
|
+
const t = ri(e);
|
|
1447
|
+
return Number.isFinite(t) ? t : H;
|
|
1437
1448
|
}
|
|
1438
|
-
var Lt =
|
|
1449
|
+
var Lt = ee("tag:yaml.org,2002:int", {
|
|
1439
1450
|
implicit: !0,
|
|
1440
1451
|
implicitFirstChars: [
|
|
1441
1452
|
"-",
|
|
1442
1453
|
"+",
|
|
1443
1454
|
..."0123456789"
|
|
1444
1455
|
],
|
|
1445
|
-
resolve:
|
|
1456
|
+
resolve: ii,
|
|
1446
1457
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1447
1458
|
represent: (e) => e.toString(10)
|
|
1448
|
-
}),
|
|
1449
|
-
function
|
|
1450
|
-
if (!
|
|
1459
|
+
}), oi = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), ai = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1460
|
+
function si(e) {
|
|
1461
|
+
if (!oi.test(e)) return H;
|
|
1451
1462
|
let t = e.toLowerCase();
|
|
1452
1463
|
const n = t[0] === "-" ? -1 : 1;
|
|
1453
1464
|
if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
1454
1465
|
if (t === ".nan") return NaN;
|
|
1455
1466
|
const r = n * parseFloat(t);
|
|
1456
|
-
return Number.isFinite(r) ||
|
|
1467
|
+
return Number.isFinite(r) || ai.test(e) ? r : H;
|
|
1457
1468
|
}
|
|
1458
|
-
function
|
|
1469
|
+
function li(e) {
|
|
1459
1470
|
if (isNaN(e)) return ".nan";
|
|
1460
1471
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1461
1472
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1463,7 +1474,7 @@ function ii(e) {
|
|
|
1463
1474
|
const t = e.toString(10);
|
|
1464
1475
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1465
1476
|
}
|
|
1466
|
-
var
|
|
1477
|
+
var Hn = ee("tag:yaml.org,2002:float", {
|
|
1467
1478
|
implicit: !0,
|
|
1468
1479
|
implicitFirstChars: [
|
|
1469
1480
|
"-",
|
|
@@ -1471,25 +1482,25 @@ var Pn = te("tag:yaml.org,2002:float", {
|
|
|
1471
1482
|
".",
|
|
1472
1483
|
..."0123456789"
|
|
1473
1484
|
],
|
|
1474
|
-
resolve:
|
|
1485
|
+
resolve: si,
|
|
1475
1486
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1476
|
-
represent:
|
|
1477
|
-
}),
|
|
1478
|
-
function
|
|
1487
|
+
represent: li
|
|
1488
|
+
}), ci = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"), ui = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1489
|
+
function fi(e, t) {
|
|
1479
1490
|
if (t) {
|
|
1480
|
-
if (!
|
|
1491
|
+
if (!ui.test(e)) return H;
|
|
1481
1492
|
let r = e.toLowerCase();
|
|
1482
1493
|
const i = r[0] === "-" ? -1 : 1;
|
|
1483
1494
|
if ("+-".includes(r[0]) && (r = r.slice(1)), r === ".inf") return i === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
1484
1495
|
if (r === ".nan") return NaN;
|
|
1485
1496
|
const o = i * parseFloat(r);
|
|
1486
|
-
return Number.isFinite(o) ? o :
|
|
1497
|
+
return Number.isFinite(o) ? o : H;
|
|
1487
1498
|
}
|
|
1488
|
-
if (!
|
|
1499
|
+
if (!ci.test(e)) return H;
|
|
1489
1500
|
const n = Number(e);
|
|
1490
|
-
return Number.isFinite(n) ? n :
|
|
1501
|
+
return Number.isFinite(n) ? n : H;
|
|
1491
1502
|
}
|
|
1492
|
-
function
|
|
1503
|
+
function pi(e) {
|
|
1493
1504
|
if (isNaN(e)) return ".nan";
|
|
1494
1505
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1495
1506
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1497,15 +1508,15 @@ function li(e) {
|
|
|
1497
1508
|
const t = e.toString(10);
|
|
1498
1509
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1499
1510
|
}
|
|
1500
|
-
var
|
|
1511
|
+
var di = ee("tag:yaml.org,2002:float", {
|
|
1501
1512
|
implicit: !0,
|
|
1502
1513
|
implicitFirstChars: ["-", ..."0123456789"],
|
|
1503
|
-
resolve:
|
|
1514
|
+
resolve: fi,
|
|
1504
1515
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1505
|
-
represent:
|
|
1506
|
-
}),
|
|
1507
|
-
function
|
|
1508
|
-
if (!
|
|
1516
|
+
represent: pi
|
|
1517
|
+
}), hi = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), gi = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1518
|
+
function mi(e) {
|
|
1519
|
+
if (!hi.test(e)) return H;
|
|
1509
1520
|
let t = e.toLowerCase().replace(/_/g, "");
|
|
1510
1521
|
const n = t[0] === "-" ? -1 : 1;
|
|
1511
1522
|
if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
@@ -1515,9 +1526,9 @@ function pi(e) {
|
|
|
1515
1526
|
for (const i of t.split(":")) r = r * 60 + Number(i);
|
|
1516
1527
|
r *= n;
|
|
1517
1528
|
} else r = n * parseFloat(t);
|
|
1518
|
-
return Number.isFinite(r) ||
|
|
1529
|
+
return Number.isFinite(r) || gi.test(e) ? r : H;
|
|
1519
1530
|
}
|
|
1520
|
-
function
|
|
1531
|
+
function Ai(e) {
|
|
1521
1532
|
if (isNaN(e)) return ".nan";
|
|
1522
1533
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1523
1534
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1525,7 +1536,7 @@ function di(e) {
|
|
|
1525
1536
|
const t = e.toString(10);
|
|
1526
1537
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1527
1538
|
}
|
|
1528
|
-
var
|
|
1539
|
+
var Ot = ee("tag:yaml.org,2002:float", {
|
|
1529
1540
|
implicit: !0,
|
|
1530
1541
|
implicitFirstChars: [
|
|
1531
1542
|
"-",
|
|
@@ -1533,81 +1544,85 @@ var kt = te("tag:yaml.org,2002:float", {
|
|
|
1533
1544
|
".",
|
|
1534
1545
|
..."0123456789"
|
|
1535
1546
|
],
|
|
1536
|
-
resolve:
|
|
1547
|
+
resolve: mi,
|
|
1537
1548
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1538
|
-
represent:
|
|
1539
|
-
}),
|
|
1549
|
+
represent: Ai
|
|
1550
|
+
}), Mn = ee("tag:yaml.org,2002:merge", {
|
|
1540
1551
|
implicit: !0,
|
|
1541
1552
|
implicitFirstChars: ["<"],
|
|
1542
|
-
resolve: (e, t) => e === "<<" || t && e === "" ?
|
|
1543
|
-
}),
|
|
1544
|
-
function
|
|
1553
|
+
resolve: (e, t) => e === "<<" || t && e === "" ? Qt : H
|
|
1554
|
+
}), yi = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
1555
|
+
function Si(e) {
|
|
1545
1556
|
const t = e.replace(/\s/g, "");
|
|
1546
|
-
if (t.length % 4 !== 0 || !
|
|
1557
|
+
if (t.length % 4 !== 0 || !yi.test(t)) return H;
|
|
1547
1558
|
const n = atob(t), r = new Uint8Array(n.length);
|
|
1548
1559
|
for (let i = 0; i < n.length; i++) r[i] = n.charCodeAt(i);
|
|
1549
1560
|
return r;
|
|
1550
1561
|
}
|
|
1551
|
-
function
|
|
1562
|
+
function Ei(e) {
|
|
1552
1563
|
let t = "";
|
|
1553
1564
|
for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
|
|
1554
1565
|
return btoa(t);
|
|
1555
1566
|
}
|
|
1556
|
-
var
|
|
1557
|
-
resolve:
|
|
1567
|
+
var Bn = ee("tag:yaml.org,2002:binary", {
|
|
1568
|
+
resolve: Si,
|
|
1558
1569
|
identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]",
|
|
1559
|
-
represent:
|
|
1560
|
-
}),
|
|
1561
|
-
function
|
|
1562
|
-
|
|
1563
|
-
|
|
1570
|
+
represent: Ei
|
|
1571
|
+
}), Ci = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Ti = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
|
|
1572
|
+
function mn(e, t, n, r = 0, i = 0, o = 0, a = 0) {
|
|
1573
|
+
const s = new Date(Date.UTC(e, t, n, r, i, o, a));
|
|
1574
|
+
return s.setUTCFullYear(e, t, n), s;
|
|
1575
|
+
}
|
|
1576
|
+
function vi(e) {
|
|
1577
|
+
let t = Ci.exec(e);
|
|
1578
|
+
if (t === null && (t = Ti.exec(e)), t === null) return H;
|
|
1564
1579
|
const n = +t[1], r = +t[2] - 1, i = +t[3];
|
|
1565
1580
|
if (!t[4]) {
|
|
1566
|
-
const c =
|
|
1567
|
-
return c.getUTCFullYear() !== n || c.getUTCMonth() !== r || c.getUTCDate() !== i ?
|
|
1581
|
+
const c = mn(n, r, i);
|
|
1582
|
+
return c.getUTCFullYear() !== n || c.getUTCMonth() !== r || c.getUTCDate() !== i ? H : c;
|
|
1568
1583
|
}
|
|
1569
1584
|
const o = +t[4], a = +t[5], s = +t[6];
|
|
1570
1585
|
let l = 0;
|
|
1571
|
-
if (o > 23 || a > 59 || s > 59) return
|
|
1586
|
+
if (o > 23 || a > 59 || s > 59) return H;
|
|
1572
1587
|
if (t[7]) {
|
|
1573
1588
|
let c = t[7].slice(0, 3);
|
|
1574
1589
|
for (; c.length < 3; ) c += "0";
|
|
1575
1590
|
l = +c;
|
|
1576
1591
|
}
|
|
1577
|
-
const u =
|
|
1578
|
-
if (u.getUTCFullYear() !== n || u.getUTCMonth() !== r || u.getUTCDate() !== i) return
|
|
1592
|
+
const u = mn(n, r, i, o, a, s, l);
|
|
1593
|
+
if (u.getUTCFullYear() !== n || u.getUTCMonth() !== r || u.getUTCDate() !== i) return H;
|
|
1579
1594
|
if (t[9]) {
|
|
1580
|
-
const c = +t[10],
|
|
1581
|
-
if (c > 23 ||
|
|
1582
|
-
const
|
|
1583
|
-
u.setTime(u.getTime() - (t[9] === "-" ? -
|
|
1595
|
+
const c = +t[10], S = +(t[11] || 0);
|
|
1596
|
+
if (c > 23 || S > 59) return H;
|
|
1597
|
+
const m = (c * 60 + S) * 6e4;
|
|
1598
|
+
u.setTime(u.getTime() - (t[9] === "-" ? -m : m));
|
|
1584
1599
|
}
|
|
1585
1600
|
return u;
|
|
1586
1601
|
}
|
|
1587
|
-
var
|
|
1602
|
+
var bi = ee("tag:yaml.org,2002:timestamp", {
|
|
1588
1603
|
implicit: !0,
|
|
1589
1604
|
implicitFirstChars: [..."0123456789"],
|
|
1590
|
-
resolve:
|
|
1605
|
+
resolve: vi,
|
|
1591
1606
|
identify: (e) => e instanceof Date,
|
|
1592
1607
|
represent: (e) => e.toISOString()
|
|
1593
|
-
}),
|
|
1608
|
+
}), Ri = Zt("tag:yaml.org,2002:seq", {
|
|
1594
1609
|
create: () => [],
|
|
1595
1610
|
addItem: (e, t) => {
|
|
1596
1611
|
e.push(t);
|
|
1597
1612
|
},
|
|
1598
1613
|
identify: Array.isArray
|
|
1599
1614
|
});
|
|
1600
|
-
function
|
|
1615
|
+
function gt(e) {
|
|
1601
1616
|
if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
|
|
1602
1617
|
const t = Object.getPrototypeOf(e);
|
|
1603
1618
|
return t === null || t === Object.prototype;
|
|
1604
1619
|
}
|
|
1605
|
-
function
|
|
1620
|
+
function Pt(e, t) {
|
|
1606
1621
|
const n = {};
|
|
1607
1622
|
for (const r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
1608
1623
|
return n;
|
|
1609
1624
|
}
|
|
1610
|
-
var
|
|
1625
|
+
var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
1611
1626
|
create: () => ({
|
|
1612
1627
|
list: [],
|
|
1613
1628
|
seen: /* @__PURE__ */ new Set()
|
|
@@ -1617,7 +1632,7 @@ var Mn = Qt("tag:yaml.org,2002:omap", {
|
|
|
1617
1632
|
if (t instanceof Map) {
|
|
1618
1633
|
if (t.size !== 1) return "cannot resolve an ordered map item";
|
|
1619
1634
|
n = t.keys().next().value;
|
|
1620
|
-
} else if (
|
|
1635
|
+
} else if (gt(t)) {
|
|
1621
1636
|
const r = Object.keys(t);
|
|
1622
1637
|
if (r.length !== 1) return "cannot resolve an ordered map item";
|
|
1623
1638
|
n = r[0];
|
|
@@ -1625,7 +1640,7 @@ var Mn = Qt("tag:yaml.org,2002:omap", {
|
|
|
1625
1640
|
return e.seen.has(n) ? "duplicate key in ordered map" : (e.seen.add(n), e.list.push(t), "");
|
|
1626
1641
|
},
|
|
1627
1642
|
finalize: (e) => e.list
|
|
1628
|
-
}),
|
|
1643
|
+
}), Un = Zt("tag:yaml.org,2002:pairs", {
|
|
1629
1644
|
create: () => [],
|
|
1630
1645
|
addItem: (e, t) => {
|
|
1631
1646
|
if (t instanceof Map)
|
|
@@ -1634,9 +1649,9 @@ var Mn = Qt("tag:yaml.org,2002:omap", {
|
|
|
1634
1649
|
const n = t, r = Object.keys(n);
|
|
1635
1650
|
return r.length !== 1 ? "cannot resolve a pairs item" : (e.push([r[0], n[r[0]]]), "");
|
|
1636
1651
|
}
|
|
1637
|
-
}),
|
|
1652
|
+
}), _i = ht("tag:yaml.org,2002:map", {
|
|
1638
1653
|
create: () => ({}),
|
|
1639
|
-
identify:
|
|
1654
|
+
identify: gt,
|
|
1640
1655
|
represent: (e) => {
|
|
1641
1656
|
const t = /* @__PURE__ */ new Map();
|
|
1642
1657
|
for (const n of Object.keys(e)) t.set(n, e[n]);
|
|
@@ -1654,8 +1669,11 @@ var Mn = Qt("tag:yaml.org,2002:omap", {
|
|
|
1654
1669
|
},
|
|
1655
1670
|
has: (e, t) => t !== null && typeof t == "object" ? !1 : Object.prototype.hasOwnProperty.call(e, String(t)),
|
|
1656
1671
|
keys: (e) => Object.keys(e),
|
|
1657
|
-
get: (e, t) =>
|
|
1658
|
-
|
|
1672
|
+
get: (e, t) => {
|
|
1673
|
+
const n = String(t);
|
|
1674
|
+
return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null;
|
|
1675
|
+
}
|
|
1676
|
+
}), Kn = ht("tag:yaml.org,2002:set", {
|
|
1659
1677
|
create: () => /* @__PURE__ */ new Set(),
|
|
1660
1678
|
identify: (e) => e instanceof Set,
|
|
1661
1679
|
represent: (e) => {
|
|
@@ -1668,21 +1686,21 @@ var Mn = Qt("tag:yaml.org,2002:omap", {
|
|
|
1668
1686
|
keys: (e) => e.keys(),
|
|
1669
1687
|
get: () => null
|
|
1670
1688
|
});
|
|
1671
|
-
function
|
|
1689
|
+
function xi() {
|
|
1672
1690
|
return {
|
|
1673
|
-
scalar:
|
|
1674
|
-
sequence:
|
|
1675
|
-
mapping:
|
|
1691
|
+
scalar: /* @__PURE__ */ Object.create(null),
|
|
1692
|
+
sequence: /* @__PURE__ */ Object.create(null),
|
|
1693
|
+
mapping: /* @__PURE__ */ Object.create(null)
|
|
1676
1694
|
};
|
|
1677
1695
|
}
|
|
1678
|
-
function
|
|
1696
|
+
function Ii() {
|
|
1679
1697
|
return {
|
|
1680
1698
|
scalar: [],
|
|
1681
1699
|
sequence: [],
|
|
1682
1700
|
mapping: []
|
|
1683
1701
|
};
|
|
1684
1702
|
}
|
|
1685
|
-
function
|
|
1703
|
+
function wi(e) {
|
|
1686
1704
|
const t = [];
|
|
1687
1705
|
for (const n of e) {
|
|
1688
1706
|
let r = t.length;
|
|
@@ -1697,7 +1715,7 @@ function bi(e) {
|
|
|
1697
1715
|
}
|
|
1698
1716
|
return t;
|
|
1699
1717
|
}
|
|
1700
|
-
var
|
|
1718
|
+
var mt = class qn {
|
|
1701
1719
|
tags;
|
|
1702
1720
|
implicitScalarTags;
|
|
1703
1721
|
implicitScalarByFirstChar;
|
|
@@ -1708,7 +1726,7 @@ var ht = class Un {
|
|
|
1708
1726
|
exact;
|
|
1709
1727
|
prefix;
|
|
1710
1728
|
constructor(t) {
|
|
1711
|
-
const n =
|
|
1729
|
+
const n = wi(t), r = [], i = xi(), o = Ii();
|
|
1712
1730
|
for (const c of n) {
|
|
1713
1731
|
if (c.nodeKind === "scalar" && c.implicit) {
|
|
1714
1732
|
if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
|
|
@@ -1727,9 +1745,9 @@ var ht = class Un {
|
|
|
1727
1745
|
}
|
|
1728
1746
|
}
|
|
1729
1747
|
const a = r.filter((c) => c.implicitFirstChars === null), s = /* @__PURE__ */ new Set();
|
|
1730
|
-
for (const c of r) if (c.implicitFirstChars !== null) for (const
|
|
1748
|
+
for (const c of r) if (c.implicitFirstChars !== null) for (const S of c.implicitFirstChars) s.add(S);
|
|
1731
1749
|
const l = /* @__PURE__ */ new Map();
|
|
1732
|
-
for (const c of s) l.set(c, r.filter((
|
|
1750
|
+
for (const c of s) l.set(c, r.filter((S) => S.implicitFirstChars === null || S.implicitFirstChars.indexOf(c) !== -1));
|
|
1733
1751
|
const u = i.scalar["tag:yaml.org,2002:str"];
|
|
1734
1752
|
if (!u) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
|
|
1735
1753
|
this.tags = n, this.implicitScalarTags = r, this.implicitScalarByFirstChar = l, this.implicitScalarAnyFirstChar = a, this.defaultScalarTag = u, this.defaultSequenceTag = i.sequence["tag:yaml.org,2002:seq"], this.defaultMappingTag = i.mapping["tag:yaml.org,2002:map"], this.exact = i, this.prefix = o;
|
|
@@ -1737,46 +1755,46 @@ var ht = class Un {
|
|
|
1737
1755
|
withTags(...t) {
|
|
1738
1756
|
let n = [];
|
|
1739
1757
|
for (const r of t) n = n.concat(r);
|
|
1740
|
-
return new
|
|
1758
|
+
return new qn([...this.tags, ...n]);
|
|
1741
1759
|
}
|
|
1742
|
-
},
|
|
1743
|
-
Ir,
|
|
1744
|
-
Ci,
|
|
1745
|
-
Ti
|
|
1746
|
-
]);
|
|
1747
|
-
new ht([
|
|
1748
|
-
...zt.tags,
|
|
1749
|
-
$r,
|
|
1750
|
-
Br,
|
|
1751
|
-
zr,
|
|
1752
|
-
ci
|
|
1753
|
-
]);
|
|
1754
|
-
var qn = new ht([
|
|
1755
|
-
...zt.tags,
|
|
1756
|
-
Nr,
|
|
1757
|
-
Fr,
|
|
1758
|
-
On,
|
|
1759
|
-
Pn
|
|
1760
|
-
]), xi = new ht([
|
|
1761
|
-
...zt.tags,
|
|
1760
|
+
}, Jt = new mt([
|
|
1762
1761
|
kr,
|
|
1762
|
+
Ri,
|
|
1763
|
+
_i
|
|
1764
|
+
]);
|
|
1765
|
+
new mt([
|
|
1766
|
+
...Jt.tags,
|
|
1767
|
+
Pr,
|
|
1763
1768
|
qr,
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1769
|
+
ti,
|
|
1770
|
+
di
|
|
1771
|
+
]);
|
|
1772
|
+
var Gn = new mt([
|
|
1773
|
+
...Jt.tags,
|
|
1774
|
+
Or,
|
|
1775
|
+
Dr,
|
|
1767
1776
|
Fn,
|
|
1768
|
-
Hn
|
|
1777
|
+
Hn
|
|
1778
|
+
]), Ni = new mt([
|
|
1779
|
+
...Jt.tags,
|
|
1780
|
+
Hr,
|
|
1781
|
+
Wr,
|
|
1782
|
+
Lt,
|
|
1783
|
+
Ot,
|
|
1784
|
+
bi,
|
|
1769
1785
|
Mn,
|
|
1770
1786
|
Bn,
|
|
1771
|
-
Dn
|
|
1787
|
+
Dn,
|
|
1788
|
+
Un,
|
|
1789
|
+
Kn
|
|
1772
1790
|
]);
|
|
1773
|
-
|
|
1791
|
+
ht("tag:yaml.org,2002:map", {
|
|
1774
1792
|
create: () => /* @__PURE__ */ new Map(),
|
|
1775
1793
|
addPair: (e, t, n) => (e.set(t, n), ""),
|
|
1776
1794
|
has: (e, t) => e.has(t),
|
|
1777
1795
|
keys: (e) => e.keys(),
|
|
1778
1796
|
get: (e, t) => e.get(t),
|
|
1779
|
-
identify: (e) => e instanceof Map ||
|
|
1797
|
+
identify: (e) => e instanceof Map || gt(e),
|
|
1780
1798
|
represent: (e) => {
|
|
1781
1799
|
if (e instanceof Map) return e;
|
|
1782
1800
|
const t = /* @__PURE__ */ new Map(), n = e;
|
|
@@ -1784,7 +1802,7 @@ pt("tag:yaml.org,2002:map", {
|
|
|
1784
1802
|
return t;
|
|
1785
1803
|
}
|
|
1786
1804
|
});
|
|
1787
|
-
function
|
|
1805
|
+
function An(e) {
|
|
1788
1806
|
if (Array.isArray(e)) {
|
|
1789
1807
|
const t = Array.prototype.slice.call(e);
|
|
1790
1808
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -1795,16 +1813,16 @@ function hn(e) {
|
|
|
1795
1813
|
}
|
|
1796
1814
|
return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e);
|
|
1797
1815
|
}
|
|
1798
|
-
|
|
1816
|
+
ht("tag:yaml.org,2002:map", {
|
|
1799
1817
|
create: () => ({}),
|
|
1800
|
-
identify:
|
|
1818
|
+
identify: gt,
|
|
1801
1819
|
represent: (e) => {
|
|
1802
1820
|
const t = /* @__PURE__ */ new Map();
|
|
1803
1821
|
for (const n of Object.keys(e)) t.set(n, e[n]);
|
|
1804
1822
|
return t;
|
|
1805
1823
|
},
|
|
1806
1824
|
addPair: (e, t, n) => {
|
|
1807
|
-
const r =
|
|
1825
|
+
const r = An(t);
|
|
1808
1826
|
return r === null ? "nested arrays are not supported inside keys" : (r === "__proto__" ? Object.defineProperty(e, r, {
|
|
1809
1827
|
value: n,
|
|
1810
1828
|
enumerable: !0,
|
|
@@ -1813,19 +1831,22 @@ pt("tag:yaml.org,2002:map", {
|
|
|
1813
1831
|
}) : e[r] = n, "");
|
|
1814
1832
|
},
|
|
1815
1833
|
has: (e, t) => {
|
|
1816
|
-
const n =
|
|
1834
|
+
const n = An(t);
|
|
1817
1835
|
return n !== null && Object.prototype.hasOwnProperty.call(e, n);
|
|
1818
1836
|
},
|
|
1819
1837
|
keys: (e) => Object.keys(e),
|
|
1820
|
-
get: (e, t) =>
|
|
1838
|
+
get: (e, t) => {
|
|
1839
|
+
const n = String(t);
|
|
1840
|
+
return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null;
|
|
1841
|
+
}
|
|
1821
1842
|
});
|
|
1822
|
-
var
|
|
1843
|
+
var $i = {
|
|
1823
1844
|
maxLength: 79,
|
|
1824
1845
|
indent: 1,
|
|
1825
1846
|
linesBefore: 3,
|
|
1826
1847
|
linesAfter: 2
|
|
1827
1848
|
};
|
|
1828
|
-
function
|
|
1849
|
+
function _t(e, t, n, r, i) {
|
|
1829
1850
|
let o = "", a = "";
|
|
1830
1851
|
const s = Math.floor(i / 2) - 1;
|
|
1831
1852
|
return r - t > s && (o = " ... ", t = r - s + o.length), n - r > s && (a = " ...", n = r + s - a.length), {
|
|
@@ -1836,10 +1857,10 @@ function bt(e, t, n, r, i) {
|
|
|
1836
1857
|
function xt(e, t) {
|
|
1837
1858
|
return " ".repeat(Math.max(t - e.length, 0)) + e;
|
|
1838
1859
|
}
|
|
1839
|
-
function
|
|
1860
|
+
function ki(e, t) {
|
|
1840
1861
|
if (!e.buffer) return null;
|
|
1841
1862
|
const n = {
|
|
1842
|
-
|
|
1863
|
+
...$i,
|
|
1843
1864
|
...t
|
|
1844
1865
|
}, r = /\r?\n|\r|\0/g, i = [0], o = [];
|
|
1845
1866
|
let a, s = -1;
|
|
@@ -1848,39 +1869,39 @@ function Ii(e, t) {
|
|
|
1848
1869
|
s < 0 && (s = i.length - 1);
|
|
1849
1870
|
let l = "";
|
|
1850
1871
|
const u = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + u + 3);
|
|
1851
|
-
for (let
|
|
1852
|
-
const C =
|
|
1853
|
-
l = `${" ".repeat(n.indent)}${xt((e.line -
|
|
1872
|
+
for (let m = 1; m <= n.linesBefore && !(s - m < 0); m++) {
|
|
1873
|
+
const C = _t(e.buffer, i[s - m], o[s - m], e.position - (i[s] - i[s - m]), c);
|
|
1874
|
+
l = `${" ".repeat(n.indent)}${xt((e.line - m + 1).toString(), u)} | ${C.str}
|
|
1854
1875
|
${l}`;
|
|
1855
1876
|
}
|
|
1856
|
-
const
|
|
1857
|
-
l += `${" ".repeat(n.indent)}${xt((e.line + 1).toString(), u)} | ${
|
|
1858
|
-
`, l += `${"-".repeat(n.indent + u + 3 +
|
|
1877
|
+
const S = _t(e.buffer, i[s], o[s], e.position, c);
|
|
1878
|
+
l += `${" ".repeat(n.indent)}${xt((e.line + 1).toString(), u)} | ${S.str}
|
|
1879
|
+
`, l += `${"-".repeat(n.indent + u + 3 + S.pos)}^
|
|
1859
1880
|
`;
|
|
1860
|
-
for (let
|
|
1861
|
-
const C =
|
|
1862
|
-
l += `${" ".repeat(n.indent)}${xt((e.line +
|
|
1881
|
+
for (let m = 1; m <= n.linesAfter && !(s + m >= o.length); m++) {
|
|
1882
|
+
const C = _t(e.buffer, i[s + m], o[s + m], e.position - (i[s] - i[s + m]), c);
|
|
1883
|
+
l += `${" ".repeat(n.indent)}${xt((e.line + m + 1).toString(), u)} | ${C.str}
|
|
1863
1884
|
`;
|
|
1864
1885
|
}
|
|
1865
1886
|
return l.replace(/\n$/, "");
|
|
1866
1887
|
}
|
|
1867
|
-
function
|
|
1888
|
+
function yn(e, t) {
|
|
1868
1889
|
let n = "";
|
|
1869
1890
|
return e.mark ? (e.mark.name && (n += `in "${e.mark.name}" `), n += `(${e.mark.line + 1}:${e.mark.column + 1})`, !t && e.mark.snippet && (n += `
|
|
1870
1891
|
|
|
1871
1892
|
${e.mark.snippet}`), `${e.reason} ${n}`) : e.reason;
|
|
1872
1893
|
}
|
|
1873
|
-
var
|
|
1894
|
+
var At = class extends Error {
|
|
1874
1895
|
reason;
|
|
1875
1896
|
mark;
|
|
1876
1897
|
constructor(e, t) {
|
|
1877
|
-
super(), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1898
|
+
super(), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = yn(this, !1), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
1878
1899
|
}
|
|
1879
1900
|
toString(e) {
|
|
1880
|
-
return `${this.name}: ${
|
|
1901
|
+
return `${this.name}: ${yn(this, e)}`;
|
|
1881
1902
|
}
|
|
1882
1903
|
};
|
|
1883
|
-
function
|
|
1904
|
+
function yt(e, t, n, r = "") {
|
|
1884
1905
|
let i = 0, o = 0;
|
|
1885
1906
|
for (let s = 0; s < t; s++) {
|
|
1886
1907
|
const l = e.charCodeAt(s);
|
|
@@ -1893,10 +1914,10 @@ function mt(e, t, n, r = "") {
|
|
|
1893
1914
|
line: i,
|
|
1894
1915
|
column: t - o
|
|
1895
1916
|
};
|
|
1896
|
-
throw a.snippet =
|
|
1917
|
+
throw a.snippet = ki(a), new At(n, a);
|
|
1897
1918
|
}
|
|
1898
|
-
var
|
|
1899
|
-
function
|
|
1919
|
+
var Li = -1;
|
|
1920
|
+
function Sn(e) {
|
|
1900
1921
|
switch (e) {
|
|
1901
1922
|
case 48:
|
|
1902
1923
|
return "\0";
|
|
@@ -1939,19 +1960,19 @@ function mn(e) {
|
|
|
1939
1960
|
return "";
|
|
1940
1961
|
}
|
|
1941
1962
|
}
|
|
1942
|
-
var
|
|
1963
|
+
var Yn = new Array(256), Wn = new Array(256);
|
|
1943
1964
|
for (let e = 0; e < 256; e++)
|
|
1944
|
-
|
|
1945
|
-
function
|
|
1965
|
+
Yn[e] = Sn(e) ? 1 : 0, Wn[e] = Sn(e);
|
|
1966
|
+
function Oi(e) {
|
|
1946
1967
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
1947
1968
|
}
|
|
1948
|
-
function
|
|
1969
|
+
function Pi(e) {
|
|
1949
1970
|
return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10;
|
|
1950
1971
|
}
|
|
1951
|
-
function
|
|
1972
|
+
function Fi(e) {
|
|
1952
1973
|
return e === 120 ? 2 : e === 117 ? 4 : 8;
|
|
1953
1974
|
}
|
|
1954
|
-
function
|
|
1975
|
+
function ct(e, t, n) {
|
|
1955
1976
|
let r = 0;
|
|
1956
1977
|
for (; t < n; ) {
|
|
1957
1978
|
const i = e.charCodeAt(t);
|
|
@@ -1967,24 +1988,24 @@ function st(e, t, n) {
|
|
|
1967
1988
|
breaks: r
|
|
1968
1989
|
};
|
|
1969
1990
|
}
|
|
1970
|
-
function
|
|
1991
|
+
function en(e) {
|
|
1971
1992
|
return e === 1 ? " " : `
|
|
1972
1993
|
`.repeat(e - 1);
|
|
1973
1994
|
}
|
|
1974
|
-
function
|
|
1995
|
+
function Hi(e, t, n) {
|
|
1975
1996
|
let r = "", i = t, o = t, a = t;
|
|
1976
1997
|
for (; i < n; ) {
|
|
1977
1998
|
const s = e.charCodeAt(i);
|
|
1978
1999
|
if (s === 10 || s === 13) {
|
|
1979
2000
|
r += e.slice(o, a);
|
|
1980
|
-
const l =
|
|
1981
|
-
r +=
|
|
2001
|
+
const l = ct(e, i, n);
|
|
2002
|
+
r += en(l.breaks), i = o = a = l.position;
|
|
1982
2003
|
} else
|
|
1983
2004
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
1984
2005
|
}
|
|
1985
2006
|
return r + e.slice(o, a);
|
|
1986
2007
|
}
|
|
1987
|
-
function
|
|
2008
|
+
function Mi(e, t, n) {
|
|
1988
2009
|
let r = "", i = t, o = t, a = t;
|
|
1989
2010
|
for (; i < n; ) {
|
|
1990
2011
|
const s = e.charCodeAt(i);
|
|
@@ -1992,161 +2013,161 @@ function Oi(e, t, n) {
|
|
|
1992
2013
|
r += e.slice(o, i) + "'", i += 2, o = a = i;
|
|
1993
2014
|
else if (s === 10 || s === 13) {
|
|
1994
2015
|
r += e.slice(o, a);
|
|
1995
|
-
const l =
|
|
1996
|
-
r +=
|
|
2016
|
+
const l = ct(e, i, n);
|
|
2017
|
+
r += en(l.breaks), i = o = a = l.position;
|
|
1997
2018
|
} else
|
|
1998
2019
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
1999
2020
|
}
|
|
2000
2021
|
return r + e.slice(o, n);
|
|
2001
2022
|
}
|
|
2002
|
-
function
|
|
2023
|
+
function Bi(e, t, n) {
|
|
2003
2024
|
let r = "", i = t, o = t, a = t;
|
|
2004
2025
|
for (; i < n; ) {
|
|
2005
2026
|
const s = e.charCodeAt(i);
|
|
2006
2027
|
if (s === 92) {
|
|
2007
2028
|
r += e.slice(o, i), i++;
|
|
2008
2029
|
const l = e.charCodeAt(i);
|
|
2009
|
-
if (l === 10 || l === 13) i =
|
|
2010
|
-
else if (l < 256 &&
|
|
2011
|
-
r +=
|
|
2030
|
+
if (l === 10 || l === 13) i = ct(e, i, n).position;
|
|
2031
|
+
else if (l < 256 && Yn[l])
|
|
2032
|
+
r += Wn[l], i++;
|
|
2012
2033
|
else {
|
|
2013
|
-
let u =
|
|
2034
|
+
let u = Fi(l), c = 0;
|
|
2014
2035
|
for (; u > 0; u--) {
|
|
2015
2036
|
i++;
|
|
2016
|
-
const
|
|
2017
|
-
c = (c << 4) +
|
|
2037
|
+
const S = Pi(e.charCodeAt(i));
|
|
2038
|
+
c = (c << 4) + S;
|
|
2018
2039
|
}
|
|
2019
|
-
r +=
|
|
2040
|
+
r += Oi(c), i++;
|
|
2020
2041
|
}
|
|
2021
2042
|
o = a = i;
|
|
2022
2043
|
} else if (s === 10 || s === 13) {
|
|
2023
2044
|
r += e.slice(o, a);
|
|
2024
|
-
const l =
|
|
2025
|
-
r +=
|
|
2045
|
+
const l = ct(e, i, n);
|
|
2046
|
+
r += en(l.breaks), i = o = a = l.position;
|
|
2026
2047
|
} else
|
|
2027
2048
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
2028
2049
|
}
|
|
2029
2050
|
return r + e.slice(o, n);
|
|
2030
2051
|
}
|
|
2031
|
-
function
|
|
2052
|
+
function En(e, t, n, r, i, o) {
|
|
2032
2053
|
const a = r < 0 ? 0 : r, s = e.slice(t, n).replace(/\r\n?/g, `
|
|
2033
2054
|
`), l = s === "" ? [] : (s.endsWith(`
|
|
2034
2055
|
`) ? s.slice(0, -1) : s).split(`
|
|
2035
2056
|
`);
|
|
2036
|
-
let u = "", c = !1,
|
|
2057
|
+
let u = "", c = !1, S = 0, m = !1;
|
|
2037
2058
|
for (const C of l) {
|
|
2038
2059
|
let E = 0;
|
|
2039
2060
|
for (; E < a && C.charCodeAt(E) === 32; ) E++;
|
|
2040
2061
|
if (r < 0 || E >= C.length) {
|
|
2041
|
-
|
|
2062
|
+
S++;
|
|
2042
2063
|
continue;
|
|
2043
2064
|
}
|
|
2044
|
-
const
|
|
2045
|
-
o ?
|
|
2046
|
-
`.repeat(c ? 1 +
|
|
2047
|
-
`.repeat(
|
|
2048
|
-
`.repeat(
|
|
2049
|
-
`.repeat(c ? 1 +
|
|
2065
|
+
const I = C.slice(a), M = I.charCodeAt(0);
|
|
2066
|
+
o ? M === 32 || M === 9 ? (m = !0, u += `
|
|
2067
|
+
`.repeat(c ? 1 + S : S)) : m ? (m = !1, u += `
|
|
2068
|
+
`.repeat(S + 1)) : S === 0 ? c && (u += " ") : u += `
|
|
2069
|
+
`.repeat(S) : u += `
|
|
2070
|
+
`.repeat(c ? 1 + S : S), u += I, c = !0, S = 0;
|
|
2050
2071
|
}
|
|
2051
2072
|
return i === 3 ? u += `
|
|
2052
|
-
`.repeat(c ? 1 +
|
|
2073
|
+
`.repeat(c ? 1 + S : S) : i !== 2 && c && (u += `
|
|
2053
2074
|
`), u;
|
|
2054
2075
|
}
|
|
2055
|
-
function
|
|
2056
|
-
if (t.valueStart ===
|
|
2076
|
+
function Di(e, t) {
|
|
2077
|
+
if (t.valueStart === Li) return "";
|
|
2057
2078
|
const { valueStart: n, valueEnd: r } = t;
|
|
2058
2079
|
if (t.fast) return e.slice(n, r);
|
|
2059
2080
|
switch (t.style) {
|
|
2060
2081
|
case 2:
|
|
2061
|
-
return
|
|
2082
|
+
return Mi(e, n, r);
|
|
2062
2083
|
case 3:
|
|
2063
|
-
return
|
|
2084
|
+
return Bi(e, n, r);
|
|
2064
2085
|
case 4:
|
|
2065
|
-
return
|
|
2086
|
+
return En(e, n, r, t.indent, t.chomping, !1);
|
|
2066
2087
|
case 5:
|
|
2067
|
-
return
|
|
2088
|
+
return En(e, n, r, t.indent, t.chomping, !0);
|
|
2068
2089
|
default:
|
|
2069
|
-
return
|
|
2090
|
+
return Hi(e, n, r);
|
|
2070
2091
|
}
|
|
2071
2092
|
}
|
|
2072
|
-
var
|
|
2093
|
+
var Ui = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2073
2094
|
"!": "!",
|
|
2074
2095
|
"!!": "tag:yaml.org,2002:"
|
|
2075
|
-
};
|
|
2076
|
-
function
|
|
2096
|
+
});
|
|
2097
|
+
function It(e) {
|
|
2077
2098
|
return encodeURI(e).replace(/!/g, "%21");
|
|
2078
2099
|
}
|
|
2079
|
-
function
|
|
2100
|
+
function jn(e, t) {
|
|
2080
2101
|
if (e.startsWith("!<") && e.endsWith(">")) return decodeURIComponent(e.slice(2, -1));
|
|
2081
|
-
const n = e.indexOf("!", 1), r = n === -1 ? "!" : e.slice(0, n + 1), i = t?.[r] ??
|
|
2102
|
+
const n = e.indexOf("!", 1), r = n === -1 ? "!" : e.slice(0, n + 1), i = t?.[r] ?? Ui[r] ?? r;
|
|
2082
2103
|
return decodeURIComponent(i) + decodeURIComponent(e.slice(r.length));
|
|
2083
2104
|
}
|
|
2084
|
-
function
|
|
2105
|
+
function Vn(e) {
|
|
2085
2106
|
let t = e;
|
|
2086
|
-
return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${
|
|
2107
|
+
return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${It(t)}`) : t.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${It(t.slice(18))}` : `!<${It(t)}>`;
|
|
2087
2108
|
}
|
|
2088
|
-
var
|
|
2109
|
+
var He = -1, tn = {
|
|
2089
2110
|
filename: "",
|
|
2090
|
-
schema:
|
|
2111
|
+
schema: Gn,
|
|
2091
2112
|
json: !1,
|
|
2092
2113
|
maxTotalMergeKeys: 1e4,
|
|
2093
2114
|
maxAliases: -1
|
|
2094
2115
|
};
|
|
2095
|
-
function
|
|
2096
|
-
return "tagStart" in e && e.tagStart !==
|
|
2116
|
+
function Ki(e) {
|
|
2117
|
+
return "tagStart" in e && e.tagStart !== He ? e.tagStart : "anchorStart" in e && e.anchorStart !== He ? e.anchorStart : "valueStart" in e && e.valueStart !== He ? e.valueStart : "start" in e ? e.start : 0;
|
|
2097
2118
|
}
|
|
2098
|
-
function
|
|
2099
|
-
|
|
2119
|
+
function oe(e, t) {
|
|
2120
|
+
yt(e.source, e.position, t, e.filename);
|
|
2100
2121
|
}
|
|
2101
|
-
function
|
|
2122
|
+
function Xn(e, t, n, r) {
|
|
2102
2123
|
try {
|
|
2103
2124
|
return n.finalize(r);
|
|
2104
2125
|
} catch (i) {
|
|
2105
|
-
if (i instanceof
|
|
2106
|
-
|
|
2126
|
+
if (i instanceof At) throw i;
|
|
2127
|
+
yt(e.source, t, i instanceof Error ? i.message : String(i), e.filename);
|
|
2107
2128
|
}
|
|
2108
2129
|
}
|
|
2109
|
-
function
|
|
2130
|
+
function st(e, t, n) {
|
|
2110
2131
|
const r = e[n];
|
|
2111
2132
|
if (r) return r;
|
|
2112
2133
|
for (const i of t) if (n.startsWith(i.tagName)) return i;
|
|
2113
2134
|
}
|
|
2114
|
-
function
|
|
2115
|
-
const o =
|
|
2135
|
+
function qi(e, t, n, r, i) {
|
|
2136
|
+
const o = st(t, n, r);
|
|
2116
2137
|
if (o) return o;
|
|
2117
|
-
|
|
2138
|
+
oe(e, `unknown ${i} tag !<${r}>`);
|
|
2118
2139
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const n =
|
|
2140
|
+
function Gi(e, t) {
|
|
2141
|
+
const n = Di(e.source, t), r = t.tagStart === He ? "" : e.source.slice(t.tagStart, t.tagEnd), i = e.schema.defaultScalarTag;
|
|
2121
2142
|
if (r !== "") {
|
|
2122
2143
|
if (r === "!") return {
|
|
2123
2144
|
value: n,
|
|
2124
2145
|
tag: i
|
|
2125
2146
|
};
|
|
2126
|
-
const o =
|
|
2147
|
+
const o = jn(r, e.tagHandlers), a = st(e.schema.exact.scalar, e.schema.prefix.scalar, o);
|
|
2127
2148
|
if (a) {
|
|
2128
2149
|
const l = a.resolve(n, !0, o);
|
|
2129
|
-
return l ===
|
|
2150
|
+
return l === H && oe(e, `cannot resolve a node with !<${o}> explicit tag`), {
|
|
2130
2151
|
value: l,
|
|
2131
2152
|
tag: a
|
|
2132
2153
|
};
|
|
2133
2154
|
}
|
|
2134
|
-
const s =
|
|
2155
|
+
const s = st(e.schema.exact.mapping, e.schema.prefix.mapping, o) ?? st(e.schema.exact.sequence, e.schema.prefix.sequence, o);
|
|
2135
2156
|
if (s) {
|
|
2136
|
-
n !== "" &&
|
|
2157
|
+
n !== "" && oe(e, `cannot resolve a node with !<${o}> explicit tag`);
|
|
2137
2158
|
const l = s.create(o);
|
|
2138
2159
|
return {
|
|
2139
|
-
value: s.carrierIsResult ? l :
|
|
2160
|
+
value: s.carrierIsResult ? l : Xn(e, e.position, s, l),
|
|
2140
2161
|
tag: s
|
|
2141
2162
|
};
|
|
2142
2163
|
}
|
|
2143
|
-
|
|
2164
|
+
oe(e, `unknown scalar tag !<${o}>`);
|
|
2144
2165
|
}
|
|
2145
2166
|
if (t.style === 1) {
|
|
2146
2167
|
const o = e.schema.implicitScalarByFirstChar.get(n.charAt(0)) ?? e.schema.implicitScalarAnyFirstChar;
|
|
2147
2168
|
for (const a of o) {
|
|
2148
2169
|
const s = a.resolve(n, !1, a.tagName);
|
|
2149
|
-
if (s !==
|
|
2170
|
+
if (s !== H) return {
|
|
2150
2171
|
value: s,
|
|
2151
2172
|
tag: a
|
|
2152
2173
|
};
|
|
@@ -2157,53 +2178,53 @@ function Di(e, t) {
|
|
|
2157
2178
|
tag: i
|
|
2158
2179
|
};
|
|
2159
2180
|
}
|
|
2160
|
-
function
|
|
2161
|
-
const a = t.tagStart ===
|
|
2181
|
+
function Cn(e, t, n, r, i, o) {
|
|
2182
|
+
const a = t.tagStart === He ? "" : e.source.slice(t.tagStart, t.tagEnd), s = a === "" || a === "!" ? i : jn(a, e.tagHandlers);
|
|
2162
2183
|
return {
|
|
2163
2184
|
tagName: s,
|
|
2164
|
-
tag:
|
|
2185
|
+
tag: qi(e, n, r, s, o)
|
|
2165
2186
|
};
|
|
2166
2187
|
}
|
|
2167
|
-
function
|
|
2188
|
+
function zn(e) {
|
|
2168
2189
|
return e.nodeKind === "mapping";
|
|
2169
2190
|
}
|
|
2170
|
-
function
|
|
2191
|
+
function Tn(e, t, n, r) {
|
|
2171
2192
|
for (const i of r.keys(n)) {
|
|
2172
|
-
if (e.maxTotalMergeKeys !== -1 && ++e.totalMergeKeys > e.maxTotalMergeKeys &&
|
|
2193
|
+
if (e.maxTotalMergeKeys !== -1 && ++e.totalMergeKeys > e.maxTotalMergeKeys && oe(e, `merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`), t.tag.has(t.value, i)) continue;
|
|
2173
2194
|
const o = t.tag.addPair(t.value, i, r.get(n, i));
|
|
2174
|
-
o &&
|
|
2195
|
+
o && oe(e, o), (t.overridable ??= /* @__PURE__ */ new Set()).add(i);
|
|
2175
2196
|
}
|
|
2176
2197
|
}
|
|
2177
|
-
function
|
|
2178
|
-
if (e.position = t.keyPosition,
|
|
2179
|
-
else if (r.nodeKind === "sequence" && Array.isArray(n)) for (const i of n)
|
|
2180
|
-
else
|
|
2198
|
+
function Yi(e, t, n, r) {
|
|
2199
|
+
if (e.position = t.keyPosition, zn(r)) Tn(e, t, n, r);
|
|
2200
|
+
else if (r.nodeKind === "sequence" && Array.isArray(n)) for (const i of n) Tn(e, t, i, t.tag);
|
|
2201
|
+
else oe(e, "cannot merge mappings; the provided source object is unacceptable");
|
|
2181
2202
|
}
|
|
2182
|
-
function
|
|
2183
|
-
if (e.position = t.keyPosition, n ===
|
|
2184
|
-
|
|
2203
|
+
function Wi(e, t, n, r, i) {
|
|
2204
|
+
if (e.position = t.keyPosition, n === Qt) {
|
|
2205
|
+
Yi(e, t, r, i);
|
|
2185
2206
|
return;
|
|
2186
2207
|
}
|
|
2187
|
-
!e.json && t.tag.has(t.value, n) && !t.overridable?.has(n) &&
|
|
2208
|
+
!e.json && t.tag.has(t.value, n) && !t.overridable?.has(n) && oe(e, "duplicated mapping key");
|
|
2188
2209
|
const o = t.tag.addPair(t.value, n, r);
|
|
2189
|
-
o &&
|
|
2210
|
+
o && oe(e, o), t.overridable?.delete(n);
|
|
2190
2211
|
}
|
|
2191
|
-
function
|
|
2212
|
+
function wt(e, t, n) {
|
|
2192
2213
|
const r = e.frames[e.frames.length - 1];
|
|
2193
2214
|
if (r.kind === "document")
|
|
2194
2215
|
r.value = t, r.hasValue = !0;
|
|
2195
2216
|
else if (r.kind === "sequence") {
|
|
2196
|
-
r.merge && (
|
|
2217
|
+
r.merge && (zn(n) || oe(e, "cannot merge mappings; the provided source object is unacceptable"));
|
|
2197
2218
|
const i = r.tag.addItem(r.value, t, r.index++);
|
|
2198
|
-
i &&
|
|
2219
|
+
i && oe(e, i);
|
|
2199
2220
|
} else if (r.hasKey) {
|
|
2200
2221
|
const i = r.key;
|
|
2201
|
-
r.key = void 0, r.hasKey = !1,
|
|
2222
|
+
r.key = void 0, r.hasKey = !1, Wi(e, r, i, t, n);
|
|
2202
2223
|
} else
|
|
2203
2224
|
r.key = t, r.keyPosition = e.position, r.hasKey = !0;
|
|
2204
2225
|
}
|
|
2205
|
-
function
|
|
2206
|
-
if (t.anchorStart !==
|
|
2226
|
+
function Nt(e, t, n, r, i) {
|
|
2227
|
+
if (t.anchorStart !== He) {
|
|
2207
2228
|
const o = {
|
|
2208
2229
|
value: n,
|
|
2209
2230
|
tag: r,
|
|
@@ -2213,9 +2234,9 @@ function wt(e, t, n, r, i) {
|
|
|
2213
2234
|
}
|
|
2214
2235
|
return null;
|
|
2215
2236
|
}
|
|
2216
|
-
function
|
|
2237
|
+
function ji(e, t) {
|
|
2217
2238
|
const n = {
|
|
2218
|
-
...
|
|
2239
|
+
...tn,
|
|
2219
2240
|
...t,
|
|
2220
2241
|
events: e,
|
|
2221
2242
|
documents: [],
|
|
@@ -2229,7 +2250,7 @@ function Ki(e, t) {
|
|
|
2229
2250
|
};
|
|
2230
2251
|
for (; n.eventIndex < n.events.length; ) {
|
|
2231
2252
|
const r = n.events[n.eventIndex++];
|
|
2232
|
-
switch (n.position =
|
|
2253
|
+
switch (n.position = Ki(r), r.type) {
|
|
2233
2254
|
case 1:
|
|
2234
2255
|
n.anchors = /* @__PURE__ */ new Map(), n.aliasCount = 0, n.tagHandlers = /* @__PURE__ */ Object.create(null);
|
|
2235
2256
|
for (const i of r.directives) i.kind === "tag" && (n.tagHandlers[i.handle] = i.prefix);
|
|
@@ -2241,12 +2262,12 @@ function Ki(e, t) {
|
|
|
2241
2262
|
});
|
|
2242
2263
|
break;
|
|
2243
2264
|
case 4: {
|
|
2244
|
-
const { value: i, tag: o } =
|
|
2245
|
-
|
|
2265
|
+
const { value: i, tag: o } = Gi(n, r);
|
|
2266
|
+
Nt(n, r, i, o, !0), wt(n, i, o);
|
|
2246
2267
|
break;
|
|
2247
2268
|
}
|
|
2248
2269
|
case 2: {
|
|
2249
|
-
const i =
|
|
2270
|
+
const i = Cn(n, r, n.schema.exact.sequence, n.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence"), o = i.tag.create(i.tagName), a = Nt(n, r, o, i.tag, i.tag.carrierIsResult), s = n.frames[n.frames.length - 1], l = s !== void 0 && s.kind === "mapping" && s.hasKey && s.key === Qt;
|
|
2250
2271
|
n.frames.push({
|
|
2251
2272
|
kind: "sequence",
|
|
2252
2273
|
position: n.position,
|
|
@@ -2259,7 +2280,7 @@ function Ki(e, t) {
|
|
|
2259
2280
|
break;
|
|
2260
2281
|
}
|
|
2261
2282
|
case 3: {
|
|
2262
|
-
const i =
|
|
2283
|
+
const i = Cn(n, r, n.schema.exact.mapping, n.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping"), o = i.tag.create(i.tagName), a = Nt(n, r, o, i.tag, i.tag.carrierIsResult);
|
|
2263
2284
|
n.frames.push({
|
|
2264
2285
|
kind: "mapping",
|
|
2265
2286
|
position: n.position,
|
|
@@ -2274,17 +2295,17 @@ function Ki(e, t) {
|
|
|
2274
2295
|
break;
|
|
2275
2296
|
}
|
|
2276
2297
|
case 5: {
|
|
2277
|
-
n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases &&
|
|
2298
|
+
n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases && oe(n, `aliases exceeded maxAliases (${n.maxAliases})`);
|
|
2278
2299
|
const i = n.source.slice(r.anchorStart, r.anchorEnd), o = n.anchors.get(i);
|
|
2279
|
-
o ||
|
|
2300
|
+
o || oe(n, `unidentified alias "${i}"`), o.isValueFinal || oe(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), wt(n, o.value, o.tag);
|
|
2280
2301
|
break;
|
|
2281
2302
|
}
|
|
2282
2303
|
case 6: {
|
|
2283
2304
|
const i = n.frames.pop();
|
|
2284
|
-
if (i.kind === "document") n.documents.push(i.value);
|
|
2305
|
+
if (i.kind === "mapping" && i.hasKey && (n.position = i.keyPosition, oe(n, "incomplete mapping pair in event stream")), i.kind === "document") n.documents.push(i.value);
|
|
2285
2306
|
else {
|
|
2286
|
-
const o = i.tag.carrierIsResult ? i.value :
|
|
2287
|
-
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0),
|
|
2307
|
+
const o = i.tag.carrierIsResult ? i.value : Xn(n, i.position, i.tag, i.value);
|
|
2308
|
+
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0), wt(n, o, i.tag);
|
|
2288
2309
|
}
|
|
2289
2310
|
break;
|
|
2290
2311
|
}
|
|
@@ -2292,11 +2313,11 @@ function Ki(e, t) {
|
|
|
2292
2313
|
}
|
|
2293
2314
|
return n.documents;
|
|
2294
2315
|
}
|
|
2295
|
-
var
|
|
2316
|
+
var B = -1, Qn = Object.prototype.hasOwnProperty, Ue = 1, Ft = 2, Zn = 3, ut = 4, Vi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Xi = /[,\[\]{}]/, Jn = /^(?:!|!!|![0-9A-Za-z-]+!)$/, Ht = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, er = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, zi = new RegExp(`^(?:${Ht})*$`), Qi = new RegExp(`^(?:${er})+$`), Zi = new RegExp(`^(?:!(?:${Ht})*|${er}(?:${Ht})*)$`), nn = {
|
|
2296
2317
|
filename: "",
|
|
2297
2318
|
maxDepth: 100
|
|
2298
2319
|
};
|
|
2299
|
-
function
|
|
2320
|
+
function Ji(e, t, n) {
|
|
2300
2321
|
e.events.push({
|
|
2301
2322
|
type: 1,
|
|
2302
2323
|
explicitStart: t,
|
|
@@ -2304,7 +2325,7 @@ function Xi(e, t, n) {
|
|
|
2304
2325
|
directives: e.directives
|
|
2305
2326
|
});
|
|
2306
2327
|
}
|
|
2307
|
-
function
|
|
2328
|
+
function tr(e, t, n, r, i, o, a) {
|
|
2308
2329
|
e.events.push({
|
|
2309
2330
|
type: 2,
|
|
2310
2331
|
start: t,
|
|
@@ -2315,7 +2336,7 @@ function Jn(e, t, n, r, i, o, a) {
|
|
|
2315
2336
|
style: a
|
|
2316
2337
|
});
|
|
2317
2338
|
}
|
|
2318
|
-
function
|
|
2339
|
+
function Mt(e, t, n, r, i, o, a) {
|
|
2319
2340
|
e.events.push({
|
|
2320
2341
|
type: 3,
|
|
2321
2342
|
start: t,
|
|
@@ -2326,14 +2347,14 @@ function Ht(e, t, n, r, i, o, a) {
|
|
|
2326
2347
|
style: a
|
|
2327
2348
|
});
|
|
2328
2349
|
}
|
|
2329
|
-
function
|
|
2350
|
+
function vn(e, t) {
|
|
2330
2351
|
e.events.splice(t.eventsLength, 0, {
|
|
2331
2352
|
type: 3,
|
|
2332
2353
|
start: t.position,
|
|
2333
|
-
anchorStart:
|
|
2334
|
-
anchorEnd:
|
|
2335
|
-
tagStart:
|
|
2336
|
-
tagEnd:
|
|
2354
|
+
anchorStart: B,
|
|
2355
|
+
anchorEnd: B,
|
|
2356
|
+
tagStart: B,
|
|
2357
|
+
tagEnd: B,
|
|
2337
2358
|
style: 2
|
|
2338
2359
|
});
|
|
2339
2360
|
}
|
|
@@ -2352,25 +2373,25 @@ function qe(e, t, n, r, i, o, a, s, l = 1, u = -1, c = !1) {
|
|
|
2352
2373
|
fast: c
|
|
2353
2374
|
});
|
|
2354
2375
|
}
|
|
2355
|
-
function
|
|
2376
|
+
function eo(e, t, n) {
|
|
2356
2377
|
e.events.push({
|
|
2357
2378
|
type: 5,
|
|
2358
2379
|
anchorStart: t,
|
|
2359
2380
|
anchorEnd: n
|
|
2360
2381
|
});
|
|
2361
2382
|
}
|
|
2362
|
-
function
|
|
2383
|
+
function Me(e) {
|
|
2363
2384
|
e.events.push({ type: 6 });
|
|
2364
2385
|
}
|
|
2365
2386
|
function re(e) {
|
|
2366
|
-
qe(e,
|
|
2387
|
+
qe(e, B, B, B, B, B, B, 1);
|
|
2367
2388
|
}
|
|
2368
|
-
function
|
|
2389
|
+
function bn() {
|
|
2369
2390
|
return {
|
|
2370
|
-
anchorStart:
|
|
2371
|
-
anchorEnd:
|
|
2372
|
-
tagStart:
|
|
2373
|
-
tagEnd:
|
|
2391
|
+
anchorStart: B,
|
|
2392
|
+
anchorEnd: B,
|
|
2393
|
+
tagStart: B,
|
|
2394
|
+
tagEnd: B
|
|
2374
2395
|
};
|
|
2375
2396
|
}
|
|
2376
2397
|
function je(e) {
|
|
@@ -2383,59 +2404,59 @@ function je(e) {
|
|
|
2383
2404
|
eventsLength: e.events.length
|
|
2384
2405
|
};
|
|
2385
2406
|
}
|
|
2386
|
-
function
|
|
2407
|
+
function Be(e, t) {
|
|
2387
2408
|
e.position = t.position, e.line = t.line, e.lineStart = t.lineStart, e.lineIndent = t.lineIndent, e.firstTabInLine = t.firstTabInLine, e.events.length = t.eventsLength;
|
|
2388
2409
|
}
|
|
2389
|
-
function
|
|
2390
|
-
|
|
2410
|
+
function _(e, t) {
|
|
2411
|
+
yt(e.input.slice(0, e.length), e.position, t, e.filename);
|
|
2391
2412
|
}
|
|
2392
|
-
function
|
|
2413
|
+
function Z(e) {
|
|
2393
2414
|
return e === 10 || e === 13;
|
|
2394
2415
|
}
|
|
2395
|
-
function
|
|
2416
|
+
function ke(e) {
|
|
2396
2417
|
return e === 9 || e === 32;
|
|
2397
2418
|
}
|
|
2398
2419
|
function pe(e) {
|
|
2399
|
-
return
|
|
2420
|
+
return ke(e) || Z(e);
|
|
2400
2421
|
}
|
|
2401
|
-
function
|
|
2422
|
+
function Ee(e) {
|
|
2402
2423
|
return e === 0 || pe(e);
|
|
2403
2424
|
}
|
|
2404
|
-
function
|
|
2425
|
+
function Le(e) {
|
|
2405
2426
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2406
2427
|
}
|
|
2407
|
-
function
|
|
2428
|
+
function to(e) {
|
|
2408
2429
|
return e >= 48 && e <= 57 ? e - 48 : -1;
|
|
2409
2430
|
}
|
|
2410
|
-
function
|
|
2431
|
+
function no(e) {
|
|
2411
2432
|
if (e >= 48 && e <= 57) return e - 48;
|
|
2412
2433
|
const t = e | 32;
|
|
2413
2434
|
return t >= 97 && t <= 102 ? t - 97 + 10 : -1;
|
|
2414
2435
|
}
|
|
2415
|
-
function
|
|
2436
|
+
function ro(e) {
|
|
2416
2437
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
2417
2438
|
}
|
|
2418
|
-
function
|
|
2439
|
+
function io(e) {
|
|
2419
2440
|
return e === 48 || e === 97 || e === 98 || e === 116 || e === 9 || e === 110 || e === 118 || e === 102 || e === 114 || e === 101 || e === 32 || e === 34 || e === 47 || e === 92 || e === 78 || e === 95 || e === 76 || e === 80;
|
|
2420
2441
|
}
|
|
2421
|
-
function
|
|
2442
|
+
function ft(e) {
|
|
2422
2443
|
e.input.charCodeAt(e.position) === 10 ? e.position++ : (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++), e.line++, e.lineStart = e.position, e.lineIndent = 0, e.firstTabInLine = -1;
|
|
2423
2444
|
}
|
|
2424
2445
|
function ie(e, t) {
|
|
2425
2446
|
let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || pe(e.input.charCodeAt(e.position - 1));
|
|
2426
2447
|
for (; r !== 0; ) {
|
|
2427
|
-
for (;
|
|
2448
|
+
for (; ke(r); )
|
|
2428
2449
|
i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2429
2450
|
if (t && i && r === 35) do
|
|
2430
2451
|
r = e.input.charCodeAt(++e.position);
|
|
2431
|
-
while (!
|
|
2432
|
-
if (!
|
|
2433
|
-
for (
|
|
2452
|
+
while (!Z(r) && r !== 0);
|
|
2453
|
+
if (!Z(r)) break;
|
|
2454
|
+
for (ft(e), n++, i = !0, r = e.input.charCodeAt(e.position); r === 32; )
|
|
2434
2455
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
2435
2456
|
}
|
|
2436
2457
|
return n;
|
|
2437
2458
|
}
|
|
2438
|
-
function
|
|
2459
|
+
function Ne(e, t = e.position) {
|
|
2439
2460
|
const n = e.input.charCodeAt(t);
|
|
2440
2461
|
if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) {
|
|
2441
2462
|
const r = e.input.charCodeAt(t + 3);
|
|
@@ -2443,48 +2464,48 @@ function ve(e, t = e.position) {
|
|
|
2443
2464
|
}
|
|
2444
2465
|
return !1;
|
|
2445
2466
|
}
|
|
2446
|
-
function
|
|
2467
|
+
function Rn(e) {
|
|
2447
2468
|
let t = e.input.charCodeAt(e.position);
|
|
2448
|
-
for (; t !== 0 && !
|
|
2469
|
+
for (; t !== 0 && !Z(t); ) t = e.input.charCodeAt(++e.position);
|
|
2449
2470
|
}
|
|
2450
|
-
function
|
|
2451
|
-
|
|
2471
|
+
function nr(e, t, n) {
|
|
2472
|
+
Vi.test(e.input.slice(t, n)) && _(e, "the stream contains non-printable characters");
|
|
2452
2473
|
}
|
|
2453
|
-
function
|
|
2474
|
+
function oo(e, t, n) {
|
|
2454
2475
|
if (e.input.charCodeAt(e.position) !== 33) return !1;
|
|
2455
|
-
t.tagStart !==
|
|
2476
|
+
t.tagStart !== B && _(e, "duplication of a tag property");
|
|
2456
2477
|
const r = e.position;
|
|
2457
2478
|
let i = !1, o = !1, a = "!", s = e.input.charCodeAt(++e.position);
|
|
2458
2479
|
s === 60 ? (i = !0, s = e.input.charCodeAt(++e.position)) : s === 33 && (o = !0, a = "!!", s = e.input.charCodeAt(++e.position));
|
|
2459
2480
|
let l = e.position, u;
|
|
2460
2481
|
if (i) {
|
|
2461
2482
|
for (; s !== 0 && s !== 62; ) s = e.input.charCodeAt(++e.position);
|
|
2462
|
-
s !== 62 &&
|
|
2483
|
+
s !== 62 && _(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(l, e.position), e.position++;
|
|
2463
2484
|
} else {
|
|
2464
|
-
for (; s !== 0 && !pe(s) && !(n &&
|
|
2465
|
-
s === 33 && (o ?
|
|
2466
|
-
u = e.input.slice(l, e.position),
|
|
2485
|
+
for (; s !== 0 && !pe(s) && !(n && Le(s)); )
|
|
2486
|
+
s === 33 && (o ? _(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(l - 1, e.position + 1), Jn.test(a) || _(e, "named tag handle cannot contain such characters"), o = !0, l = e.position + 1)), s = e.input.charCodeAt(++e.position);
|
|
2487
|
+
u = e.input.slice(l, e.position), Xi.test(u) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
2467
2488
|
}
|
|
2468
|
-
return u && !(i ?
|
|
2489
|
+
return u && !(i ? zi.test(u) : Qi.test(u)) && _(e, `tag name cannot contain such characters: ${u}`), !i && a !== "!" && a !== "!!" && !Qn.call(e.tagHandlers, a) && _(e, `undeclared tag handle "${a}"`), t.tagStart = r, t.tagEnd = e.position, !0;
|
|
2469
2490
|
}
|
|
2470
|
-
function
|
|
2491
|
+
function ao(e, t) {
|
|
2471
2492
|
if (e.input.charCodeAt(e.position) !== 38) return !1;
|
|
2472
|
-
t.anchorStart !==
|
|
2493
|
+
t.anchorStart !== B && _(e, "duplication of an anchor property"), e.position++;
|
|
2473
2494
|
const n = e.position;
|
|
2474
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) &&
|
|
2475
|
-
return e.position === n &&
|
|
2495
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Le(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2496
|
+
return e.position === n && _(e, "name of an anchor node must contain at least one character"), t.anchorStart = n, t.anchorEnd = e.position, !0;
|
|
2476
2497
|
}
|
|
2477
|
-
function
|
|
2498
|
+
function so(e, t) {
|
|
2478
2499
|
if (e.input.charCodeAt(e.position) !== 42) return !1;
|
|
2479
|
-
(t.anchorStart !==
|
|
2500
|
+
(t.anchorStart !== B || t.tagStart !== B) && _(e, "alias node should not have any properties"), e.position++;
|
|
2480
2501
|
const n = e.position;
|
|
2481
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) &&
|
|
2482
|
-
return e.position === n &&
|
|
2502
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Le(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2503
|
+
return e.position === n && _(e, "name of an alias node must contain at least one character"), eo(e, n, e.position), !0;
|
|
2483
2504
|
}
|
|
2484
|
-
function
|
|
2485
|
-
ie(e, !1), e.lineIndent < t &&
|
|
2505
|
+
function Bt(e, t) {
|
|
2506
|
+
ie(e, !1), e.lineIndent < t && _(e, "deficient indentation");
|
|
2486
2507
|
}
|
|
2487
|
-
function
|
|
2508
|
+
function lo(e, t, n) {
|
|
2488
2509
|
if (e.input.charCodeAt(e.position) !== 39) return !1;
|
|
2489
2510
|
e.position++;
|
|
2490
2511
|
const r = e.position;
|
|
@@ -2499,11 +2520,11 @@ function io(e, t, n) {
|
|
|
2499
2520
|
const a = e.position;
|
|
2500
2521
|
return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2, 1, -1, i), !0;
|
|
2501
2522
|
}
|
|
2502
|
-
|
|
2523
|
+
Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart && Ne(e) ? _(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2503
2524
|
}
|
|
2504
|
-
|
|
2525
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
2505
2526
|
}
|
|
2506
|
-
function
|
|
2527
|
+
function co(e, t, n) {
|
|
2507
2528
|
if (e.input.charCodeAt(e.position) !== 34) return !1;
|
|
2508
2529
|
e.position++;
|
|
2509
2530
|
const r = e.position;
|
|
@@ -2517,225 +2538,223 @@ function oo(e, t, n) {
|
|
|
2517
2538
|
if (o === 92) {
|
|
2518
2539
|
i = !1;
|
|
2519
2540
|
const a = e.input.charCodeAt(++e.position);
|
|
2520
|
-
if (
|
|
2521
|
-
else if (
|
|
2541
|
+
if (Z(a)) Bt(e, t);
|
|
2542
|
+
else if (io(a)) e.position++;
|
|
2522
2543
|
else {
|
|
2523
|
-
let s =
|
|
2524
|
-
for (s === 0 &&
|
|
2525
|
-
e.position++,
|
|
2544
|
+
let s = ro(a);
|
|
2545
|
+
for (s === 0 && _(e, "unknown escape sequence"); s-- > 0; )
|
|
2546
|
+
e.position++, no(e.input.charCodeAt(e.position)) < 0 && _(e, "expected hexadecimal character");
|
|
2526
2547
|
e.position++;
|
|
2527
2548
|
}
|
|
2528
|
-
} else
|
|
2549
|
+
} else Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart && Ne(e) ? _(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2529
2550
|
}
|
|
2530
|
-
|
|
2551
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
2531
2552
|
}
|
|
2532
|
-
function
|
|
2553
|
+
function uo(e, t, n) {
|
|
2533
2554
|
const r = e.input.charCodeAt(e.position);
|
|
2534
2555
|
let i = 1, o = -1, a = !1;
|
|
2535
2556
|
if (r !== 124 && r !== 62) return !1;
|
|
2536
2557
|
const s = r === 124 ? 4 : 5;
|
|
2537
2558
|
for (e.position++; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2538
|
-
const C = e.input.charCodeAt(e.position), E =
|
|
2559
|
+
const C = e.input.charCodeAt(e.position), E = to(C);
|
|
2539
2560
|
if (C === 43 || C === 45)
|
|
2540
|
-
i !== 1 &&
|
|
2561
|
+
i !== 1 && _(e, "repeat of a chomping mode identifier"), i = C === 43 ? 3 : 2, e.position++;
|
|
2541
2562
|
else if (E >= 0)
|
|
2542
|
-
E === 0 &&
|
|
2563
|
+
E === 0 && _(e, "bad explicit indentation width of a block scalar; it cannot be less than one"), a && _(e, "repeat of an indentation width identifier"), o = t + E - 1, a = !0, e.position++;
|
|
2543
2564
|
else break;
|
|
2544
2565
|
}
|
|
2545
2566
|
let l = !1;
|
|
2546
|
-
for (;
|
|
2567
|
+
for (; ke(e.input.charCodeAt(e.position)); )
|
|
2547
2568
|
l = !0, e.position++;
|
|
2548
|
-
l && e.input.charCodeAt(e.position) === 35 &&
|
|
2569
|
+
l && e.input.charCodeAt(e.position) === 35 && Rn(e), Z(e.input.charCodeAt(e.position)) ? ft(e) : e.input.charCodeAt(e.position) !== 0 && _(e, "a line break is expected");
|
|
2549
2570
|
let u = a ? o : -1, c = 0;
|
|
2550
|
-
const
|
|
2551
|
-
let
|
|
2571
|
+
const S = e.position;
|
|
2572
|
+
let m = e.position;
|
|
2552
2573
|
for (; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2553
2574
|
const C = e.position;
|
|
2554
2575
|
let E = 0;
|
|
2555
2576
|
for (; e.input.charCodeAt(C + E) === 32; ) E++;
|
|
2556
|
-
const
|
|
2557
|
-
if (
|
|
2558
|
-
u >= 0 ? E > u && (
|
|
2577
|
+
const I = e.input.charCodeAt(C + E);
|
|
2578
|
+
if (I === 0) {
|
|
2579
|
+
u >= 0 ? E > u && (m = C + E) : E > 0 && (m = C + E);
|
|
2559
2580
|
break;
|
|
2560
2581
|
}
|
|
2561
|
-
if (C === e.lineStart &&
|
|
2562
|
-
if (!a && u === -1 &&
|
|
2582
|
+
if (C === e.lineStart && Ne(e, C)) break;
|
|
2583
|
+
if (!a && u === -1 && Z(I) && (c = Math.max(c, E)), !a && u === -1 && !Z(I) && (I === 9 && E < t && (e.position = C + E, _(e, "tab characters must not be used in indentation")), E < c && (e.position = C + E, _(e, "bad indentation of a mapping entry"))), u === -1 && I !== 0 && !Z(I) && E < t) {
|
|
2563
2584
|
e.lineIndent = E, e.position = C + E;
|
|
2564
2585
|
break;
|
|
2565
2586
|
}
|
|
2566
|
-
!a &&
|
|
2567
|
-
const
|
|
2568
|
-
if (
|
|
2587
|
+
!a && I !== 0 && !Z(I) && u === -1 && (u = E);
|
|
2588
|
+
const M = u === -1 ? t + 1 : u;
|
|
2589
|
+
if (I !== 0 && !Z(I) && E < M) {
|
|
2569
2590
|
e.lineIndent = E, e.position = C + E;
|
|
2570
2591
|
break;
|
|
2571
2592
|
}
|
|
2572
|
-
|
|
2593
|
+
Rn(e), m = e.position, Z(e.input.charCodeAt(e.position)) && (ft(e), m = e.position);
|
|
2573
2594
|
}
|
|
2574
|
-
return
|
|
2595
|
+
return nr(e, S, m), qe(e, S, m, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, s, i, u), !0;
|
|
2575
2596
|
}
|
|
2576
|
-
function
|
|
2577
|
-
const n = e.input.charCodeAt(e.position), r = t ===
|
|
2578
|
-
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r &&
|
|
2597
|
+
function fo(e, t) {
|
|
2598
|
+
const n = e.input.charCodeAt(e.position), r = t === Ue;
|
|
2599
|
+
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r && Le(n)) return !1;
|
|
2579
2600
|
if (n === 63 || n === 45) {
|
|
2580
2601
|
const i = e.input.charCodeAt(e.position + 1);
|
|
2581
|
-
if (
|
|
2602
|
+
if (Ee(i) || r && Le(i)) return !1;
|
|
2582
2603
|
}
|
|
2583
2604
|
return !0;
|
|
2584
2605
|
}
|
|
2585
|
-
function
|
|
2586
|
-
if (!
|
|
2606
|
+
function po(e, t, n, r) {
|
|
2607
|
+
if (!fo(e, n)) return !1;
|
|
2587
2608
|
const i = e.position;
|
|
2588
2609
|
let o = e.position, a = e.input.charCodeAt(e.position);
|
|
2589
|
-
const s = n ===
|
|
2610
|
+
const s = n === Ue;
|
|
2590
2611
|
let l = !1;
|
|
2591
|
-
for (; a !== 0 && !(e.position === e.lineStart &&
|
|
2612
|
+
for (; a !== 0 && !(e.position === e.lineStart && Ne(e)); ) {
|
|
2592
2613
|
if (a === 58) {
|
|
2593
2614
|
const u = e.input.charCodeAt(e.position + 1);
|
|
2594
|
-
if (
|
|
2615
|
+
if (Ee(u) || s && Le(u)) break;
|
|
2595
2616
|
} else if (a === 35) {
|
|
2596
2617
|
if (pe(e.input.charCodeAt(e.position - 1))) break;
|
|
2597
2618
|
} else {
|
|
2598
|
-
if (s &&
|
|
2599
|
-
if (
|
|
2600
|
-
const u = e.position, c = e.line,
|
|
2619
|
+
if (s && Le(a)) break;
|
|
2620
|
+
if (Z(a)) {
|
|
2621
|
+
const u = e.position, c = e.line, S = e.lineStart, m = e.lineIndent;
|
|
2601
2622
|
if (ie(e, !1), e.lineIndent >= t) {
|
|
2602
2623
|
l = !0, a = e.input.charCodeAt(e.position);
|
|
2603
2624
|
continue;
|
|
2604
2625
|
}
|
|
2605
|
-
e.position = u, e.line = c, e.lineStart =
|
|
2626
|
+
e.position = u, e.line = c, e.lineStart = S, e.lineIndent = m;
|
|
2606
2627
|
break;
|
|
2607
2628
|
}
|
|
2608
2629
|
}
|
|
2609
|
-
|
|
2630
|
+
ke(a) || (o = e.position + 1), a = e.input.charCodeAt(++e.position);
|
|
2610
2631
|
}
|
|
2611
|
-
return o === i ? !1 : (
|
|
2632
|
+
return o === i ? !1 : (nr(e, i, o), qe(e, i, o, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1, 1, -1, !l), !0);
|
|
2612
2633
|
}
|
|
2613
2634
|
function Ge(e, t) {
|
|
2614
2635
|
const n = e.line;
|
|
2615
|
-
ie(e, !0), (e.line > n && e.lineIndent < t || e.firstTabInLine !== -1 && e.lineIndent < t) &&
|
|
2636
|
+
ie(e, !0), (e.line > n && e.lineIndent < t || e.firstTabInLine !== -1 && e.lineIndent < t) && _(e, "deficient indentation");
|
|
2616
2637
|
}
|
|
2617
|
-
function
|
|
2638
|
+
function ho(e, t, n) {
|
|
2618
2639
|
const r = e.input.charCodeAt(e.position), i = r === 123, o = e.position;
|
|
2619
2640
|
let a = !0;
|
|
2620
2641
|
if (r !== 91 && r !== 123) return !1;
|
|
2621
2642
|
const s = i ? 125 : 93;
|
|
2622
|
-
for (i ?
|
|
2643
|
+
for (i ? Mt(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2) : tr(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2), e.position++; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2623
2644
|
Ge(e, t);
|
|
2624
2645
|
let l = e.input.charCodeAt(e.position);
|
|
2625
2646
|
if (l === s)
|
|
2626
|
-
return e.position++,
|
|
2627
|
-
a ? l === 44 &&
|
|
2647
|
+
return e.position++, Me(e), !0;
|
|
2648
|
+
a ? l === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries");
|
|
2628
2649
|
let u = !1, c = !1;
|
|
2629
2650
|
l === 63 && pe(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, Ge(e, t));
|
|
2630
|
-
const
|
|
2631
|
-
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line ===
|
|
2651
|
+
const S = e.line, m = je(e), C = $e(e, t, Ue, !1, !0);
|
|
2652
|
+
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === S) && l === 58 ? (u = !0, e.position++, Ge(e, t), i || vn(e, m), C || re(e), $e(e, t, Ue, !1, !0) || re(e), Ge(e, t), i || Me(e)) : i && u ? (C || re(e), re(e)) : i ? re(e) : u && (vn(e, m), C || re(e), re(e), Me(e)), l = e.input.charCodeAt(e.position), l === 44 ? (a = !0, e.position++) : a = !1;
|
|
2632
2653
|
}
|
|
2633
|
-
|
|
2654
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
2634
2655
|
}
|
|
2635
|
-
function
|
|
2636
|
-
if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !
|
|
2637
|
-
for (
|
|
2638
|
-
e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2656
|
+
function _n(e, t, n) {
|
|
2657
|
+
if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !Ee(e.input.charCodeAt(e.position + 1))) return !1;
|
|
2658
|
+
for (tr(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 1); e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)); ) {
|
|
2659
|
+
e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation"));
|
|
2639
2660
|
const r = e.line;
|
|
2640
2661
|
e.position++;
|
|
2641
2662
|
const i = ie(e, !0) > 0;
|
|
2642
|
-
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 &&
|
|
2643
|
-
e.lineIndent > t &&
|
|
2663
|
+
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) : $e(e, t, Zn, !1, !0), ie(e, !0), e.lineIndent < t || e.position >= e.length) break;
|
|
2664
|
+
e.lineIndent > t && _(e, "bad indentation of a sequence entry"), e.line === r && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry");
|
|
2644
2665
|
}
|
|
2645
|
-
return
|
|
2666
|
+
return Me(e), !0;
|
|
2646
2667
|
}
|
|
2647
|
-
function
|
|
2668
|
+
function $t(e, t, n, r) {
|
|
2648
2669
|
let i = !1, o = !1, a = !1, s = !1;
|
|
2649
2670
|
if (e.firstTabInLine !== -1) return !1;
|
|
2650
2671
|
let l = e.input.charCodeAt(e.position);
|
|
2651
2672
|
for (; l !== 0; ) {
|
|
2652
|
-
!i && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2673
|
+
!i && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation"));
|
|
2653
2674
|
const u = e.input.charCodeAt(e.position + 1), c = e.line;
|
|
2654
|
-
if ((l === 63 || l === 58) &&
|
|
2655
|
-
a || (
|
|
2675
|
+
if ((l === 63 || l === 58) && Ee(u))
|
|
2676
|
+
a || (Mt(e, e.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0), l === 63 ? (i && re(e), o = !0, i = !0) : (i || (re(e), o = !0), i = !1), e.position += 1, s = !0;
|
|
2656
2677
|
else {
|
|
2657
2678
|
i && (re(e), i = !1);
|
|
2658
|
-
const
|
|
2659
|
-
if (
|
|
2679
|
+
const S = je(e);
|
|
2680
|
+
if (!$e(e, n, Ft, !1, !0)) break;
|
|
2660
2681
|
if (e.line === c) {
|
|
2661
|
-
for (l = e.input.charCodeAt(e.position);
|
|
2682
|
+
for (l = e.input.charCodeAt(e.position); ke(l); ) l = e.input.charCodeAt(++e.position);
|
|
2662
2683
|
if (l === 58) {
|
|
2663
|
-
if (l = e.input.charCodeAt(++e.position),
|
|
2664
|
-
for (
|
|
2684
|
+
if (l = e.input.charCodeAt(++e.position), Ee(l) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), !a) {
|
|
2685
|
+
for (Be(e, S), Mt(e, S.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0, $e(e, n, Ft, !1, !0), l = e.input.charCodeAt(e.position); ke(l); ) l = e.input.charCodeAt(++e.position);
|
|
2665
2686
|
e.position++;
|
|
2666
2687
|
}
|
|
2667
2688
|
o = !0, i = !1, s = !1;
|
|
2668
|
-
} else if (o)
|
|
2689
|
+
} else if (o) _(e, "expected ':' after a mapping key");
|
|
2669
2690
|
else
|
|
2670
|
-
return r.anchorStart !==
|
|
2671
|
-
} else if (o)
|
|
2691
|
+
return r.anchorStart !== B || r.tagStart !== B ? (Be(e, S), !1) : !0;
|
|
2692
|
+
} else if (o) _(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2672
2693
|
else
|
|
2673
|
-
return r.anchorStart !==
|
|
2694
|
+
return r.anchorStart !== B || r.tagStart !== B ? (Be(e, S), !1) : !0;
|
|
2674
2695
|
}
|
|
2675
|
-
if (
|
|
2696
|
+
if ($e(e, t, ut, !0, s) && (s = !1), i || s && (re(e), s = !1), ie(e, !0), l = e.input.charCodeAt(e.position), (e.line === c || e.lineIndent > t) && l !== 0) _(e, "bad indentation of a mapping entry");
|
|
2676
2697
|
else if (e.lineIndent < t) break;
|
|
2677
2698
|
}
|
|
2678
|
-
return o ? (i && re(e), a &&
|
|
2699
|
+
return o ? (i && re(e), a && Me(e), !0) : !1;
|
|
2679
2700
|
}
|
|
2680
|
-
function
|
|
2681
|
-
e.depth >= e.maxDepth &&
|
|
2701
|
+
function $e(e, t, n, r, i, o = !0) {
|
|
2702
|
+
e.depth >= e.maxDepth && _(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
|
|
2682
2703
|
let a = 1, s = !1, l = !1, u = null;
|
|
2683
|
-
const c =
|
|
2684
|
-
let
|
|
2685
|
-
const C =
|
|
2686
|
-
if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1),
|
|
2687
|
-
|
|
2688
|
-
if (a === 1) for (; ; ) {
|
|
2689
|
-
const E = e.input.charCodeAt(e.position), w = je(e);
|
|
2704
|
+
const c = bn();
|
|
2705
|
+
let S = n === ut || n === Zn, m = S;
|
|
2706
|
+
const C = S;
|
|
2707
|
+
if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1), a === 1) for (; ; ) {
|
|
2708
|
+
const E = e.input.charCodeAt(e.position), I = je(e);
|
|
2690
2709
|
if (s && a !== 1 && (E === 33 || E === 38)) break;
|
|
2691
|
-
if (s && C && (c.tagStart !==
|
|
2692
|
-
const
|
|
2693
|
-
if (
|
|
2710
|
+
if (s && C && (c.tagStart !== B || c.anchorStart !== B) && (E === 33 || E === 38)) {
|
|
2711
|
+
const M = je(e), N = t + 1;
|
|
2712
|
+
if ($t(e, e.position - e.lineStart, N, c) && e.events[M.eventsLength]?.type === 3)
|
|
2694
2713
|
return e.depth--, !0;
|
|
2695
|
-
|
|
2714
|
+
Be(e, M);
|
|
2696
2715
|
}
|
|
2697
|
-
if (s && (E === 33 && c.tagStart !==
|
|
2698
|
-
u === null && (u =
|
|
2716
|
+
if (s && (E === 33 && c.tagStart !== B || E === 38 && c.anchorStart !== B) || !oo(e, c, n === Ue) && !ao(e, c)) break;
|
|
2717
|
+
u === null && (u = I), ie(e, !0) ? (s = !0, m = C, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1) : m = !1;
|
|
2699
2718
|
}
|
|
2700
|
-
if (
|
|
2701
|
-
const E = n ===
|
|
2702
|
-
if (a === 1) if (
|
|
2719
|
+
if (m && (m = s || i), a === 1 || n === ut) {
|
|
2720
|
+
const E = n === Ue || n === Ft ? t : t + 1, I = e.position - e.lineStart;
|
|
2721
|
+
if (a === 1) if (m && (_n(e, I, c) || $t(e, I, E, c)) || ho(e, E, c)) l = !0;
|
|
2703
2722
|
else {
|
|
2704
|
-
const
|
|
2705
|
-
if (u !== null && o && C && !
|
|
2706
|
-
const N = je(e),
|
|
2707
|
-
|
|
2723
|
+
const M = e.input.charCodeAt(e.position);
|
|
2724
|
+
if (u !== null && o && C && !m && M !== 124 && M !== 62) {
|
|
2725
|
+
const N = je(e), k = u.position - u.lineStart;
|
|
2726
|
+
Be(e, u), $t(e, k, E, bn()) && e.events[N.eventsLength]?.type === 3 ? l = !0 : Be(e, N);
|
|
2708
2727
|
}
|
|
2709
|
-
!l && (
|
|
2728
|
+
!l && (S && uo(e, E, c) || lo(e, E, c) || co(e, E, c) || so(e, c) || po(e, E, n, c)) && (l = !0);
|
|
2710
2729
|
}
|
|
2711
|
-
else a === 0 && (l =
|
|
2730
|
+
else a === 0 && (l = m && _n(e, I, c));
|
|
2712
2731
|
}
|
|
2713
|
-
return
|
|
2732
|
+
return S = S && !l, !l && (c.anchorStart !== B || c.tagStart !== B || S) && (qe(e, B, B, c.anchorStart, c.anchorEnd, c.tagStart, c.tagEnd, 1), l = !0), e.depth--, l || c.anchorStart !== B || c.tagStart !== B;
|
|
2714
2733
|
}
|
|
2715
|
-
function
|
|
2734
|
+
function go(e) {
|
|
2716
2735
|
if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1;
|
|
2717
2736
|
e.position++;
|
|
2718
2737
|
const t = e.position;
|
|
2719
2738
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2720
2739
|
const n = e.input.slice(t, e.position), r = [];
|
|
2721
|
-
for (n.length === 0 &&
|
|
2722
|
-
for (;
|
|
2723
|
-
if (e.input.charCodeAt(e.position) === 35 ||
|
|
2740
|
+
for (n.length === 0 && _(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !Z(e.input.charCodeAt(e.position)); ) {
|
|
2741
|
+
for (; ke(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2742
|
+
if (e.input.charCodeAt(e.position) === 35 || Z(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
|
|
2724
2743
|
const i = e.position;
|
|
2725
2744
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2726
2745
|
r.push(e.input.slice(i, e.position));
|
|
2727
2746
|
}
|
|
2728
|
-
if (
|
|
2729
|
-
e.directives.some((o) => o.kind === "yaml") &&
|
|
2747
|
+
if (Z(e.input.charCodeAt(e.position)) && ft(e), n === "YAML") {
|
|
2748
|
+
e.directives.some((o) => o.kind === "yaml") && _(e, "duplication of %YAML directive"), r.length !== 1 && _(e, "YAML directive accepts exactly one argument");
|
|
2730
2749
|
const i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]);
|
|
2731
|
-
i === null &&
|
|
2750
|
+
i === null && _(e, "ill-formed argument of the YAML directive"), parseInt(i[1], 10) !== 1 && _(e, "unacceptable YAML version of the document"), e.directives.push({
|
|
2732
2751
|
kind: "yaml",
|
|
2733
2752
|
version: r[0]
|
|
2734
2753
|
});
|
|
2735
2754
|
} else if (n === "TAG") {
|
|
2736
|
-
r.length !== 2 &&
|
|
2755
|
+
r.length !== 2 && _(e, "TAG directive accepts exactly two arguments");
|
|
2737
2756
|
const [i, o] = r;
|
|
2738
|
-
|
|
2757
|
+
Jn.test(i) || _(e, "ill-formed tag handle (first argument) of the TAG directive"), Qn.call(e.tagHandlers, i) && _(e, `there is a previously declared suffix for "${i}" tag handle`), Zi.test(o) || _(e, "ill-formed tag prefix (second argument) of the TAG directive"), e.tagHandlers[i] = o, e.directives.push({
|
|
2739
2758
|
kind: "tag",
|
|
2740
2759
|
handle: i,
|
|
2741
2760
|
prefix: o
|
|
@@ -2743,32 +2762,32 @@ function uo(e) {
|
|
|
2743
2762
|
}
|
|
2744
2763
|
return !0;
|
|
2745
2764
|
}
|
|
2746
|
-
function
|
|
2765
|
+
function mo(e) {
|
|
2747
2766
|
e.directives = [], e.tagHandlers = /* @__PURE__ */ Object.create(null);
|
|
2748
2767
|
let t = !1;
|
|
2749
|
-
for (ie(e, !0);
|
|
2768
|
+
for (ie(e, !0); go(e); )
|
|
2750
2769
|
t = !0, ie(e, !0);
|
|
2751
2770
|
let n = !1, r = !1, i = !0;
|
|
2752
|
-
if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 &&
|
|
2771
|
+
if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 && Ee(e.input.charCodeAt(e.position + 3))) {
|
|
2753
2772
|
n = !0;
|
|
2754
2773
|
const s = e.line;
|
|
2755
2774
|
e.position += 3, ie(e, !0), i = e.line > s;
|
|
2756
|
-
} else t &&
|
|
2775
|
+
} else t && _(e, "directives end mark is expected");
|
|
2757
2776
|
const o = e.events.length;
|
|
2758
|
-
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 &&
|
|
2777
|
+
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && Ne(e)) {
|
|
2759
2778
|
e.position += 3, ie(e, !0);
|
|
2760
2779
|
return;
|
|
2761
2780
|
}
|
|
2762
|
-
if (
|
|
2781
|
+
if (Ji(e, n, !1), $e(e, e.lineIndent - 1, ut, !1, i, i) || re(e), ie(e, !0), e.position === e.lineStart && Ne(e) && (r = e.input.charCodeAt(e.position) === 46, r)) {
|
|
2763
2782
|
const s = e.line;
|
|
2764
|
-
e.position += 3, ie(e, !0), e.line === s && e.position < e.length &&
|
|
2783
|
+
e.position += 3, ie(e, !0), e.line === s && e.position < e.length && _(e, "end of the stream or a document separator is expected");
|
|
2765
2784
|
}
|
|
2766
2785
|
const a = e.events[o];
|
|
2767
|
-
a?.type === 1 && (a.explicitEnd = r),
|
|
2786
|
+
a?.type === 1 && (a.explicitEnd = r), Me(e), !r && e.position < e.length && !(e.position === e.lineStart && Ne(e)) && _(e, "end of the stream or a document separator is expected");
|
|
2768
2787
|
}
|
|
2769
|
-
function
|
|
2788
|
+
function Ao(e, t) {
|
|
2770
2789
|
const n = e.length, r = {
|
|
2771
|
-
...
|
|
2790
|
+
...nn,
|
|
2772
2791
|
...t,
|
|
2773
2792
|
input: `${e}\0`,
|
|
2774
2793
|
length: n,
|
|
@@ -2782,42 +2801,42 @@ function po(e, t) {
|
|
|
2782
2801
|
tagHandlers: /* @__PURE__ */ Object.create(null),
|
|
2783
2802
|
events: []
|
|
2784
2803
|
}, i = e.indexOf("\0");
|
|
2785
|
-
for (i !== -1 &&
|
|
2804
|
+
for (i !== -1 && yt(e, i, "null byte is not allowed in input", r.filename), r.input.charCodeAt(r.position) === 65279 && r.position++; r.position < r.length && (ie(r, !0), !(r.position >= r.length)); ) {
|
|
2786
2805
|
const o = r.position;
|
|
2787
|
-
|
|
2806
|
+
mo(r), r.position === o && _(r, "can not read a document");
|
|
2788
2807
|
}
|
|
2789
2808
|
return r.events;
|
|
2790
2809
|
}
|
|
2791
|
-
var
|
|
2792
|
-
...
|
|
2793
|
-
...
|
|
2810
|
+
var yo = {
|
|
2811
|
+
...nn,
|
|
2812
|
+
...tn
|
|
2794
2813
|
};
|
|
2795
|
-
function
|
|
2814
|
+
function So(e, t = {}) {
|
|
2796
2815
|
const n = {
|
|
2797
|
-
...
|
|
2816
|
+
...yo,
|
|
2798
2817
|
...t
|
|
2799
|
-
}, r = String(e), i = Object.keys(
|
|
2800
|
-
return
|
|
2801
|
-
...
|
|
2818
|
+
}, r = String(e), i = Object.keys(nn), o = Object.keys(tn);
|
|
2819
|
+
return ji(Ao(r, Pt(n, i)), {
|
|
2820
|
+
...Pt(n, o),
|
|
2802
2821
|
source: r
|
|
2803
2822
|
});
|
|
2804
2823
|
}
|
|
2805
|
-
function
|
|
2824
|
+
function Eo(e, t, n) {
|
|
2806
2825
|
let r = null;
|
|
2807
2826
|
typeof t == "function" ? r = t : t !== null && typeof t == "object" && (n = t);
|
|
2808
|
-
const i =
|
|
2827
|
+
const i = So(e, n);
|
|
2809
2828
|
if (r === null) return i;
|
|
2810
2829
|
for (const o of i) r(o);
|
|
2811
2830
|
}
|
|
2812
|
-
var
|
|
2831
|
+
var nt = class {
|
|
2813
2832
|
tagged = !1;
|
|
2814
2833
|
flow = !1;
|
|
2815
2834
|
singleQuoted = !1;
|
|
2816
2835
|
doubleQuoted = !1;
|
|
2817
2836
|
literal = !1;
|
|
2818
2837
|
folded = !1;
|
|
2819
|
-
},
|
|
2820
|
-
function
|
|
2838
|
+
}, we = /* @__PURE__ */ Symbol("INVALID");
|
|
2839
|
+
function Co(e) {
|
|
2821
2840
|
const t = new Set([
|
|
2822
2841
|
e.defaultScalarTag,
|
|
2823
2842
|
e.defaultSequenceTag,
|
|
@@ -2838,7 +2857,7 @@ function Ao(e) {
|
|
|
2838
2857
|
}))
|
|
2839
2858
|
];
|
|
2840
2859
|
}
|
|
2841
|
-
function
|
|
2860
|
+
function To(e, t) {
|
|
2842
2861
|
for (let n = 0, r = e.representTypes.length; n < r; n += 1) {
|
|
2843
2862
|
const { tag: i, implicitTag: o } = e.representTypes[n];
|
|
2844
2863
|
if (i.identify && i.identify(t)) {
|
|
@@ -2859,18 +2878,18 @@ function We(e, t) {
|
|
|
2859
2878
|
return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
|
|
2860
2879
|
kind: "alias",
|
|
2861
2880
|
tag: "",
|
|
2862
|
-
style: new
|
|
2881
|
+
style: new nt(),
|
|
2863
2882
|
anchor: c.anchor
|
|
2864
2883
|
};
|
|
2865
2884
|
}
|
|
2866
|
-
const n =
|
|
2885
|
+
const n = To(e, t);
|
|
2867
2886
|
if (!n) {
|
|
2868
|
-
if (t === void 0 || e.skipInvalid) return
|
|
2869
|
-
throw new
|
|
2887
|
+
if (t === void 0 || e.skipInvalid) return we;
|
|
2888
|
+
throw new At(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`);
|
|
2870
2889
|
}
|
|
2871
|
-
const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i :
|
|
2890
|
+
const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i : Vn(i);
|
|
2872
2891
|
if (r.nodeKind === "scalar") {
|
|
2873
|
-
const c = new
|
|
2892
|
+
const c = new nt();
|
|
2874
2893
|
return c.tagged = !o, {
|
|
2875
2894
|
kind: "scalar",
|
|
2876
2895
|
tag: a,
|
|
@@ -2879,22 +2898,22 @@ function We(e, t) {
|
|
|
2879
2898
|
};
|
|
2880
2899
|
}
|
|
2881
2900
|
if (r.nodeKind === "sequence") {
|
|
2882
|
-
const c = r.represent(t),
|
|
2883
|
-
|
|
2884
|
-
const
|
|
2901
|
+
const c = r.represent(t), S = new nt();
|
|
2902
|
+
S.tagged = !o;
|
|
2903
|
+
const m = {
|
|
2885
2904
|
kind: "sequence",
|
|
2886
2905
|
tag: a,
|
|
2887
|
-
style:
|
|
2906
|
+
style: S,
|
|
2888
2907
|
items: []
|
|
2889
2908
|
};
|
|
2890
|
-
e.noRefs || e.refs.set(t,
|
|
2909
|
+
e.noRefs || e.refs.set(t, m);
|
|
2891
2910
|
for (let C = 0, E = c.length; C < E; C += 1) {
|
|
2892
|
-
let
|
|
2893
|
-
|
|
2911
|
+
let I = We(e, c[C]);
|
|
2912
|
+
I === we && c[C] === void 0 && (I = We(e, null)), I !== we && m.items.push(I);
|
|
2894
2913
|
}
|
|
2895
|
-
return
|
|
2914
|
+
return m;
|
|
2896
2915
|
}
|
|
2897
|
-
const s = r.represent(t), l = new
|
|
2916
|
+
const s = r.represent(t), l = new nt();
|
|
2898
2917
|
l.tagged = !o;
|
|
2899
2918
|
const u = {
|
|
2900
2919
|
kind: "mapping",
|
|
@@ -2903,39 +2922,39 @@ function We(e, t) {
|
|
|
2903
2922
|
items: []
|
|
2904
2923
|
};
|
|
2905
2924
|
e.noRefs || e.refs.set(t, u);
|
|
2906
|
-
for (const [c,
|
|
2907
|
-
const
|
|
2908
|
-
if (
|
|
2909
|
-
const C = We(e,
|
|
2910
|
-
C !==
|
|
2911
|
-
key:
|
|
2925
|
+
for (const [c, S] of s) {
|
|
2926
|
+
const m = We(e, c);
|
|
2927
|
+
if (m === we) continue;
|
|
2928
|
+
const C = We(e, S);
|
|
2929
|
+
C !== we && u.items.push({
|
|
2930
|
+
key: m,
|
|
2912
2931
|
value: C
|
|
2913
2932
|
});
|
|
2914
2933
|
}
|
|
2915
2934
|
return u;
|
|
2916
2935
|
}
|
|
2917
|
-
function
|
|
2936
|
+
function vo(e, t, n = {}) {
|
|
2918
2937
|
const r = We({
|
|
2919
|
-
representTypes:
|
|
2938
|
+
representTypes: Co(t),
|
|
2920
2939
|
noRefs: n.noRefs ?? !1,
|
|
2921
2940
|
skipInvalid: n.skipInvalid ?? !1,
|
|
2922
2941
|
refs: /* @__PURE__ */ new Map(),
|
|
2923
2942
|
refCounter: 0
|
|
2924
2943
|
}, e);
|
|
2925
2944
|
return [{
|
|
2926
|
-
contents: r ===
|
|
2945
|
+
contents: r === we ? null : r,
|
|
2927
2946
|
directives: []
|
|
2928
2947
|
}];
|
|
2929
2948
|
}
|
|
2930
|
-
var
|
|
2931
|
-
function
|
|
2949
|
+
var bo = /* @__PURE__ */ Symbol("visit:break"), rr = /* @__PURE__ */ Symbol("visit:skip");
|
|
2950
|
+
function lt(e, t, n) {
|
|
2932
2951
|
const r = t(e, n);
|
|
2933
|
-
if (r ===
|
|
2934
|
-
if (r ===
|
|
2952
|
+
if (r === bo) return !0;
|
|
2953
|
+
if (r === rr) return !1;
|
|
2935
2954
|
const i = n.depth + 1;
|
|
2936
2955
|
switch (e.kind) {
|
|
2937
2956
|
case "sequence":
|
|
2938
|
-
for (const o of e.items) if (
|
|
2957
|
+
for (const o of e.items) if (lt(o, t, {
|
|
2939
2958
|
depth: i,
|
|
2940
2959
|
parent: e,
|
|
2941
2960
|
isKey: !1
|
|
@@ -2943,11 +2962,11 @@ function at(e, t, n) {
|
|
|
2943
2962
|
break;
|
|
2944
2963
|
case "mapping":
|
|
2945
2964
|
for (const { key: o, value: a } of e.items)
|
|
2946
|
-
if (
|
|
2965
|
+
if (lt(o, t, {
|
|
2947
2966
|
depth: i,
|
|
2948
2967
|
parent: e,
|
|
2949
2968
|
isKey: !0
|
|
2950
|
-
}) ||
|
|
2969
|
+
}) || lt(a, t, {
|
|
2951
2970
|
depth: i,
|
|
2952
2971
|
parent: e,
|
|
2953
2972
|
isKey: !1
|
|
@@ -2956,30 +2975,30 @@ function at(e, t, n) {
|
|
|
2956
2975
|
}
|
|
2957
2976
|
return !1;
|
|
2958
2977
|
}
|
|
2959
|
-
function
|
|
2960
|
-
for (const n of e) if (n.contents &&
|
|
2978
|
+
function Ro(e, t) {
|
|
2979
|
+
for (const n of e) if (n.contents && lt(n.contents, t, {
|
|
2961
2980
|
depth: 0,
|
|
2962
2981
|
parent: null,
|
|
2963
2982
|
isKey: !1
|
|
2964
2983
|
})) return;
|
|
2965
2984
|
}
|
|
2966
|
-
var
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
var
|
|
2985
|
+
var rn = 65279, _o = 9, Oe = 10, ir = 13, xo = 32, Io = 33, or = 34, Dt = 35, wo = 37, No = 38, ar = 39, $o = 42, Ut = 44, on = 45, ze = 58, ko = 61, Lo = 62, sr = 63, Oo = 64, Kt = 91, qt = 93, Po = 96, Gt = 123, Fo = 124, Yt = 125, te = {};
|
|
2986
|
+
te[0] = "\\0";
|
|
2987
|
+
te[7] = "\\a";
|
|
2988
|
+
te[8] = "\\b";
|
|
2989
|
+
te[9] = "\\t";
|
|
2990
|
+
te[10] = "\\n";
|
|
2991
|
+
te[11] = "\\v";
|
|
2992
|
+
te[12] = "\\f";
|
|
2993
|
+
te[13] = "\\r";
|
|
2994
|
+
te[27] = "\\e";
|
|
2995
|
+
te[34] = '\\"';
|
|
2996
|
+
te[92] = "\\\\";
|
|
2997
|
+
te[133] = "\\N";
|
|
2998
|
+
te[160] = "\\_";
|
|
2999
|
+
te[8232] = "\\L";
|
|
3000
|
+
te[8233] = "\\P";
|
|
3001
|
+
var an = {
|
|
2983
3002
|
indent: 2,
|
|
2984
3003
|
seqNoIndent: !1,
|
|
2985
3004
|
seqInlineFirst: !0,
|
|
@@ -2993,12 +3012,12 @@ var rn = {
|
|
|
2993
3012
|
forceQuotes: !1,
|
|
2994
3013
|
tagBeforeAnchor: !1
|
|
2995
3014
|
};
|
|
2996
|
-
function
|
|
2997
|
-
return e.style.tagged ? e.tag :
|
|
3015
|
+
function Ho(e) {
|
|
3016
|
+
return e.style.tagged ? e.tag : Vn(e.tag);
|
|
2998
3017
|
}
|
|
2999
|
-
function
|
|
3018
|
+
function Mo(e) {
|
|
3000
3019
|
const t = {
|
|
3001
|
-
...
|
|
3020
|
+
...an,
|
|
3002
3021
|
...e
|
|
3003
3022
|
};
|
|
3004
3023
|
return {
|
|
@@ -3007,11 +3026,11 @@ function Oo(e) {
|
|
|
3007
3026
|
implicitResolvers: t.schema.implicitScalarTags
|
|
3008
3027
|
};
|
|
3009
3028
|
}
|
|
3010
|
-
function
|
|
3029
|
+
function Bo(e) {
|
|
3011
3030
|
const t = e.toString(16).toUpperCase(), n = e <= 255 ? "x" : "u", r = e <= 255 ? 2 : 4;
|
|
3012
3031
|
return `\\${n}${"0".repeat(r - t.length)}${t}`;
|
|
3013
3032
|
}
|
|
3014
|
-
function
|
|
3033
|
+
function xn(e, t) {
|
|
3015
3034
|
const n = " ".repeat(t);
|
|
3016
3035
|
let r = 0, i = "";
|
|
3017
3036
|
const o = e.length;
|
|
@@ -3024,11 +3043,11 @@ function Rn(e, t) {
|
|
|
3024
3043
|
}
|
|
3025
3044
|
return i;
|
|
3026
3045
|
}
|
|
3027
|
-
function
|
|
3046
|
+
function Wt(e, t) {
|
|
3028
3047
|
return `
|
|
3029
3048
|
${" ".repeat(e.indent * t)}`;
|
|
3030
3049
|
}
|
|
3031
|
-
function
|
|
3050
|
+
function Do(e, t) {
|
|
3032
3051
|
const n = e.indent * Math.max(1, t);
|
|
3033
3052
|
return {
|
|
3034
3053
|
indent: n,
|
|
@@ -3036,115 +3055,115 @@ function Fo(e, t) {
|
|
|
3036
3055
|
lineWidth: e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n)
|
|
3037
3056
|
};
|
|
3038
3057
|
}
|
|
3039
|
-
function
|
|
3058
|
+
function In(e, t) {
|
|
3040
3059
|
for (let n = 0, r = e.implicitResolvers.length; n < r; n += 1) {
|
|
3041
3060
|
const i = e.implicitResolvers[n];
|
|
3042
|
-
if (i.resolve(t, !1, i.tagName) !==
|
|
3061
|
+
if (i.resolve(t, !1, i.tagName) !== H) return i.tagName;
|
|
3043
3062
|
}
|
|
3044
3063
|
return e.defaultScalarTagName;
|
|
3045
3064
|
}
|
|
3046
|
-
function
|
|
3047
|
-
return e ===
|
|
3065
|
+
function Ke(e) {
|
|
3066
|
+
return e === xo || e === _o;
|
|
3048
3067
|
}
|
|
3049
|
-
function
|
|
3068
|
+
function Uo(e) {
|
|
3050
3069
|
const t = e.charCodeAt(0);
|
|
3051
|
-
if (t !==
|
|
3070
|
+
if (t !== on && t !== 46 || e.charCodeAt(1) !== t || e.charCodeAt(2) !== t) return !1;
|
|
3052
3071
|
if (e.length === 3) return !0;
|
|
3053
3072
|
const n = e.charCodeAt(3);
|
|
3054
|
-
return
|
|
3073
|
+
return Ke(n) || n === ir || n === Oe;
|
|
3055
3074
|
}
|
|
3056
|
-
function
|
|
3057
|
-
return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !==
|
|
3075
|
+
function Qe(e) {
|
|
3076
|
+
return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== rn || e >= 65536 && e <= 1114111;
|
|
3058
3077
|
}
|
|
3059
|
-
function
|
|
3060
|
-
return
|
|
3078
|
+
function wn(e) {
|
|
3079
|
+
return Qe(e) && e !== rn && e !== ir && e !== Oe;
|
|
3061
3080
|
}
|
|
3062
|
-
function
|
|
3063
|
-
const r =
|
|
3064
|
-
return (n ? r : r && e !==
|
|
3081
|
+
function jt(e, t, n) {
|
|
3082
|
+
const r = wn(e), i = r && !Ke(e);
|
|
3083
|
+
return (n ? r : r && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt) && e !== Dt && !(t === ze && !i) || wn(t) && !Ke(t) && e === Dt || t === ze && i && (n || e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt);
|
|
3065
3084
|
}
|
|
3066
|
-
function
|
|
3067
|
-
return
|
|
3085
|
+
function Ko(e) {
|
|
3086
|
+
return Qe(e) && e !== rn && !Ke(e) && e !== on && e !== sr && e !== ze && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt && e !== Dt && e !== No && e !== $o && e !== Io && e !== Fo && e !== ko && e !== Lo && e !== ar && e !== or && e !== wo && e !== Oo && e !== Po;
|
|
3068
3087
|
}
|
|
3069
|
-
function
|
|
3070
|
-
const n =
|
|
3071
|
-
if (
|
|
3072
|
-
if (e.length > 1 && (n ===
|
|
3073
|
-
const r =
|
|
3074
|
-
return !
|
|
3088
|
+
function qo(e, t) {
|
|
3089
|
+
const n = De(e, 0);
|
|
3090
|
+
if (Ko(n)) return !0;
|
|
3091
|
+
if (e.length > 1 && (n === on || n === sr || n === ze)) {
|
|
3092
|
+
const r = De(e, 1);
|
|
3093
|
+
return !Ke(r) && jt(r, n, t);
|
|
3075
3094
|
}
|
|
3076
3095
|
return !1;
|
|
3077
3096
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return !
|
|
3097
|
+
function Go(e) {
|
|
3098
|
+
return !Ke(e) && e !== ze;
|
|
3080
3099
|
}
|
|
3081
|
-
function
|
|
3100
|
+
function De(e, t) {
|
|
3082
3101
|
const n = e.charCodeAt(t);
|
|
3083
3102
|
let r;
|
|
3084
3103
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
3085
3104
|
}
|
|
3086
|
-
function
|
|
3105
|
+
function lr(e) {
|
|
3087
3106
|
return /^\n* /.test(e);
|
|
3088
3107
|
}
|
|
3089
|
-
var Ze = 1, Ve = 2,
|
|
3090
|
-
function
|
|
3108
|
+
var Ze = 1, Ve = 2, sn = 3, ln = 4, _e = 5;
|
|
3109
|
+
function Yo(e, t, n, r, i, o) {
|
|
3091
3110
|
const { blockIndent: a, lineWidth: s } = n;
|
|
3092
|
-
let l, u = 0, c = -1,
|
|
3111
|
+
let l, u = 0, c = -1, S = !1, m = !1;
|
|
3093
3112
|
const C = s !== -1;
|
|
3094
|
-
let E = -1,
|
|
3113
|
+
let E = -1, I = !Uo(t) && qo(t, o) && Go(De(t, t.length - 1));
|
|
3095
3114
|
if (r || i) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3096
|
-
if (u =
|
|
3097
|
-
|
|
3115
|
+
if (u = De(t, l), !Qe(u)) return _e;
|
|
3116
|
+
I = I && jt(u, c, o), c = u;
|
|
3098
3117
|
}
|
|
3099
3118
|
else {
|
|
3100
3119
|
for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3101
|
-
if (u =
|
|
3102
|
-
|
|
3103
|
-
else if (!
|
|
3104
|
-
|
|
3120
|
+
if (u = De(t, l), u === Oe)
|
|
3121
|
+
S = !0, C && (m = m || l - E - 1 > s && !Je(t[E + 1]), E = l);
|
|
3122
|
+
else if (!Qe(u)) return _e;
|
|
3123
|
+
I = I && jt(u, c, o), c = u;
|
|
3105
3124
|
}
|
|
3106
|
-
|
|
3125
|
+
m = m || C && l - E - 1 > s && !Je(t[E + 1]);
|
|
3107
3126
|
}
|
|
3108
|
-
return !
|
|
3127
|
+
return !S && !m ? I && !i ? Ze : e.quoteStyle === "double" ? _e : Ve : a > 9 && lr(t) ? _e : m ? ln : sn;
|
|
3109
3128
|
}
|
|
3110
|
-
function
|
|
3129
|
+
function Wo(e, t, n) {
|
|
3111
3130
|
const { indent: r, blockIndent: i, lineWidth: o } = n;
|
|
3112
3131
|
switch (t) {
|
|
3113
3132
|
case Ze:
|
|
3114
|
-
return
|
|
3133
|
+
return $n(e, r);
|
|
3115
3134
|
case Ve:
|
|
3116
|
-
return `'${
|
|
3117
|
-
case
|
|
3118
|
-
return "|" +
|
|
3119
|
-
case
|
|
3120
|
-
return ">" +
|
|
3121
|
-
case
|
|
3122
|
-
return `"${
|
|
3135
|
+
return `'${$n(e, r).replace(/'/g, "''")}'`;
|
|
3136
|
+
case sn:
|
|
3137
|
+
return "|" + Nn(e, i) + kn(xn(e, r));
|
|
3138
|
+
case ln:
|
|
3139
|
+
return ">" + Nn(e, i) + kn(xn(Vo(e, o), r));
|
|
3140
|
+
case _e:
|
|
3141
|
+
return `"${Xo(e)}"`;
|
|
3123
3142
|
}
|
|
3124
3143
|
}
|
|
3125
|
-
function
|
|
3144
|
+
function jo(e, t, n, r, i) {
|
|
3126
3145
|
const o = r || !i;
|
|
3127
3146
|
if (t.style.singleQuoted) return Ve;
|
|
3128
|
-
if (t.style.doubleQuoted) return
|
|
3147
|
+
if (t.style.doubleQuoted) return _e;
|
|
3129
3148
|
if (!o) {
|
|
3130
|
-
if (t.style.literal) return
|
|
3131
|
-
if (t.style.folded) return
|
|
3149
|
+
if (t.style.literal) return sn;
|
|
3150
|
+
if (t.style.folded) return ln;
|
|
3132
3151
|
}
|
|
3133
3152
|
const a = t.value;
|
|
3134
3153
|
if (a.length === 0)
|
|
3135
|
-
return t.style.tagged ||
|
|
3136
|
-
const s =
|
|
3137
|
-
return s === Ze && !t.style.tagged &&
|
|
3154
|
+
return t.style.tagged || In(e, a) === t.tag ? Ze : e.quoteStyle === "double" ? _e : Ve;
|
|
3155
|
+
const s = Yo(e, a, n, o, e.forceQuotes && !r, i);
|
|
3156
|
+
return s === Ze && !t.style.tagged && In(e, a) !== t.tag ? e.quoteStyle === "double" ? _e : Ve : s;
|
|
3138
3157
|
}
|
|
3139
|
-
function
|
|
3140
|
-
const n =
|
|
3158
|
+
function Nn(e, t) {
|
|
3159
|
+
const n = lr(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
3141
3160
|
`;
|
|
3142
3161
|
return `${n}${r && (e[e.length - 2] === `
|
|
3143
3162
|
` || e === `
|
|
3144
3163
|
`) ? "+" : r ? "" : "-"}
|
|
3145
3164
|
`;
|
|
3146
3165
|
}
|
|
3147
|
-
function
|
|
3166
|
+
function $n(e, t) {
|
|
3148
3167
|
let n = e.indexOf(`
|
|
3149
3168
|
`);
|
|
3150
3169
|
if (n === -1) return e;
|
|
@@ -3160,27 +3179,30 @@ function In(e, t) {
|
|
|
3160
3179
|
}
|
|
3161
3180
|
return i;
|
|
3162
3181
|
}
|
|
3163
|
-
function
|
|
3182
|
+
function kn(e) {
|
|
3164
3183
|
return e[e.length - 1] === `
|
|
3165
3184
|
` ? e.slice(0, -1) : e;
|
|
3166
3185
|
}
|
|
3167
|
-
function
|
|
3186
|
+
function Je(e) {
|
|
3187
|
+
return e === " " || e === " ";
|
|
3188
|
+
}
|
|
3189
|
+
function Vo(e, t) {
|
|
3168
3190
|
const n = /(\n+)([^\n]*)/g;
|
|
3169
3191
|
let r = e.indexOf(`
|
|
3170
3192
|
`);
|
|
3171
3193
|
r === -1 && (r = e.length), n.lastIndex = r;
|
|
3172
|
-
let i =
|
|
3173
|
-
` || e[0]
|
|
3194
|
+
let i = Ln(e.slice(0, r), t), o = e[0] === `
|
|
3195
|
+
` || Je(e[0]), a, s;
|
|
3174
3196
|
for (; s = n.exec(e); ) {
|
|
3175
3197
|
const l = s[1], u = s[2];
|
|
3176
|
-
a = u
|
|
3177
|
-
` : "") +
|
|
3198
|
+
a = u !== "" && Je(u[0]), i += l + (!o && !a && u !== "" ? `
|
|
3199
|
+
` : "") + Ln(u, t), o = a;
|
|
3178
3200
|
}
|
|
3179
3201
|
return i;
|
|
3180
3202
|
}
|
|
3181
|
-
function
|
|
3182
|
-
if (e === "" || e[0]
|
|
3183
|
-
const n = / [^ ]/g;
|
|
3203
|
+
function Ln(e, t) {
|
|
3204
|
+
if (e === "" || Je(e[0])) return e;
|
|
3205
|
+
const n = / [^ \t]/g;
|
|
3184
3206
|
let r, i = 0, o, a = 0, s = 0, l = "";
|
|
3185
3207
|
for (; r = n.exec(e); )
|
|
3186
3208
|
s = r.index, s - i > t && (o = a > i ? a : s, l += `
|
|
@@ -3189,129 +3211,129 @@ ${e.slice(i, o)}`, i = o + 1), a = s;
|
|
|
3189
3211
|
`, e.length - i > t && a > i ? l += `${e.slice(i, a)}
|
|
3190
3212
|
${e.slice(a + 1)}` : l += e.slice(i), l.slice(1);
|
|
3191
3213
|
}
|
|
3192
|
-
function
|
|
3214
|
+
function Xo(e) {
|
|
3193
3215
|
let t = "", n = 0;
|
|
3194
3216
|
for (let r = 0; r < e.length; n >= 65536 ? r += 2 : r++) {
|
|
3195
|
-
n =
|
|
3196
|
-
const i =
|
|
3217
|
+
n = De(e, r);
|
|
3218
|
+
const i = te[n];
|
|
3197
3219
|
if (i) {
|
|
3198
3220
|
t += i;
|
|
3199
3221
|
continue;
|
|
3200
3222
|
}
|
|
3201
|
-
if (
|
|
3223
|
+
if (Qe(n)) {
|
|
3202
3224
|
t += e[r], n >= 65536 && (t += e[r + 1]);
|
|
3203
3225
|
continue;
|
|
3204
3226
|
}
|
|
3205
|
-
t +=
|
|
3227
|
+
t += Bo(n);
|
|
3206
3228
|
}
|
|
3207
3229
|
return t;
|
|
3208
3230
|
}
|
|
3209
|
-
function
|
|
3231
|
+
function zo(e, t, n) {
|
|
3210
3232
|
let r = "";
|
|
3211
3233
|
for (let o = 0, a = n.items.length; o < a; o += 1) {
|
|
3212
|
-
const s =
|
|
3234
|
+
const s = Ce(e, t, n.items[o], {});
|
|
3213
3235
|
r !== "" && (r += `,${e.flowSkipCommaSpace ? "" : " "}`), r += s;
|
|
3214
3236
|
}
|
|
3215
3237
|
const i = e.flowBracketPadding && r !== "" ? " " : "";
|
|
3216
3238
|
return `[${i}${r}${i}]`;
|
|
3217
3239
|
}
|
|
3218
|
-
function
|
|
3240
|
+
function On(e, t, n, r) {
|
|
3219
3241
|
let i = "";
|
|
3220
3242
|
for (let o = 0, a = n.items.length; o < a; o += 1) {
|
|
3221
|
-
const s =
|
|
3243
|
+
const s = Ce(e, t + 1, n.items[o], {
|
|
3222
3244
|
block: !0,
|
|
3223
3245
|
compact: e.seqInlineFirst,
|
|
3224
3246
|
isblockseq: !0
|
|
3225
3247
|
});
|
|
3226
|
-
(!r || i !== "") && (i +=
|
|
3248
|
+
(!r || i !== "") && (i += Wt(e, t)), s === "" || Oe === s.charCodeAt(0) ? i += "-" : i += "- ", i += s;
|
|
3227
3249
|
}
|
|
3228
3250
|
return i;
|
|
3229
3251
|
}
|
|
3230
|
-
function
|
|
3252
|
+
function Qo(e, t, n) {
|
|
3231
3253
|
let r = "";
|
|
3232
|
-
const i =
|
|
3254
|
+
const i = cr(e, n.items);
|
|
3233
3255
|
for (const { key: a, value: s } of i) {
|
|
3234
3256
|
let l = "";
|
|
3235
3257
|
r !== "" && (l += `,${e.flowSkipCommaSpace ? "" : " "}`);
|
|
3236
|
-
const u =
|
|
3258
|
+
const u = Ce(e, t, a, { iskey: !0 }), c = u.length > 1024;
|
|
3237
3259
|
c ? l += "? " : e.quoteFlowKeys && (l += '"');
|
|
3238
|
-
const
|
|
3239
|
-
l += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${
|
|
3260
|
+
const S = Ce(e, t, s, {}), m = e.flowSkipColonSpace || S === "" ? "" : " ";
|
|
3261
|
+
l += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${m}${S}`, r += l;
|
|
3240
3262
|
}
|
|
3241
3263
|
const o = e.flowBracketPadding && r !== "" ? " " : "";
|
|
3242
3264
|
return `{${o}${r}${o}}`;
|
|
3243
3265
|
}
|
|
3244
|
-
function
|
|
3266
|
+
function rt(e) {
|
|
3245
3267
|
return e.kind === "scalar" ? e.value : e;
|
|
3246
3268
|
}
|
|
3247
|
-
function
|
|
3269
|
+
function cr(e, t) {
|
|
3248
3270
|
if (!e.sortKeys) return t;
|
|
3249
3271
|
const n = t.slice();
|
|
3250
3272
|
if (e.sortKeys === !0) n.sort((r, i) => {
|
|
3251
|
-
const o =
|
|
3273
|
+
const o = rt(r.key), a = rt(i.key);
|
|
3252
3274
|
return o < a ? -1 : o > a ? 1 : 0;
|
|
3253
3275
|
});
|
|
3254
3276
|
else {
|
|
3255
3277
|
const r = e.sortKeys;
|
|
3256
|
-
n.sort((i, o) => r(
|
|
3278
|
+
n.sort((i, o) => r(rt(i.key), rt(o.key)));
|
|
3257
3279
|
}
|
|
3258
3280
|
return n;
|
|
3259
3281
|
}
|
|
3260
|
-
function
|
|
3282
|
+
function Zo(e, t, n, r) {
|
|
3261
3283
|
let i = "";
|
|
3262
|
-
const o =
|
|
3284
|
+
const o = cr(e, n.items);
|
|
3263
3285
|
for (let a = 0, s = o.length; a < s; a += 1) {
|
|
3264
3286
|
let l = "";
|
|
3265
|
-
(!r || i !== "") && (l +=
|
|
3266
|
-
const { key: u, value: c } = o[a],
|
|
3287
|
+
(!r || i !== "") && (l += Wt(e, t));
|
|
3288
|
+
const { key: u, value: c } = o[a], S = (u.kind === "mapping" || u.kind === "sequence") && !u.style.flow && u.items.length !== 0 || u.kind === "scalar" && (u.style.literal || u.style.folded), m = S ? Ce(e, t + 1, u, {
|
|
3267
3289
|
block: !0,
|
|
3268
3290
|
compact: !0,
|
|
3269
|
-
isblockseq: !
|
|
3270
|
-
}) :
|
|
3291
|
+
isblockseq: !Vt(e, u, t + 1)
|
|
3292
|
+
}) : Ce(e, t + 1, u, {
|
|
3271
3293
|
block: !0,
|
|
3272
3294
|
compact: !0,
|
|
3273
3295
|
iskey: !0
|
|
3274
3296
|
}), C = u.kind === "scalar" && u.value.indexOf(`
|
|
3275
|
-
`) !== -1, E =
|
|
3276
|
-
E && (
|
|
3277
|
-
const
|
|
3297
|
+
`) !== -1, E = S || C || m.length > 1024;
|
|
3298
|
+
E && (m && Oe === m.charCodeAt(0) ? l += "?" : l += "? "), l += m, E && (l += Wt(e, t));
|
|
3299
|
+
const I = Ce(e, t + 1, c, {
|
|
3278
3300
|
block: !0,
|
|
3279
3301
|
compact: E,
|
|
3280
|
-
isblockseq: E && !
|
|
3281
|
-
}),
|
|
3282
|
-
|
|
3302
|
+
isblockseq: E && !Vt(e, c, t + 1)
|
|
3303
|
+
}), M = u.kind === "scalar" && u.value === "" && m !== "" && m.charCodeAt(m.length - 1) !== ar && m.charCodeAt(m.length - 1) !== or, N = !E && (u.kind === "alias" || M) ? " " : "";
|
|
3304
|
+
I === "" || Oe === I.charCodeAt(0) ? l += `${N}:` : l += `${N}: `, l += I, i += l;
|
|
3283
3305
|
}
|
|
3284
3306
|
return i;
|
|
3285
3307
|
}
|
|
3286
|
-
function
|
|
3308
|
+
function Vt(e, t, n) {
|
|
3287
3309
|
return t.style.tagged || t.anchor !== void 0 || e.indent < 2 && n > 0;
|
|
3288
3310
|
}
|
|
3289
|
-
function
|
|
3311
|
+
function Ce(e, t, n, r) {
|
|
3290
3312
|
if (n.kind === "alias") return `*${n.anchor}`;
|
|
3291
3313
|
const { block: i = !1, iskey: o = !1, isblockseq: a = !1 } = r;
|
|
3292
3314
|
let s = r.compact ?? !1;
|
|
3293
3315
|
const l = n.anchor !== void 0;
|
|
3294
|
-
|
|
3316
|
+
Vt(e, n, t) && (s = !1);
|
|
3295
3317
|
let u, c = n.style.tagged;
|
|
3296
|
-
const
|
|
3297
|
-
if (n.kind === "mapping")
|
|
3298
|
-
else if (n.kind === "sequence")
|
|
3318
|
+
const S = i && (n.kind === "mapping" || n.kind === "sequence") && !n.style.flow && n.items.length !== 0;
|
|
3319
|
+
if (n.kind === "mapping") S ? u = Zo(e, t, n, s) : u = Qo(e, t, n);
|
|
3320
|
+
else if (n.kind === "sequence") S ? e.seqNoIndent && !a && t > 0 ? u = On(e, t - 1, n, s) : u = On(e, t, n, s) : u = zo(e, t, n);
|
|
3299
3321
|
else {
|
|
3300
|
-
const
|
|
3301
|
-
u =
|
|
3322
|
+
const m = Do(e, t), C = jo(e, n, m, o, i);
|
|
3323
|
+
u = Wo(n.value, C, m), c = n.style.tagged || C !== Ze && n.tag !== e.defaultScalarTagName;
|
|
3302
3324
|
}
|
|
3303
|
-
if (
|
|
3304
|
-
const
|
|
3305
|
-
e.tagBeforeAnchor ? (C !== null &&
|
|
3306
|
-
const
|
|
3307
|
-
u = `${
|
|
3325
|
+
if (S && s && t > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`), c || l) {
|
|
3326
|
+
const m = [], C = c ? Ho(n) : null, E = l ? `&${n.anchor}` : null;
|
|
3327
|
+
e.tagBeforeAnchor ? (C !== null && m.push(C), E !== null && m.push(E)) : (E !== null && m.push(E), C !== null && m.push(C));
|
|
3328
|
+
const I = u === "" || u.charCodeAt(0) === Oe ? "" : " ";
|
|
3329
|
+
u = `${m.join(" ")}${I}${u}`;
|
|
3308
3330
|
}
|
|
3309
3331
|
return u;
|
|
3310
3332
|
}
|
|
3311
|
-
function
|
|
3333
|
+
function Jo(e) {
|
|
3312
3334
|
return (e.kind === "sequence" || e.kind === "mapping") && !e.style.flow && e.items.length !== 0 && !e.style.tagged && e.anchor === void 0;
|
|
3313
3335
|
}
|
|
3314
|
-
function
|
|
3336
|
+
function ea(e) {
|
|
3315
3337
|
let t = e;
|
|
3316
3338
|
for (; (t.kind === "sequence" || t.kind === "mapping") && !t.style.flow && t.items.length !== 0; ) t = t.kind === "sequence" ? t.items[t.items.length - 1] : t.items[t.items.length - 1].value;
|
|
3317
3339
|
if (t.kind !== "scalar" || !(t.style.literal || t.style.folded)) return !1;
|
|
@@ -3321,7 +3343,7 @@ function Qo(e) {
|
|
|
3321
3343
|
`) || n === `
|
|
3322
3344
|
`;
|
|
3323
3345
|
}
|
|
3324
|
-
function
|
|
3346
|
+
function ta(e) {
|
|
3325
3347
|
let t = "";
|
|
3326
3348
|
for (const n of e.directives) {
|
|
3327
3349
|
if (n.kind === "yaml") {
|
|
@@ -3335,110 +3357,110 @@ function zo(e) {
|
|
|
3335
3357
|
}
|
|
3336
3358
|
return t;
|
|
3337
3359
|
}
|
|
3338
|
-
function
|
|
3339
|
-
const n =
|
|
3360
|
+
function na(e, t) {
|
|
3361
|
+
const n = Mo(t);
|
|
3340
3362
|
let r = "", i = !1;
|
|
3341
3363
|
for (let o = 0; o < e.length; o += 1) {
|
|
3342
|
-
const a = e[o], s =
|
|
3364
|
+
const a = e[o], s = ta(a), l = s !== "", u = a.explicitStart || l || o > 0 && !i;
|
|
3343
3365
|
if (r += s, a.contents === null)
|
|
3344
3366
|
u && (r += `---
|
|
3345
3367
|
`);
|
|
3346
3368
|
else if (u) {
|
|
3347
|
-
const c =
|
|
3369
|
+
const c = Ce(n, 0, a.contents, {
|
|
3348
3370
|
block: !0,
|
|
3349
3371
|
compact: !0
|
|
3350
|
-
}),
|
|
3372
|
+
}), S = c === "" ? "" : l || Jo(a.contents) ? `
|
|
3351
3373
|
` : " ";
|
|
3352
|
-
r += `---${
|
|
3374
|
+
r += `---${S}${c}
|
|
3353
3375
|
`;
|
|
3354
|
-
} else r +=
|
|
3376
|
+
} else r += Ce(n, 0, a.contents, {
|
|
3355
3377
|
block: !0,
|
|
3356
3378
|
compact: !0
|
|
3357
3379
|
}) + `
|
|
3358
3380
|
`;
|
|
3359
|
-
i = a.explicitEnd || a.contents !== null &&
|
|
3381
|
+
i = a.explicitEnd || a.contents !== null && ea(a.contents), i && (r += `...
|
|
3360
3382
|
`);
|
|
3361
3383
|
}
|
|
3362
3384
|
return r;
|
|
3363
3385
|
}
|
|
3364
|
-
var
|
|
3386
|
+
var ra = Ni.withTags({
|
|
3365
3387
|
...Lt,
|
|
3366
3388
|
resolve: (e, t, n) => {
|
|
3367
3389
|
const r = Lt.resolve(e, t, n);
|
|
3368
|
-
return r ===
|
|
3390
|
+
return r === H ? Fn.resolve(e, t, n) : r;
|
|
3369
3391
|
}
|
|
3370
3392
|
}, {
|
|
3371
|
-
...
|
|
3393
|
+
...Ot,
|
|
3372
3394
|
resolve: (e, t, n) => {
|
|
3373
|
-
const r =
|
|
3374
|
-
return r ===
|
|
3395
|
+
const r = Ot.resolve(e, t, n);
|
|
3396
|
+
return r === H ? Hn.resolve(e, t, n) : r;
|
|
3375
3397
|
}
|
|
3376
|
-
}),
|
|
3377
|
-
...
|
|
3378
|
-
schema:
|
|
3398
|
+
}), ia = {
|
|
3399
|
+
...an,
|
|
3400
|
+
schema: ra,
|
|
3379
3401
|
skipInvalid: !1,
|
|
3380
3402
|
noRefs: !1,
|
|
3381
3403
|
flowLevel: -1,
|
|
3382
3404
|
transform: () => {
|
|
3383
3405
|
}
|
|
3384
3406
|
};
|
|
3385
|
-
function
|
|
3407
|
+
function oa(e, t = {}) {
|
|
3386
3408
|
const n = {
|
|
3387
|
-
...
|
|
3409
|
+
...ia,
|
|
3388
3410
|
...t
|
|
3389
|
-
}, r =
|
|
3411
|
+
}, r = vo(e, n.schema, {
|
|
3390
3412
|
noRefs: n.noRefs,
|
|
3391
3413
|
skipInvalid: n.skipInvalid
|
|
3392
3414
|
});
|
|
3393
|
-
return n.flowLevel >= 0 &&
|
|
3415
|
+
return n.flowLevel >= 0 && Ro(r, (i, o) => {
|
|
3394
3416
|
if (!(o.depth < n.flowLevel))
|
|
3395
|
-
return i.style.flow = !0,
|
|
3396
|
-
}), n.transform(r),
|
|
3397
|
-
...
|
|
3417
|
+
return i.style.flow = !0, rr;
|
|
3418
|
+
}), n.transform(r), na(r, {
|
|
3419
|
+
...Pt(n, Object.keys(an)),
|
|
3398
3420
|
schema: n.schema
|
|
3399
3421
|
});
|
|
3400
3422
|
}
|
|
3401
|
-
const
|
|
3402
|
-
const n =
|
|
3423
|
+
const aa = Gn.withTags(Mn, Bn, Dn, Un, Kn), ur = (e, t) => {
|
|
3424
|
+
const n = Eo(e, { schema: aa, ...t });
|
|
3403
3425
|
if (n.length === 0)
|
|
3404
3426
|
return e.trim() === "" ? void 0 : null;
|
|
3405
3427
|
if (n.length > 1)
|
|
3406
|
-
throw new
|
|
3428
|
+
throw new At("expected a single document in the stream, but found more");
|
|
3407
3429
|
return n[0];
|
|
3408
|
-
},
|
|
3409
|
-
function
|
|
3430
|
+
}, ba = (e, t) => oa(e, t);
|
|
3431
|
+
function sa(e, t) {
|
|
3410
3432
|
return e.hasOwnProperty(t) ? e[t] : void 0;
|
|
3411
3433
|
}
|
|
3412
|
-
const
|
|
3413
|
-
class
|
|
3434
|
+
const la = /\((\d+):(\d+)\)$/;
|
|
3435
|
+
class St extends Error {
|
|
3414
3436
|
originalError;
|
|
3415
3437
|
source;
|
|
3416
3438
|
col;
|
|
3417
3439
|
line;
|
|
3418
3440
|
constructor(t, n) {
|
|
3419
3441
|
super(t.message.split(`
|
|
3420
|
-
`)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this,
|
|
3421
|
-
const [, r, i] = this.message.match(
|
|
3442
|
+
`)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this, St.prototype);
|
|
3443
|
+
const [, r, i] = this.message.match(la) || [];
|
|
3422
3444
|
this.line = parseInt(r, 10), this.col = parseInt(i, 10);
|
|
3423
3445
|
}
|
|
3424
3446
|
}
|
|
3425
|
-
function
|
|
3447
|
+
function ca(e) {
|
|
3426
3448
|
return e.endsWith(".yaml") || e.endsWith(".yml") || e.endsWith(".json");
|
|
3427
3449
|
}
|
|
3428
|
-
const
|
|
3429
|
-
function
|
|
3450
|
+
const ua = [".graphql", ".gql"];
|
|
3451
|
+
function fr(e) {
|
|
3430
3452
|
const t = e.toLowerCase();
|
|
3431
|
-
return
|
|
3453
|
+
return ua.some((n) => t.endsWith(n));
|
|
3432
3454
|
}
|
|
3433
|
-
function
|
|
3455
|
+
function kt(e, t) {
|
|
3434
3456
|
return e + "::" + t;
|
|
3435
3457
|
}
|
|
3436
|
-
function
|
|
3458
|
+
function fa() {
|
|
3437
3459
|
return new Promise((e) => {
|
|
3438
3460
|
setTimeout(e);
|
|
3439
3461
|
});
|
|
3440
3462
|
}
|
|
3441
|
-
class
|
|
3463
|
+
class Xt {
|
|
3442
3464
|
absoluteRef;
|
|
3443
3465
|
body;
|
|
3444
3466
|
mimeType;
|
|
@@ -3456,26 +3478,26 @@ class Vt {
|
|
|
3456
3478
|
return this.#t === void 0 && (this.#t = this.body.split(/\r\n|[\n\r]/g)), this.#t;
|
|
3457
3479
|
}
|
|
3458
3480
|
}
|
|
3459
|
-
class
|
|
3481
|
+
class cn extends Error {
|
|
3460
3482
|
originalError;
|
|
3461
3483
|
constructor(t) {
|
|
3462
|
-
super(t.message), this.originalError = t, Object.setPrototypeOf(this,
|
|
3484
|
+
super(t.message), this.originalError = t, Object.setPrototypeOf(this, cn.prototype);
|
|
3463
3485
|
}
|
|
3464
3486
|
}
|
|
3465
|
-
function
|
|
3466
|
-
const n = new
|
|
3467
|
-
if (
|
|
3487
|
+
function Ra(e, t) {
|
|
3488
|
+
const n = new Xt(t, e);
|
|
3489
|
+
if (fr(t))
|
|
3468
3490
|
return { source: n, parsed: e };
|
|
3469
3491
|
try {
|
|
3470
3492
|
return {
|
|
3471
3493
|
source: n,
|
|
3472
|
-
parsed:
|
|
3494
|
+
parsed: ur(e, { filename: t })
|
|
3473
3495
|
};
|
|
3474
3496
|
} catch (r) {
|
|
3475
|
-
throw new
|
|
3497
|
+
throw new St(r, n);
|
|
3476
3498
|
}
|
|
3477
3499
|
}
|
|
3478
|
-
class
|
|
3500
|
+
class _a {
|
|
3479
3501
|
config;
|
|
3480
3502
|
cache = /* @__PURE__ */ new Map();
|
|
3481
3503
|
constructor(t = { http: { headers: [] } }) {
|
|
@@ -3485,36 +3507,36 @@ class Ta {
|
|
|
3485
3507
|
return new Set(Array.from(this.cache.keys()));
|
|
3486
3508
|
}
|
|
3487
3509
|
resolveExternalRef(t, n) {
|
|
3488
|
-
return
|
|
3510
|
+
return Fe(n) ? n : t && Fe(t) ? new URL(n, t).href : Xe.resolve(t ? Xe.dirname(t) : process.cwd(), n);
|
|
3489
3511
|
}
|
|
3490
3512
|
async loadExternalRef(t) {
|
|
3491
3513
|
try {
|
|
3492
|
-
if (
|
|
3493
|
-
const { body: n, mimeType: r } = await
|
|
3494
|
-
return new
|
|
3514
|
+
if (Fe(t)) {
|
|
3515
|
+
const { body: n, mimeType: r } = await br(t, this.config.http);
|
|
3516
|
+
return new Xt(t, n, r);
|
|
3495
3517
|
} else {
|
|
3496
3518
|
if ((void 0)(t).isDirectory())
|
|
3497
3519
|
throw new Error(`Expected a file but received a folder at ${t}.`);
|
|
3498
3520
|
const n = await (void 0).readFile(t, "utf-8");
|
|
3499
|
-
return new
|
|
3521
|
+
return new Xt(t, n.replace(/\r\n/g, `
|
|
3500
3522
|
`));
|
|
3501
3523
|
}
|
|
3502
3524
|
} catch (n) {
|
|
3503
|
-
throw n.message = n.message.replace(", lstat", ""), new
|
|
3525
|
+
throw n.message = n.message.replace(", lstat", ""), new cn(n);
|
|
3504
3526
|
}
|
|
3505
3527
|
}
|
|
3506
3528
|
parseDocument(t, n = !1) {
|
|
3507
|
-
if (
|
|
3529
|
+
if (fr(t.absoluteRef))
|
|
3508
3530
|
return { source: t, parsed: t.body };
|
|
3509
|
-
if (!
|
|
3531
|
+
if (!ca(t.absoluteRef) && !t.mimeType?.match(/(json|yaml|openapi)/) && !n)
|
|
3510
3532
|
return { source: t, parsed: t.body };
|
|
3511
3533
|
try {
|
|
3512
3534
|
return {
|
|
3513
3535
|
source: t,
|
|
3514
|
-
parsed:
|
|
3536
|
+
parsed: ur(t.body, { filename: t.absoluteRef })
|
|
3515
3537
|
};
|
|
3516
3538
|
} catch (r) {
|
|
3517
|
-
throw new
|
|
3539
|
+
throw new St(r, t);
|
|
3518
3540
|
}
|
|
3519
3541
|
}
|
|
3520
3542
|
async resolveDocument(t, n, r = !1) {
|
|
@@ -3525,13 +3547,13 @@ class Ta {
|
|
|
3525
3547
|
return this.cache.set(i, a), a;
|
|
3526
3548
|
}
|
|
3527
3549
|
}
|
|
3528
|
-
function
|
|
3550
|
+
function Pn(e, t) {
|
|
3529
3551
|
return {
|
|
3530
3552
|
prev: e,
|
|
3531
3553
|
node: t
|
|
3532
3554
|
};
|
|
3533
3555
|
}
|
|
3534
|
-
function
|
|
3556
|
+
function pa(e, t) {
|
|
3535
3557
|
for (; e; ) {
|
|
3536
3558
|
if (e.node === t)
|
|
3537
3559
|
return !0;
|
|
@@ -3539,8 +3561,8 @@ function la(e, t) {
|
|
|
3539
3561
|
}
|
|
3540
3562
|
return !1;
|
|
3541
3563
|
}
|
|
3542
|
-
const Ye = { name: "unknown", properties: {} },
|
|
3543
|
-
async function
|
|
3564
|
+
const Ye = { name: "unknown", properties: {} }, da = { name: "scalar", properties: {} };
|
|
3565
|
+
async function xa(e) {
|
|
3544
3566
|
const { rootDocument: t, externalRefResolver: n, rootType: r } = e, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [];
|
|
3545
3567
|
l(t.parsed, t, "#/", r);
|
|
3546
3568
|
let s;
|
|
@@ -3548,147 +3570,160 @@ async function va(e) {
|
|
|
3548
3570
|
s = await Promise.all(a);
|
|
3549
3571
|
while (a.length !== s.length);
|
|
3550
3572
|
return i;
|
|
3551
|
-
function l(u, c,
|
|
3573
|
+
function l(u, c, S, m) {
|
|
3552
3574
|
const C = c.source.absoluteRef, E = /* @__PURE__ */ new Map();
|
|
3553
|
-
|
|
3554
|
-
function
|
|
3555
|
-
if (!
|
|
3575
|
+
I(u, m, C + S);
|
|
3576
|
+
function I(N, k, y) {
|
|
3577
|
+
if (!Re(N) && !Array.isArray(N))
|
|
3556
3578
|
return;
|
|
3557
|
-
const
|
|
3558
|
-
if (o.has(
|
|
3579
|
+
const R = `${k.name}::${y}`;
|
|
3580
|
+
if (o.has(R))
|
|
3559
3581
|
return;
|
|
3560
|
-
if (o.add(
|
|
3561
|
-
const b =
|
|
3562
|
-
if (b === void 0 &&
|
|
3582
|
+
if (o.add(R), Array.isArray(N)) {
|
|
3583
|
+
const b = k.items;
|
|
3584
|
+
if (b === void 0 && k !== Ye && k !== it)
|
|
3563
3585
|
return;
|
|
3564
|
-
const
|
|
3565
|
-
for (let
|
|
3566
|
-
let
|
|
3567
|
-
if (
|
|
3586
|
+
const A = typeof b == "function";
|
|
3587
|
+
for (let g = 0; g < N.length; g++) {
|
|
3588
|
+
let x = A ? b(N[g], be(y, g)) : b;
|
|
3589
|
+
if (x === void 0 && k !== Ye && k !== it)
|
|
3568
3590
|
continue;
|
|
3569
|
-
const W =
|
|
3570
|
-
|
|
3591
|
+
const W = x?.directResolveAs ? { $ref: N[g] } : N[g];
|
|
3592
|
+
x = x?.directResolveAs || x, I(W, ot(x) ? x : Ye, be(y, g));
|
|
3571
3593
|
}
|
|
3572
3594
|
return;
|
|
3573
3595
|
}
|
|
3574
|
-
const [
|
|
3575
|
-
|
|
3596
|
+
const [f, w] = Object.entries(N).find(([b]) => b === "$anchor") || [];
|
|
3597
|
+
w && E.set(`#${w}`, N);
|
|
3576
3598
|
for (const b of Object.keys(N)) {
|
|
3577
|
-
let
|
|
3578
|
-
|
|
3599
|
+
let A = N[b], g = sa(k.properties, b);
|
|
3600
|
+
g === void 0 && (g = k.additionalProperties), typeof g == "function" && (g = g(A, b)), g === void 0 && (g = Ye), k.extensionsPrefix && b.startsWith(k.extensionsPrefix) && g === Ye && (g = it), !ot(g) && g?.directResolveAs && (g = g.directResolveAs, A = { $ref: A }), g && g.name === void 0 && g.resolvable !== !1 && (g = da), !(!ot(g) || !(Re(A) || Array.isArray(A))) && I(A, g, be(y, Pe(b)));
|
|
3579
3601
|
}
|
|
3580
|
-
if (
|
|
3581
|
-
const b =
|
|
3602
|
+
if (at(N)) {
|
|
3603
|
+
const b = M(c, N, {
|
|
3582
3604
|
prev: null,
|
|
3583
3605
|
node: N
|
|
3584
|
-
}).then((
|
|
3585
|
-
|
|
3606
|
+
}).then((A) => {
|
|
3607
|
+
if (A.resolved) {
|
|
3608
|
+
l(A.node, A.document, A.nodePointer, k);
|
|
3609
|
+
for (const g of A.chain ?? [])
|
|
3610
|
+
l(g.node, g.document, g.location.pointer, k);
|
|
3611
|
+
}
|
|
3586
3612
|
});
|
|
3587
3613
|
a.push(b);
|
|
3588
3614
|
}
|
|
3589
|
-
if (
|
|
3590
|
-
const b =
|
|
3615
|
+
if (xr(N)) {
|
|
3616
|
+
const b = M(c, { $ref: N.externalValue }, {
|
|
3591
3617
|
prev: null,
|
|
3592
3618
|
node: N
|
|
3593
|
-
}).then((
|
|
3594
|
-
|
|
3619
|
+
}).then((A) => {
|
|
3620
|
+
A.resolved && l(A.node, A.document, A.nodePointer, k);
|
|
3595
3621
|
});
|
|
3596
3622
|
a.push(b);
|
|
3597
3623
|
}
|
|
3598
3624
|
}
|
|
3599
|
-
async function
|
|
3600
|
-
if (
|
|
3625
|
+
async function M(N, k, y) {
|
|
3626
|
+
if (pa(y.prev, k))
|
|
3601
3627
|
throw new Error("Self-referencing circular pointer");
|
|
3602
|
-
if (
|
|
3603
|
-
await
|
|
3604
|
-
const
|
|
3628
|
+
if ($r(k.$ref)) {
|
|
3629
|
+
await fa();
|
|
3630
|
+
const L = {
|
|
3605
3631
|
resolved: !0,
|
|
3606
3632
|
isRemote: !1,
|
|
3607
|
-
node: E.get(
|
|
3633
|
+
node: E.get(k.$ref),
|
|
3608
3634
|
document: N,
|
|
3609
|
-
nodePointer:
|
|
3610
|
-
},
|
|
3611
|
-
return i.set(
|
|
3635
|
+
nodePointer: k.$ref
|
|
3636
|
+
}, q = kt(N.source.absoluteRef, k.$ref);
|
|
3637
|
+
return i.set(q, L), L;
|
|
3612
3638
|
}
|
|
3613
|
-
const { uri:
|
|
3639
|
+
const { uri: R, pointer: f } = wr(k.$ref), w = R !== null && n.resolveExternalRef(N.source.absoluteRef, R) !== N.source.absoluteRef;
|
|
3614
3640
|
let b;
|
|
3615
3641
|
try {
|
|
3616
|
-
b =
|
|
3617
|
-
} catch (
|
|
3618
|
-
const
|
|
3642
|
+
b = w ? await n.resolveDocument(N.source.absoluteRef, R) : N;
|
|
3643
|
+
} catch (L) {
|
|
3644
|
+
const q = {
|
|
3619
3645
|
resolved: !1,
|
|
3620
|
-
isRemote:
|
|
3646
|
+
isRemote: w,
|
|
3621
3647
|
document: void 0,
|
|
3622
|
-
error:
|
|
3623
|
-
},
|
|
3624
|
-
return i.set(
|
|
3648
|
+
error: L
|
|
3649
|
+
}, ce = kt(N.source.absoluteRef, k.$ref);
|
|
3650
|
+
return i.set(ce, q), q;
|
|
3625
3651
|
}
|
|
3626
|
-
let
|
|
3652
|
+
let A = {
|
|
3627
3653
|
resolved: !0,
|
|
3628
3654
|
document: b,
|
|
3629
|
-
isRemote:
|
|
3655
|
+
isRemote: w,
|
|
3630
3656
|
node: N.parsed,
|
|
3631
3657
|
nodePointer: "#/"
|
|
3632
|
-
},
|
|
3633
|
-
const
|
|
3634
|
-
for (const
|
|
3635
|
-
if (
|
|
3636
|
-
|
|
3637
|
-
else if (Array.isArray(
|
|
3638
|
-
|
|
3639
|
-
else if (
|
|
3640
|
-
if (
|
|
3641
|
-
|
|
3642
|
-
else if (Array.isArray(
|
|
3643
|
-
|
|
3658
|
+
}, g = b.parsed;
|
|
3659
|
+
const x = f;
|
|
3660
|
+
for (const L of x)
|
|
3661
|
+
if (Re(g) && g[L] !== void 0)
|
|
3662
|
+
g = g[L], A.nodePointer = be(A.nodePointer, Pe(L));
|
|
3663
|
+
else if (Array.isArray(g) && g[+L] !== void 0)
|
|
3664
|
+
g = g[+L], A.nodePointer = be(A.nodePointer, Pe(L));
|
|
3665
|
+
else if (at(g))
|
|
3666
|
+
if (A = await M(b, g, Pn(y, g)), A.chain = void 0, b = A.document || b, Re(A.node))
|
|
3667
|
+
g = A.node[L], A.nodePointer = be(A.nodePointer, Pe(L));
|
|
3668
|
+
else if (Array.isArray(A.node))
|
|
3669
|
+
g = A.node[+L], A.nodePointer = be(A.nodePointer, Pe(L));
|
|
3644
3670
|
else {
|
|
3645
|
-
|
|
3671
|
+
g = void 0;
|
|
3646
3672
|
break;
|
|
3647
3673
|
}
|
|
3648
3674
|
else {
|
|
3649
|
-
|
|
3675
|
+
g = void 0;
|
|
3650
3676
|
break;
|
|
3651
3677
|
}
|
|
3652
|
-
|
|
3653
|
-
const W =
|
|
3654
|
-
|
|
3678
|
+
A.node = g, A.document = b;
|
|
3679
|
+
const W = kt(N.source.absoluteRef, k.$ref);
|
|
3680
|
+
if (A.document && at(g)) {
|
|
3681
|
+
const L = _r(g) ? {
|
|
3682
|
+
node: g,
|
|
3683
|
+
document: A.document,
|
|
3684
|
+
location: new zt(A.document.source, A.nodePointer)
|
|
3685
|
+
} : void 0;
|
|
3686
|
+
A = await M(A.document, g, Pn(y, g)), L && A.resolved && (A = { ...A, chain: [L, ...A.chain ?? []] });
|
|
3687
|
+
}
|
|
3688
|
+
return i.set(W, A), { ...A };
|
|
3655
3689
|
}
|
|
3656
3690
|
}
|
|
3657
3691
|
}
|
|
3658
3692
|
export {
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
it as
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3693
|
+
xr as A,
|
|
3694
|
+
_a as B,
|
|
3695
|
+
ya as C,
|
|
3696
|
+
Sa as D,
|
|
3697
|
+
Nr as E,
|
|
3698
|
+
vr as F,
|
|
3699
|
+
zt as L,
|
|
3700
|
+
cn as R,
|
|
3701
|
+
Xt as S,
|
|
3702
|
+
St as Y,
|
|
3703
|
+
Tr as a,
|
|
3704
|
+
fr as b,
|
|
3705
|
+
Ta as c,
|
|
3706
|
+
at as d,
|
|
3707
|
+
Pe as e,
|
|
3708
|
+
ca as f,
|
|
3709
|
+
Ea as g,
|
|
3710
|
+
gr as h,
|
|
3711
|
+
Fe as i,
|
|
3712
|
+
br as j,
|
|
3713
|
+
Ca as k,
|
|
3714
|
+
ga as l,
|
|
3715
|
+
Ra as m,
|
|
3716
|
+
Aa as n,
|
|
3717
|
+
ma as o,
|
|
3718
|
+
ur as p,
|
|
3719
|
+
wr as q,
|
|
3720
|
+
xa as r,
|
|
3721
|
+
ba as s,
|
|
3722
|
+
sa as t,
|
|
3723
|
+
Ir as u,
|
|
3724
|
+
it as v,
|
|
3725
|
+
ot as w,
|
|
3726
|
+
va as x,
|
|
3727
|
+
_r as y,
|
|
3728
|
+
kt as z
|
|
3694
3729
|
};
|