@redocly/replay 0.27.0-next.9 → 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-B94RnQsz.js → replay-AiChatProvider-LQhrLIDL.js} +44 -44
- package/dist/{replay-AiChatProvider-P2u2MtTk.js → replay-AiChatProvider-Oms5CFgT.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-z_QUPu2M.js → replay-AiChatSqliteDBStorage-3-p1mthX.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-BtTa9KkQ.js → replay-AiChatSqliteDBStorage-GZibdHOQ.js} +1 -1
- package/dist/replay-AiPanel-BvwwBTh1.js +742 -0
- package/dist/{replay-AiPanel-BCkDovN_.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-DMxFWJQ7.js → replay-SqliteDBStorage-Dn6DoVWW.js} +1 -1
- package/dist/{replay-SqliteDBStorage-D9b6LAKr.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-C2QNfRSA.js → replay-agent-loop-BLSu4v_O.js} +1 -1
- package/dist/{replay-agent-loop-C8ERLqB5.js → replay-agent-loop-DgEHdXUt.js} +11 -11
- package/dist/{replay-ai-chat-mappers-fViZvzIy.js → replay-ai-chat-mappers-BvfcEubB.js} +5 -5
- package/dist/{replay-ai-chat-mappers-BMhtm64Y.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-BhuazQ2q.js → replay-create-model-DNPFcOIp.js} +579 -578
- package/dist/{replay-create-model-BgR6vFGV.js → replay-create-model-bOIDB-e8.js} +10 -10
- package/dist/{replay-db-DAiJFj0l.js → replay-db-BQGv3PGw.js} +1 -1
- package/dist/{replay-db-DKzJowQC.js → replay-db-CMXZZs9v.js} +1 -1
- package/dist/{replay-external-resolver-UONYkON2.js → replay-external-resolver-mrykFC2h.js} +2 -2
- package/dist/{replay-external-resolver-BY6AAeGp.js → replay-external-resolver-n5OvQMRF.js} +1 -1
- package/dist/replay-index-3lwhSmvi.js +1 -0
- package/dist/{replay-index-BowK-_3Z.js → replay-index-Bc5RHu5L.js} +23698 -25407
- package/dist/replay-index-CFLu-XMV.js +25 -0
- package/dist/{replay-index-DWKlhkdU.js → replay-index-CHGVyIdG.js} +1 -1
- package/dist/replay-index-CSR_qlua.js +1 -0
- package/dist/replay-index-CepJ5Z0m.js +6875 -0
- package/dist/{replay-index-amF_dPN8.js → replay-index-CgCGhu4l.js} +6 -6
- package/dist/replay-index-DDjmUXWm.js +1 -0
- package/dist/{replay-index-DM12kT-D.js → replay-index-DiSy_1OY.js} +1 -1
- package/dist/replay-index-Oct6Dygd.js +1 -0
- package/dist/{replay-index-BubK_s3I.js → replay-index-QXosJxRc.js} +18 -18
- package/dist/replay-index-jkDlU0Lx.js +32 -0
- package/dist/{replay-lint-CAN3a2zf.js → replay-lint-DoHQIATV.js} +3 -3
- package/dist/{replay-lint-a0aMVdOC.js → replay-lint-PWaLESz5.js} +3 -3
- package/dist/{replay-lint-graphql-C3aqm51r.js → replay-lint-graphql-xh8VoAwd.js} +1 -1
- package/dist/{replay-lint-graphql-DnztHI0i.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-LjvT95Yw.js → replay-resolve-MVe_8Ube.js} +1104 -1094
- package/dist/{replay-respect-run-DLSZ4d4p.js → replay-respect-run-BJsR4a4m.js} +1 -1
- package/dist/{replay-respect-run-wqqp8WHA.js → replay-respect-run-X4PSO6Fj.js} +3 -3
- package/dist/{replay-tauri-path-Bg-T0cwI.js → replay-tauri-path-CkGiQWsb.js} +2 -2
- package/dist/{replay-tauri-path-DHZlqqfb.js → replay-tauri-path-D8FJsoZb.js} +1 -1
- package/dist/replay-useAiChatQueries-BXL-_N2Q.js +215 -0
- package/dist/{replay-useAiChatQueries-Dy-kPGKF.js → replay-useAiChatQueries-D7sHNAfV.js} +1078 -1022
- package/dist/{replay-validate-key-B2N6AiQk.js → replay-validate-key-CmzSfORv.js} +1 -1
- package/dist/{replay-validate-key-B7RBY-6z.js → replay-validate-key-CtZEJRP7.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +12 -12
- package/package.json +5 -4
- package/dist/replay-AiPanel-COL9ADyD.js +0 -868
- package/dist/replay-index-ClVtMDHn.js +0 -6899
- package/dist/replay-index-F528jCaH.js +0 -1
- package/dist/replay-index-fpeoVNQb.js +0 -1
- package/dist/replay-resolve-BoryNVbu.js +0 -47
- package/dist/replay-useAiChatQueries-DuNxx5rQ.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
|
|
5
|
+
var Et = {}, Ct, un;
|
|
6
6
|
function pt() {
|
|
7
7
|
if (un) return Ct;
|
|
8
8
|
un = 1;
|
|
9
|
-
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`,
|
|
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 pt() {
|
|
|
14
14
|
ONE_CHAR: s,
|
|
15
15
|
QMARK: l,
|
|
16
16
|
END_ANCHOR: u,
|
|
17
|
-
DOTS_SLASH:
|
|
17
|
+
DOTS_SLASH: S,
|
|
18
18
|
NO_DOT: m,
|
|
19
19
|
NO_DOTS: C,
|
|
20
|
-
NO_DOT_SLASH:
|
|
21
|
-
NO_DOTS_SLASH:
|
|
22
|
-
QMARK_NO_DOT:
|
|
20
|
+
NO_DOT_SLASH: E,
|
|
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 pt() {
|
|
|
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",
|
|
@@ -57,7 +57,7 @@ function pt() {
|
|
|
57
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 pt() {
|
|
|
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,8 +176,8 @@ function pt() {
|
|
|
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
|
}
|
|
@@ -210,10 +210,10 @@ function dt() {
|
|
|
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
215
|
var Tt, pn;
|
|
216
|
-
function
|
|
216
|
+
function mr() {
|
|
217
217
|
if (pn) return Tt;
|
|
218
218
|
pn = 1;
|
|
219
219
|
const e = /* @__PURE__ */ dt(), {
|
|
@@ -237,77 +237,77 @@ function gr() {
|
|
|
237
237
|
/* ( */
|
|
238
238
|
CHAR_LEFT_SQUARE_BRACKET: c,
|
|
239
239
|
/* [ */
|
|
240
|
-
CHAR_PLUS:
|
|
240
|
+
CHAR_PLUS: S,
|
|
241
241
|
/* + */
|
|
242
242
|
CHAR_QUESTION_MARK: m,
|
|
243
243
|
/* ? */
|
|
244
244
|
CHAR_RIGHT_CURLY_BRACE: C,
|
|
245
245
|
/* } */
|
|
246
|
-
CHAR_RIGHT_PARENTHESES:
|
|
246
|
+
CHAR_RIGHT_PARENTHESES: E,
|
|
247
247
|
/* ) */
|
|
248
|
-
CHAR_RIGHT_SQUARE_BRACKET:
|
|
248
|
+
CHAR_RIGHT_SQUARE_BRACKET: I
|
|
249
249
|
/* ] */
|
|
250
|
-
} = /* @__PURE__ */ pt(),
|
|
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 Tt = (
|
|
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
|
}
|
|
289
|
-
if (
|
|
289
|
+
if (b === !0)
|
|
290
290
|
continue;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
293
|
if ($ === s) {
|
|
294
|
-
if (A.push(
|
|
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
|
-
if ($ ===
|
|
310
|
-
j =
|
|
309
|
+
if ($ === E) {
|
|
310
|
+
j = F.isGlob = !0, ne = !0;
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
@@ -316,43 +316,43 @@ function gr() {
|
|
|
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
323
|
if ($ === m) {
|
|
324
|
-
if (j =
|
|
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
|
}
|
|
339
|
-
if (
|
|
339
|
+
if (b === !0)
|
|
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
|
-
if ($ ===
|
|
355
|
-
|
|
354
|
+
if ($ === E) {
|
|
355
|
+
ne = !0;
|
|
356
356
|
break;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -361,45 +361,45 @@ function gr() {
|
|
|
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
|
|
398
|
+
return ue;
|
|
399
399
|
}, Tt;
|
|
400
400
|
}
|
|
401
401
|
var vt, dn;
|
|
402
|
-
function
|
|
402
|
+
function Ar() {
|
|
403
403
|
if (dn) return vt;
|
|
404
404
|
dn = 1;
|
|
405
405
|
const e = /* @__PURE__ */ pt(), t = /* @__PURE__ */ dt(), {
|
|
@@ -408,187 +408,197 @@ function mr() {
|
|
|
408
408
|
REGEX_NON_SPECIAL_CHARS: i,
|
|
409
409
|
REGEX_SPECIAL_CHARS_BACKREF: o,
|
|
410
410
|
REPLACEMENTS: a
|
|
411
|
-
} = e, s = (y,
|
|
412
|
-
if (typeof
|
|
413
|
-
return
|
|
411
|
+
} = e, s = (y, R) => {
|
|
412
|
+
if (typeof R.expandRange == "function")
|
|
413
|
+
return R.expandRange(...y, R);
|
|
414
414
|
y.sort();
|
|
415
|
-
const
|
|
415
|
+
const f = `[${y.join("-")}]`;
|
|
416
416
|
try {
|
|
417
|
-
new RegExp(
|
|
417
|
+
new RegExp(f);
|
|
418
418
|
} catch {
|
|
419
|
-
return y.map((
|
|
419
|
+
return y.map((b) => t.escapeRegex(b)).join("..");
|
|
420
420
|
}
|
|
421
|
-
return
|
|
422
|
-
}, l = (y,
|
|
423
|
-
const
|
|
424
|
-
let
|
|
425
|
-
for (const
|
|
426
|
-
if (
|
|
427
|
-
|
|
421
|
+
return f;
|
|
422
|
+
}, l = (y, R) => `Missing ${y}: "${R}" - use "\\\\${R}" to match literal characters`, u = (y) => {
|
|
423
|
+
const R = [];
|
|
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
|
-
|
|
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
|
|
456
|
+
return R.push(A), R;
|
|
457
457
|
}, c = (y) => {
|
|
458
|
-
let
|
|
459
|
-
for (const
|
|
460
|
-
if (
|
|
461
|
-
|
|
458
|
+
let R = !1;
|
|
459
|
+
for (const f of y) {
|
|
460
|
+
if (R === !0) {
|
|
461
|
+
R = !1;
|
|
462
462
|
continue;
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
465
|
-
|
|
464
|
+
if (f === "\\") {
|
|
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
|
|
474
|
-
for (;
|
|
475
|
-
|
|
476
|
-
if (c(
|
|
477
|
-
return
|
|
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
|
+
if (c(R))
|
|
477
|
+
return R.replace(/\\(.)/g, "$1");
|
|
478
478
|
}, m = (y) => {
|
|
479
|
-
const
|
|
480
|
-
for (let
|
|
481
|
-
for (let
|
|
482
|
-
const
|
|
483
|
-
if (!(!
|
|
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 = (y,
|
|
487
|
+
}, C = (y, R = !0) => {
|
|
488
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
|
|
519
|
+
if (x === ")" && (w--, w === 0))
|
|
520
|
+
return R === !0 && g !== y.length - 1 ? void 0 : {
|
|
521
521
|
type: y[0],
|
|
522
|
-
body: y.slice(2,
|
|
523
|
-
end:
|
|
522
|
+
body: y.slice(2, g),
|
|
523
|
+
end: g
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
},
|
|
529
|
-
let
|
|
530
|
-
const
|
|
531
|
-
for (;
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
528
|
+
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`, I = (y) => {
|
|
529
|
+
let R = 0;
|
|
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
|
|
536
|
-
if (
|
|
535
|
+
const b = u(w.body).map((g) => g.trim());
|
|
536
|
+
if (b.length !== 1)
|
|
537
537
|
return;
|
|
538
|
-
const A =
|
|
538
|
+
const A = S(b[0]);
|
|
539
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
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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);
|
|
549
|
+
return R;
|
|
550
|
+
}, N = (y, R) => {
|
|
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
|
-
},
|
|
572
|
+
return A ? g ? { risky: !0, safeOutput: E([...new Set(b)]) } : { risky: !0 } : { risky: !1 };
|
|
573
|
+
}, k = (y, R) => {
|
|
564
574
|
if (typeof y != "string")
|
|
565
575
|
throw new TypeError("Expected a string");
|
|
566
576
|
y = a[y] || y;
|
|
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
|
|
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 = {
|
|
588
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 mr() {
|
|
|
599
609
|
parens: 0,
|
|
600
610
|
quotes: 0,
|
|
601
611
|
globstar: !1,
|
|
602
|
-
tokens:
|
|
612
|
+
tokens: g
|
|
603
613
|
};
|
|
604
|
-
y = t.removePrefix(y,
|
|
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 : (
|
|
624
|
+
V(), h.start++, v++;
|
|
625
|
+
return v % 2 === 0 ? !1 : (h.negated = !0, h.start++, !0);
|
|
616
626
|
}, et = (v) => {
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
|
|
620
|
-
},
|
|
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
|
-
}, tt = (v,
|
|
631
|
-
const T = { ...
|
|
632
|
-
T.prev = d, T.parens =
|
|
633
|
-
const
|
|
634
|
-
et("parens"),
|
|
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
|
-
et("parens"),
|
|
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
731
|
et("brackets");
|
|
722
|
-
|
|
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 (
|
|
758
|
+
if (p === "{" && f.nobrace !== !0) {
|
|
749
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
|
-
tt("qmark",
|
|
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
|
-
tt("negate",
|
|
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
|
-
tt("plus",
|
|
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
|
-
tt("star",
|
|
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: ${
|
|
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}`);
|
|
956
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
|
-
}, vt =
|
|
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
1010
|
var bt, hn;
|
|
1001
|
-
function
|
|
1011
|
+
function yr() {
|
|
1002
1012
|
if (hn) return bt;
|
|
1003
1013
|
hn = 1;
|
|
1004
|
-
const e = /* @__PURE__ */
|
|
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,35 +1025,35 @@ function Ar() {
|
|
|
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 || {},
|
|
1028
|
+
const c = s || {}, S = c.windows, m = u ? o.compileRe(a, s) : o.makeRe(a, s, !1, !0), C = m.state;
|
|
1019
1029
|
delete m.state;
|
|
1020
|
-
let
|
|
1030
|
+
let E = () => !1;
|
|
1021
1031
|
if (c.ignore) {
|
|
1022
|
-
const
|
|
1023
|
-
|
|
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,
|
|
1038
|
-
return C === !1 && (
|
|
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
|
-
const
|
|
1046
|
-
return u === !0 && (
|
|
1055
|
+
const E = o.toRegex(C, s);
|
|
1056
|
+
return u === !0 && (E.state = a), E;
|
|
1047
1057
|
}, o.makeRe = (a, s = {}, l = !1, u = !1) => {
|
|
1048
1058
|
if (!a || typeof a != "string")
|
|
1049
1059
|
throw new TypeError("Expected a non-empty string");
|
|
@@ -1060,21 +1070,21 @@ function Ar() {
|
|
|
1060
1070
|
}, o.constants = r, bt = o, bt;
|
|
1061
1071
|
}
|
|
1062
1072
|
var Rt, gn;
|
|
1063
|
-
function
|
|
1073
|
+
function Sr() {
|
|
1064
1074
|
if (gn) return Rt;
|
|
1065
1075
|
gn = 1;
|
|
1066
|
-
const e = /* @__PURE__ */
|
|
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
1080
|
return Object.assign(n, e), Rt = n, Rt;
|
|
1071
1081
|
}
|
|
1072
|
-
var Er = /* @__PURE__ */
|
|
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 vr(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 ha(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: {},
|
|
@@ -1107,7 +1117,7 @@ const it = {
|
|
|
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] = {
|
|
@@ -1142,17 +1152,17 @@ function ma(e, t = {}) {
|
|
|
1142
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
1158
|
function at(e) {
|
|
1149
|
-
return
|
|
1159
|
+
return Re(e) && typeof e.$ref == "string";
|
|
1150
1160
|
}
|
|
1151
|
-
function
|
|
1161
|
+
function _r(e) {
|
|
1152
1162
|
return at(e) && Object.keys(e).length > 1;
|
|
1153
1163
|
}
|
|
1154
|
-
function
|
|
1155
|
-
return
|
|
1164
|
+
function xr(e) {
|
|
1165
|
+
return Re(e) && typeof e.externalValue == "string";
|
|
1156
1166
|
}
|
|
1157
1167
|
class zt {
|
|
1158
1168
|
source;
|
|
@@ -1161,7 +1171,7 @@ class zt {
|
|
|
1161
1171
|
this.source = t, this.pointer = n;
|
|
1162
1172
|
}
|
|
1163
1173
|
child(t) {
|
|
1164
|
-
return new zt(this.source,
|
|
1174
|
+
return new zt(this.source, be(this.pointer, (Array.isArray(t) ? t : [t]).map(Pe).join("/")));
|
|
1165
1175
|
}
|
|
1166
1176
|
key() {
|
|
1167
1177
|
return { ...this, reportOnKey: !0 };
|
|
@@ -1170,7 +1180,7 @@ class zt {
|
|
|
1170
1180
|
return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer);
|
|
1171
1181
|
}
|
|
1172
1182
|
}
|
|
1173
|
-
function
|
|
1183
|
+
function Ir(e) {
|
|
1174
1184
|
const t = e.indexOf("~") === -1 ? e : e.replaceAll("~1", "/").replaceAll("~0", "~");
|
|
1175
1185
|
try {
|
|
1176
1186
|
return decodeURIComponent(t);
|
|
@@ -1178,51 +1188,51 @@ function xr(e) {
|
|
|
1178
1188
|
return t;
|
|
1179
1189
|
}
|
|
1180
1190
|
}
|
|
1181
|
-
function
|
|
1191
|
+
function Pe(e) {
|
|
1182
1192
|
return typeof e == "number" || e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
1183
1193
|
}
|
|
1184
|
-
function
|
|
1194
|
+
function wr(e) {
|
|
1185
1195
|
const [t, n = ""] = e.split("#/");
|
|
1186
1196
|
return {
|
|
1187
1197
|
uri: (t.endsWith("#") ? t.slice(0, -1) : t) || null,
|
|
1188
|
-
pointer:
|
|
1198
|
+
pointer: Nr(n)
|
|
1189
1199
|
};
|
|
1190
1200
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return e.split("/").map(
|
|
1201
|
+
function Nr(e) {
|
|
1202
|
+
return e.split("/").map(Ir).filter(gr);
|
|
1193
1203
|
}
|
|
1194
|
-
function
|
|
1204
|
+
function ya(e) {
|
|
1195
1205
|
const t = e.split("/");
|
|
1196
1206
|
return t[t.length - 1];
|
|
1197
1207
|
}
|
|
1198
|
-
function
|
|
1208
|
+
function Sa(e) {
|
|
1199
1209
|
const t = e.split(/[\/\\]/);
|
|
1200
1210
|
return t[t.length - 1].replace(/\.[^.]+$/, "");
|
|
1201
1211
|
}
|
|
1202
|
-
function
|
|
1212
|
+
function Fe(e) {
|
|
1203
1213
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://") || e.startsWith("data:");
|
|
1204
1214
|
}
|
|
1205
1215
|
function Ea(e) {
|
|
1206
|
-
return Xe.extname(e) ?
|
|
1216
|
+
return Xe.extname(e) ? Fe(e) ? e.substring(0, e.lastIndexOf("/")) : Xe.dirname(e) : e;
|
|
1207
1217
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return
|
|
1218
|
+
function Ca(e, t) {
|
|
1219
|
+
return Fe(e) ? new URL(t, e.endsWith("/") ? e : `${e}/`).href : Xe.resolve(e, t);
|
|
1210
1220
|
}
|
|
1211
|
-
function
|
|
1212
|
-
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));
|
|
1213
1223
|
}
|
|
1214
|
-
function
|
|
1224
|
+
function $r(e) {
|
|
1215
1225
|
return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e);
|
|
1216
1226
|
}
|
|
1217
|
-
function
|
|
1218
|
-
if (!
|
|
1227
|
+
function va(e, t, n) {
|
|
1228
|
+
if (!Re(t.node) && n.parent) {
|
|
1219
1229
|
n.parent[n.key] = t.node;
|
|
1220
1230
|
return;
|
|
1221
1231
|
}
|
|
1222
|
-
delete e.$ref,
|
|
1232
|
+
delete e.$ref, Re(t.node) && Object.assign(e, { ...t.node, ...e });
|
|
1223
1233
|
}
|
|
1224
|
-
var
|
|
1225
|
-
function
|
|
1234
|
+
var H = /* @__PURE__ */ Symbol("NOT_RESOLVED"), Qt = /* @__PURE__ */ Symbol("MERGE_KEY");
|
|
1235
|
+
function ee(e, t) {
|
|
1226
1236
|
return {
|
|
1227
1237
|
tagName: e,
|
|
1228
1238
|
nodeKind: "scalar",
|
|
@@ -1270,7 +1280,7 @@ function ht(e, t) {
|
|
|
1270
1280
|
representTagName: t.representTagName ?? null
|
|
1271
1281
|
};
|
|
1272
1282
|
}
|
|
1273
|
-
var
|
|
1283
|
+
var kr = ee("tag:yaml.org,2002:str", {
|
|
1274
1284
|
resolve: (e) => e,
|
|
1275
1285
|
identify: (e) => typeof e == "string"
|
|
1276
1286
|
}), Lr = [
|
|
@@ -1279,7 +1289,7 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1279
1289
|
"null",
|
|
1280
1290
|
"Null",
|
|
1281
1291
|
"NULL"
|
|
1282
|
-
],
|
|
1292
|
+
], Or = ee("tag:yaml.org,2002:null", {
|
|
1283
1293
|
implicit: !0,
|
|
1284
1294
|
implicitFirstChars: [
|
|
1285
1295
|
"",
|
|
@@ -1287,22 +1297,22 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1287
1297
|
"n",
|
|
1288
1298
|
"N"
|
|
1289
1299
|
],
|
|
1290
|
-
resolve: (e) => Lr.indexOf(e) !== -1 ? null :
|
|
1300
|
+
resolve: (e) => Lr.indexOf(e) !== -1 ? null : H,
|
|
1291
1301
|
identify: (e) => e === null,
|
|
1292
1302
|
represent: () => "null"
|
|
1293
|
-
}),
|
|
1303
|
+
}), Pr = ee("tag:yaml.org,2002:null", {
|
|
1294
1304
|
implicit: !0,
|
|
1295
1305
|
implicitFirstChars: ["n"],
|
|
1296
|
-
resolve: (e, t) => e === "null" || t && e === "" ? null :
|
|
1306
|
+
resolve: (e, t) => e === "null" || t && e === "" ? null : H,
|
|
1297
1307
|
identify: (e) => e === null,
|
|
1298
1308
|
represent: () => "null"
|
|
1299
|
-
}),
|
|
1309
|
+
}), Fr = [
|
|
1300
1310
|
"",
|
|
1301
1311
|
"~",
|
|
1302
1312
|
"null",
|
|
1303
1313
|
"Null",
|
|
1304
1314
|
"NULL"
|
|
1305
|
-
],
|
|
1315
|
+
], Hr = ee("tag:yaml.org,2002:null", {
|
|
1306
1316
|
implicit: !0,
|
|
1307
1317
|
implicitFirstChars: [
|
|
1308
1318
|
"",
|
|
@@ -1310,18 +1320,18 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1310
1320
|
"n",
|
|
1311
1321
|
"N"
|
|
1312
1322
|
],
|
|
1313
|
-
resolve: (e) =>
|
|
1323
|
+
resolve: (e) => Fr.indexOf(e) !== -1 ? null : H,
|
|
1314
1324
|
identify: (e) => e === null,
|
|
1315
1325
|
represent: () => "null"
|
|
1316
|
-
}),
|
|
1326
|
+
}), Mr = [
|
|
1317
1327
|
"true",
|
|
1318
1328
|
"True",
|
|
1319
1329
|
"TRUE"
|
|
1320
|
-
],
|
|
1330
|
+
], Br = [
|
|
1321
1331
|
"false",
|
|
1322
1332
|
"False",
|
|
1323
1333
|
"FALSE"
|
|
1324
|
-
],
|
|
1334
|
+
], Dr = ee("tag:yaml.org,2002:bool", {
|
|
1325
1335
|
implicit: !0,
|
|
1326
1336
|
implicitFirstChars: [
|
|
1327
1337
|
"t",
|
|
@@ -1329,16 +1339,16 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1329
1339
|
"f",
|
|
1330
1340
|
"F"
|
|
1331
1341
|
],
|
|
1332
|
-
resolve: (e) =>
|
|
1342
|
+
resolve: (e) => Mr.indexOf(e) !== -1 ? !0 : Br.indexOf(e) !== -1 ? !1 : H,
|
|
1333
1343
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1334
1344
|
represent: (e) => e ? "true" : "false"
|
|
1335
|
-
}),
|
|
1345
|
+
}), Ur = ["true"], Kr = ["false"], qr = ee("tag:yaml.org,2002:bool", {
|
|
1336
1346
|
implicit: !0,
|
|
1337
1347
|
implicitFirstChars: ["t", "f"],
|
|
1338
|
-
resolve: (e) =>
|
|
1348
|
+
resolve: (e) => Ur.indexOf(e) !== -1 ? !0 : Kr.indexOf(e) !== -1 ? !1 : H,
|
|
1339
1349
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1340
1350
|
represent: (e) => e ? "true" : "false"
|
|
1341
|
-
}),
|
|
1351
|
+
}), Gr = [
|
|
1342
1352
|
"true",
|
|
1343
1353
|
"True",
|
|
1344
1354
|
"TRUE",
|
|
@@ -1350,7 +1360,7 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1350
1360
|
"on",
|
|
1351
1361
|
"On",
|
|
1352
1362
|
"ON"
|
|
1353
|
-
],
|
|
1363
|
+
], Yr = [
|
|
1354
1364
|
"false",
|
|
1355
1365
|
"False",
|
|
1356
1366
|
"FALSE",
|
|
@@ -1362,7 +1372,7 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1362
1372
|
"off",
|
|
1363
1373
|
"Off",
|
|
1364
1374
|
"OFF"
|
|
1365
|
-
],
|
|
1375
|
+
], Wr = ee("tag:yaml.org,2002:bool", {
|
|
1366
1376
|
implicit: !0,
|
|
1367
1377
|
implicitFirstChars: [
|
|
1368
1378
|
"y",
|
|
@@ -1376,51 +1386,51 @@ var $r = te("tag:yaml.org,2002:str", {
|
|
|
1376
1386
|
"o",
|
|
1377
1387
|
"O"
|
|
1378
1388
|
],
|
|
1379
|
-
resolve: (e) =>
|
|
1389
|
+
resolve: (e) => Gr.indexOf(e) !== -1 ? !0 : Yr.indexOf(e) !== -1 ? !1 : H,
|
|
1380
1390
|
identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
|
|
1381
1391
|
represent: (e) => e ? "true" : "false"
|
|
1382
|
-
}),
|
|
1383
|
-
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) {
|
|
1384
1394
|
let t = e, n = 1;
|
|
1385
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);
|
|
1386
1396
|
}
|
|
1387
|
-
function
|
|
1397
|
+
function zr(e, t) {
|
|
1388
1398
|
if (t) {
|
|
1389
|
-
if (!
|
|
1390
|
-
} else if (!
|
|
1391
|
-
const n =
|
|
1392
|
-
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;
|
|
1393
1403
|
}
|
|
1394
|
-
var Fn =
|
|
1404
|
+
var Fn = ee("tag:yaml.org,2002:int", {
|
|
1395
1405
|
implicit: !0,
|
|
1396
1406
|
implicitFirstChars: [
|
|
1397
1407
|
"-",
|
|
1398
1408
|
"+",
|
|
1399
1409
|
..."0123456789"
|
|
1400
1410
|
],
|
|
1401
|
-
resolve:
|
|
1411
|
+
resolve: zr,
|
|
1402
1412
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1403
1413
|
represent: (e) => e.toString(10)
|
|
1404
|
-
}),
|
|
1405
|
-
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) {
|
|
1406
1416
|
let t = e, n = 1;
|
|
1407
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);
|
|
1408
1418
|
}
|
|
1409
|
-
function
|
|
1419
|
+
function ei(e, t) {
|
|
1410
1420
|
if (t) {
|
|
1411
|
-
if (!
|
|
1412
|
-
} else if (!
|
|
1413
|
-
const n =
|
|
1414
|
-
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;
|
|
1415
1425
|
}
|
|
1416
|
-
var
|
|
1426
|
+
var ti = ee("tag:yaml.org,2002:int", {
|
|
1417
1427
|
implicit: !0,
|
|
1418
1428
|
implicitFirstChars: ["-", ..."0123456789"],
|
|
1419
|
-
resolve:
|
|
1429
|
+
resolve: ei,
|
|
1420
1430
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1421
1431
|
represent: (e) => e.toString(10)
|
|
1422
|
-
}),
|
|
1423
|
-
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) {
|
|
1424
1434
|
let t = e.replace(/_/g, ""), n = 1;
|
|
1425
1435
|
if ((t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b")) return n * parseInt(t.slice(2), 2);
|
|
1426
1436
|
if (t.startsWith("0x")) return n * parseInt(t.slice(2), 16);
|
|
@@ -1431,32 +1441,32 @@ function ni(e) {
|
|
|
1431
1441
|
}
|
|
1432
1442
|
return t !== "0" && t[0] === "0" ? n * parseInt(t, 8) : n * parseInt(t, 10);
|
|
1433
1443
|
}
|
|
1434
|
-
function
|
|
1435
|
-
if (!
|
|
1436
|
-
const t =
|
|
1437
|
-
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;
|
|
1438
1448
|
}
|
|
1439
|
-
var
|
|
1449
|
+
var Lt = ee("tag:yaml.org,2002:int", {
|
|
1440
1450
|
implicit: !0,
|
|
1441
1451
|
implicitFirstChars: [
|
|
1442
1452
|
"-",
|
|
1443
1453
|
"+",
|
|
1444
1454
|
..."0123456789"
|
|
1445
1455
|
],
|
|
1446
|
-
resolve:
|
|
1456
|
+
resolve: ii,
|
|
1447
1457
|
identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
|
|
1448
1458
|
represent: (e) => e.toString(10)
|
|
1449
|
-
}),
|
|
1450
|
-
function
|
|
1451
|
-
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;
|
|
1452
1462
|
let t = e.toLowerCase();
|
|
1453
1463
|
const n = t[0] === "-" ? -1 : 1;
|
|
1454
1464
|
if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
1455
1465
|
if (t === ".nan") return NaN;
|
|
1456
1466
|
const r = n * parseFloat(t);
|
|
1457
|
-
return Number.isFinite(r) ||
|
|
1467
|
+
return Number.isFinite(r) || ai.test(e) ? r : H;
|
|
1458
1468
|
}
|
|
1459
|
-
function
|
|
1469
|
+
function li(e) {
|
|
1460
1470
|
if (isNaN(e)) return ".nan";
|
|
1461
1471
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1462
1472
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1464,7 +1474,7 @@ function si(e) {
|
|
|
1464
1474
|
const t = e.toString(10);
|
|
1465
1475
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1466
1476
|
}
|
|
1467
|
-
var Hn =
|
|
1477
|
+
var Hn = ee("tag:yaml.org,2002:float", {
|
|
1468
1478
|
implicit: !0,
|
|
1469
1479
|
implicitFirstChars: [
|
|
1470
1480
|
"-",
|
|
@@ -1472,25 +1482,25 @@ var Hn = te("tag:yaml.org,2002:float", {
|
|
|
1472
1482
|
".",
|
|
1473
1483
|
..."0123456789"
|
|
1474
1484
|
],
|
|
1475
|
-
resolve:
|
|
1485
|
+
resolve: si,
|
|
1476
1486
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1477
|
-
represent:
|
|
1478
|
-
}),
|
|
1479
|
-
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) {
|
|
1480
1490
|
if (t) {
|
|
1481
|
-
if (!
|
|
1491
|
+
if (!ui.test(e)) return H;
|
|
1482
1492
|
let r = e.toLowerCase();
|
|
1483
1493
|
const i = r[0] === "-" ? -1 : 1;
|
|
1484
1494
|
if ("+-".includes(r[0]) && (r = r.slice(1)), r === ".inf") return i === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
1485
1495
|
if (r === ".nan") return NaN;
|
|
1486
1496
|
const o = i * parseFloat(r);
|
|
1487
|
-
return Number.isFinite(o) ? o :
|
|
1497
|
+
return Number.isFinite(o) ? o : H;
|
|
1488
1498
|
}
|
|
1489
|
-
if (!
|
|
1499
|
+
if (!ci.test(e)) return H;
|
|
1490
1500
|
const n = Number(e);
|
|
1491
|
-
return Number.isFinite(n) ? n :
|
|
1501
|
+
return Number.isFinite(n) ? n : H;
|
|
1492
1502
|
}
|
|
1493
|
-
function
|
|
1503
|
+
function pi(e) {
|
|
1494
1504
|
if (isNaN(e)) return ".nan";
|
|
1495
1505
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1496
1506
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1498,15 +1508,15 @@ function fi(e) {
|
|
|
1498
1508
|
const t = e.toString(10);
|
|
1499
1509
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1500
1510
|
}
|
|
1501
|
-
var
|
|
1511
|
+
var di = ee("tag:yaml.org,2002:float", {
|
|
1502
1512
|
implicit: !0,
|
|
1503
1513
|
implicitFirstChars: ["-", ..."0123456789"],
|
|
1504
|
-
resolve:
|
|
1514
|
+
resolve: fi,
|
|
1505
1515
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1506
|
-
represent:
|
|
1507
|
-
}),
|
|
1508
|
-
function
|
|
1509
|
-
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;
|
|
1510
1520
|
let t = e.toLowerCase().replace(/_/g, "");
|
|
1511
1521
|
const n = t[0] === "-" ? -1 : 1;
|
|
1512
1522
|
if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
@@ -1516,9 +1526,9 @@ function gi(e) {
|
|
|
1516
1526
|
for (const i of t.split(":")) r = r * 60 + Number(i);
|
|
1517
1527
|
r *= n;
|
|
1518
1528
|
} else r = n * parseFloat(t);
|
|
1519
|
-
return Number.isFinite(r) ||
|
|
1529
|
+
return Number.isFinite(r) || gi.test(e) ? r : H;
|
|
1520
1530
|
}
|
|
1521
|
-
function
|
|
1531
|
+
function Ai(e) {
|
|
1522
1532
|
if (isNaN(e)) return ".nan";
|
|
1523
1533
|
if (e === Number.POSITIVE_INFINITY) return ".inf";
|
|
1524
1534
|
if (e === Number.NEGATIVE_INFINITY) return "-.inf";
|
|
@@ -1526,7 +1536,7 @@ function mi(e) {
|
|
|
1526
1536
|
const t = e.toString(10);
|
|
1527
1537
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1528
1538
|
}
|
|
1529
|
-
var Ot =
|
|
1539
|
+
var Ot = ee("tag:yaml.org,2002:float", {
|
|
1530
1540
|
implicit: !0,
|
|
1531
1541
|
implicitFirstChars: [
|
|
1532
1542
|
"-",
|
|
@@ -1534,17 +1544,17 @@ var Ot = te("tag:yaml.org,2002:float", {
|
|
|
1534
1544
|
".",
|
|
1535
1545
|
..."0123456789"
|
|
1536
1546
|
],
|
|
1537
|
-
resolve:
|
|
1547
|
+
resolve: mi,
|
|
1538
1548
|
identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
|
|
1539
|
-
represent:
|
|
1540
|
-
}), Mn =
|
|
1549
|
+
represent: Ai
|
|
1550
|
+
}), Mn = ee("tag:yaml.org,2002:merge", {
|
|
1541
1551
|
implicit: !0,
|
|
1542
1552
|
implicitFirstChars: ["<"],
|
|
1543
|
-
resolve: (e, t) => e === "<<" || t && e === "" ? Qt :
|
|
1544
|
-
}),
|
|
1545
|
-
function
|
|
1553
|
+
resolve: (e, t) => e === "<<" || t && e === "" ? Qt : H
|
|
1554
|
+
}), yi = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
1555
|
+
function Si(e) {
|
|
1546
1556
|
const t = e.replace(/\s/g, "");
|
|
1547
|
-
if (t.length % 4 !== 0 || !
|
|
1557
|
+
if (t.length % 4 !== 0 || !yi.test(t)) return H;
|
|
1548
1558
|
const n = atob(t), r = new Uint8Array(n.length);
|
|
1549
1559
|
for (let i = 0; i < n.length; i++) r[i] = n.charCodeAt(i);
|
|
1550
1560
|
return r;
|
|
@@ -1554,48 +1564,48 @@ function Ei(e) {
|
|
|
1554
1564
|
for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
|
|
1555
1565
|
return btoa(t);
|
|
1556
1566
|
}
|
|
1557
|
-
var Bn =
|
|
1558
|
-
resolve:
|
|
1567
|
+
var Bn = ee("tag:yaml.org,2002:binary", {
|
|
1568
|
+
resolve: Si,
|
|
1559
1569
|
identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]",
|
|
1560
1570
|
represent: Ei
|
|
1561
|
-
}),
|
|
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]))?))?$");
|
|
1562
1572
|
function mn(e, t, n, r = 0, i = 0, o = 0, a = 0) {
|
|
1563
1573
|
const s = new Date(Date.UTC(e, t, n, r, i, o, a));
|
|
1564
1574
|
return s.setUTCFullYear(e, t, n), s;
|
|
1565
1575
|
}
|
|
1566
|
-
function
|
|
1567
|
-
let t =
|
|
1568
|
-
if (t === null && (t =
|
|
1576
|
+
function vi(e) {
|
|
1577
|
+
let t = Ci.exec(e);
|
|
1578
|
+
if (t === null && (t = Ti.exec(e)), t === null) return H;
|
|
1569
1579
|
const n = +t[1], r = +t[2] - 1, i = +t[3];
|
|
1570
1580
|
if (!t[4]) {
|
|
1571
1581
|
const c = mn(n, r, i);
|
|
1572
|
-
return c.getUTCFullYear() !== n || c.getUTCMonth() !== r || c.getUTCDate() !== i ?
|
|
1582
|
+
return c.getUTCFullYear() !== n || c.getUTCMonth() !== r || c.getUTCDate() !== i ? H : c;
|
|
1573
1583
|
}
|
|
1574
1584
|
const o = +t[4], a = +t[5], s = +t[6];
|
|
1575
1585
|
let l = 0;
|
|
1576
|
-
if (o > 23 || a > 59 || s > 59) return
|
|
1586
|
+
if (o > 23 || a > 59 || s > 59) return H;
|
|
1577
1587
|
if (t[7]) {
|
|
1578
1588
|
let c = t[7].slice(0, 3);
|
|
1579
1589
|
for (; c.length < 3; ) c += "0";
|
|
1580
1590
|
l = +c;
|
|
1581
1591
|
}
|
|
1582
1592
|
const u = mn(n, r, i, o, a, s, l);
|
|
1583
|
-
if (u.getUTCFullYear() !== n || u.getUTCMonth() !== r || u.getUTCDate() !== i) return
|
|
1593
|
+
if (u.getUTCFullYear() !== n || u.getUTCMonth() !== r || u.getUTCDate() !== i) return H;
|
|
1584
1594
|
if (t[9]) {
|
|
1585
|
-
const c = +t[10],
|
|
1586
|
-
if (c > 23 ||
|
|
1587
|
-
const m = (c * 60 +
|
|
1595
|
+
const c = +t[10], S = +(t[11] || 0);
|
|
1596
|
+
if (c > 23 || S > 59) return H;
|
|
1597
|
+
const m = (c * 60 + S) * 6e4;
|
|
1588
1598
|
u.setTime(u.getTime() - (t[9] === "-" ? -m : m));
|
|
1589
1599
|
}
|
|
1590
1600
|
return u;
|
|
1591
1601
|
}
|
|
1592
|
-
var
|
|
1602
|
+
var bi = ee("tag:yaml.org,2002:timestamp", {
|
|
1593
1603
|
implicit: !0,
|
|
1594
1604
|
implicitFirstChars: [..."0123456789"],
|
|
1595
|
-
resolve:
|
|
1605
|
+
resolve: vi,
|
|
1596
1606
|
identify: (e) => e instanceof Date,
|
|
1597
1607
|
represent: (e) => e.toISOString()
|
|
1598
|
-
}),
|
|
1608
|
+
}), Ri = Zt("tag:yaml.org,2002:seq", {
|
|
1599
1609
|
create: () => [],
|
|
1600
1610
|
addItem: (e, t) => {
|
|
1601
1611
|
e.push(t);
|
|
@@ -1639,7 +1649,7 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1639
1649
|
const n = t, r = Object.keys(n);
|
|
1640
1650
|
return r.length !== 1 ? "cannot resolve a pairs item" : (e.push([r[0], n[r[0]]]), "");
|
|
1641
1651
|
}
|
|
1642
|
-
}),
|
|
1652
|
+
}), _i = ht("tag:yaml.org,2002:map", {
|
|
1643
1653
|
create: () => ({}),
|
|
1644
1654
|
identify: gt,
|
|
1645
1655
|
represent: (e) => {
|
|
@@ -1676,21 +1686,21 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1676
1686
|
keys: (e) => e.keys(),
|
|
1677
1687
|
get: () => null
|
|
1678
1688
|
});
|
|
1679
|
-
function
|
|
1689
|
+
function xi() {
|
|
1680
1690
|
return {
|
|
1681
1691
|
scalar: /* @__PURE__ */ Object.create(null),
|
|
1682
1692
|
sequence: /* @__PURE__ */ Object.create(null),
|
|
1683
1693
|
mapping: /* @__PURE__ */ Object.create(null)
|
|
1684
1694
|
};
|
|
1685
1695
|
}
|
|
1686
|
-
function
|
|
1696
|
+
function Ii() {
|
|
1687
1697
|
return {
|
|
1688
1698
|
scalar: [],
|
|
1689
1699
|
sequence: [],
|
|
1690
1700
|
mapping: []
|
|
1691
1701
|
};
|
|
1692
1702
|
}
|
|
1693
|
-
function
|
|
1703
|
+
function wi(e) {
|
|
1694
1704
|
const t = [];
|
|
1695
1705
|
for (const n of e) {
|
|
1696
1706
|
let r = t.length;
|
|
@@ -1716,7 +1726,7 @@ var mt = class qn {
|
|
|
1716
1726
|
exact;
|
|
1717
1727
|
prefix;
|
|
1718
1728
|
constructor(t) {
|
|
1719
|
-
const n =
|
|
1729
|
+
const n = wi(t), r = [], i = xi(), o = Ii();
|
|
1720
1730
|
for (const c of n) {
|
|
1721
1731
|
if (c.nodeKind === "scalar" && c.implicit) {
|
|
1722
1732
|
if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
|
|
@@ -1735,9 +1745,9 @@ var mt = class qn {
|
|
|
1735
1745
|
}
|
|
1736
1746
|
}
|
|
1737
1747
|
const a = r.filter((c) => c.implicitFirstChars === null), s = /* @__PURE__ */ new Set();
|
|
1738
|
-
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);
|
|
1739
1749
|
const l = /* @__PURE__ */ new Map();
|
|
1740
|
-
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));
|
|
1741
1751
|
const u = i.scalar["tag:yaml.org,2002:str"];
|
|
1742
1752
|
if (!u) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
|
|
1743
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;
|
|
@@ -1748,30 +1758,30 @@ var mt = class qn {
|
|
|
1748
1758
|
return new qn([...this.tags, ...n]);
|
|
1749
1759
|
}
|
|
1750
1760
|
}, Jt = new mt([
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1761
|
+
kr,
|
|
1762
|
+
Ri,
|
|
1763
|
+
_i
|
|
1754
1764
|
]);
|
|
1755
1765
|
new mt([
|
|
1756
1766
|
...Jt.tags,
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1767
|
+
Pr,
|
|
1768
|
+
qr,
|
|
1769
|
+
ti,
|
|
1770
|
+
di
|
|
1761
1771
|
]);
|
|
1762
1772
|
var Gn = new mt([
|
|
1763
1773
|
...Jt.tags,
|
|
1764
|
-
|
|
1765
|
-
|
|
1774
|
+
Or,
|
|
1775
|
+
Dr,
|
|
1766
1776
|
Fn,
|
|
1767
1777
|
Hn
|
|
1768
|
-
]),
|
|
1778
|
+
]), Ni = new mt([
|
|
1769
1779
|
...Jt.tags,
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1780
|
+
Hr,
|
|
1781
|
+
Wr,
|
|
1782
|
+
Lt,
|
|
1773
1783
|
Ot,
|
|
1774
|
-
|
|
1784
|
+
bi,
|
|
1775
1785
|
Mn,
|
|
1776
1786
|
Bn,
|
|
1777
1787
|
Dn,
|
|
@@ -1830,7 +1840,7 @@ ht("tag:yaml.org,2002:map", {
|
|
|
1830
1840
|
return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null;
|
|
1831
1841
|
}
|
|
1832
1842
|
});
|
|
1833
|
-
var
|
|
1843
|
+
var $i = {
|
|
1834
1844
|
maxLength: 79,
|
|
1835
1845
|
indent: 1,
|
|
1836
1846
|
linesBefore: 3,
|
|
@@ -1847,10 +1857,10 @@ function _t(e, t, n, r, i) {
|
|
|
1847
1857
|
function xt(e, t) {
|
|
1848
1858
|
return " ".repeat(Math.max(t - e.length, 0)) + e;
|
|
1849
1859
|
}
|
|
1850
|
-
function
|
|
1860
|
+
function ki(e, t) {
|
|
1851
1861
|
if (!e.buffer) return null;
|
|
1852
1862
|
const n = {
|
|
1853
|
-
|
|
1863
|
+
...$i,
|
|
1854
1864
|
...t
|
|
1855
1865
|
}, r = /\r?\n|\r|\0/g, i = [0], o = [];
|
|
1856
1866
|
let a, s = -1;
|
|
@@ -1864,9 +1874,9 @@ function $i(e, t) {
|
|
|
1864
1874
|
l = `${" ".repeat(n.indent)}${xt((e.line - m + 1).toString(), u)} | ${C.str}
|
|
1865
1875
|
${l}`;
|
|
1866
1876
|
}
|
|
1867
|
-
const
|
|
1868
|
-
l += `${" ".repeat(n.indent)}${xt((e.line + 1).toString(), u)} | ${
|
|
1869
|
-
`, 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)}^
|
|
1870
1880
|
`;
|
|
1871
1881
|
for (let m = 1; m <= n.linesAfter && !(s + m >= o.length); m++) {
|
|
1872
1882
|
const C = _t(e.buffer, i[s + m], o[s + m], e.position - (i[s] - i[s + m]), c);
|
|
@@ -1904,10 +1914,10 @@ function yt(e, t, n, r = "") {
|
|
|
1904
1914
|
line: i,
|
|
1905
1915
|
column: t - o
|
|
1906
1916
|
};
|
|
1907
|
-
throw a.snippet =
|
|
1917
|
+
throw a.snippet = ki(a), new At(n, a);
|
|
1908
1918
|
}
|
|
1909
1919
|
var Li = -1;
|
|
1910
|
-
function
|
|
1920
|
+
function Sn(e) {
|
|
1911
1921
|
switch (e) {
|
|
1912
1922
|
case 48:
|
|
1913
1923
|
return "\0";
|
|
@@ -1952,14 +1962,14 @@ function En(e) {
|
|
|
1952
1962
|
}
|
|
1953
1963
|
var Yn = new Array(256), Wn = new Array(256);
|
|
1954
1964
|
for (let e = 0; e < 256; e++)
|
|
1955
|
-
Yn[e] =
|
|
1956
|
-
function
|
|
1965
|
+
Yn[e] = Sn(e) ? 1 : 0, Wn[e] = Sn(e);
|
|
1966
|
+
function Oi(e) {
|
|
1957
1967
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
1958
1968
|
}
|
|
1959
|
-
function
|
|
1969
|
+
function Pi(e) {
|
|
1960
1970
|
return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10;
|
|
1961
1971
|
}
|
|
1962
|
-
function
|
|
1972
|
+
function Fi(e) {
|
|
1963
1973
|
return e === 120 ? 2 : e === 117 ? 4 : 8;
|
|
1964
1974
|
}
|
|
1965
1975
|
function ct(e, t, n) {
|
|
@@ -1982,7 +1992,7 @@ function en(e) {
|
|
|
1982
1992
|
return e === 1 ? " " : `
|
|
1983
1993
|
`.repeat(e - 1);
|
|
1984
1994
|
}
|
|
1985
|
-
function
|
|
1995
|
+
function Hi(e, t, n) {
|
|
1986
1996
|
let r = "", i = t, o = t, a = t;
|
|
1987
1997
|
for (; i < n; ) {
|
|
1988
1998
|
const s = e.charCodeAt(i);
|
|
@@ -1995,7 +2005,7 @@ function Fi(e, t, n) {
|
|
|
1995
2005
|
}
|
|
1996
2006
|
return r + e.slice(o, a);
|
|
1997
2007
|
}
|
|
1998
|
-
function
|
|
2008
|
+
function Mi(e, t, n) {
|
|
1999
2009
|
let r = "", i = t, o = t, a = t;
|
|
2000
2010
|
for (; i < n; ) {
|
|
2001
2011
|
const s = e.charCodeAt(i);
|
|
@@ -2010,7 +2020,7 @@ function Hi(e, t, n) {
|
|
|
2010
2020
|
}
|
|
2011
2021
|
return r + e.slice(o, n);
|
|
2012
2022
|
}
|
|
2013
|
-
function
|
|
2023
|
+
function Bi(e, t, n) {
|
|
2014
2024
|
let r = "", i = t, o = t, a = t;
|
|
2015
2025
|
for (; i < n; ) {
|
|
2016
2026
|
const s = e.charCodeAt(i);
|
|
@@ -2021,13 +2031,13 @@ function Mi(e, t, n) {
|
|
|
2021
2031
|
else if (l < 256 && Yn[l])
|
|
2022
2032
|
r += Wn[l], i++;
|
|
2023
2033
|
else {
|
|
2024
|
-
let u =
|
|
2034
|
+
let u = Fi(l), c = 0;
|
|
2025
2035
|
for (; u > 0; u--) {
|
|
2026
2036
|
i++;
|
|
2027
|
-
const
|
|
2028
|
-
c = (c << 4) +
|
|
2037
|
+
const S = Pi(e.charCodeAt(i));
|
|
2038
|
+
c = (c << 4) + S;
|
|
2029
2039
|
}
|
|
2030
|
-
r +=
|
|
2040
|
+
r += Oi(c), i++;
|
|
2031
2041
|
}
|
|
2032
2042
|
o = a = i;
|
|
2033
2043
|
} else if (s === 10 || s === 13) {
|
|
@@ -2039,48 +2049,48 @@ function Mi(e, t, n) {
|
|
|
2039
2049
|
}
|
|
2040
2050
|
return r + e.slice(o, n);
|
|
2041
2051
|
}
|
|
2042
|
-
function
|
|
2052
|
+
function En(e, t, n, r, i, o) {
|
|
2043
2053
|
const a = r < 0 ? 0 : r, s = e.slice(t, n).replace(/\r\n?/g, `
|
|
2044
2054
|
`), l = s === "" ? [] : (s.endsWith(`
|
|
2045
2055
|
`) ? s.slice(0, -1) : s).split(`
|
|
2046
2056
|
`);
|
|
2047
|
-
let u = "", c = !1,
|
|
2057
|
+
let u = "", c = !1, S = 0, m = !1;
|
|
2048
2058
|
for (const C of l) {
|
|
2049
|
-
let
|
|
2050
|
-
for (;
|
|
2051
|
-
if (r < 0 ||
|
|
2052
|
-
|
|
2059
|
+
let E = 0;
|
|
2060
|
+
for (; E < a && C.charCodeAt(E) === 32; ) E++;
|
|
2061
|
+
if (r < 0 || E >= C.length) {
|
|
2062
|
+
S++;
|
|
2053
2063
|
continue;
|
|
2054
2064
|
}
|
|
2055
|
-
const
|
|
2056
|
-
o ?
|
|
2057
|
-
`.repeat(c ? 1 +
|
|
2058
|
-
`.repeat(
|
|
2059
|
-
`.repeat(
|
|
2060
|
-
`.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;
|
|
2061
2071
|
}
|
|
2062
2072
|
return i === 3 ? u += `
|
|
2063
|
-
`.repeat(c ? 1 +
|
|
2073
|
+
`.repeat(c ? 1 + S : S) : i !== 2 && c && (u += `
|
|
2064
2074
|
`), u;
|
|
2065
2075
|
}
|
|
2066
|
-
function
|
|
2076
|
+
function Di(e, t) {
|
|
2067
2077
|
if (t.valueStart === Li) return "";
|
|
2068
2078
|
const { valueStart: n, valueEnd: r } = t;
|
|
2069
2079
|
if (t.fast) return e.slice(n, r);
|
|
2070
2080
|
switch (t.style) {
|
|
2071
2081
|
case 2:
|
|
2072
|
-
return Hi(e, n, r);
|
|
2073
|
-
case 3:
|
|
2074
2082
|
return Mi(e, n, r);
|
|
2083
|
+
case 3:
|
|
2084
|
+
return Bi(e, n, r);
|
|
2075
2085
|
case 4:
|
|
2076
|
-
return
|
|
2086
|
+
return En(e, n, r, t.indent, t.chomping, !1);
|
|
2077
2087
|
case 5:
|
|
2078
|
-
return
|
|
2088
|
+
return En(e, n, r, t.indent, t.chomping, !0);
|
|
2079
2089
|
default:
|
|
2080
|
-
return
|
|
2090
|
+
return Hi(e, n, r);
|
|
2081
2091
|
}
|
|
2082
2092
|
}
|
|
2083
|
-
var
|
|
2093
|
+
var Ui = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2084
2094
|
"!": "!",
|
|
2085
2095
|
"!!": "tag:yaml.org,2002:"
|
|
2086
2096
|
});
|
|
@@ -2089,22 +2099,22 @@ function It(e) {
|
|
|
2089
2099
|
}
|
|
2090
2100
|
function jn(e, t) {
|
|
2091
2101
|
if (e.startsWith("!<") && e.endsWith(">")) return decodeURIComponent(e.slice(2, -1));
|
|
2092
|
-
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;
|
|
2093
2103
|
return decodeURIComponent(i) + decodeURIComponent(e.slice(r.length));
|
|
2094
2104
|
}
|
|
2095
2105
|
function Vn(e) {
|
|
2096
2106
|
let t = e;
|
|
2097
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)}>`;
|
|
2098
2108
|
}
|
|
2099
|
-
var
|
|
2109
|
+
var He = -1, tn = {
|
|
2100
2110
|
filename: "",
|
|
2101
2111
|
schema: Gn,
|
|
2102
2112
|
json: !1,
|
|
2103
2113
|
maxTotalMergeKeys: 1e4,
|
|
2104
2114
|
maxAliases: -1
|
|
2105
2115
|
};
|
|
2106
|
-
function
|
|
2107
|
-
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;
|
|
2108
2118
|
}
|
|
2109
2119
|
function oe(e, t) {
|
|
2110
2120
|
yt(e.source, e.position, t, e.filename);
|
|
@@ -2122,13 +2132,13 @@ function st(e, t, n) {
|
|
|
2122
2132
|
if (r) return r;
|
|
2123
2133
|
for (const i of t) if (n.startsWith(i.tagName)) return i;
|
|
2124
2134
|
}
|
|
2125
|
-
function
|
|
2135
|
+
function qi(e, t, n, r, i) {
|
|
2126
2136
|
const o = st(t, n, r);
|
|
2127
2137
|
if (o) return o;
|
|
2128
2138
|
oe(e, `unknown ${i} tag !<${r}>`);
|
|
2129
2139
|
}
|
|
2130
|
-
function
|
|
2131
|
-
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;
|
|
2132
2142
|
if (r !== "") {
|
|
2133
2143
|
if (r === "!") return {
|
|
2134
2144
|
value: n,
|
|
@@ -2137,7 +2147,7 @@ function qi(e, t) {
|
|
|
2137
2147
|
const o = jn(r, e.tagHandlers), a = st(e.schema.exact.scalar, e.schema.prefix.scalar, o);
|
|
2138
2148
|
if (a) {
|
|
2139
2149
|
const l = a.resolve(n, !0, o);
|
|
2140
|
-
return l ===
|
|
2150
|
+
return l === H && oe(e, `cannot resolve a node with !<${o}> explicit tag`), {
|
|
2141
2151
|
value: l,
|
|
2142
2152
|
tag: a
|
|
2143
2153
|
};
|
|
@@ -2157,7 +2167,7 @@ function qi(e, t) {
|
|
|
2157
2167
|
const o = e.schema.implicitScalarByFirstChar.get(n.charAt(0)) ?? e.schema.implicitScalarAnyFirstChar;
|
|
2158
2168
|
for (const a of o) {
|
|
2159
2169
|
const s = a.resolve(n, !1, a.tagName);
|
|
2160
|
-
if (s !==
|
|
2170
|
+
if (s !== H) return {
|
|
2161
2171
|
value: s,
|
|
2162
2172
|
tag: a
|
|
2163
2173
|
};
|
|
@@ -2169,10 +2179,10 @@ function qi(e, t) {
|
|
|
2169
2179
|
};
|
|
2170
2180
|
}
|
|
2171
2181
|
function Cn(e, t, n, r, i, o) {
|
|
2172
|
-
const a = t.tagStart ===
|
|
2182
|
+
const a = t.tagStart === He ? "" : e.source.slice(t.tagStart, t.tagEnd), s = a === "" || a === "!" ? i : jn(a, e.tagHandlers);
|
|
2173
2183
|
return {
|
|
2174
2184
|
tagName: s,
|
|
2175
|
-
tag:
|
|
2185
|
+
tag: qi(e, n, r, s, o)
|
|
2176
2186
|
};
|
|
2177
2187
|
}
|
|
2178
2188
|
function zn(e) {
|
|
@@ -2185,14 +2195,14 @@ function Tn(e, t, n, r) {
|
|
|
2185
2195
|
o && oe(e, o), (t.overridable ??= /* @__PURE__ */ new Set()).add(i);
|
|
2186
2196
|
}
|
|
2187
2197
|
}
|
|
2188
|
-
function
|
|
2198
|
+
function Yi(e, t, n, r) {
|
|
2189
2199
|
if (e.position = t.keyPosition, zn(r)) Tn(e, t, n, r);
|
|
2190
2200
|
else if (r.nodeKind === "sequence" && Array.isArray(n)) for (const i of n) Tn(e, t, i, t.tag);
|
|
2191
2201
|
else oe(e, "cannot merge mappings; the provided source object is unacceptable");
|
|
2192
2202
|
}
|
|
2193
|
-
function
|
|
2203
|
+
function Wi(e, t, n, r, i) {
|
|
2194
2204
|
if (e.position = t.keyPosition, n === Qt) {
|
|
2195
|
-
|
|
2205
|
+
Yi(e, t, r, i);
|
|
2196
2206
|
return;
|
|
2197
2207
|
}
|
|
2198
2208
|
!e.json && t.tag.has(t.value, n) && !t.overridable?.has(n) && oe(e, "duplicated mapping key");
|
|
@@ -2209,12 +2219,12 @@ function wt(e, t, n) {
|
|
|
2209
2219
|
i && oe(e, i);
|
|
2210
2220
|
} else if (r.hasKey) {
|
|
2211
2221
|
const i = r.key;
|
|
2212
|
-
r.key = void 0, r.hasKey = !1,
|
|
2222
|
+
r.key = void 0, r.hasKey = !1, Wi(e, r, i, t, n);
|
|
2213
2223
|
} else
|
|
2214
2224
|
r.key = t, r.keyPosition = e.position, r.hasKey = !0;
|
|
2215
2225
|
}
|
|
2216
2226
|
function Nt(e, t, n, r, i) {
|
|
2217
|
-
if (t.anchorStart !==
|
|
2227
|
+
if (t.anchorStart !== He) {
|
|
2218
2228
|
const o = {
|
|
2219
2229
|
value: n,
|
|
2220
2230
|
tag: r,
|
|
@@ -2224,7 +2234,7 @@ function Nt(e, t, n, r, i) {
|
|
|
2224
2234
|
}
|
|
2225
2235
|
return null;
|
|
2226
2236
|
}
|
|
2227
|
-
function
|
|
2237
|
+
function ji(e, t) {
|
|
2228
2238
|
const n = {
|
|
2229
2239
|
...tn,
|
|
2230
2240
|
...t,
|
|
@@ -2240,7 +2250,7 @@ function Wi(e, t) {
|
|
|
2240
2250
|
};
|
|
2241
2251
|
for (; n.eventIndex < n.events.length; ) {
|
|
2242
2252
|
const r = n.events[n.eventIndex++];
|
|
2243
|
-
switch (n.position =
|
|
2253
|
+
switch (n.position = Ki(r), r.type) {
|
|
2244
2254
|
case 1:
|
|
2245
2255
|
n.anchors = /* @__PURE__ */ new Map(), n.aliasCount = 0, n.tagHandlers = /* @__PURE__ */ Object.create(null);
|
|
2246
2256
|
for (const i of r.directives) i.kind === "tag" && (n.tagHandlers[i.handle] = i.prefix);
|
|
@@ -2252,7 +2262,7 @@ function Wi(e, t) {
|
|
|
2252
2262
|
});
|
|
2253
2263
|
break;
|
|
2254
2264
|
case 4: {
|
|
2255
|
-
const { value: i, tag: o } =
|
|
2265
|
+
const { value: i, tag: o } = Gi(n, r);
|
|
2256
2266
|
Nt(n, r, i, o, !0), wt(n, i, o);
|
|
2257
2267
|
break;
|
|
2258
2268
|
}
|
|
@@ -2303,11 +2313,11 @@ function Wi(e, t) {
|
|
|
2303
2313
|
}
|
|
2304
2314
|
return n.documents;
|
|
2305
2315
|
}
|
|
2306
|
-
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 = {
|
|
2307
2317
|
filename: "",
|
|
2308
2318
|
maxDepth: 100
|
|
2309
2319
|
};
|
|
2310
|
-
function
|
|
2320
|
+
function Ji(e, t, n) {
|
|
2311
2321
|
e.events.push({
|
|
2312
2322
|
type: 1,
|
|
2313
2323
|
explicitStart: t,
|
|
@@ -2341,14 +2351,14 @@ function vn(e, t) {
|
|
|
2341
2351
|
e.events.splice(t.eventsLength, 0, {
|
|
2342
2352
|
type: 3,
|
|
2343
2353
|
start: t.position,
|
|
2344
|
-
anchorStart:
|
|
2345
|
-
anchorEnd:
|
|
2346
|
-
tagStart:
|
|
2347
|
-
tagEnd:
|
|
2354
|
+
anchorStart: B,
|
|
2355
|
+
anchorEnd: B,
|
|
2356
|
+
tagStart: B,
|
|
2357
|
+
tagEnd: B,
|
|
2348
2358
|
style: 2
|
|
2349
2359
|
});
|
|
2350
2360
|
}
|
|
2351
|
-
function
|
|
2361
|
+
function qe(e, t, n, r, i, o, a, s, l = 1, u = -1, c = !1) {
|
|
2352
2362
|
e.events.push({
|
|
2353
2363
|
type: 4,
|
|
2354
2364
|
valueStart: t,
|
|
@@ -2363,25 +2373,25 @@ function Ke(e, t, n, r, i, o, a, s, l = 1, u = -1, c = !1) {
|
|
|
2363
2373
|
fast: c
|
|
2364
2374
|
});
|
|
2365
2375
|
}
|
|
2366
|
-
function
|
|
2376
|
+
function eo(e, t, n) {
|
|
2367
2377
|
e.events.push({
|
|
2368
2378
|
type: 5,
|
|
2369
2379
|
anchorStart: t,
|
|
2370
2380
|
anchorEnd: n
|
|
2371
2381
|
});
|
|
2372
2382
|
}
|
|
2373
|
-
function
|
|
2383
|
+
function Me(e) {
|
|
2374
2384
|
e.events.push({ type: 6 });
|
|
2375
2385
|
}
|
|
2376
2386
|
function re(e) {
|
|
2377
|
-
|
|
2387
|
+
qe(e, B, B, B, B, B, B, 1);
|
|
2378
2388
|
}
|
|
2379
2389
|
function bn() {
|
|
2380
2390
|
return {
|
|
2381
|
-
anchorStart:
|
|
2382
|
-
anchorEnd:
|
|
2383
|
-
tagStart:
|
|
2384
|
-
tagEnd:
|
|
2391
|
+
anchorStart: B,
|
|
2392
|
+
anchorEnd: B,
|
|
2393
|
+
tagStart: B,
|
|
2394
|
+
tagEnd: B
|
|
2385
2395
|
};
|
|
2386
2396
|
}
|
|
2387
2397
|
function je(e) {
|
|
@@ -2394,39 +2404,39 @@ function je(e) {
|
|
|
2394
2404
|
eventsLength: e.events.length
|
|
2395
2405
|
};
|
|
2396
2406
|
}
|
|
2397
|
-
function
|
|
2407
|
+
function Be(e, t) {
|
|
2398
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;
|
|
2399
2409
|
}
|
|
2400
|
-
function
|
|
2410
|
+
function _(e, t) {
|
|
2401
2411
|
yt(e.input.slice(0, e.length), e.position, t, e.filename);
|
|
2402
2412
|
}
|
|
2403
|
-
function
|
|
2413
|
+
function Z(e) {
|
|
2404
2414
|
return e === 10 || e === 13;
|
|
2405
2415
|
}
|
|
2406
|
-
function
|
|
2416
|
+
function ke(e) {
|
|
2407
2417
|
return e === 9 || e === 32;
|
|
2408
2418
|
}
|
|
2409
2419
|
function pe(e) {
|
|
2410
|
-
return
|
|
2420
|
+
return ke(e) || Z(e);
|
|
2411
2421
|
}
|
|
2412
|
-
function
|
|
2422
|
+
function Ee(e) {
|
|
2413
2423
|
return e === 0 || pe(e);
|
|
2414
2424
|
}
|
|
2415
|
-
function
|
|
2425
|
+
function Le(e) {
|
|
2416
2426
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2417
2427
|
}
|
|
2418
|
-
function
|
|
2428
|
+
function to(e) {
|
|
2419
2429
|
return e >= 48 && e <= 57 ? e - 48 : -1;
|
|
2420
2430
|
}
|
|
2421
|
-
function
|
|
2431
|
+
function no(e) {
|
|
2422
2432
|
if (e >= 48 && e <= 57) return e - 48;
|
|
2423
2433
|
const t = e | 32;
|
|
2424
2434
|
return t >= 97 && t <= 102 ? t - 97 + 10 : -1;
|
|
2425
2435
|
}
|
|
2426
|
-
function
|
|
2436
|
+
function ro(e) {
|
|
2427
2437
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
2428
2438
|
}
|
|
2429
|
-
function
|
|
2439
|
+
function io(e) {
|
|
2430
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;
|
|
2431
2441
|
}
|
|
2432
2442
|
function ft(e) {
|
|
@@ -2435,18 +2445,18 @@ function ft(e) {
|
|
|
2435
2445
|
function ie(e, t) {
|
|
2436
2446
|
let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || pe(e.input.charCodeAt(e.position - 1));
|
|
2437
2447
|
for (; r !== 0; ) {
|
|
2438
|
-
for (;
|
|
2448
|
+
for (; ke(r); )
|
|
2439
2449
|
i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2440
2450
|
if (t && i && r === 35) do
|
|
2441
2451
|
r = e.input.charCodeAt(++e.position);
|
|
2442
|
-
while (!
|
|
2443
|
-
if (!
|
|
2452
|
+
while (!Z(r) && r !== 0);
|
|
2453
|
+
if (!Z(r)) break;
|
|
2444
2454
|
for (ft(e), n++, i = !0, r = e.input.charCodeAt(e.position); r === 32; )
|
|
2445
2455
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
2446
2456
|
}
|
|
2447
2457
|
return n;
|
|
2448
2458
|
}
|
|
2449
|
-
function
|
|
2459
|
+
function Ne(e, t = e.position) {
|
|
2450
2460
|
const n = e.input.charCodeAt(t);
|
|
2451
2461
|
if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) {
|
|
2452
2462
|
const r = e.input.charCodeAt(t + 3);
|
|
@@ -2456,46 +2466,46 @@ function Ie(e, t = e.position) {
|
|
|
2456
2466
|
}
|
|
2457
2467
|
function Rn(e) {
|
|
2458
2468
|
let t = e.input.charCodeAt(e.position);
|
|
2459
|
-
for (; t !== 0 && !
|
|
2469
|
+
for (; t !== 0 && !Z(t); ) t = e.input.charCodeAt(++e.position);
|
|
2460
2470
|
}
|
|
2461
2471
|
function nr(e, t, n) {
|
|
2462
|
-
|
|
2472
|
+
Vi.test(e.input.slice(t, n)) && _(e, "the stream contains non-printable characters");
|
|
2463
2473
|
}
|
|
2464
|
-
function
|
|
2474
|
+
function oo(e, t, n) {
|
|
2465
2475
|
if (e.input.charCodeAt(e.position) !== 33) return !1;
|
|
2466
|
-
t.tagStart !==
|
|
2476
|
+
t.tagStart !== B && _(e, "duplication of a tag property");
|
|
2467
2477
|
const r = e.position;
|
|
2468
2478
|
let i = !1, o = !1, a = "!", s = e.input.charCodeAt(++e.position);
|
|
2469
2479
|
s === 60 ? (i = !0, s = e.input.charCodeAt(++e.position)) : s === 33 && (o = !0, a = "!!", s = e.input.charCodeAt(++e.position));
|
|
2470
2480
|
let l = e.position, u;
|
|
2471
2481
|
if (i) {
|
|
2472
2482
|
for (; s !== 0 && s !== 62; ) s = e.input.charCodeAt(++e.position);
|
|
2473
|
-
s !== 62 &&
|
|
2483
|
+
s !== 62 && _(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(l, e.position), e.position++;
|
|
2474
2484
|
} else {
|
|
2475
|
-
for (; s !== 0 && !pe(s) && !(n &&
|
|
2476
|
-
s === 33 && (o ?
|
|
2477
|
-
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");
|
|
2478
2488
|
}
|
|
2479
|
-
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;
|
|
2480
2490
|
}
|
|
2481
|
-
function
|
|
2491
|
+
function ao(e, t) {
|
|
2482
2492
|
if (e.input.charCodeAt(e.position) !== 38) return !1;
|
|
2483
|
-
t.anchorStart !==
|
|
2493
|
+
t.anchorStart !== B && _(e, "duplication of an anchor property"), e.position++;
|
|
2484
2494
|
const n = e.position;
|
|
2485
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) &&
|
|
2486
|
-
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;
|
|
2487
2497
|
}
|
|
2488
|
-
function
|
|
2498
|
+
function so(e, t) {
|
|
2489
2499
|
if (e.input.charCodeAt(e.position) !== 42) return !1;
|
|
2490
|
-
(t.anchorStart !==
|
|
2500
|
+
(t.anchorStart !== B || t.tagStart !== B) && _(e, "alias node should not have any properties"), e.position++;
|
|
2491
2501
|
const n = e.position;
|
|
2492
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) &&
|
|
2493
|
-
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;
|
|
2494
2504
|
}
|
|
2495
2505
|
function Bt(e, t) {
|
|
2496
|
-
ie(e, !1), e.lineIndent < t &&
|
|
2506
|
+
ie(e, !1), e.lineIndent < t && _(e, "deficient indentation");
|
|
2497
2507
|
}
|
|
2498
|
-
function
|
|
2508
|
+
function lo(e, t, n) {
|
|
2499
2509
|
if (e.input.charCodeAt(e.position) !== 39) return !1;
|
|
2500
2510
|
e.position++;
|
|
2501
2511
|
const r = e.position;
|
|
@@ -2508,13 +2518,13 @@ function so(e, t, n) {
|
|
|
2508
2518
|
continue;
|
|
2509
2519
|
}
|
|
2510
2520
|
const a = e.position;
|
|
2511
|
-
return e.position++,
|
|
2521
|
+
return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2, 1, -1, i), !0;
|
|
2512
2522
|
}
|
|
2513
|
-
|
|
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++;
|
|
2514
2524
|
}
|
|
2515
|
-
|
|
2525
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
2516
2526
|
}
|
|
2517
|
-
function
|
|
2527
|
+
function co(e, t, n) {
|
|
2518
2528
|
if (e.input.charCodeAt(e.position) !== 34) return !1;
|
|
2519
2529
|
e.position++;
|
|
2520
2530
|
const r = e.position;
|
|
@@ -2523,109 +2533,109 @@ function lo(e, t, n) {
|
|
|
2523
2533
|
const o = e.input.charCodeAt(e.position);
|
|
2524
2534
|
if (o === 34) {
|
|
2525
2535
|
const a = e.position;
|
|
2526
|
-
return e.position++,
|
|
2536
|
+
return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 3, 1, -1, i), !0;
|
|
2527
2537
|
}
|
|
2528
2538
|
if (o === 92) {
|
|
2529
2539
|
i = !1;
|
|
2530
2540
|
const a = e.input.charCodeAt(++e.position);
|
|
2531
|
-
if (
|
|
2532
|
-
else if (
|
|
2541
|
+
if (Z(a)) Bt(e, t);
|
|
2542
|
+
else if (io(a)) e.position++;
|
|
2533
2543
|
else {
|
|
2534
|
-
let s =
|
|
2535
|
-
for (s === 0 &&
|
|
2536
|
-
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");
|
|
2537
2547
|
e.position++;
|
|
2538
2548
|
}
|
|
2539
|
-
} 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++;
|
|
2540
2550
|
}
|
|
2541
|
-
|
|
2551
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
2542
2552
|
}
|
|
2543
|
-
function
|
|
2553
|
+
function uo(e, t, n) {
|
|
2544
2554
|
const r = e.input.charCodeAt(e.position);
|
|
2545
2555
|
let i = 1, o = -1, a = !1;
|
|
2546
2556
|
if (r !== 124 && r !== 62) return !1;
|
|
2547
2557
|
const s = r === 124 ? 4 : 5;
|
|
2548
2558
|
for (e.position++; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2549
|
-
const C = e.input.charCodeAt(e.position),
|
|
2559
|
+
const C = e.input.charCodeAt(e.position), E = to(C);
|
|
2550
2560
|
if (C === 43 || C === 45)
|
|
2551
|
-
i !== 1 &&
|
|
2552
|
-
else if (
|
|
2553
|
-
|
|
2561
|
+
i !== 1 && _(e, "repeat of a chomping mode identifier"), i = C === 43 ? 3 : 2, e.position++;
|
|
2562
|
+
else if (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++;
|
|
2554
2564
|
else break;
|
|
2555
2565
|
}
|
|
2556
2566
|
let l = !1;
|
|
2557
|
-
for (;
|
|
2567
|
+
for (; ke(e.input.charCodeAt(e.position)); )
|
|
2558
2568
|
l = !0, e.position++;
|
|
2559
|
-
l && e.input.charCodeAt(e.position) === 35 && Rn(e),
|
|
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");
|
|
2560
2570
|
let u = a ? o : -1, c = 0;
|
|
2561
|
-
const
|
|
2571
|
+
const S = e.position;
|
|
2562
2572
|
let m = e.position;
|
|
2563
2573
|
for (; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2564
2574
|
const C = e.position;
|
|
2565
|
-
let
|
|
2566
|
-
for (; e.input.charCodeAt(C +
|
|
2567
|
-
const
|
|
2568
|
-
if (
|
|
2569
|
-
u >= 0 ?
|
|
2575
|
+
let E = 0;
|
|
2576
|
+
for (; e.input.charCodeAt(C + E) === 32; ) E++;
|
|
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);
|
|
2570
2580
|
break;
|
|
2571
2581
|
}
|
|
2572
|
-
if (C === e.lineStart &&
|
|
2573
|
-
if (!a && u === -1 &&
|
|
2574
|
-
e.lineIndent =
|
|
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) {
|
|
2584
|
+
e.lineIndent = E, e.position = C + E;
|
|
2575
2585
|
break;
|
|
2576
2586
|
}
|
|
2577
|
-
!a &&
|
|
2578
|
-
const
|
|
2579
|
-
if (
|
|
2580
|
-
e.lineIndent =
|
|
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) {
|
|
2590
|
+
e.lineIndent = E, e.position = C + E;
|
|
2581
2591
|
break;
|
|
2582
2592
|
}
|
|
2583
|
-
Rn(e), m = e.position,
|
|
2593
|
+
Rn(e), m = e.position, Z(e.input.charCodeAt(e.position)) && (ft(e), m = e.position);
|
|
2584
2594
|
}
|
|
2585
|
-
return nr(e,
|
|
2595
|
+
return nr(e, S, m), qe(e, S, m, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, s, i, u), !0;
|
|
2586
2596
|
}
|
|
2587
|
-
function
|
|
2588
|
-
const n = e.input.charCodeAt(e.position), r = t ===
|
|
2589
|
-
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;
|
|
2590
2600
|
if (n === 63 || n === 45) {
|
|
2591
2601
|
const i = e.input.charCodeAt(e.position + 1);
|
|
2592
|
-
if (
|
|
2602
|
+
if (Ee(i) || r && Le(i)) return !1;
|
|
2593
2603
|
}
|
|
2594
2604
|
return !0;
|
|
2595
2605
|
}
|
|
2596
|
-
function
|
|
2597
|
-
if (!
|
|
2606
|
+
function po(e, t, n, r) {
|
|
2607
|
+
if (!fo(e, n)) return !1;
|
|
2598
2608
|
const i = e.position;
|
|
2599
2609
|
let o = e.position, a = e.input.charCodeAt(e.position);
|
|
2600
|
-
const s = n ===
|
|
2610
|
+
const s = n === Ue;
|
|
2601
2611
|
let l = !1;
|
|
2602
|
-
for (; a !== 0 && !(e.position === e.lineStart &&
|
|
2612
|
+
for (; a !== 0 && !(e.position === e.lineStart && Ne(e)); ) {
|
|
2603
2613
|
if (a === 58) {
|
|
2604
2614
|
const u = e.input.charCodeAt(e.position + 1);
|
|
2605
|
-
if (
|
|
2615
|
+
if (Ee(u) || s && Le(u)) break;
|
|
2606
2616
|
} else if (a === 35) {
|
|
2607
2617
|
if (pe(e.input.charCodeAt(e.position - 1))) break;
|
|
2608
2618
|
} else {
|
|
2609
|
-
if (s &&
|
|
2610
|
-
if (
|
|
2611
|
-
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;
|
|
2612
2622
|
if (ie(e, !1), e.lineIndent >= t) {
|
|
2613
2623
|
l = !0, a = e.input.charCodeAt(e.position);
|
|
2614
2624
|
continue;
|
|
2615
2625
|
}
|
|
2616
|
-
e.position = u, e.line = c, e.lineStart =
|
|
2626
|
+
e.position = u, e.line = c, e.lineStart = S, e.lineIndent = m;
|
|
2617
2627
|
break;
|
|
2618
2628
|
}
|
|
2619
2629
|
}
|
|
2620
|
-
|
|
2630
|
+
ke(a) || (o = e.position + 1), a = e.input.charCodeAt(++e.position);
|
|
2621
2631
|
}
|
|
2622
|
-
return o === i ? !1 : (nr(e, i, o),
|
|
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);
|
|
2623
2633
|
}
|
|
2624
2634
|
function Ge(e, t) {
|
|
2625
2635
|
const n = e.line;
|
|
2626
|
-
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");
|
|
2627
2637
|
}
|
|
2628
|
-
function
|
|
2638
|
+
function ho(e, t, n) {
|
|
2629
2639
|
const r = e.input.charCodeAt(e.position), i = r === 123, o = e.position;
|
|
2630
2640
|
let a = !0;
|
|
2631
2641
|
if (r !== 91 && r !== 123) return !1;
|
|
@@ -2634,117 +2644,117 @@ function po(e, t, n) {
|
|
|
2634
2644
|
Ge(e, t);
|
|
2635
2645
|
let l = e.input.charCodeAt(e.position);
|
|
2636
2646
|
if (l === s)
|
|
2637
|
-
return e.position++,
|
|
2638
|
-
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");
|
|
2639
2649
|
let u = !1, c = !1;
|
|
2640
2650
|
l === 63 && pe(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, Ge(e, t));
|
|
2641
|
-
const
|
|
2642
|
-
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;
|
|
2643
2653
|
}
|
|
2644
|
-
|
|
2654
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
2645
2655
|
}
|
|
2646
2656
|
function _n(e, t, n) {
|
|
2647
|
-
if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !
|
|
2648
|
-
for (tr(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 1); e.input.charCodeAt(e.position) === 45 &&
|
|
2649
|
-
e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
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"));
|
|
2650
2660
|
const r = e.line;
|
|
2651
2661
|
e.position++;
|
|
2652
2662
|
const i = ie(e, !0) > 0;
|
|
2653
|
-
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 &&
|
|
2654
|
-
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");
|
|
2655
2665
|
}
|
|
2656
|
-
return
|
|
2666
|
+
return Me(e), !0;
|
|
2657
2667
|
}
|
|
2658
2668
|
function $t(e, t, n, r) {
|
|
2659
2669
|
let i = !1, o = !1, a = !1, s = !1;
|
|
2660
2670
|
if (e.firstTabInLine !== -1) return !1;
|
|
2661
2671
|
let l = e.input.charCodeAt(e.position);
|
|
2662
2672
|
for (; l !== 0; ) {
|
|
2663
|
-
!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"));
|
|
2664
2674
|
const u = e.input.charCodeAt(e.position + 1), c = e.line;
|
|
2665
|
-
if ((l === 63 || l === 58) &&
|
|
2675
|
+
if ((l === 63 || l === 58) && Ee(u))
|
|
2666
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;
|
|
2667
2677
|
else {
|
|
2668
2678
|
i && (re(e), i = !1);
|
|
2669
|
-
const
|
|
2670
|
-
if (
|
|
2679
|
+
const S = je(e);
|
|
2680
|
+
if (!$e(e, n, Ft, !1, !0)) break;
|
|
2671
2681
|
if (e.line === c) {
|
|
2672
|
-
for (l = e.input.charCodeAt(e.position);
|
|
2682
|
+
for (l = e.input.charCodeAt(e.position); ke(l); ) l = e.input.charCodeAt(++e.position);
|
|
2673
2683
|
if (l === 58) {
|
|
2674
|
-
if (l = e.input.charCodeAt(++e.position),
|
|
2675
|
-
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);
|
|
2676
2686
|
e.position++;
|
|
2677
2687
|
}
|
|
2678
2688
|
o = !0, i = !1, s = !1;
|
|
2679
|
-
} else if (o)
|
|
2689
|
+
} else if (o) _(e, "expected ':' after a mapping key");
|
|
2680
2690
|
else
|
|
2681
|
-
return r.anchorStart !==
|
|
2682
|
-
} 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");
|
|
2683
2693
|
else
|
|
2684
|
-
return r.anchorStart !==
|
|
2694
|
+
return r.anchorStart !== B || r.tagStart !== B ? (Be(e, S), !1) : !0;
|
|
2685
2695
|
}
|
|
2686
|
-
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");
|
|
2687
2697
|
else if (e.lineIndent < t) break;
|
|
2688
2698
|
}
|
|
2689
|
-
return o ? (i && re(e), a &&
|
|
2699
|
+
return o ? (i && re(e), a && Me(e), !0) : !1;
|
|
2690
2700
|
}
|
|
2691
|
-
function
|
|
2692
|
-
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++;
|
|
2693
2703
|
let a = 1, s = !1, l = !1, u = null;
|
|
2694
2704
|
const c = bn();
|
|
2695
|
-
let
|
|
2696
|
-
const C =
|
|
2705
|
+
let S = n === ut || n === Zn, m = S;
|
|
2706
|
+
const C = S;
|
|
2697
2707
|
if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1), a === 1) for (; ; ) {
|
|
2698
|
-
const
|
|
2699
|
-
if (s && a !== 1 && (
|
|
2700
|
-
if (s && C && (c.tagStart !==
|
|
2701
|
-
const
|
|
2702
|
-
if ($t(e, e.position - e.lineStart, N, c) && e.events[
|
|
2708
|
+
const E = e.input.charCodeAt(e.position), I = je(e);
|
|
2709
|
+
if (s && a !== 1 && (E === 33 || E === 38)) break;
|
|
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)
|
|
2703
2713
|
return e.depth--, !0;
|
|
2704
|
-
|
|
2714
|
+
Be(e, M);
|
|
2705
2715
|
}
|
|
2706
|
-
if (s && (
|
|
2707
|
-
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;
|
|
2708
2718
|
}
|
|
2709
2719
|
if (m && (m = s || i), a === 1 || n === ut) {
|
|
2710
|
-
const
|
|
2711
|
-
if (a === 1) if (m && (_n(e,
|
|
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;
|
|
2712
2722
|
else {
|
|
2713
|
-
const
|
|
2714
|
-
if (u !== null && o && C && !m &&
|
|
2715
|
-
const N = je(e),
|
|
2716
|
-
|
|
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);
|
|
2717
2727
|
}
|
|
2718
|
-
!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);
|
|
2719
2729
|
}
|
|
2720
|
-
else a === 0 && (l = m && _n(e,
|
|
2730
|
+
else a === 0 && (l = m && _n(e, I, c));
|
|
2721
2731
|
}
|
|
2722
|
-
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;
|
|
2723
2733
|
}
|
|
2724
|
-
function
|
|
2734
|
+
function go(e) {
|
|
2725
2735
|
if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1;
|
|
2726
2736
|
e.position++;
|
|
2727
2737
|
const t = e.position;
|
|
2728
2738
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2729
2739
|
const n = e.input.slice(t, e.position), r = [];
|
|
2730
|
-
for (n.length === 0 &&
|
|
2731
|
-
for (;
|
|
2732
|
-
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;
|
|
2733
2743
|
const i = e.position;
|
|
2734
2744
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2735
2745
|
r.push(e.input.slice(i, e.position));
|
|
2736
2746
|
}
|
|
2737
|
-
if (
|
|
2738
|
-
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");
|
|
2739
2749
|
const i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]);
|
|
2740
|
-
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({
|
|
2741
2751
|
kind: "yaml",
|
|
2742
2752
|
version: r[0]
|
|
2743
2753
|
});
|
|
2744
2754
|
} else if (n === "TAG") {
|
|
2745
|
-
r.length !== 2 &&
|
|
2755
|
+
r.length !== 2 && _(e, "TAG directive accepts exactly two arguments");
|
|
2746
2756
|
const [i, o] = r;
|
|
2747
|
-
Jn.test(i) ||
|
|
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({
|
|
2748
2758
|
kind: "tag",
|
|
2749
2759
|
handle: i,
|
|
2750
2760
|
prefix: o
|
|
@@ -2752,30 +2762,30 @@ function ho(e) {
|
|
|
2752
2762
|
}
|
|
2753
2763
|
return !0;
|
|
2754
2764
|
}
|
|
2755
|
-
function
|
|
2765
|
+
function mo(e) {
|
|
2756
2766
|
e.directives = [], e.tagHandlers = /* @__PURE__ */ Object.create(null);
|
|
2757
2767
|
let t = !1;
|
|
2758
|
-
for (ie(e, !0);
|
|
2768
|
+
for (ie(e, !0); go(e); )
|
|
2759
2769
|
t = !0, ie(e, !0);
|
|
2760
2770
|
let n = !1, r = !1, i = !0;
|
|
2761
|
-
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))) {
|
|
2762
2772
|
n = !0;
|
|
2763
2773
|
const s = e.line;
|
|
2764
2774
|
e.position += 3, ie(e, !0), i = e.line > s;
|
|
2765
|
-
} else t &&
|
|
2775
|
+
} else t && _(e, "directives end mark is expected");
|
|
2766
2776
|
const o = e.events.length;
|
|
2767
|
-
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)) {
|
|
2768
2778
|
e.position += 3, ie(e, !0);
|
|
2769
2779
|
return;
|
|
2770
2780
|
}
|
|
2771
|
-
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)) {
|
|
2772
2782
|
const s = e.line;
|
|
2773
|
-
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");
|
|
2774
2784
|
}
|
|
2775
2785
|
const a = e.events[o];
|
|
2776
|
-
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");
|
|
2777
2787
|
}
|
|
2778
|
-
function
|
|
2788
|
+
function Ao(e, t) {
|
|
2779
2789
|
const n = e.length, r = {
|
|
2780
2790
|
...nn,
|
|
2781
2791
|
...t,
|
|
@@ -2793,20 +2803,20 @@ function mo(e, t) {
|
|
|
2793
2803
|
}, i = e.indexOf("\0");
|
|
2794
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)); ) {
|
|
2795
2805
|
const o = r.position;
|
|
2796
|
-
|
|
2806
|
+
mo(r), r.position === o && _(r, "can not read a document");
|
|
2797
2807
|
}
|
|
2798
2808
|
return r.events;
|
|
2799
2809
|
}
|
|
2800
|
-
var
|
|
2810
|
+
var yo = {
|
|
2801
2811
|
...nn,
|
|
2802
2812
|
...tn
|
|
2803
2813
|
};
|
|
2804
|
-
function
|
|
2814
|
+
function So(e, t = {}) {
|
|
2805
2815
|
const n = {
|
|
2806
|
-
...
|
|
2816
|
+
...yo,
|
|
2807
2817
|
...t
|
|
2808
2818
|
}, r = String(e), i = Object.keys(nn), o = Object.keys(tn);
|
|
2809
|
-
return
|
|
2819
|
+
return ji(Ao(r, Pt(n, i)), {
|
|
2810
2820
|
...Pt(n, o),
|
|
2811
2821
|
source: r
|
|
2812
2822
|
});
|
|
@@ -2814,7 +2824,7 @@ function yo(e, t = {}) {
|
|
|
2814
2824
|
function Eo(e, t, n) {
|
|
2815
2825
|
let r = null;
|
|
2816
2826
|
typeof t == "function" ? r = t : t !== null && typeof t == "object" && (n = t);
|
|
2817
|
-
const i =
|
|
2827
|
+
const i = So(e, n);
|
|
2818
2828
|
if (r === null) return i;
|
|
2819
2829
|
for (const o of i) r(o);
|
|
2820
2830
|
}
|
|
@@ -2825,8 +2835,8 @@ var nt = class {
|
|
|
2825
2835
|
doubleQuoted = !1;
|
|
2826
2836
|
literal = !1;
|
|
2827
2837
|
folded = !1;
|
|
2828
|
-
},
|
|
2829
|
-
function
|
|
2838
|
+
}, we = /* @__PURE__ */ Symbol("INVALID");
|
|
2839
|
+
function Co(e) {
|
|
2830
2840
|
const t = new Set([
|
|
2831
2841
|
e.defaultScalarTag,
|
|
2832
2842
|
e.defaultSequenceTag,
|
|
@@ -2847,7 +2857,7 @@ function So(e) {
|
|
|
2847
2857
|
}))
|
|
2848
2858
|
];
|
|
2849
2859
|
}
|
|
2850
|
-
function
|
|
2860
|
+
function To(e, t) {
|
|
2851
2861
|
for (let n = 0, r = e.representTypes.length; n < r; n += 1) {
|
|
2852
2862
|
const { tag: i, implicitTag: o } = e.representTypes[n];
|
|
2853
2863
|
if (i.identify && i.identify(t)) {
|
|
@@ -2872,9 +2882,9 @@ function We(e, t) {
|
|
|
2872
2882
|
anchor: c.anchor
|
|
2873
2883
|
};
|
|
2874
2884
|
}
|
|
2875
|
-
const n =
|
|
2885
|
+
const n = To(e, t);
|
|
2876
2886
|
if (!n) {
|
|
2877
|
-
if (t === void 0 || e.skipInvalid) return
|
|
2887
|
+
if (t === void 0 || e.skipInvalid) return we;
|
|
2878
2888
|
throw new At(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`);
|
|
2879
2889
|
}
|
|
2880
2890
|
const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i : Vn(i);
|
|
@@ -2888,18 +2898,18 @@ function We(e, t) {
|
|
|
2888
2898
|
};
|
|
2889
2899
|
}
|
|
2890
2900
|
if (r.nodeKind === "sequence") {
|
|
2891
|
-
const c = r.represent(t),
|
|
2892
|
-
|
|
2901
|
+
const c = r.represent(t), S = new nt();
|
|
2902
|
+
S.tagged = !o;
|
|
2893
2903
|
const m = {
|
|
2894
2904
|
kind: "sequence",
|
|
2895
2905
|
tag: a,
|
|
2896
|
-
style:
|
|
2906
|
+
style: S,
|
|
2897
2907
|
items: []
|
|
2898
2908
|
};
|
|
2899
2909
|
e.noRefs || e.refs.set(t, m);
|
|
2900
|
-
for (let C = 0,
|
|
2901
|
-
let
|
|
2902
|
-
|
|
2910
|
+
for (let C = 0, E = c.length; C < E; C += 1) {
|
|
2911
|
+
let I = We(e, c[C]);
|
|
2912
|
+
I === we && c[C] === void 0 && (I = We(e, null)), I !== we && m.items.push(I);
|
|
2903
2913
|
}
|
|
2904
2914
|
return m;
|
|
2905
2915
|
}
|
|
@@ -2912,34 +2922,34 @@ function We(e, t) {
|
|
|
2912
2922
|
items: []
|
|
2913
2923
|
};
|
|
2914
2924
|
e.noRefs || e.refs.set(t, u);
|
|
2915
|
-
for (const [c,
|
|
2925
|
+
for (const [c, S] of s) {
|
|
2916
2926
|
const m = We(e, c);
|
|
2917
|
-
if (m ===
|
|
2918
|
-
const C = We(e,
|
|
2919
|
-
C !==
|
|
2927
|
+
if (m === we) continue;
|
|
2928
|
+
const C = We(e, S);
|
|
2929
|
+
C !== we && u.items.push({
|
|
2920
2930
|
key: m,
|
|
2921
2931
|
value: C
|
|
2922
2932
|
});
|
|
2923
2933
|
}
|
|
2924
2934
|
return u;
|
|
2925
2935
|
}
|
|
2926
|
-
function
|
|
2936
|
+
function vo(e, t, n = {}) {
|
|
2927
2937
|
const r = We({
|
|
2928
|
-
representTypes:
|
|
2938
|
+
representTypes: Co(t),
|
|
2929
2939
|
noRefs: n.noRefs ?? !1,
|
|
2930
2940
|
skipInvalid: n.skipInvalid ?? !1,
|
|
2931
2941
|
refs: /* @__PURE__ */ new Map(),
|
|
2932
2942
|
refCounter: 0
|
|
2933
2943
|
}, e);
|
|
2934
2944
|
return [{
|
|
2935
|
-
contents: r ===
|
|
2945
|
+
contents: r === we ? null : r,
|
|
2936
2946
|
directives: []
|
|
2937
2947
|
}];
|
|
2938
2948
|
}
|
|
2939
|
-
var
|
|
2949
|
+
var bo = /* @__PURE__ */ Symbol("visit:break"), rr = /* @__PURE__ */ Symbol("visit:skip");
|
|
2940
2950
|
function lt(e, t, n) {
|
|
2941
2951
|
const r = t(e, n);
|
|
2942
|
-
if (r ===
|
|
2952
|
+
if (r === bo) return !0;
|
|
2943
2953
|
if (r === rr) return !1;
|
|
2944
2954
|
const i = n.depth + 1;
|
|
2945
2955
|
switch (e.kind) {
|
|
@@ -2965,29 +2975,29 @@ function lt(e, t, n) {
|
|
|
2965
2975
|
}
|
|
2966
2976
|
return !1;
|
|
2967
2977
|
}
|
|
2968
|
-
function
|
|
2978
|
+
function Ro(e, t) {
|
|
2969
2979
|
for (const n of e) if (n.contents && lt(n.contents, t, {
|
|
2970
2980
|
depth: 0,
|
|
2971
2981
|
parent: null,
|
|
2972
2982
|
isKey: !1
|
|
2973
2983
|
})) return;
|
|
2974
2984
|
}
|
|
2975
|
-
var rn = 65279,
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
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";
|
|
2991
3001
|
var an = {
|
|
2992
3002
|
indent: 2,
|
|
2993
3003
|
seqNoIndent: !1,
|
|
@@ -3002,10 +3012,10 @@ var an = {
|
|
|
3002
3012
|
forceQuotes: !1,
|
|
3003
3013
|
tagBeforeAnchor: !1
|
|
3004
3014
|
};
|
|
3005
|
-
function
|
|
3015
|
+
function Ho(e) {
|
|
3006
3016
|
return e.style.tagged ? e.tag : Vn(e.tag);
|
|
3007
3017
|
}
|
|
3008
|
-
function
|
|
3018
|
+
function Mo(e) {
|
|
3009
3019
|
const t = {
|
|
3010
3020
|
...an,
|
|
3011
3021
|
...e
|
|
@@ -3016,7 +3026,7 @@ function Ho(e) {
|
|
|
3016
3026
|
implicitResolvers: t.schema.implicitScalarTags
|
|
3017
3027
|
};
|
|
3018
3028
|
}
|
|
3019
|
-
function
|
|
3029
|
+
function Bo(e) {
|
|
3020
3030
|
const t = e.toString(16).toUpperCase(), n = e <= 255 ? "x" : "u", r = e <= 255 ? 2 : 4;
|
|
3021
3031
|
return `\\${n}${"0".repeat(r - t.length)}${t}`;
|
|
3022
3032
|
}
|
|
@@ -3037,7 +3047,7 @@ function Wt(e, t) {
|
|
|
3037
3047
|
return `
|
|
3038
3048
|
${" ".repeat(e.indent * t)}`;
|
|
3039
3049
|
}
|
|
3040
|
-
function
|
|
3050
|
+
function Do(e, t) {
|
|
3041
3051
|
const n = e.indent * Math.max(1, t);
|
|
3042
3052
|
return {
|
|
3043
3053
|
indent: n,
|
|
@@ -3048,46 +3058,46 @@ function Bo(e, t) {
|
|
|
3048
3058
|
function In(e, t) {
|
|
3049
3059
|
for (let n = 0, r = e.implicitResolvers.length; n < r; n += 1) {
|
|
3050
3060
|
const i = e.implicitResolvers[n];
|
|
3051
|
-
if (i.resolve(t, !1, i.tagName) !==
|
|
3061
|
+
if (i.resolve(t, !1, i.tagName) !== H) return i.tagName;
|
|
3052
3062
|
}
|
|
3053
3063
|
return e.defaultScalarTagName;
|
|
3054
3064
|
}
|
|
3055
|
-
function
|
|
3056
|
-
return e ===
|
|
3065
|
+
function Ke(e) {
|
|
3066
|
+
return e === xo || e === _o;
|
|
3057
3067
|
}
|
|
3058
|
-
function
|
|
3068
|
+
function Uo(e) {
|
|
3059
3069
|
const t = e.charCodeAt(0);
|
|
3060
3070
|
if (t !== on && t !== 46 || e.charCodeAt(1) !== t || e.charCodeAt(2) !== t) return !1;
|
|
3061
3071
|
if (e.length === 3) return !0;
|
|
3062
3072
|
const n = e.charCodeAt(3);
|
|
3063
|
-
return
|
|
3073
|
+
return Ke(n) || n === ir || n === Oe;
|
|
3064
3074
|
}
|
|
3065
3075
|
function Qe(e) {
|
|
3066
3076
|
return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== rn || e >= 65536 && e <= 1114111;
|
|
3067
3077
|
}
|
|
3068
3078
|
function wn(e) {
|
|
3069
|
-
return Qe(e) && e !== rn && e !== ir && e !==
|
|
3079
|
+
return Qe(e) && e !== rn && e !== ir && e !== Oe;
|
|
3070
3080
|
}
|
|
3071
3081
|
function jt(e, t, n) {
|
|
3072
|
-
const r = wn(e), i = r && !
|
|
3073
|
-
return (n ? r : r && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt) && e !== Dt && !(t === ze && !i) || wn(t) && !
|
|
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);
|
|
3074
3084
|
}
|
|
3075
|
-
function
|
|
3076
|
-
return Qe(e) && e !== rn && !
|
|
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;
|
|
3077
3087
|
}
|
|
3078
|
-
function
|
|
3079
|
-
const n =
|
|
3080
|
-
if (
|
|
3088
|
+
function qo(e, t) {
|
|
3089
|
+
const n = De(e, 0);
|
|
3090
|
+
if (Ko(n)) return !0;
|
|
3081
3091
|
if (e.length > 1 && (n === on || n === sr || n === ze)) {
|
|
3082
|
-
const r =
|
|
3083
|
-
return !
|
|
3092
|
+
const r = De(e, 1);
|
|
3093
|
+
return !Ke(r) && jt(r, n, t);
|
|
3084
3094
|
}
|
|
3085
3095
|
return !1;
|
|
3086
3096
|
}
|
|
3087
|
-
function
|
|
3088
|
-
return !
|
|
3097
|
+
function Go(e) {
|
|
3098
|
+
return !Ke(e) && e !== ze;
|
|
3089
3099
|
}
|
|
3090
|
-
function
|
|
3100
|
+
function De(e, t) {
|
|
3091
3101
|
const n = e.charCodeAt(t);
|
|
3092
3102
|
let r;
|
|
3093
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;
|
|
@@ -3095,28 +3105,28 @@ function Be(e, t) {
|
|
|
3095
3105
|
function lr(e) {
|
|
3096
3106
|
return /^\n* /.test(e);
|
|
3097
3107
|
}
|
|
3098
|
-
var Ze = 1, Ve = 2, sn = 3, ln = 4,
|
|
3099
|
-
function
|
|
3108
|
+
var Ze = 1, Ve = 2, sn = 3, ln = 4, _e = 5;
|
|
3109
|
+
function Yo(e, t, n, r, i, o) {
|
|
3100
3110
|
const { blockIndent: a, lineWidth: s } = n;
|
|
3101
|
-
let l, u = 0, c = -1,
|
|
3111
|
+
let l, u = 0, c = -1, S = !1, m = !1;
|
|
3102
3112
|
const C = s !== -1;
|
|
3103
|
-
let
|
|
3113
|
+
let E = -1, I = !Uo(t) && qo(t, o) && Go(De(t, t.length - 1));
|
|
3104
3114
|
if (r || i) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3105
|
-
if (u =
|
|
3106
|
-
|
|
3115
|
+
if (u = De(t, l), !Qe(u)) return _e;
|
|
3116
|
+
I = I && jt(u, c, o), c = u;
|
|
3107
3117
|
}
|
|
3108
3118
|
else {
|
|
3109
3119
|
for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3110
|
-
if (u =
|
|
3111
|
-
|
|
3112
|
-
else if (!Qe(u)) return
|
|
3113
|
-
|
|
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;
|
|
3114
3124
|
}
|
|
3115
|
-
m = m || C && l -
|
|
3125
|
+
m = m || C && l - E - 1 > s && !Je(t[E + 1]);
|
|
3116
3126
|
}
|
|
3117
|
-
return !
|
|
3127
|
+
return !S && !m ? I && !i ? Ze : e.quoteStyle === "double" ? _e : Ve : a > 9 && lr(t) ? _e : m ? ln : sn;
|
|
3118
3128
|
}
|
|
3119
|
-
function
|
|
3129
|
+
function Wo(e, t, n) {
|
|
3120
3130
|
const { indent: r, blockIndent: i, lineWidth: o } = n;
|
|
3121
3131
|
switch (t) {
|
|
3122
3132
|
case Ze:
|
|
@@ -3124,26 +3134,26 @@ function Yo(e, t, n) {
|
|
|
3124
3134
|
case Ve:
|
|
3125
3135
|
return `'${$n(e, r).replace(/'/g, "''")}'`;
|
|
3126
3136
|
case sn:
|
|
3127
|
-
return "|" + Nn(e, i) +
|
|
3137
|
+
return "|" + Nn(e, i) + kn(xn(e, r));
|
|
3128
3138
|
case ln:
|
|
3129
|
-
return ">" + Nn(e, i) +
|
|
3130
|
-
case
|
|
3131
|
-
return `"${
|
|
3139
|
+
return ">" + Nn(e, i) + kn(xn(Vo(e, o), r));
|
|
3140
|
+
case _e:
|
|
3141
|
+
return `"${Xo(e)}"`;
|
|
3132
3142
|
}
|
|
3133
3143
|
}
|
|
3134
|
-
function
|
|
3144
|
+
function jo(e, t, n, r, i) {
|
|
3135
3145
|
const o = r || !i;
|
|
3136
3146
|
if (t.style.singleQuoted) return Ve;
|
|
3137
|
-
if (t.style.doubleQuoted) return
|
|
3147
|
+
if (t.style.doubleQuoted) return _e;
|
|
3138
3148
|
if (!o) {
|
|
3139
3149
|
if (t.style.literal) return sn;
|
|
3140
3150
|
if (t.style.folded) return ln;
|
|
3141
3151
|
}
|
|
3142
3152
|
const a = t.value;
|
|
3143
3153
|
if (a.length === 0)
|
|
3144
|
-
return t.style.tagged || In(e, a) === t.tag ? Ze : e.quoteStyle === "double" ?
|
|
3145
|
-
const s =
|
|
3146
|
-
return s === Ze && !t.style.tagged && In(e, a) !== t.tag ? e.quoteStyle === "double" ?
|
|
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;
|
|
3147
3157
|
}
|
|
3148
3158
|
function Nn(e, t) {
|
|
3149
3159
|
const n = lr(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
@@ -3169,28 +3179,28 @@ function $n(e, t) {
|
|
|
3169
3179
|
}
|
|
3170
3180
|
return i;
|
|
3171
3181
|
}
|
|
3172
|
-
function
|
|
3182
|
+
function kn(e) {
|
|
3173
3183
|
return e[e.length - 1] === `
|
|
3174
3184
|
` ? e.slice(0, -1) : e;
|
|
3175
3185
|
}
|
|
3176
3186
|
function Je(e) {
|
|
3177
3187
|
return e === " " || e === " ";
|
|
3178
3188
|
}
|
|
3179
|
-
function
|
|
3189
|
+
function Vo(e, t) {
|
|
3180
3190
|
const n = /(\n+)([^\n]*)/g;
|
|
3181
3191
|
let r = e.indexOf(`
|
|
3182
3192
|
`);
|
|
3183
3193
|
r === -1 && (r = e.length), n.lastIndex = r;
|
|
3184
|
-
let i =
|
|
3194
|
+
let i = Ln(e.slice(0, r), t), o = e[0] === `
|
|
3185
3195
|
` || Je(e[0]), a, s;
|
|
3186
3196
|
for (; s = n.exec(e); ) {
|
|
3187
3197
|
const l = s[1], u = s[2];
|
|
3188
3198
|
a = u !== "" && Je(u[0]), i += l + (!o && !a && u !== "" ? `
|
|
3189
|
-
` : "") +
|
|
3199
|
+
` : "") + Ln(u, t), o = a;
|
|
3190
3200
|
}
|
|
3191
3201
|
return i;
|
|
3192
3202
|
}
|
|
3193
|
-
function
|
|
3203
|
+
function Ln(e, t) {
|
|
3194
3204
|
if (e === "" || Je(e[0])) return e;
|
|
3195
3205
|
const n = / [^ \t]/g;
|
|
3196
3206
|
let r, i = 0, o, a = 0, s = 0, l = "";
|
|
@@ -3201,11 +3211,11 @@ ${e.slice(i, o)}`, i = o + 1), a = s;
|
|
|
3201
3211
|
`, e.length - i > t && a > i ? l += `${e.slice(i, a)}
|
|
3202
3212
|
${e.slice(a + 1)}` : l += e.slice(i), l.slice(1);
|
|
3203
3213
|
}
|
|
3204
|
-
function
|
|
3214
|
+
function Xo(e) {
|
|
3205
3215
|
let t = "", n = 0;
|
|
3206
3216
|
for (let r = 0; r < e.length; n >= 65536 ? r += 2 : r++) {
|
|
3207
|
-
n =
|
|
3208
|
-
const i =
|
|
3217
|
+
n = De(e, r);
|
|
3218
|
+
const i = te[n];
|
|
3209
3219
|
if (i) {
|
|
3210
3220
|
t += i;
|
|
3211
3221
|
continue;
|
|
@@ -3214,14 +3224,14 @@ function Vo(e) {
|
|
|
3214
3224
|
t += e[r], n >= 65536 && (t += e[r + 1]);
|
|
3215
3225
|
continue;
|
|
3216
3226
|
}
|
|
3217
|
-
t +=
|
|
3227
|
+
t += Bo(n);
|
|
3218
3228
|
}
|
|
3219
3229
|
return t;
|
|
3220
3230
|
}
|
|
3221
|
-
function
|
|
3231
|
+
function zo(e, t, n) {
|
|
3222
3232
|
let r = "";
|
|
3223
3233
|
for (let o = 0, a = n.items.length; o < a; o += 1) {
|
|
3224
|
-
const s =
|
|
3234
|
+
const s = Ce(e, t, n.items[o], {});
|
|
3225
3235
|
r !== "" && (r += `,${e.flowSkipCommaSpace ? "" : " "}`), r += s;
|
|
3226
3236
|
}
|
|
3227
3237
|
const i = e.flowBracketPadding && r !== "" ? " " : "";
|
|
@@ -3230,25 +3240,25 @@ function Xo(e, t, n) {
|
|
|
3230
3240
|
function On(e, t, n, r) {
|
|
3231
3241
|
let i = "";
|
|
3232
3242
|
for (let o = 0, a = n.items.length; o < a; o += 1) {
|
|
3233
|
-
const s =
|
|
3243
|
+
const s = Ce(e, t + 1, n.items[o], {
|
|
3234
3244
|
block: !0,
|
|
3235
3245
|
compact: e.seqInlineFirst,
|
|
3236
3246
|
isblockseq: !0
|
|
3237
3247
|
});
|
|
3238
|
-
(!r || i !== "") && (i += Wt(e, t)), s === "" ||
|
|
3248
|
+
(!r || i !== "") && (i += Wt(e, t)), s === "" || Oe === s.charCodeAt(0) ? i += "-" : i += "- ", i += s;
|
|
3239
3249
|
}
|
|
3240
3250
|
return i;
|
|
3241
3251
|
}
|
|
3242
|
-
function
|
|
3252
|
+
function Qo(e, t, n) {
|
|
3243
3253
|
let r = "";
|
|
3244
3254
|
const i = cr(e, n.items);
|
|
3245
3255
|
for (const { key: a, value: s } of i) {
|
|
3246
3256
|
let l = "";
|
|
3247
3257
|
r !== "" && (l += `,${e.flowSkipCommaSpace ? "" : " "}`);
|
|
3248
|
-
const u =
|
|
3258
|
+
const u = Ce(e, t, a, { iskey: !0 }), c = u.length > 1024;
|
|
3249
3259
|
c ? l += "? " : e.quoteFlowKeys && (l += '"');
|
|
3250
|
-
const
|
|
3251
|
-
l += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${m}${
|
|
3260
|
+
const S = Ce(e, t, s, {}), m = e.flowSkipColonSpace || S === "" ? "" : " ";
|
|
3261
|
+
l += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${m}${S}`, r += l;
|
|
3252
3262
|
}
|
|
3253
3263
|
const o = e.flowBracketPadding && r !== "" ? " " : "";
|
|
3254
3264
|
return `{${o}${r}${o}}`;
|
|
@@ -3269,61 +3279,61 @@ function cr(e, t) {
|
|
|
3269
3279
|
}
|
|
3270
3280
|
return n;
|
|
3271
3281
|
}
|
|
3272
|
-
function
|
|
3282
|
+
function Zo(e, t, n, r) {
|
|
3273
3283
|
let i = "";
|
|
3274
3284
|
const o = cr(e, n.items);
|
|
3275
3285
|
for (let a = 0, s = o.length; a < s; a += 1) {
|
|
3276
3286
|
let l = "";
|
|
3277
3287
|
(!r || i !== "") && (l += Wt(e, t));
|
|
3278
|
-
const { key: u, value: c } = o[a],
|
|
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, {
|
|
3279
3289
|
block: !0,
|
|
3280
3290
|
compact: !0,
|
|
3281
3291
|
isblockseq: !Vt(e, u, t + 1)
|
|
3282
|
-
}) :
|
|
3292
|
+
}) : Ce(e, t + 1, u, {
|
|
3283
3293
|
block: !0,
|
|
3284
3294
|
compact: !0,
|
|
3285
3295
|
iskey: !0
|
|
3286
3296
|
}), C = u.kind === "scalar" && u.value.indexOf(`
|
|
3287
|
-
`) !== -1,
|
|
3288
|
-
|
|
3289
|
-
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, {
|
|
3290
3300
|
block: !0,
|
|
3291
|
-
compact:
|
|
3292
|
-
isblockseq:
|
|
3293
|
-
}),
|
|
3294
|
-
|
|
3301
|
+
compact: E,
|
|
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;
|
|
3295
3305
|
}
|
|
3296
3306
|
return i;
|
|
3297
3307
|
}
|
|
3298
3308
|
function Vt(e, t, n) {
|
|
3299
3309
|
return t.style.tagged || t.anchor !== void 0 || e.indent < 2 && n > 0;
|
|
3300
3310
|
}
|
|
3301
|
-
function
|
|
3311
|
+
function Ce(e, t, n, r) {
|
|
3302
3312
|
if (n.kind === "alias") return `*${n.anchor}`;
|
|
3303
3313
|
const { block: i = !1, iskey: o = !1, isblockseq: a = !1 } = r;
|
|
3304
3314
|
let s = r.compact ?? !1;
|
|
3305
3315
|
const l = n.anchor !== void 0;
|
|
3306
3316
|
Vt(e, n, t) && (s = !1);
|
|
3307
3317
|
let u, c = n.style.tagged;
|
|
3308
|
-
const
|
|
3309
|
-
if (n.kind === "mapping")
|
|
3310
|
-
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);
|
|
3311
3321
|
else {
|
|
3312
|
-
const m =
|
|
3313
|
-
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;
|
|
3314
3324
|
}
|
|
3315
|
-
if (
|
|
3316
|
-
const m = [], C = c ?
|
|
3317
|
-
e.tagBeforeAnchor ? (C !== null && m.push(C),
|
|
3318
|
-
const
|
|
3319
|
-
u = `${m.join(" ")}${
|
|
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}`;
|
|
3320
3330
|
}
|
|
3321
3331
|
return u;
|
|
3322
3332
|
}
|
|
3323
|
-
function
|
|
3333
|
+
function Jo(e) {
|
|
3324
3334
|
return (e.kind === "sequence" || e.kind === "mapping") && !e.style.flow && e.items.length !== 0 && !e.style.tagged && e.anchor === void 0;
|
|
3325
3335
|
}
|
|
3326
|
-
function
|
|
3336
|
+
function ea(e) {
|
|
3327
3337
|
let t = e;
|
|
3328
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;
|
|
3329
3339
|
if (t.kind !== "scalar" || !(t.style.literal || t.style.folded)) return !1;
|
|
@@ -3333,7 +3343,7 @@ function Jo(e) {
|
|
|
3333
3343
|
`) || n === `
|
|
3334
3344
|
`;
|
|
3335
3345
|
}
|
|
3336
|
-
function
|
|
3346
|
+
function ta(e) {
|
|
3337
3347
|
let t = "";
|
|
3338
3348
|
for (const n of e.directives) {
|
|
3339
3349
|
if (n.kind === "yaml") {
|
|
@@ -3347,105 +3357,105 @@ function ea(e) {
|
|
|
3347
3357
|
}
|
|
3348
3358
|
return t;
|
|
3349
3359
|
}
|
|
3350
|
-
function
|
|
3351
|
-
const n =
|
|
3360
|
+
function na(e, t) {
|
|
3361
|
+
const n = Mo(t);
|
|
3352
3362
|
let r = "", i = !1;
|
|
3353
3363
|
for (let o = 0; o < e.length; o += 1) {
|
|
3354
|
-
const a = e[o], s =
|
|
3364
|
+
const a = e[o], s = ta(a), l = s !== "", u = a.explicitStart || l || o > 0 && !i;
|
|
3355
3365
|
if (r += s, a.contents === null)
|
|
3356
3366
|
u && (r += `---
|
|
3357
3367
|
`);
|
|
3358
3368
|
else if (u) {
|
|
3359
|
-
const c =
|
|
3369
|
+
const c = Ce(n, 0, a.contents, {
|
|
3360
3370
|
block: !0,
|
|
3361
3371
|
compact: !0
|
|
3362
|
-
}),
|
|
3372
|
+
}), S = c === "" ? "" : l || Jo(a.contents) ? `
|
|
3363
3373
|
` : " ";
|
|
3364
|
-
r += `---${
|
|
3374
|
+
r += `---${S}${c}
|
|
3365
3375
|
`;
|
|
3366
|
-
} else r +=
|
|
3376
|
+
} else r += Ce(n, 0, a.contents, {
|
|
3367
3377
|
block: !0,
|
|
3368
3378
|
compact: !0
|
|
3369
3379
|
}) + `
|
|
3370
3380
|
`;
|
|
3371
|
-
i = a.explicitEnd || a.contents !== null &&
|
|
3381
|
+
i = a.explicitEnd || a.contents !== null && ea(a.contents), i && (r += `...
|
|
3372
3382
|
`);
|
|
3373
3383
|
}
|
|
3374
3384
|
return r;
|
|
3375
3385
|
}
|
|
3376
|
-
var
|
|
3377
|
-
...
|
|
3386
|
+
var ra = Ni.withTags({
|
|
3387
|
+
...Lt,
|
|
3378
3388
|
resolve: (e, t, n) => {
|
|
3379
|
-
const r =
|
|
3380
|
-
return r ===
|
|
3389
|
+
const r = Lt.resolve(e, t, n);
|
|
3390
|
+
return r === H ? Fn.resolve(e, t, n) : r;
|
|
3381
3391
|
}
|
|
3382
3392
|
}, {
|
|
3383
3393
|
...Ot,
|
|
3384
3394
|
resolve: (e, t, n) => {
|
|
3385
3395
|
const r = Ot.resolve(e, t, n);
|
|
3386
|
-
return r ===
|
|
3396
|
+
return r === H ? Hn.resolve(e, t, n) : r;
|
|
3387
3397
|
}
|
|
3388
|
-
}),
|
|
3398
|
+
}), ia = {
|
|
3389
3399
|
...an,
|
|
3390
|
-
schema:
|
|
3400
|
+
schema: ra,
|
|
3391
3401
|
skipInvalid: !1,
|
|
3392
3402
|
noRefs: !1,
|
|
3393
3403
|
flowLevel: -1,
|
|
3394
3404
|
transform: () => {
|
|
3395
3405
|
}
|
|
3396
3406
|
};
|
|
3397
|
-
function
|
|
3407
|
+
function oa(e, t = {}) {
|
|
3398
3408
|
const n = {
|
|
3399
|
-
...
|
|
3409
|
+
...ia,
|
|
3400
3410
|
...t
|
|
3401
|
-
}, r =
|
|
3411
|
+
}, r = vo(e, n.schema, {
|
|
3402
3412
|
noRefs: n.noRefs,
|
|
3403
3413
|
skipInvalid: n.skipInvalid
|
|
3404
3414
|
});
|
|
3405
|
-
return n.flowLevel >= 0 &&
|
|
3415
|
+
return n.flowLevel >= 0 && Ro(r, (i, o) => {
|
|
3406
3416
|
if (!(o.depth < n.flowLevel))
|
|
3407
3417
|
return i.style.flow = !0, rr;
|
|
3408
|
-
}), n.transform(r),
|
|
3418
|
+
}), n.transform(r), na(r, {
|
|
3409
3419
|
...Pt(n, Object.keys(an)),
|
|
3410
3420
|
schema: n.schema
|
|
3411
3421
|
});
|
|
3412
3422
|
}
|
|
3413
|
-
const
|
|
3414
|
-
const n = Eo(e, { schema:
|
|
3423
|
+
const aa = Gn.withTags(Mn, Bn, Dn, Un, Kn), ur = (e, t) => {
|
|
3424
|
+
const n = Eo(e, { schema: aa, ...t });
|
|
3415
3425
|
if (n.length === 0)
|
|
3416
3426
|
return e.trim() === "" ? void 0 : null;
|
|
3417
3427
|
if (n.length > 1)
|
|
3418
3428
|
throw new At("expected a single document in the stream, but found more");
|
|
3419
3429
|
return n[0];
|
|
3420
|
-
},
|
|
3421
|
-
function
|
|
3430
|
+
}, ba = (e, t) => oa(e, t);
|
|
3431
|
+
function sa(e, t) {
|
|
3422
3432
|
return e.hasOwnProperty(t) ? e[t] : void 0;
|
|
3423
3433
|
}
|
|
3424
|
-
const
|
|
3425
|
-
class
|
|
3434
|
+
const la = /\((\d+):(\d+)\)$/;
|
|
3435
|
+
class St extends Error {
|
|
3426
3436
|
originalError;
|
|
3427
3437
|
source;
|
|
3428
3438
|
col;
|
|
3429
3439
|
line;
|
|
3430
3440
|
constructor(t, n) {
|
|
3431
3441
|
super(t.message.split(`
|
|
3432
|
-
`)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this,
|
|
3433
|
-
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) || [];
|
|
3434
3444
|
this.line = parseInt(r, 10), this.col = parseInt(i, 10);
|
|
3435
3445
|
}
|
|
3436
3446
|
}
|
|
3437
|
-
function
|
|
3447
|
+
function ca(e) {
|
|
3438
3448
|
return e.endsWith(".yaml") || e.endsWith(".yml") || e.endsWith(".json");
|
|
3439
3449
|
}
|
|
3440
|
-
const
|
|
3450
|
+
const ua = [".graphql", ".gql"];
|
|
3441
3451
|
function fr(e) {
|
|
3442
3452
|
const t = e.toLowerCase();
|
|
3443
|
-
return
|
|
3453
|
+
return ua.some((n) => t.endsWith(n));
|
|
3444
3454
|
}
|
|
3445
|
-
function
|
|
3455
|
+
function kt(e, t) {
|
|
3446
3456
|
return e + "::" + t;
|
|
3447
3457
|
}
|
|
3448
|
-
function
|
|
3458
|
+
function fa() {
|
|
3449
3459
|
return new Promise((e) => {
|
|
3450
3460
|
setTimeout(e);
|
|
3451
3461
|
});
|
|
@@ -3474,7 +3484,7 @@ class cn extends Error {
|
|
|
3474
3484
|
super(t.message), this.originalError = t, Object.setPrototypeOf(this, cn.prototype);
|
|
3475
3485
|
}
|
|
3476
3486
|
}
|
|
3477
|
-
function
|
|
3487
|
+
function Ra(e, t) {
|
|
3478
3488
|
const n = new Xt(t, e);
|
|
3479
3489
|
if (fr(t))
|
|
3480
3490
|
return { source: n, parsed: e };
|
|
@@ -3484,10 +3494,10 @@ function ba(e, t) {
|
|
|
3484
3494
|
parsed: ur(e, { filename: t })
|
|
3485
3495
|
};
|
|
3486
3496
|
} catch (r) {
|
|
3487
|
-
throw new
|
|
3497
|
+
throw new St(r, n);
|
|
3488
3498
|
}
|
|
3489
3499
|
}
|
|
3490
|
-
class
|
|
3500
|
+
class _a {
|
|
3491
3501
|
config;
|
|
3492
3502
|
cache = /* @__PURE__ */ new Map();
|
|
3493
3503
|
constructor(t = { http: { headers: [] } }) {
|
|
@@ -3497,12 +3507,12 @@ class Ra {
|
|
|
3497
3507
|
return new Set(Array.from(this.cache.keys()));
|
|
3498
3508
|
}
|
|
3499
3509
|
resolveExternalRef(t, n) {
|
|
3500
|
-
return
|
|
3510
|
+
return Fe(n) ? n : t && Fe(t) ? new URL(n, t).href : Xe.resolve(t ? Xe.dirname(t) : process.cwd(), n);
|
|
3501
3511
|
}
|
|
3502
3512
|
async loadExternalRef(t) {
|
|
3503
3513
|
try {
|
|
3504
|
-
if (
|
|
3505
|
-
const { body: n, mimeType: r } = await
|
|
3514
|
+
if (Fe(t)) {
|
|
3515
|
+
const { body: n, mimeType: r } = await br(t, this.config.http);
|
|
3506
3516
|
return new Xt(t, n, r);
|
|
3507
3517
|
} else {
|
|
3508
3518
|
if ((void 0)(t).isDirectory())
|
|
@@ -3518,7 +3528,7 @@ class Ra {
|
|
|
3518
3528
|
parseDocument(t, n = !1) {
|
|
3519
3529
|
if (fr(t.absoluteRef))
|
|
3520
3530
|
return { source: t, parsed: t.body };
|
|
3521
|
-
if (!
|
|
3531
|
+
if (!ca(t.absoluteRef) && !t.mimeType?.match(/(json|yaml|openapi)/) && !n)
|
|
3522
3532
|
return { source: t, parsed: t.body };
|
|
3523
3533
|
try {
|
|
3524
3534
|
return {
|
|
@@ -3526,7 +3536,7 @@ class Ra {
|
|
|
3526
3536
|
parsed: ur(t.body, { filename: t.absoluteRef })
|
|
3527
3537
|
};
|
|
3528
3538
|
} catch (r) {
|
|
3529
|
-
throw new
|
|
3539
|
+
throw new St(r, t);
|
|
3530
3540
|
}
|
|
3531
3541
|
}
|
|
3532
3542
|
async resolveDocument(t, n, r = !1) {
|
|
@@ -3543,7 +3553,7 @@ function Pn(e, t) {
|
|
|
3543
3553
|
node: t
|
|
3544
3554
|
};
|
|
3545
3555
|
}
|
|
3546
|
-
function
|
|
3556
|
+
function pa(e, t) {
|
|
3547
3557
|
for (; e; ) {
|
|
3548
3558
|
if (e.node === t)
|
|
3549
3559
|
return !0;
|
|
@@ -3551,8 +3561,8 @@ function fa(e, t) {
|
|
|
3551
3561
|
}
|
|
3552
3562
|
return !1;
|
|
3553
3563
|
}
|
|
3554
|
-
const Ye = { name: "unknown", properties: {} },
|
|
3555
|
-
async function
|
|
3564
|
+
const Ye = { name: "unknown", properties: {} }, da = { name: "scalar", properties: {} };
|
|
3565
|
+
async function xa(e) {
|
|
3556
3566
|
const { rootDocument: t, externalRefResolver: n, rootType: r } = e, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [];
|
|
3557
3567
|
l(t.parsed, t, "#/", r);
|
|
3558
3568
|
let s;
|
|
@@ -3560,103 +3570,103 @@ async function _a(e) {
|
|
|
3560
3570
|
s = await Promise.all(a);
|
|
3561
3571
|
while (a.length !== s.length);
|
|
3562
3572
|
return i;
|
|
3563
|
-
function l(u, c,
|
|
3564
|
-
const C = c.source.absoluteRef,
|
|
3565
|
-
|
|
3566
|
-
function
|
|
3567
|
-
if (!
|
|
3573
|
+
function l(u, c, S, m) {
|
|
3574
|
+
const C = c.source.absoluteRef, E = /* @__PURE__ */ new Map();
|
|
3575
|
+
I(u, m, C + S);
|
|
3576
|
+
function I(N, k, y) {
|
|
3577
|
+
if (!Re(N) && !Array.isArray(N))
|
|
3568
3578
|
return;
|
|
3569
|
-
const
|
|
3570
|
-
if (o.has(
|
|
3579
|
+
const R = `${k.name}::${y}`;
|
|
3580
|
+
if (o.has(R))
|
|
3571
3581
|
return;
|
|
3572
|
-
if (o.add(
|
|
3573
|
-
const
|
|
3574
|
-
if (
|
|
3582
|
+
if (o.add(R), Array.isArray(N)) {
|
|
3583
|
+
const b = k.items;
|
|
3584
|
+
if (b === void 0 && k !== Ye && k !== it)
|
|
3575
3585
|
return;
|
|
3576
|
-
const A = typeof
|
|
3586
|
+
const A = typeof b == "function";
|
|
3577
3587
|
for (let g = 0; g < N.length; g++) {
|
|
3578
|
-
let
|
|
3579
|
-
if (
|
|
3588
|
+
let x = A ? b(N[g], be(y, g)) : b;
|
|
3589
|
+
if (x === void 0 && k !== Ye && k !== it)
|
|
3580
3590
|
continue;
|
|
3581
|
-
const W =
|
|
3582
|
-
|
|
3591
|
+
const W = x?.directResolveAs ? { $ref: N[g] } : N[g];
|
|
3592
|
+
x = x?.directResolveAs || x, I(W, ot(x) ? x : Ye, be(y, g));
|
|
3583
3593
|
}
|
|
3584
3594
|
return;
|
|
3585
3595
|
}
|
|
3586
|
-
const [
|
|
3587
|
-
|
|
3588
|
-
for (const
|
|
3589
|
-
let A = N[
|
|
3590
|
-
g === void 0 && (g =
|
|
3596
|
+
const [f, w] = Object.entries(N).find(([b]) => b === "$anchor") || [];
|
|
3597
|
+
w && E.set(`#${w}`, N);
|
|
3598
|
+
for (const b of Object.keys(N)) {
|
|
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)));
|
|
3591
3601
|
}
|
|
3592
3602
|
if (at(N)) {
|
|
3593
|
-
const
|
|
3603
|
+
const b = M(c, N, {
|
|
3594
3604
|
prev: null,
|
|
3595
3605
|
node: N
|
|
3596
3606
|
}).then((A) => {
|
|
3597
3607
|
if (A.resolved) {
|
|
3598
|
-
l(A.node, A.document, A.nodePointer,
|
|
3608
|
+
l(A.node, A.document, A.nodePointer, k);
|
|
3599
3609
|
for (const g of A.chain ?? [])
|
|
3600
|
-
l(g.node, g.document, g.location.pointer,
|
|
3610
|
+
l(g.node, g.document, g.location.pointer, k);
|
|
3601
3611
|
}
|
|
3602
3612
|
});
|
|
3603
|
-
a.push(
|
|
3613
|
+
a.push(b);
|
|
3604
3614
|
}
|
|
3605
|
-
if (
|
|
3606
|
-
const
|
|
3615
|
+
if (xr(N)) {
|
|
3616
|
+
const b = M(c, { $ref: N.externalValue }, {
|
|
3607
3617
|
prev: null,
|
|
3608
3618
|
node: N
|
|
3609
3619
|
}).then((A) => {
|
|
3610
|
-
A.resolved && l(A.node, A.document, A.nodePointer,
|
|
3620
|
+
A.resolved && l(A.node, A.document, A.nodePointer, k);
|
|
3611
3621
|
});
|
|
3612
|
-
a.push(
|
|
3622
|
+
a.push(b);
|
|
3613
3623
|
}
|
|
3614
3624
|
}
|
|
3615
|
-
async function
|
|
3616
|
-
if (
|
|
3625
|
+
async function M(N, k, y) {
|
|
3626
|
+
if (pa(y.prev, k))
|
|
3617
3627
|
throw new Error("Self-referencing circular pointer");
|
|
3618
|
-
if (
|
|
3619
|
-
await
|
|
3620
|
-
const
|
|
3628
|
+
if ($r(k.$ref)) {
|
|
3629
|
+
await fa();
|
|
3630
|
+
const L = {
|
|
3621
3631
|
resolved: !0,
|
|
3622
3632
|
isRemote: !1,
|
|
3623
|
-
node:
|
|
3633
|
+
node: E.get(k.$ref),
|
|
3624
3634
|
document: N,
|
|
3625
|
-
nodePointer:
|
|
3626
|
-
},
|
|
3627
|
-
return i.set(
|
|
3635
|
+
nodePointer: k.$ref
|
|
3636
|
+
}, q = kt(N.source.absoluteRef, k.$ref);
|
|
3637
|
+
return i.set(q, L), L;
|
|
3628
3638
|
}
|
|
3629
|
-
const { uri:
|
|
3630
|
-
let
|
|
3639
|
+
const { uri: R, pointer: f } = wr(k.$ref), w = R !== null && n.resolveExternalRef(N.source.absoluteRef, R) !== N.source.absoluteRef;
|
|
3640
|
+
let b;
|
|
3631
3641
|
try {
|
|
3632
|
-
|
|
3633
|
-
} catch (
|
|
3634
|
-
const
|
|
3642
|
+
b = w ? await n.resolveDocument(N.source.absoluteRef, R) : N;
|
|
3643
|
+
} catch (L) {
|
|
3644
|
+
const q = {
|
|
3635
3645
|
resolved: !1,
|
|
3636
|
-
isRemote:
|
|
3646
|
+
isRemote: w,
|
|
3637
3647
|
document: void 0,
|
|
3638
|
-
error:
|
|
3639
|
-
},
|
|
3640
|
-
return i.set(
|
|
3648
|
+
error: L
|
|
3649
|
+
}, ce = kt(N.source.absoluteRef, k.$ref);
|
|
3650
|
+
return i.set(ce, q), q;
|
|
3641
3651
|
}
|
|
3642
3652
|
let A = {
|
|
3643
3653
|
resolved: !0,
|
|
3644
|
-
document:
|
|
3645
|
-
isRemote:
|
|
3654
|
+
document: b,
|
|
3655
|
+
isRemote: w,
|
|
3646
3656
|
node: N.parsed,
|
|
3647
3657
|
nodePointer: "#/"
|
|
3648
|
-
}, g =
|
|
3649
|
-
const
|
|
3650
|
-
for (const
|
|
3651
|
-
if (
|
|
3652
|
-
g = g[
|
|
3653
|
-
else if (Array.isArray(g) && g[+
|
|
3654
|
-
g = g[+
|
|
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));
|
|
3655
3665
|
else if (at(g))
|
|
3656
|
-
if (A = await
|
|
3657
|
-
g = A.node[
|
|
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));
|
|
3658
3668
|
else if (Array.isArray(A.node))
|
|
3659
|
-
g = A.node[+
|
|
3669
|
+
g = A.node[+L], A.nodePointer = be(A.nodePointer, Pe(L));
|
|
3660
3670
|
else {
|
|
3661
3671
|
g = void 0;
|
|
3662
3672
|
break;
|
|
@@ -3665,55 +3675,55 @@ async function _a(e) {
|
|
|
3665
3675
|
g = void 0;
|
|
3666
3676
|
break;
|
|
3667
3677
|
}
|
|
3668
|
-
A.node = g, A.document =
|
|
3669
|
-
const W =
|
|
3678
|
+
A.node = g, A.document = b;
|
|
3679
|
+
const W = kt(N.source.absoluteRef, k.$ref);
|
|
3670
3680
|
if (A.document && at(g)) {
|
|
3671
|
-
const
|
|
3681
|
+
const L = _r(g) ? {
|
|
3672
3682
|
node: g,
|
|
3673
3683
|
document: A.document,
|
|
3674
3684
|
location: new zt(A.document.source, A.nodePointer)
|
|
3675
3685
|
} : void 0;
|
|
3676
|
-
A = await
|
|
3686
|
+
A = await M(A.document, g, Pn(y, g)), L && A.resolved && (A = { ...A, chain: [L, ...A.chain ?? []] });
|
|
3677
3687
|
}
|
|
3678
3688
|
return i.set(W, A), { ...A };
|
|
3679
3689
|
}
|
|
3680
3690
|
}
|
|
3681
3691
|
}
|
|
3682
3692
|
export {
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3693
|
+
xr as A,
|
|
3694
|
+
_a as B,
|
|
3695
|
+
ya as C,
|
|
3696
|
+
Sa as D,
|
|
3697
|
+
Nr as E,
|
|
3698
|
+
vr as F,
|
|
3689
3699
|
zt as L,
|
|
3690
3700
|
cn as R,
|
|
3691
3701
|
Xt as S,
|
|
3692
|
-
|
|
3693
|
-
|
|
3702
|
+
St as Y,
|
|
3703
|
+
Tr as a,
|
|
3694
3704
|
fr as b,
|
|
3695
|
-
|
|
3705
|
+
Ta as c,
|
|
3696
3706
|
at as d,
|
|
3697
|
-
|
|
3698
|
-
|
|
3707
|
+
Pe as e,
|
|
3708
|
+
ca as f,
|
|
3699
3709
|
Ea as g,
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
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,
|
|
3708
3718
|
ur as p,
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3719
|
+
wr as q,
|
|
3720
|
+
xa as r,
|
|
3721
|
+
ba as s,
|
|
3722
|
+
sa as t,
|
|
3723
|
+
Ir as u,
|
|
3714
3724
|
it as v,
|
|
3715
3725
|
ot as w,
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3726
|
+
va as x,
|
|
3727
|
+
_r as y,
|
|
3728
|
+
kt as z
|
|
3719
3729
|
};
|