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