@redocly/replay 0.27.0-next.1 → 0.27.0-next.11

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