elrh-cosca 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +237 -99
  2. package/dist/chunks/magicast-B0ixXlDw.mjs +14033 -0
  3. package/dist/chunks/rolldown-runtime-Dqa2HsxW.mjs +20 -0
  4. package/dist/chunks/yaml-BwPmYYDT.mjs +4297 -0
  5. package/dist/elrh-cosca.mjs +328 -14157
  6. package/dist/types/src/_private/fetch-file.d.ts +1 -1
  7. package/dist/types/src/checks/get-package-manager.d.ts +2 -2
  8. package/dist/types/src/checks/has-json-key.d.ts +5 -3
  9. package/dist/types/src/checks/has-text.d.ts +6 -4
  10. package/dist/types/src/checks/has-yaml-key.d.ts +11 -0
  11. package/dist/types/src/checks/path-exists.d.ts +6 -4
  12. package/dist/types/src/functions/create-file-from-template.d.ts +10 -8
  13. package/dist/types/src/functions/create-file-from-web-template.d.ts +10 -8
  14. package/dist/types/src/functions/delete-path.d.ts +9 -7
  15. package/dist/types/src/functions/remove-from-json-file.d.ts +8 -6
  16. package/dist/types/src/functions/remove-from-text-file.d.ts +8 -6
  17. package/dist/types/src/functions/remove-from-yaml-file.d.ts +13 -0
  18. package/dist/types/src/functions/update-config-file.d.ts +13 -7
  19. package/dist/types/src/functions/update-json-file.d.ts +12 -10
  20. package/dist/types/src/functions/update-text-file.d.ts +11 -7
  21. package/dist/types/src/functions/update-yaml-file.d.ts +15 -0
  22. package/dist/types/src/main.d.ts +5 -1
  23. package/dist/types/src/terminal/prompt-user.d.ts +8 -8
  24. package/dist/types/src/terminal/show-error.d.ts +5 -3
  25. package/dist/types/src/terminal/show-message.d.ts +5 -3
  26. package/dist/types/src/types/data.d.ts +6 -0
  27. package/dist/types/src/types/functions.d.ts +99 -0
  28. package/dist/types/src/utils/get-env-value.d.ts +6 -4
  29. package/dist/types/src/utils/parse-qualified-path.d.ts +4 -2
  30. package/dist/types/src/utils/resolve-package-path.d.ts +7 -5
  31. package/dist/types/test/checks-has-yaml-key.test.d.ts +1 -0
  32. package/dist/types/test/functions-remove-from-yaml-file.test.d.ts +1 -0
  33. package/dist/types/test/functions-update-yaml-file.test.d.ts +1 -0
  34. package/dist/types/test/private-deep-merge-object.test.d.ts +1 -0
  35. package/dist/types/test/private-fetch-file.test.d.ts +1 -0
  36. package/dist/types/test/snapshots/created-config-file.d.ts +7 -0
  37. package/package.json +15 -11
  38. package/test/cosca-test.js +17 -17
  39. package/dist/types/src/types/json.d.ts +0 -6
@@ -0,0 +1,4297 @@
1
+ import { n as e } from "./rolldown-runtime-Dqa2HsxW.mjs";
2
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js
3
+ var t = Symbol.for("yaml.alias"), n = Symbol.for("yaml.document"), r = Symbol.for("yaml.map"), i = Symbol.for("yaml.pair"), a = Symbol.for("yaml.scalar"), o = Symbol.for("yaml.seq"), s = Symbol.for("yaml.node.type"), c = (e) => !!e && typeof e == "object" && e[s] === t, l = (e) => !!e && typeof e == "object" && e[s] === n, u = (e) => !!e && typeof e == "object" && e[s] === r, d = (e) => !!e && typeof e == "object" && e[s] === i, f = (e) => !!e && typeof e == "object" && e[s] === a, p = (e) => !!e && typeof e == "object" && e[s] === o;
4
+ function m(e) {
5
+ if (e && typeof e == "object") switch (e[s]) {
6
+ case r:
7
+ case o: return !0;
8
+ }
9
+ return !1;
10
+ }
11
+ function h(e) {
12
+ if (e && typeof e == "object") switch (e[s]) {
13
+ case t:
14
+ case r:
15
+ case a:
16
+ case o: return !0;
17
+ }
18
+ return !1;
19
+ }
20
+ var g = (e) => (f(e) || m(e)) && !!e.anchor, _ = Symbol("break visit"), v = Symbol("skip children"), y = Symbol("remove node");
21
+ function b(e, t) {
22
+ let n = ee(t);
23
+ l(e) ? x(null, e.contents, n, Object.freeze([e])) === y && (e.contents = null) : x(null, e, n, Object.freeze([]));
24
+ }
25
+ b.BREAK = _, b.SKIP = v, b.REMOVE = y;
26
+ function x(e, t, n, r) {
27
+ let i = w(e, t, n, r);
28
+ if (h(i) || d(i)) return T(e, r, i), x(e, i, n, r);
29
+ if (typeof i != "symbol") {
30
+ if (m(t)) {
31
+ r = Object.freeze(r.concat(t));
32
+ for (let e = 0; e < t.items.length; ++e) {
33
+ let i = x(e, t.items[e], n, r);
34
+ if (typeof i == "number") e = i - 1;
35
+ else if (i === _) return _;
36
+ else i === y && (t.items.splice(e, 1), --e);
37
+ }
38
+ } else if (d(t)) {
39
+ r = Object.freeze(r.concat(t));
40
+ let e = x("key", t.key, n, r);
41
+ if (e === _) return _;
42
+ e === y && (t.key = null);
43
+ let i = x("value", t.value, n, r);
44
+ if (i === _) return _;
45
+ i === y && (t.value = null);
46
+ }
47
+ }
48
+ return i;
49
+ }
50
+ async function S(e, t) {
51
+ let n = ee(t);
52
+ l(e) ? await C(null, e.contents, n, Object.freeze([e])) === y && (e.contents = null) : await C(null, e, n, Object.freeze([]));
53
+ }
54
+ S.BREAK = _, S.SKIP = v, S.REMOVE = y;
55
+ async function C(e, t, n, r) {
56
+ let i = await w(e, t, n, r);
57
+ if (h(i) || d(i)) return T(e, r, i), C(e, i, n, r);
58
+ if (typeof i != "symbol") {
59
+ if (m(t)) {
60
+ r = Object.freeze(r.concat(t));
61
+ for (let e = 0; e < t.items.length; ++e) {
62
+ let i = await C(e, t.items[e], n, r);
63
+ if (typeof i == "number") e = i - 1;
64
+ else if (i === _) return _;
65
+ else i === y && (t.items.splice(e, 1), --e);
66
+ }
67
+ } else if (d(t)) {
68
+ r = Object.freeze(r.concat(t));
69
+ let e = await C("key", t.key, n, r);
70
+ if (e === _) return _;
71
+ e === y && (t.key = null);
72
+ let i = await C("value", t.value, n, r);
73
+ if (i === _) return _;
74
+ i === y && (t.value = null);
75
+ }
76
+ }
77
+ return i;
78
+ }
79
+ function ee(e) {
80
+ return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
81
+ Alias: e.Node,
82
+ Map: e.Node,
83
+ Scalar: e.Node,
84
+ Seq: e.Node
85
+ }, e.Value && {
86
+ Map: e.Value,
87
+ Scalar: e.Value,
88
+ Seq: e.Value
89
+ }, e.Collection && {
90
+ Map: e.Collection,
91
+ Seq: e.Collection
92
+ }, e) : e;
93
+ }
94
+ function w(e, t, n, r) {
95
+ if (typeof n == "function") return n(e, t, r);
96
+ if (u(t)) return n.Map?.(e, t, r);
97
+ if (p(t)) return n.Seq?.(e, t, r);
98
+ if (d(t)) return n.Pair?.(e, t, r);
99
+ if (f(t)) return n.Scalar?.(e, t, r);
100
+ if (c(t)) return n.Alias?.(e, t, r);
101
+ }
102
+ function T(e, t, n) {
103
+ let r = t[t.length - 1];
104
+ if (m(r)) r.items[e] = n;
105
+ else if (d(r)) e === "key" ? r.key = n : r.value = n;
106
+ else if (l(r)) r.contents = n;
107
+ else {
108
+ let e = c(r) ? "alias" : "scalar";
109
+ throw Error(`Cannot replace node with ${e} parent`);
110
+ }
111
+ }
112
+ //#endregion
113
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/directives.js
114
+ var te = {
115
+ "!": "%21",
116
+ ",": "%2C",
117
+ "[": "%5B",
118
+ "]": "%5D",
119
+ "{": "%7B",
120
+ "}": "%7D"
121
+ }, ne = (e) => e.replace(/[!,[\]{}]/g, (e) => te[e]), E = class e {
122
+ constructor(t, n) {
123
+ this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
124
+ }
125
+ clone() {
126
+ let t = new e(this.yaml, this.tags);
127
+ return t.docStart = this.docStart, t;
128
+ }
129
+ atDocument() {
130
+ let t = new e(this.yaml, this.tags);
131
+ switch (this.yaml.version) {
132
+ case "1.1":
133
+ this.atNextDocument = !0;
134
+ break;
135
+ case "1.2":
136
+ this.atNextDocument = !1, this.yaml = {
137
+ explicit: e.defaultYaml.explicit,
138
+ version: "1.2"
139
+ }, this.tags = Object.assign({}, e.defaultTags);
140
+ break;
141
+ }
142
+ return t;
143
+ }
144
+ add(t, n) {
145
+ this.atNextDocument &&= (this.yaml = {
146
+ explicit: e.defaultYaml.explicit,
147
+ version: "1.1"
148
+ }, this.tags = Object.assign({}, e.defaultTags), !1);
149
+ let r = t.trim().split(/[ \t]+/), i = r.shift();
150
+ switch (i) {
151
+ case "%TAG": {
152
+ if (r.length !== 2 && (n(0, "%TAG directive should contain exactly two parts"), r.length < 2)) return !1;
153
+ let [e, t] = r;
154
+ return this.tags[e] = t, !0;
155
+ }
156
+ case "%YAML": {
157
+ if (this.yaml.explicit = !0, r.length !== 1) return n(0, "%YAML directive should contain exactly one part"), !1;
158
+ let [e] = r;
159
+ if (e === "1.1" || e === "1.2") return this.yaml.version = e, !0;
160
+ {
161
+ let t = /^\d+\.\d+$/.test(e);
162
+ return n(6, `Unsupported YAML version ${e}`, t), !1;
163
+ }
164
+ }
165
+ default: return n(0, `Unknown directive ${i}`, !0), !1;
166
+ }
167
+ }
168
+ tagName(e, t) {
169
+ if (e === "!") return "!";
170
+ if (e[0] !== "!") return t(`Not a valid tag: ${e}`), null;
171
+ if (e[1] === "<") {
172
+ let n = e.slice(2, -1);
173
+ return n === "!" || n === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), n);
174
+ }
175
+ let [, n, r] = e.match(/^(.*!)([^!]*)$/s);
176
+ r || t(`The ${e} tag has no suffix`);
177
+ let i = this.tags[n];
178
+ if (i) try {
179
+ return i + decodeURIComponent(r);
180
+ } catch (e) {
181
+ return t(String(e)), null;
182
+ }
183
+ return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
184
+ }
185
+ tagString(e) {
186
+ for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + ne(e.substring(n.length));
187
+ return e[0] === "!" ? e : `!<${e}>`;
188
+ }
189
+ toString(e) {
190
+ let t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags), r;
191
+ if (e && n.length > 0 && h(e.contents)) {
192
+ let t = {};
193
+ b(e.contents, (e, n) => {
194
+ h(n) && n.tag && (t[n.tag] = !0);
195
+ }), r = Object.keys(t);
196
+ } else r = [];
197
+ for (let [i, a] of n) i === "!!" && a === "tag:yaml.org,2002:" || (!e || r.some((e) => e.startsWith(a))) && t.push(`%TAG ${i} ${a}`);
198
+ return t.join("\n");
199
+ }
200
+ };
201
+ E.defaultYaml = {
202
+ explicit: !1,
203
+ version: "1.2"
204
+ }, E.defaultTags = { "!!": "tag:yaml.org,2002:" };
205
+ //#endregion
206
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/anchors.js
207
+ function re(e) {
208
+ if (/[\x00-\x19\s,[\]{}]/.test(e)) {
209
+ let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
210
+ throw Error(t);
211
+ }
212
+ return !0;
213
+ }
214
+ function ie(e) {
215
+ let t = /* @__PURE__ */ new Set();
216
+ return b(e, { Value(e, n) {
217
+ n.anchor && t.add(n.anchor);
218
+ } }), t;
219
+ }
220
+ function ae(e, t) {
221
+ for (let n = 1;; ++n) {
222
+ let r = `${e}${n}`;
223
+ if (!t.has(r)) return r;
224
+ }
225
+ }
226
+ function oe(e, t) {
227
+ let n = [], r = /* @__PURE__ */ new Map(), i = null;
228
+ return {
229
+ onAnchor: (r) => {
230
+ n.push(r), i ??= ie(e);
231
+ let a = ae(t, i);
232
+ return i.add(a), a;
233
+ },
234
+ setAnchors: () => {
235
+ for (let e of n) {
236
+ let t = r.get(e);
237
+ if (typeof t == "object" && t.anchor && (f(t.node) || m(t.node))) t.node.anchor = t.anchor;
238
+ else {
239
+ let t = /* @__PURE__ */ Error("Failed to resolve repeated object (this should not happen)");
240
+ throw t.source = e, t;
241
+ }
242
+ }
243
+ },
244
+ sourceObjects: r
245
+ };
246
+ }
247
+ //#endregion
248
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/applyReviver.js
249
+ function D(e, t, n, r) {
250
+ if (r && typeof r == "object") if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
251
+ let n = r[t], i = D(e, r, String(t), n);
252
+ i === void 0 ? delete r[t] : i !== n && (r[t] = i);
253
+ }
254
+ else if (r instanceof Map) for (let t of Array.from(r.keys())) {
255
+ let n = r.get(t), i = D(e, r, t, n);
256
+ i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
257
+ }
258
+ else if (r instanceof Set) for (let t of Array.from(r)) {
259
+ let n = D(e, r, t, t);
260
+ n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
261
+ }
262
+ else for (let [t, n] of Object.entries(r)) {
263
+ let i = D(e, r, t, n);
264
+ i === void 0 ? delete r[t] : i !== n && (r[t] = i);
265
+ }
266
+ return e.call(t, n, r);
267
+ }
268
+ //#endregion
269
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/toJS.js
270
+ function O(e, t, n) {
271
+ if (Array.isArray(e)) return e.map((e, t) => O(e, String(t), n));
272
+ if (e && typeof e.toJSON == "function") {
273
+ if (!n || !g(e)) return e.toJSON(t, n);
274
+ let r = {
275
+ aliasCount: 0,
276
+ count: 1,
277
+ res: void 0
278
+ };
279
+ n.anchors.set(e, r), n.onCreate = (e) => {
280
+ r.res = e, delete n.onCreate;
281
+ };
282
+ let i = e.toJSON(t, n);
283
+ return n.onCreate && n.onCreate(i), i;
284
+ }
285
+ return typeof e == "bigint" && !n?.keep ? Number(e) : e;
286
+ }
287
+ //#endregion
288
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Node.js
289
+ var se = class {
290
+ constructor(e) {
291
+ Object.defineProperty(this, s, { value: e });
292
+ }
293
+ clone() {
294
+ let e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
295
+ return this.range && (e.range = this.range.slice()), e;
296
+ }
297
+ toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: r, reviver: i } = {}) {
298
+ if (!l(e)) throw TypeError("A document argument is required");
299
+ let a = {
300
+ anchors: /* @__PURE__ */ new Map(),
301
+ doc: e,
302
+ keep: !0,
303
+ mapAsMap: t === !0,
304
+ mapKeyWarned: !1,
305
+ maxAliasCount: typeof n == "number" ? n : 100
306
+ }, o = O(this, "", a);
307
+ if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
308
+ return typeof i == "function" ? D(i, { "": o }, "", o) : o;
309
+ }
310
+ }, k = class extends se {
311
+ constructor(e) {
312
+ super(t), this.source = e, Object.defineProperty(this, "tag", { set() {
313
+ throw Error("Alias nodes cannot have tags");
314
+ } });
315
+ }
316
+ resolve(e, t) {
317
+ if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
318
+ let n;
319
+ t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], b(e, { Node: (e, t) => {
320
+ (c(t) || g(t)) && n.push(t);
321
+ } }), t && (t.aliasResolveCache = n));
322
+ let r;
323
+ for (let e of n) {
324
+ if (e === this) break;
325
+ e.anchor === this.source && (r = e);
326
+ }
327
+ if (r && t) {
328
+ let { anchors: e, doc: n, maxAliasCount: i } = t, a = e.get(r);
329
+ /* istanbul ignore if */
330
+ if (a ||= (O(r, null, t), e.get(r)), a?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
331
+ if (i >= 0 && (a.count += 1, a.aliasCount === 0 && (a.aliasCount = ce(n, r, e)), a.count * a.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
332
+ }
333
+ return r;
334
+ }
335
+ toJSON(e, t) {
336
+ if (!t) return { source: this.source };
337
+ let n = this.resolve(t.doc, t);
338
+ if (!n) {
339
+ let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
340
+ throw ReferenceError(e);
341
+ }
342
+ return t.anchors.get(n).res;
343
+ }
344
+ toString(e, t, n) {
345
+ let r = `*${this.source}`;
346
+ if (e) {
347
+ if (re(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
348
+ let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
349
+ throw Error(e);
350
+ }
351
+ if (e.implicitKey) return `${r} `;
352
+ }
353
+ return r;
354
+ }
355
+ };
356
+ function ce(e, t, n) {
357
+ if (c(t)) {
358
+ let r = t.resolve(e), i = n && r && n.get(r);
359
+ return i ? i.count * i.aliasCount : 0;
360
+ } else if (m(t)) {
361
+ let r = 0;
362
+ for (let i of t.items) {
363
+ let t = ce(e, i, n);
364
+ t > r && (r = t);
365
+ }
366
+ return r;
367
+ } else if (d(t)) {
368
+ let r = ce(e, t.key, n), i = ce(e, t.value, n);
369
+ return Math.max(r, i);
370
+ }
371
+ return 1;
372
+ }
373
+ //#endregion
374
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Scalar.js
375
+ var le = (e) => !e || typeof e != "function" && typeof e != "object", A = class extends se {
376
+ constructor(e) {
377
+ super(a), this.value = e;
378
+ }
379
+ toJSON(e, t) {
380
+ return t?.keep ? this.value : O(this.value, e, t);
381
+ }
382
+ toString() {
383
+ return String(this.value);
384
+ }
385
+ };
386
+ A.BLOCK_FOLDED = "BLOCK_FOLDED", A.BLOCK_LITERAL = "BLOCK_LITERAL", A.PLAIN = "PLAIN", A.QUOTE_DOUBLE = "QUOTE_DOUBLE", A.QUOTE_SINGLE = "QUOTE_SINGLE";
387
+ //#endregion
388
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/createNode.js
389
+ var ue = "tag:yaml.org,2002:";
390
+ function de(e, t, n) {
391
+ if (t) {
392
+ let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
393
+ if (!r) throw Error(`Tag ${t} not found`);
394
+ return r;
395
+ }
396
+ return n.find((t) => t.identify?.(e) && !t.format);
397
+ }
398
+ function j(e, t, n) {
399
+ if (l(e) && (e = e.contents), h(e)) return e;
400
+ if (d(e)) {
401
+ let t = n.schema[r].createNode?.(n.schema, null, n);
402
+ return t.items.push(e), t;
403
+ }
404
+ (e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
405
+ let { aliasDuplicateObjects: i, onAnchor: a, onTagObj: s, schema: c, sourceObjects: u } = n, f;
406
+ if (i && e && typeof e == "object") {
407
+ if (f = u.get(e), f) return f.anchor ??= a(e), new k(f.anchor);
408
+ f = {
409
+ anchor: null,
410
+ node: null
411
+ }, u.set(e, f);
412
+ }
413
+ t?.startsWith("!!") && (t = ue + t.slice(2));
414
+ let p = de(e, t, c.tags);
415
+ if (!p) {
416
+ if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
417
+ let t = new A(e);
418
+ return f && (f.node = t), t;
419
+ }
420
+ p = e instanceof Map ? c[r] : Symbol.iterator in Object(e) ? c[o] : c[r];
421
+ }
422
+ s && (s(p), delete n.onTagObj);
423
+ let m = p?.createNode ? p.createNode(n.schema, e, n) : typeof p?.nodeClass?.from == "function" ? p.nodeClass.from(n.schema, e, n) : new A(e);
424
+ return t ? m.tag = t : p.default || (m.tag = p.tag), f && (f.node = m), m;
425
+ }
426
+ //#endregion
427
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Collection.js
428
+ function fe(e, t, n) {
429
+ let r = n;
430
+ for (let e = t.length - 1; e >= 0; --e) {
431
+ let n = t[e];
432
+ if (typeof n == "number" && Number.isInteger(n) && n >= 0) {
433
+ let e = [];
434
+ e[n] = r, r = e;
435
+ } else r = new Map([[n, r]]);
436
+ }
437
+ return j(r, void 0, {
438
+ aliasDuplicateObjects: !1,
439
+ keepUndefined: !1,
440
+ onAnchor: () => {
441
+ throw Error("This should not happen, please report a bug.");
442
+ },
443
+ schema: e,
444
+ sourceObjects: /* @__PURE__ */ new Map()
445
+ });
446
+ }
447
+ var M = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, pe = class extends se {
448
+ constructor(e, t) {
449
+ super(e), Object.defineProperty(this, "schema", {
450
+ value: t,
451
+ configurable: !0,
452
+ enumerable: !1,
453
+ writable: !0
454
+ });
455
+ }
456
+ clone(e) {
457
+ let t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
458
+ return e && (t.schema = e), t.items = t.items.map((t) => h(t) || d(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
459
+ }
460
+ addIn(e, t) {
461
+ if (M(e)) this.add(t);
462
+ else {
463
+ let [n, ...r] = e, i = this.get(n, !0);
464
+ if (m(i)) i.addIn(r, t);
465
+ else if (i === void 0 && this.schema) this.set(n, fe(this.schema, r, t));
466
+ else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
467
+ }
468
+ }
469
+ deleteIn(e) {
470
+ let [t, ...n] = e;
471
+ if (n.length === 0) return this.delete(t);
472
+ let r = this.get(t, !0);
473
+ if (m(r)) return r.deleteIn(n);
474
+ throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);
475
+ }
476
+ getIn(e, t) {
477
+ let [n, ...r] = e, i = this.get(n, !0);
478
+ return r.length === 0 ? !t && f(i) ? i.value : i : m(i) ? i.getIn(r, t) : void 0;
479
+ }
480
+ hasAllNullValues(e) {
481
+ return this.items.every((t) => {
482
+ if (!d(t)) return !1;
483
+ let n = t.value;
484
+ return n == null || e && f(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
485
+ });
486
+ }
487
+ hasIn(e) {
488
+ let [t, ...n] = e;
489
+ if (n.length === 0) return this.has(t);
490
+ let r = this.get(t, !0);
491
+ return m(r) ? r.hasIn(n) : !1;
492
+ }
493
+ setIn(e, t) {
494
+ let [n, ...r] = e;
495
+ if (r.length === 0) this.set(n, t);
496
+ else {
497
+ let e = this.get(n, !0);
498
+ if (m(e)) e.setIn(r, t);
499
+ else if (e === void 0 && this.schema) this.set(n, fe(this.schema, r, t));
500
+ else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
501
+ }
502
+ }
503
+ }, me = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
504
+ function N(e, t) {
505
+ return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
506
+ }
507
+ var P = (e, t, n) => e.endsWith("\n") ? N(n, t) : n.includes("\n") ? "\n" + N(n, t) : (e.endsWith(" ") ? "" : " ") + n, he = "flow", ge = "block", _e = "quoted";
508
+ function ve(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
509
+ if (!i || i < 0) return e;
510
+ i < a && (a = 0);
511
+ let c = Math.max(1 + a, 1 + i - t.length);
512
+ if (e.length <= c) return e;
513
+ let l = [], u = {}, d = i - t.length;
514
+ typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
515
+ let f, p, m = !1, h = -1, g = -1, _ = -1;
516
+ n === "block" && (h = ye(e, h, t.length), h !== -1 && (d = h + c));
517
+ for (let r; r = e[h += 1];) {
518
+ if (n === "quoted" && r === "\\") {
519
+ switch (g = h, e[h + 1]) {
520
+ case "x":
521
+ h += 3;
522
+ break;
523
+ case "u":
524
+ h += 5;
525
+ break;
526
+ case "U":
527
+ h += 9;
528
+ break;
529
+ default: h += 1;
530
+ }
531
+ _ = h;
532
+ }
533
+ if (r === "\n") n === "block" && (h = ye(e, h, t.length)), d = h + t.length + c, f = void 0;
534
+ else {
535
+ if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
536
+ let t = e[h + 1];
537
+ t && t !== " " && t !== "\n" && t !== " " && (f = h);
538
+ }
539
+ if (h >= d) if (f) l.push(f), d = f + c, f = void 0;
540
+ else if (n === "quoted") {
541
+ for (; p === " " || p === " ";) p = r, r = e[h += 1], m = !0;
542
+ let t = h > _ + 1 ? h - 2 : g - 1;
543
+ if (u[t]) return e;
544
+ l.push(t), u[t] = !0, d = t + c, f = void 0;
545
+ } else m = !0;
546
+ }
547
+ p = r;
548
+ }
549
+ if (m && s && s(), l.length === 0) return e;
550
+ o && o();
551
+ let v = e.slice(0, l[0]);
552
+ for (let r = 0; r < l.length; ++r) {
553
+ let i = l[r], a = l[r + 1] || e.length;
554
+ i === 0 ? v = `\n${t}${e.slice(0, a)}` : (n === "quoted" && u[i] && (v += `${e[i]}\\`), v += `\n${t}${e.slice(i + 1, a)}`);
555
+ }
556
+ return v;
557
+ }
558
+ function ye(e, t, n) {
559
+ let r = t, i = t + 1, a = e[i];
560
+ for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
561
+ else {
562
+ do
563
+ a = e[++t];
564
+ while (a && a !== "\n");
565
+ r = t, i = t + 1, a = e[i];
566
+ }
567
+ return r;
568
+ }
569
+ //#endregion
570
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyString.js
571
+ var be = (e, t) => ({
572
+ indentAtStart: t ? e.indent.length : e.indentAtStart,
573
+ lineWidth: e.options.lineWidth,
574
+ minContentWidth: e.options.minContentWidth
575
+ }), xe = (e) => /^(%|---|\.\.\.)/m.test(e);
576
+ function Se(e, t, n) {
577
+ if (!t || t < 0) return !1;
578
+ let r = t - n, i = e.length;
579
+ if (i <= r) return !1;
580
+ for (let t = 0, n = 0; t < i; ++t) if (e[t] === "\n") {
581
+ if (t - n > r) return !0;
582
+ if (n = t + 1, i - n <= r) return !1;
583
+ }
584
+ return !0;
585
+ }
586
+ function Ce(e, t) {
587
+ let n = JSON.stringify(e);
588
+ if (t.options.doubleQuotedAsJSON) return n;
589
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (xe(e) ? " " : ""), o = "", s = 0;
590
+ for (let e = 0, t = n[e]; t; t = n[++e]) if (t === " " && n[e + 1] === "\\" && n[e + 2] === "n" && (o += n.slice(s, e) + "\\ ", e += 1, s = e, t = "\\"), t === "\\") switch (n[e + 1]) {
591
+ case "u":
592
+ {
593
+ o += n.slice(s, e);
594
+ let t = n.substr(e + 2, 4);
595
+ switch (t) {
596
+ case "0000":
597
+ o += "\\0";
598
+ break;
599
+ case "0007":
600
+ o += "\\a";
601
+ break;
602
+ case "000b":
603
+ o += "\\v";
604
+ break;
605
+ case "001b":
606
+ o += "\\e";
607
+ break;
608
+ case "0085":
609
+ o += "\\N";
610
+ break;
611
+ case "00a0":
612
+ o += "\\_";
613
+ break;
614
+ case "2028":
615
+ o += "\\L";
616
+ break;
617
+ case "2029":
618
+ o += "\\P";
619
+ break;
620
+ default: t.substr(0, 2) === "00" ? o += "\\x" + t.substr(2) : o += n.substr(e, 6);
621
+ }
622
+ e += 5, s = e + 1;
623
+ }
624
+ break;
625
+ case "n":
626
+ if (r || n[e + 2] === "\"" || n.length < i) e += 1;
627
+ else {
628
+ for (o += n.slice(s, e) + "\n\n"; n[e + 2] === "\\" && n[e + 3] === "n" && n[e + 4] !== "\"";) o += "\n", e += 2;
629
+ o += a, n[e + 2] === " " && (o += "\\"), e += 1, s = e + 1;
630
+ }
631
+ break;
632
+ default: e += 1;
633
+ }
634
+ return o = s ? o + n.slice(s) : n, r ? o : ve(o, a, _e, be(t, !1));
635
+ }
636
+ function we(e, t) {
637
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Ce(e, t);
638
+ let n = t.indent || (xe(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
639
+ return t.implicitKey ? r : ve(r, n, he, be(t, !1));
640
+ }
641
+ function F(e, t) {
642
+ let { singleQuote: n } = t.options, r;
643
+ if (n === !1) r = Ce;
644
+ else {
645
+ let t = e.includes("\""), i = e.includes("'");
646
+ r = t && !i ? we : i && !t ? Ce : n ? we : Ce;
647
+ }
648
+ return r(e, t);
649
+ }
650
+ var Te;
651
+ try {
652
+ Te = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
653
+ } catch {
654
+ Te = /\n+(?!\n|$)/g;
655
+ }
656
+ function Ee({ comment: e, type: t, value: n }, r, i, a) {
657
+ let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
658
+ if (!o || /\n[\t ]+$/.test(n)) return F(n, r);
659
+ let l = r.indent || (r.forceBlockIndent || xe(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === A.BLOCK_FOLDED ? !1 : t === A.BLOCK_LITERAL ? !0 : !Se(n, c, l.length);
660
+ if (!n) return u ? "|\n" : ">\n";
661
+ let d, f;
662
+ for (f = n.length; f > 0; --f) {
663
+ let e = n[f - 1];
664
+ if (e !== "\n" && e !== " " && e !== " ") break;
665
+ }
666
+ let p = n.substring(f), m = p.indexOf("\n");
667
+ m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(Te, `$&${l}`));
668
+ let h = !1, g, _ = -1;
669
+ for (g = 0; g < n.length; ++g) {
670
+ let e = n[g];
671
+ if (e === " ") h = !0;
672
+ else if (e === "\n") _ = g;
673
+ else break;
674
+ }
675
+ let v = n.substring(0, _ < g ? _ + 1 : g);
676
+ v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
677
+ let y = (h ? l ? "2" : "1" : "") + d;
678
+ if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
679
+ let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = be(r, !0);
680
+ o !== "folded" && t !== A.BLOCK_FOLDED && (a.onOverflow = () => {
681
+ i = !0;
682
+ });
683
+ let s = ve(`${v}${e}${p}`, l, ge, a);
684
+ if (!i) return `>${y}\n${l}${s}`;
685
+ }
686
+ return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
687
+ }
688
+ function De(e, t, n, r) {
689
+ let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
690
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return F(a, t);
691
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? F(a, t) : Ee(e, t, n, r);
692
+ if (!s && !u && i !== A.PLAIN && a.includes("\n")) return Ee(e, t, n, r);
693
+ if (xe(a)) {
694
+ if (c === "") return t.forceBlockIndent = !0, Ee(e, t, n, r);
695
+ if (s && c === l) return F(a, t);
696
+ }
697
+ let d = a.replace(/\n+/g, `$&\n${c}`);
698
+ if (o) {
699
+ let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
700
+ if (r.some(e) || n?.some(e)) return F(a, t);
701
+ }
702
+ return s ? d : ve(d, c, he, be(t, !1));
703
+ }
704
+ function I(e, t, n, r) {
705
+ let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
706
+ s !== A.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = A.QUOTE_DOUBLE);
707
+ let c = (e) => {
708
+ switch (e) {
709
+ case A.BLOCK_FOLDED:
710
+ case A.BLOCK_LITERAL: return i || a ? F(o.value, t) : Ee(o, t, n, r);
711
+ case A.QUOTE_DOUBLE: return Ce(o.value, t);
712
+ case A.QUOTE_SINGLE: return we(o.value, t);
713
+ case A.PLAIN: return De(o, t, n, r);
714
+ default: return null;
715
+ }
716
+ }, l = c(s);
717
+ if (l === null) {
718
+ let { defaultKeyType: e, defaultStringType: n } = t.options, r = i && e || n;
719
+ if (l = c(r), l === null) throw Error(`Unsupported default string type ${r}`);
720
+ }
721
+ return l;
722
+ }
723
+ //#endregion
724
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringify.js
725
+ function Oe(e, t) {
726
+ let n = Object.assign({
727
+ blockQuote: !0,
728
+ commentString: me,
729
+ defaultKeyType: null,
730
+ defaultStringType: "PLAIN",
731
+ directives: null,
732
+ doubleQuotedAsJSON: !1,
733
+ doubleQuotedMinMultiLineLength: 40,
734
+ falseStr: "false",
735
+ flowCollectionPadding: !0,
736
+ indentSeq: !0,
737
+ lineWidth: 80,
738
+ minContentWidth: 20,
739
+ nullStr: "null",
740
+ simpleKeys: !1,
741
+ singleQuote: null,
742
+ trailingComma: !1,
743
+ trueStr: "true",
744
+ verifyAliasOrder: !0
745
+ }, e.schema.toStringOptions, t), r;
746
+ switch (n.collectionStyle) {
747
+ case "block":
748
+ r = !1;
749
+ break;
750
+ case "flow":
751
+ r = !0;
752
+ break;
753
+ default: r = null;
754
+ }
755
+ return {
756
+ anchors: /* @__PURE__ */ new Set(),
757
+ doc: e,
758
+ flowCollectionPadding: n.flowCollectionPadding ? " " : "",
759
+ indent: "",
760
+ indentStep: typeof n.indent == "number" ? " ".repeat(n.indent) : " ",
761
+ inFlow: r,
762
+ options: n
763
+ };
764
+ }
765
+ function ke(e, t) {
766
+ if (t.tag) {
767
+ let n = e.filter((e) => e.tag === t.tag);
768
+ if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
769
+ }
770
+ let n, r;
771
+ if (f(t)) {
772
+ r = t.value;
773
+ let i = e.filter((e) => e.identify?.(r));
774
+ if (i.length > 1) {
775
+ let e = i.filter((e) => e.test);
776
+ e.length > 0 && (i = e);
777
+ }
778
+ n = i.find((e) => e.format === t.format) ?? i.find((e) => !e.format);
779
+ } else r = t, n = e.find((e) => e.nodeClass && r instanceof e.nodeClass);
780
+ if (!n) {
781
+ let e = r?.constructor?.name ?? (r === null ? "null" : typeof r);
782
+ throw Error(`Tag not resolved for ${e} value`);
783
+ }
784
+ return n;
785
+ }
786
+ function Ae(e, t, { anchors: n, doc: r }) {
787
+ if (!r.directives) return "";
788
+ let i = [], a = (f(e) || m(e)) && e.anchor;
789
+ a && re(a) && (n.add(a), i.push(`&${a}`));
790
+ let o = e.tag ?? (t.default ? null : t.tag);
791
+ return o && i.push(r.directives.tagString(o)), i.join(" ");
792
+ }
793
+ function L(e, t, n, r) {
794
+ if (d(e)) return e.toString(t, n, r);
795
+ if (c(e)) {
796
+ if (t.doc.directives) return e.toString(t);
797
+ if (t.resolvedAliases?.has(e)) throw TypeError("Cannot stringify circular structure without alias nodes");
798
+ t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = new Set([e]), e = e.resolve(t.doc);
799
+ }
800
+ let i, a = h(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
801
+ i ??= ke(t.doc.schema.tags, a);
802
+ let o = Ae(a, i, t);
803
+ o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
804
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : f(a) ? I(a, t, n, r) : a.toString(t, n, r);
805
+ return o ? f(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
806
+ }
807
+ //#endregion
808
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyPair.js
809
+ function je({ key: e, value: t }, n, r, i) {
810
+ let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, g = h(e) && e.comment || null;
811
+ if (d) {
812
+ if (g) throw Error("With simple keys, key nodes cannot have comments");
813
+ if (m(e) || !h(e) && typeof e == "object") throw Error("With simple keys, collection cannot be used as a key value");
814
+ }
815
+ let _ = !d && (!e || g && t == null && !n.inFlow || m(e) || (f(e) ? e.type === A.BLOCK_FOLDED || e.type === A.BLOCK_LITERAL : typeof e == "object"));
816
+ n = Object.assign({}, n, {
817
+ allNullValues: !1,
818
+ implicitKey: !_ && (d || !a),
819
+ indent: s + c
820
+ });
821
+ let v = !1, y = !1, b = L(e, n, () => v = !0, () => y = !0);
822
+ if (!_ && !n.inFlow && b.length > 1024) {
823
+ if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
824
+ _ = !0;
825
+ }
826
+ if (n.inFlow) {
827
+ if (a || t == null) return v && r && r(), b === "" ? "?" : _ ? `? ${b}` : b;
828
+ } else if (a && !d || t == null && _) return b = `? ${b}`, g && !v ? b += P(b, n.indent, l(g)) : y && i && i(), b;
829
+ v && (g = null), _ ? (g && (b += P(b, n.indent, l(g))), b = `? ${b}\n${s}:`) : (b = `${b}:`, g && (b += P(b, n.indent, l(g))));
830
+ let x, S, C;
831
+ h(t) ? (x = !!t.spaceBefore, S = t.commentBefore, C = t.comment) : (x = !1, S = null, C = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !_ && !g && f(t) && (n.indentAtStart = b.length + 1), y = !1, !u && c.length >= 2 && !n.inFlow && !_ && p(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
832
+ let ee = !1, w = L(t, n, () => ee = !0, () => y = !0), T = " ";
833
+ if (g || x || S) {
834
+ if (T = x ? "\n" : "", S) {
835
+ let e = l(S);
836
+ T += `\n${N(e, n.indent)}`;
837
+ }
838
+ w === "" && !n.inFlow ? T === "\n" && C && (T = "\n\n") : T += `\n${n.indent}`;
839
+ } else if (!_ && m(t)) {
840
+ let e = w[0], r = w.indexOf("\n"), i = r !== -1, a = n.inFlow ?? t.flow ?? t.items.length === 0;
841
+ if (i || !a) {
842
+ let t = !1;
843
+ if (i && (e === "&" || e === "!")) {
844
+ let n = w.indexOf(" ");
845
+ e === "&" && n !== -1 && n < r && w[n + 1] === "!" && (n = w.indexOf(" ", n + 1)), (n === -1 || r < n) && (t = !0);
846
+ }
847
+ t || (T = `\n${n.indent}`);
848
+ }
849
+ } else (w === "" || w[0] === "\n") && (T = "");
850
+ return b += T + w, n.inFlow ? ee && r && r() : C && !ee ? b += P(b, n.indent, l(C)) : y && i && i(), b;
851
+ }
852
+ //#endregion
853
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/log.js
854
+ function Me(e, t) {
855
+ (e === "debug" || e === "warn") && console.warn(t);
856
+ }
857
+ //#endregion
858
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
859
+ var Ne = "<<", R = {
860
+ identify: (e) => e === Ne || typeof e == "symbol" && e.description === Ne,
861
+ default: "key",
862
+ tag: "tag:yaml.org,2002:merge",
863
+ test: /^<<$/,
864
+ resolve: () => Object.assign(new A(Symbol(Ne)), { addToJSMap: Fe }),
865
+ stringify: () => Ne
866
+ }, Pe = (e, t) => (R.identify(t) || f(t) && (!t.type || t.type === A.PLAIN) && R.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === R.tag && e.default);
867
+ function Fe(e, t, n) {
868
+ let r = Le(e, n);
869
+ if (p(r)) for (let n of r.items) Ie(e, t, n);
870
+ else if (Array.isArray(r)) for (let n of r) Ie(e, t, n);
871
+ else Ie(e, t, r);
872
+ }
873
+ function Ie(e, t, n) {
874
+ let r = Le(e, n);
875
+ if (!u(r)) throw Error("Merge sources must be maps or map aliases");
876
+ let i = r.toJSON(null, e, Map);
877
+ for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
878
+ value: n,
879
+ writable: !0,
880
+ enumerable: !0,
881
+ configurable: !0
882
+ });
883
+ return t;
884
+ }
885
+ function Le(e, t) {
886
+ return e && c(t) ? t.resolve(e.doc, e) : t;
887
+ }
888
+ //#endregion
889
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
890
+ function Re(e, t, { key: n, value: r }) {
891
+ if (h(n) && n.addToJSMap) n.addToJSMap(e, t, r);
892
+ else if (Pe(e, n)) Fe(e, t, r);
893
+ else {
894
+ let i = O(n, "", e);
895
+ if (t instanceof Map) t.set(i, O(r, i, e));
896
+ else if (t instanceof Set) t.add(i);
897
+ else {
898
+ let a = ze(n, i, e), o = O(r, a, e);
899
+ a in t ? Object.defineProperty(t, a, {
900
+ value: o,
901
+ writable: !0,
902
+ enumerable: !0,
903
+ configurable: !0
904
+ }) : t[a] = o;
905
+ }
906
+ }
907
+ return t;
908
+ }
909
+ function ze(e, t, n) {
910
+ if (t === null) return "";
911
+ if (typeof t != "object") return String(t);
912
+ if (h(e) && n?.doc) {
913
+ let t = Oe(n.doc, {});
914
+ t.anchors = /* @__PURE__ */ new Set();
915
+ for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
916
+ t.inFlow = !0, t.inStringifyKey = !0;
917
+ let r = e.toString(t);
918
+ if (!n.mapKeyWarned) {
919
+ let e = JSON.stringify(r);
920
+ e.length > 40 && (e = e.substring(0, 36) + "...\""), Me(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
921
+ }
922
+ return r;
923
+ }
924
+ return JSON.stringify(t);
925
+ }
926
+ //#endregion
927
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Pair.js
928
+ function Be(e, t, n) {
929
+ return new z(j(e, void 0, n), j(t, void 0, n));
930
+ }
931
+ var z = class e {
932
+ constructor(e, t = null) {
933
+ Object.defineProperty(this, s, { value: i }), this.key = e, this.value = t;
934
+ }
935
+ clone(t) {
936
+ let { key: n, value: r } = this;
937
+ return h(n) && (n = n.clone(t)), h(r) && (r = r.clone(t)), new e(n, r);
938
+ }
939
+ toJSON(e, t) {
940
+ return Re(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
941
+ }
942
+ toString(e, t, n) {
943
+ return e?.doc ? je(this, e, t, n) : JSON.stringify(this);
944
+ }
945
+ };
946
+ //#endregion
947
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
948
+ function Ve(e, t, n) {
949
+ return (t.inFlow ?? e.flow ? Ue : He)(e, t, n);
950
+ }
951
+ function He({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
952
+ let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
953
+ indent: a,
954
+ type: null
955
+ }), f = !1, p = [];
956
+ for (let e = 0; e < t.length; ++e) {
957
+ let i = t[e], o = null;
958
+ if (h(i)) !f && i.spaceBefore && p.push(""), We(n, p, i.commentBefore, f), i.comment && (o = i.comment);
959
+ else if (d(i)) {
960
+ let e = h(i.key) ? i.key : null;
961
+ e && (!f && e.spaceBefore && p.push(""), We(n, p, e.commentBefore, f));
962
+ }
963
+ f = !1;
964
+ let s = L(i, u, () => o = null, () => f = !0);
965
+ o && (s += P(s, a, l(o))), f && o && (f = !1), p.push(r + s);
966
+ }
967
+ let m;
968
+ if (p.length === 0) m = i.start + i.end;
969
+ else {
970
+ m = p[0];
971
+ for (let e = 1; e < p.length; ++e) {
972
+ let t = p[e];
973
+ m += t ? `\n${c}${t}` : "\n";
974
+ }
975
+ }
976
+ return e ? (m += "\n" + N(l(e), c), s && s()) : f && o && o(), m;
977
+ }
978
+ function Ue({ items: e }, t, { flowChars: n, itemIndent: r }) {
979
+ let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
980
+ r += a;
981
+ let c = Object.assign({}, t, {
982
+ indent: r,
983
+ inFlow: !0,
984
+ type: null
985
+ }), l = !1, u = 0, f = [];
986
+ for (let n = 0; n < e.length; ++n) {
987
+ let i = e[n], a = null;
988
+ if (h(i)) i.spaceBefore && f.push(""), We(t, f, i.commentBefore, !1), i.comment && (a = i.comment);
989
+ else if (d(i)) {
990
+ let e = h(i.key) ? i.key : null;
991
+ e && (e.spaceBefore && f.push(""), We(t, f, e.commentBefore, !1), e.comment && (l = !0));
992
+ let n = h(i.value) ? i.value : null;
993
+ n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
994
+ }
995
+ a && (l = !0);
996
+ let o = L(i, c, () => a = null);
997
+ l ||= f.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= f.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += P(o, r, s(a))), f.push(o), u = f.length;
998
+ }
999
+ let { start: p, end: m } = n;
1000
+ if (f.length === 0) return p + m;
1001
+ if (!l) {
1002
+ let e = f.reduce((e, t) => e + t.length + 2, 2);
1003
+ l = t.options.lineWidth > 0 && e > t.options.lineWidth;
1004
+ }
1005
+ if (l) {
1006
+ let e = p;
1007
+ for (let t of f) e += t ? `\n${a}${i}${t}` : "\n";
1008
+ return `${e}\n${i}${m}`;
1009
+ } else return `${p}${o}${f.join(" ")}${o}${m}`;
1010
+ }
1011
+ function We({ indent: e, options: { commentString: t } }, n, r, i) {
1012
+ if (r && i && (r = r.replace(/^\n+/, "")), r) {
1013
+ let i = N(t(r), e);
1014
+ n.push(i.trimStart());
1015
+ }
1016
+ }
1017
+ //#endregion
1018
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLMap.js
1019
+ function B(e, t) {
1020
+ let n = f(t) ? t.value : t;
1021
+ for (let r of e) if (d(r) && (r.key === t || r.key === n || f(r.key) && r.key.value === n)) return r;
1022
+ }
1023
+ var V = class extends pe {
1024
+ static get tagName() {
1025
+ return "tag:yaml.org,2002:map";
1026
+ }
1027
+ constructor(e) {
1028
+ super(r, e), this.items = [];
1029
+ }
1030
+ static from(e, t, n) {
1031
+ let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
1032
+ if (typeof i == "function") o = i.call(t, e, o);
1033
+ else if (Array.isArray(i) && !i.includes(e)) return;
1034
+ (o !== void 0 || r) && a.items.push(Be(e, o, n));
1035
+ };
1036
+ if (t instanceof Map) for (let [e, n] of t) o(e, n);
1037
+ else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
1038
+ return typeof e.sortMapEntries == "function" && a.items.sort(e.sortMapEntries), a;
1039
+ }
1040
+ add(e, t) {
1041
+ let n;
1042
+ n = d(e) ? e : !e || typeof e != "object" || !("key" in e) ? new z(e, e?.value) : new z(e.key, e.value);
1043
+ let r = B(this.items, n.key), i = this.schema?.sortMapEntries;
1044
+ if (r) {
1045
+ if (!t) throw Error(`Key ${n.key} already set`);
1046
+ f(r.value) && le(n.value) ? r.value.value = n.value : r.value = n.value;
1047
+ } else if (i) {
1048
+ let e = this.items.findIndex((e) => i(n, e) < 0);
1049
+ e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
1050
+ } else this.items.push(n);
1051
+ }
1052
+ delete(e) {
1053
+ let t = B(this.items, e);
1054
+ return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1055
+ }
1056
+ get(e, t) {
1057
+ let n = B(this.items, e)?.value;
1058
+ return (!t && f(n) ? n.value : n) ?? void 0;
1059
+ }
1060
+ has(e) {
1061
+ return !!B(this.items, e);
1062
+ }
1063
+ set(e, t) {
1064
+ this.add(new z(e, t), !0);
1065
+ }
1066
+ toJSON(e, t, n) {
1067
+ let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1068
+ t?.onCreate && t.onCreate(r);
1069
+ for (let e of this.items) Re(t, r, e);
1070
+ return r;
1071
+ }
1072
+ toString(e, t, n) {
1073
+ if (!e) return JSON.stringify(this);
1074
+ for (let e of this.items) if (!d(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
1075
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Ve(this, e, {
1076
+ blockItemPrefix: "",
1077
+ flowChars: {
1078
+ start: "{",
1079
+ end: "}"
1080
+ },
1081
+ itemIndent: e.indent || "",
1082
+ onChompKeep: n,
1083
+ onComment: t
1084
+ });
1085
+ }
1086
+ }, H = {
1087
+ collection: "map",
1088
+ default: !0,
1089
+ nodeClass: V,
1090
+ tag: "tag:yaml.org,2002:map",
1091
+ resolve(e, t) {
1092
+ return u(e) || t("Expected a mapping for this tag"), e;
1093
+ },
1094
+ createNode: (e, t, n) => V.from(e, t, n)
1095
+ }, U = class extends pe {
1096
+ static get tagName() {
1097
+ return "tag:yaml.org,2002:seq";
1098
+ }
1099
+ constructor(e) {
1100
+ super(o, e), this.items = [];
1101
+ }
1102
+ add(e) {
1103
+ this.items.push(e);
1104
+ }
1105
+ delete(e) {
1106
+ let t = Ge(e);
1107
+ return typeof t == "number" ? this.items.splice(t, 1).length > 0 : !1;
1108
+ }
1109
+ get(e, t) {
1110
+ let n = Ge(e);
1111
+ if (typeof n != "number") return;
1112
+ let r = this.items[n];
1113
+ return !t && f(r) ? r.value : r;
1114
+ }
1115
+ has(e) {
1116
+ let t = Ge(e);
1117
+ return typeof t == "number" && t < this.items.length;
1118
+ }
1119
+ set(e, t) {
1120
+ let n = Ge(e);
1121
+ if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
1122
+ let r = this.items[n];
1123
+ f(r) && le(t) ? r.value = t : this.items[n] = t;
1124
+ }
1125
+ toJSON(e, t) {
1126
+ let n = [];
1127
+ t?.onCreate && t.onCreate(n);
1128
+ let r = 0;
1129
+ for (let e of this.items) n.push(O(e, String(r++), t));
1130
+ return n;
1131
+ }
1132
+ toString(e, t, n) {
1133
+ return e ? Ve(this, e, {
1134
+ blockItemPrefix: "- ",
1135
+ flowChars: {
1136
+ start: "[",
1137
+ end: "]"
1138
+ },
1139
+ itemIndent: (e.indent || "") + " ",
1140
+ onChompKeep: n,
1141
+ onComment: t
1142
+ }) : JSON.stringify(this);
1143
+ }
1144
+ static from(e, t, n) {
1145
+ let { replacer: r } = n, i = new this(e);
1146
+ if (t && Symbol.iterator in Object(t)) {
1147
+ let e = 0;
1148
+ for (let a of t) {
1149
+ if (typeof r == "function") {
1150
+ let n = t instanceof Set ? a : String(e++);
1151
+ a = r.call(t, n, a);
1152
+ }
1153
+ i.items.push(j(a, void 0, n));
1154
+ }
1155
+ }
1156
+ return i;
1157
+ }
1158
+ };
1159
+ function Ge(e) {
1160
+ let t = f(e) ? e.value : e;
1161
+ return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
1162
+ }
1163
+ //#endregion
1164
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/seq.js
1165
+ var W = {
1166
+ collection: "seq",
1167
+ default: !0,
1168
+ nodeClass: U,
1169
+ tag: "tag:yaml.org,2002:seq",
1170
+ resolve(e, t) {
1171
+ return p(e) || t("Expected a sequence for this tag"), e;
1172
+ },
1173
+ createNode: (e, t, n) => U.from(e, t, n)
1174
+ }, Ke = {
1175
+ identify: (e) => typeof e == "string",
1176
+ default: !0,
1177
+ tag: "tag:yaml.org,2002:str",
1178
+ resolve: (e) => e,
1179
+ stringify(e, t, n, r) {
1180
+ return t = Object.assign({ actualString: !0 }, t), I(e, t, n, r);
1181
+ }
1182
+ }, qe = {
1183
+ identify: (e) => e == null,
1184
+ createNode: () => new A(null),
1185
+ default: !0,
1186
+ tag: "tag:yaml.org,2002:null",
1187
+ test: /^(?:~|[Nn]ull|NULL)?$/,
1188
+ resolve: () => new A(null),
1189
+ stringify: ({ source: e }, t) => typeof e == "string" && qe.test.test(e) ? e : t.options.nullStr
1190
+ }, Je = {
1191
+ identify: (e) => typeof e == "boolean",
1192
+ default: !0,
1193
+ tag: "tag:yaml.org,2002:bool",
1194
+ test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1195
+ resolve: (e) => new A(e[0] === "t" || e[0] === "T"),
1196
+ stringify({ source: e, value: t }, n) {
1197
+ return e && Je.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1198
+ }
1199
+ };
1200
+ //#endregion
1201
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyNumber.js
1202
+ function G({ format: e, minFractionDigits: t, tag: n, value: r }) {
1203
+ if (typeof r == "bigint") return String(r);
1204
+ let i = typeof r == "number" ? r : Number(r);
1205
+ if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1206
+ let a = Object.is(r, -0) ? "-0" : JSON.stringify(r);
1207
+ if (!e && t && (!n || n === "tag:yaml.org,2002:float") && /^-?\d/.test(a) && !a.includes("e")) {
1208
+ let e = a.indexOf(".");
1209
+ e < 0 && (e = a.length, a += ".");
1210
+ let n = t - (a.length - e - 1);
1211
+ for (; n-- > 0;) a += "0";
1212
+ }
1213
+ return a;
1214
+ }
1215
+ //#endregion
1216
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/float.js
1217
+ var Ye = {
1218
+ identify: (e) => typeof e == "number",
1219
+ default: !0,
1220
+ tag: "tag:yaml.org,2002:float",
1221
+ test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1222
+ resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1223
+ stringify: G
1224
+ }, Xe = {
1225
+ identify: (e) => typeof e == "number",
1226
+ default: !0,
1227
+ tag: "tag:yaml.org,2002:float",
1228
+ format: "EXP",
1229
+ test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1230
+ resolve: (e) => parseFloat(e),
1231
+ stringify(e) {
1232
+ let t = Number(e.value);
1233
+ return isFinite(t) ? t.toExponential() : G(e);
1234
+ }
1235
+ }, Ze = {
1236
+ identify: (e) => typeof e == "number",
1237
+ default: !0,
1238
+ tag: "tag:yaml.org,2002:float",
1239
+ test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1240
+ resolve(e) {
1241
+ let t = new A(parseFloat(e)), n = e.indexOf(".");
1242
+ return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
1243
+ },
1244
+ stringify: G
1245
+ }, Qe = (e) => typeof e == "bigint" || Number.isInteger(e), $e = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1246
+ function et(e, t, n) {
1247
+ let { value: r } = e;
1248
+ return Qe(r) && r >= 0 ? n + r.toString(t) : G(e);
1249
+ }
1250
+ var tt = {
1251
+ identify: (e) => Qe(e) && e >= 0,
1252
+ default: !0,
1253
+ tag: "tag:yaml.org,2002:int",
1254
+ format: "OCT",
1255
+ test: /^0o[0-7]+$/,
1256
+ resolve: (e, t, n) => $e(e, 2, 8, n),
1257
+ stringify: (e) => et(e, 8, "0o")
1258
+ }, nt = {
1259
+ identify: Qe,
1260
+ default: !0,
1261
+ tag: "tag:yaml.org,2002:int",
1262
+ test: /^[-+]?[0-9]+$/,
1263
+ resolve: (e, t, n) => $e(e, 0, 10, n),
1264
+ stringify: G
1265
+ }, rt = {
1266
+ identify: (e) => Qe(e) && e >= 0,
1267
+ default: !0,
1268
+ tag: "tag:yaml.org,2002:int",
1269
+ format: "HEX",
1270
+ test: /^0x[0-9a-fA-F]+$/,
1271
+ resolve: (e, t, n) => $e(e, 2, 16, n),
1272
+ stringify: (e) => et(e, 16, "0x")
1273
+ }, it = [
1274
+ H,
1275
+ W,
1276
+ Ke,
1277
+ qe,
1278
+ Je,
1279
+ tt,
1280
+ nt,
1281
+ rt,
1282
+ Ye,
1283
+ Xe,
1284
+ Ze
1285
+ ];
1286
+ //#endregion
1287
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/json/schema.js
1288
+ function at(e) {
1289
+ return typeof e == "bigint" || Number.isInteger(e);
1290
+ }
1291
+ var ot = ({ value: e }) => JSON.stringify(e), st = [
1292
+ {
1293
+ identify: (e) => typeof e == "string",
1294
+ default: !0,
1295
+ tag: "tag:yaml.org,2002:str",
1296
+ resolve: (e) => e,
1297
+ stringify: ot
1298
+ },
1299
+ {
1300
+ identify: (e) => e == null,
1301
+ createNode: () => new A(null),
1302
+ default: !0,
1303
+ tag: "tag:yaml.org,2002:null",
1304
+ test: /^null$/,
1305
+ resolve: () => null,
1306
+ stringify: ot
1307
+ },
1308
+ {
1309
+ identify: (e) => typeof e == "boolean",
1310
+ default: !0,
1311
+ tag: "tag:yaml.org,2002:bool",
1312
+ test: /^true$|^false$/,
1313
+ resolve: (e) => e === "true",
1314
+ stringify: ot
1315
+ },
1316
+ {
1317
+ identify: at,
1318
+ default: !0,
1319
+ tag: "tag:yaml.org,2002:int",
1320
+ test: /^-?(?:0|[1-9][0-9]*)$/,
1321
+ resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
1322
+ stringify: ({ value: e }) => at(e) ? e.toString() : JSON.stringify(e)
1323
+ },
1324
+ {
1325
+ identify: (e) => typeof e == "number",
1326
+ default: !0,
1327
+ tag: "tag:yaml.org,2002:float",
1328
+ test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1329
+ resolve: (e) => parseFloat(e),
1330
+ stringify: ot
1331
+ }
1332
+ ], ct = [H, W].concat(st, {
1333
+ default: !0,
1334
+ tag: "",
1335
+ test: /^/,
1336
+ resolve(e, t) {
1337
+ return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
1338
+ }
1339
+ }), lt = {
1340
+ identify: (e) => e instanceof Uint8Array,
1341
+ default: !1,
1342
+ tag: "tag:yaml.org,2002:binary",
1343
+ resolve(e, t) {
1344
+ if (typeof atob == "function") {
1345
+ let t = atob(e.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1346
+ for (let e = 0; e < t.length; ++e) n[e] = t.charCodeAt(e);
1347
+ return n;
1348
+ } else return t("This environment does not support reading binary tags; either Buffer or atob is required"), e;
1349
+ },
1350
+ stringify({ comment: e, type: t, value: n }, r, i, a) {
1351
+ if (!n) return "";
1352
+ let o = n, s;
1353
+ if (typeof btoa == "function") {
1354
+ let e = "";
1355
+ for (let t = 0; t < o.length; ++t) e += String.fromCharCode(o[t]);
1356
+ s = btoa(e);
1357
+ } else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1358
+ if (t ??= A.BLOCK_LITERAL, t !== A.QUOTE_DOUBLE) {
1359
+ let e = Math.max(r.options.lineWidth - r.indent.length, r.options.minContentWidth), n = Math.ceil(s.length / e), i = Array(n);
1360
+ for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
1361
+ s = i.join(t === A.BLOCK_LITERAL ? "\n" : " ");
1362
+ }
1363
+ return I({
1364
+ comment: e,
1365
+ type: t,
1366
+ value: s
1367
+ }, r, i, a);
1368
+ }
1369
+ };
1370
+ //#endregion
1371
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
1372
+ function ut(e, t) {
1373
+ if (p(e)) for (let n = 0; n < e.items.length; ++n) {
1374
+ let r = e.items[n];
1375
+ if (!d(r)) {
1376
+ if (u(r)) {
1377
+ r.items.length > 1 && t("Each pair must have its own sequence indicator");
1378
+ let e = r.items[0] || new z(new A(null));
1379
+ if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
1380
+ let t = e.value ?? e.key;
1381
+ t.comment = t.comment ? `${r.comment}\n${t.comment}` : r.comment;
1382
+ }
1383
+ r = e;
1384
+ }
1385
+ e.items[n] = d(r) ? r : new z(r);
1386
+ }
1387
+ }
1388
+ else t("Expected a sequence for this tag");
1389
+ return e;
1390
+ }
1391
+ function dt(e, t, n) {
1392
+ let { replacer: r } = n, i = new U(e);
1393
+ i.tag = "tag:yaml.org,2002:pairs";
1394
+ let a = 0;
1395
+ if (t && Symbol.iterator in Object(t)) for (let e of t) {
1396
+ typeof r == "function" && (e = r.call(t, String(a++), e));
1397
+ let o, s;
1398
+ if (Array.isArray(e)) if (e.length === 2) o = e[0], s = e[1];
1399
+ else throw TypeError(`Expected [key, value] tuple: ${e}`);
1400
+ else if (e && e instanceof Object) {
1401
+ let t = Object.keys(e);
1402
+ if (t.length === 1) o = t[0], s = e[o];
1403
+ else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
1404
+ } else o = e;
1405
+ i.items.push(Be(o, s, n));
1406
+ }
1407
+ return i;
1408
+ }
1409
+ var ft = {
1410
+ collection: "seq",
1411
+ default: !1,
1412
+ tag: "tag:yaml.org,2002:pairs",
1413
+ resolve: ut,
1414
+ createNode: dt
1415
+ }, pt = class e extends U {
1416
+ constructor() {
1417
+ super(), this.add = V.prototype.add.bind(this), this.delete = V.prototype.delete.bind(this), this.get = V.prototype.get.bind(this), this.has = V.prototype.has.bind(this), this.set = V.prototype.set.bind(this), this.tag = e.tag;
1418
+ }
1419
+ toJSON(e, t) {
1420
+ if (!t) return super.toJSON(e);
1421
+ let n = /* @__PURE__ */ new Map();
1422
+ t?.onCreate && t.onCreate(n);
1423
+ for (let e of this.items) {
1424
+ let r, i;
1425
+ if (d(e) ? (r = O(e.key, "", t), i = O(e.value, r, t)) : r = O(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1426
+ n.set(r, i);
1427
+ }
1428
+ return n;
1429
+ }
1430
+ static from(e, t, n) {
1431
+ let r = dt(e, t, n), i = new this();
1432
+ return i.items = r.items, i;
1433
+ }
1434
+ };
1435
+ pt.tag = "tag:yaml.org,2002:omap";
1436
+ var mt = {
1437
+ collection: "seq",
1438
+ identify: (e) => e instanceof Map,
1439
+ nodeClass: pt,
1440
+ default: !1,
1441
+ tag: "tag:yaml.org,2002:omap",
1442
+ resolve(e, t) {
1443
+ let n = ut(e, t), r = [];
1444
+ for (let { key: e } of n.items) f(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
1445
+ return Object.assign(new pt(), n);
1446
+ },
1447
+ createNode: (e, t, n) => pt.from(e, t, n)
1448
+ };
1449
+ //#endregion
1450
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
1451
+ function ht({ value: e, source: t }, n) {
1452
+ return t && (e ? gt : _t).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1453
+ }
1454
+ var gt = {
1455
+ identify: (e) => e === !0,
1456
+ default: !0,
1457
+ tag: "tag:yaml.org,2002:bool",
1458
+ test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1459
+ resolve: () => new A(!0),
1460
+ stringify: ht
1461
+ }, _t = {
1462
+ identify: (e) => e === !1,
1463
+ default: !0,
1464
+ tag: "tag:yaml.org,2002:bool",
1465
+ test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1466
+ resolve: () => new A(!1),
1467
+ stringify: ht
1468
+ }, vt = {
1469
+ identify: (e) => typeof e == "number",
1470
+ default: !0,
1471
+ tag: "tag:yaml.org,2002:float",
1472
+ test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1473
+ resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1474
+ stringify: G
1475
+ }, yt = {
1476
+ identify: (e) => typeof e == "number",
1477
+ default: !0,
1478
+ tag: "tag:yaml.org,2002:float",
1479
+ format: "EXP",
1480
+ test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1481
+ resolve: (e) => parseFloat(e.replace(/_/g, "")),
1482
+ stringify(e) {
1483
+ let t = Number(e.value);
1484
+ return isFinite(t) ? t.toExponential() : G(e);
1485
+ }
1486
+ }, bt = {
1487
+ identify: (e) => typeof e == "number",
1488
+ default: !0,
1489
+ tag: "tag:yaml.org,2002:float",
1490
+ test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1491
+ resolve(e) {
1492
+ let t = new A(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1493
+ if (n !== -1) {
1494
+ let r = e.substring(n + 1).replace(/_/g, "");
1495
+ r[r.length - 1] === "0" && (t.minFractionDigits = r.length);
1496
+ }
1497
+ return t;
1498
+ },
1499
+ stringify: G
1500
+ }, K = (e) => typeof e == "bigint" || Number.isInteger(e);
1501
+ function xt(e, t, n, { intAsBigInt: r }) {
1502
+ let i = e[0];
1503
+ if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
1504
+ switch (n) {
1505
+ case 2:
1506
+ e = `0b${e}`;
1507
+ break;
1508
+ case 8:
1509
+ e = `0o${e}`;
1510
+ break;
1511
+ case 16:
1512
+ e = `0x${e}`;
1513
+ break;
1514
+ }
1515
+ let t = BigInt(e);
1516
+ return i === "-" ? BigInt(-1) * t : t;
1517
+ }
1518
+ let a = parseInt(e, n);
1519
+ return i === "-" ? -1 * a : a;
1520
+ }
1521
+ function St(e, t, n) {
1522
+ let { value: r } = e;
1523
+ if (K(r)) {
1524
+ let e = r.toString(t);
1525
+ return r < 0 ? "-" + n + e.substr(1) : n + e;
1526
+ }
1527
+ return G(e);
1528
+ }
1529
+ var Ct = {
1530
+ identify: K,
1531
+ default: !0,
1532
+ tag: "tag:yaml.org,2002:int",
1533
+ format: "BIN",
1534
+ test: /^[-+]?0b[0-1_]+$/,
1535
+ resolve: (e, t, n) => xt(e, 2, 2, n),
1536
+ stringify: (e) => St(e, 2, "0b")
1537
+ }, wt = {
1538
+ identify: K,
1539
+ default: !0,
1540
+ tag: "tag:yaml.org,2002:int",
1541
+ format: "OCT",
1542
+ test: /^[-+]?0[0-7_]+$/,
1543
+ resolve: (e, t, n) => xt(e, 1, 8, n),
1544
+ stringify: (e) => St(e, 8, "0")
1545
+ }, Tt = {
1546
+ identify: K,
1547
+ default: !0,
1548
+ tag: "tag:yaml.org,2002:int",
1549
+ test: /^[-+]?[0-9][0-9_]*$/,
1550
+ resolve: (e, t, n) => xt(e, 0, 10, n),
1551
+ stringify: G
1552
+ }, Et = {
1553
+ identify: K,
1554
+ default: !0,
1555
+ tag: "tag:yaml.org,2002:int",
1556
+ format: "HEX",
1557
+ test: /^[-+]?0x[0-9a-fA-F_]+$/,
1558
+ resolve: (e, t, n) => xt(e, 2, 16, n),
1559
+ stringify: (e) => St(e, 16, "0x")
1560
+ }, Dt = class e extends V {
1561
+ constructor(t) {
1562
+ super(t), this.tag = e.tag;
1563
+ }
1564
+ add(e) {
1565
+ let t;
1566
+ t = d(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new z(e.key, null) : new z(e, null), B(this.items, t.key) || this.items.push(t);
1567
+ }
1568
+ get(e, t) {
1569
+ let n = B(this.items, e);
1570
+ return !t && d(n) ? f(n.key) ? n.key.value : n.key : n;
1571
+ }
1572
+ set(e, t) {
1573
+ if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1574
+ let n = B(this.items, e);
1575
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new z(e));
1576
+ }
1577
+ toJSON(e, t) {
1578
+ return super.toJSON(e, t, Set);
1579
+ }
1580
+ toString(e, t, n) {
1581
+ if (!e) return JSON.stringify(this);
1582
+ if (this.hasAllNullValues(!0)) return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1583
+ throw Error("Set items must all have null values");
1584
+ }
1585
+ static from(e, t, n) {
1586
+ let { replacer: r } = n, i = new this(e);
1587
+ if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Be(e, null, n));
1588
+ return i;
1589
+ }
1590
+ };
1591
+ Dt.tag = "tag:yaml.org,2002:set";
1592
+ var Ot = {
1593
+ collection: "map",
1594
+ identify: (e) => e instanceof Set,
1595
+ nodeClass: Dt,
1596
+ default: !1,
1597
+ tag: "tag:yaml.org,2002:set",
1598
+ createNode: (e, t, n) => Dt.from(e, t, n),
1599
+ resolve(e, t) {
1600
+ if (u(e)) {
1601
+ if (e.hasAllNullValues(!0)) return Object.assign(new Dt(), e);
1602
+ t("Set items must all have null values");
1603
+ } else t("Expected a mapping for this tag");
1604
+ return e;
1605
+ }
1606
+ };
1607
+ //#endregion
1608
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
1609
+ function kt(e, t) {
1610
+ let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
1611
+ return n === "-" ? i(-1) * a : a;
1612
+ }
1613
+ function At(e) {
1614
+ let { value: t } = e, n = (e) => e;
1615
+ if (typeof t == "bigint") n = (e) => BigInt(e);
1616
+ else if (isNaN(t) || !isFinite(t)) return G(e);
1617
+ let r = "";
1618
+ t < 0 && (r = "-", t *= n(-1));
1619
+ let i = n(60), a = [t % i];
1620
+ return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1621
+ }
1622
+ var jt = {
1623
+ identify: (e) => typeof e == "bigint" || Number.isInteger(e),
1624
+ default: !0,
1625
+ tag: "tag:yaml.org,2002:int",
1626
+ format: "TIME",
1627
+ test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1628
+ resolve: (e, t, { intAsBigInt: n }) => kt(e, n),
1629
+ stringify: At
1630
+ }, Mt = {
1631
+ identify: (e) => typeof e == "number",
1632
+ default: !0,
1633
+ tag: "tag:yaml.org,2002:float",
1634
+ format: "TIME",
1635
+ test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1636
+ resolve: (e) => kt(e, !1),
1637
+ stringify: At
1638
+ }, Nt = {
1639
+ identify: (e) => e instanceof Date,
1640
+ default: !0,
1641
+ tag: "tag:yaml.org,2002:timestamp",
1642
+ test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
1643
+ resolve(e) {
1644
+ let t = e.match(Nt.test);
1645
+ if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1646
+ let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
1647
+ if (u && u !== "Z") {
1648
+ let e = kt(u, !1);
1649
+ Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
1650
+ }
1651
+ return new Date(l);
1652
+ },
1653
+ stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
1654
+ }, Pt = [
1655
+ H,
1656
+ W,
1657
+ Ke,
1658
+ qe,
1659
+ gt,
1660
+ _t,
1661
+ Ct,
1662
+ wt,
1663
+ Tt,
1664
+ Et,
1665
+ vt,
1666
+ yt,
1667
+ bt,
1668
+ lt,
1669
+ R,
1670
+ mt,
1671
+ ft,
1672
+ Ot,
1673
+ jt,
1674
+ Mt,
1675
+ Nt
1676
+ ], Ft = new Map([
1677
+ ["core", it],
1678
+ ["failsafe", [
1679
+ H,
1680
+ W,
1681
+ Ke
1682
+ ]],
1683
+ ["json", ct],
1684
+ ["yaml11", Pt],
1685
+ ["yaml-1.1", Pt]
1686
+ ]), It = {
1687
+ binary: lt,
1688
+ bool: Je,
1689
+ float: Ze,
1690
+ floatExp: Xe,
1691
+ floatNaN: Ye,
1692
+ floatTime: Mt,
1693
+ int: nt,
1694
+ intHex: rt,
1695
+ intOct: tt,
1696
+ intTime: jt,
1697
+ map: H,
1698
+ merge: R,
1699
+ null: qe,
1700
+ omap: mt,
1701
+ pairs: ft,
1702
+ seq: W,
1703
+ set: Ot,
1704
+ timestamp: Nt
1705
+ }, Lt = {
1706
+ "tag:yaml.org,2002:binary": lt,
1707
+ "tag:yaml.org,2002:merge": R,
1708
+ "tag:yaml.org,2002:omap": mt,
1709
+ "tag:yaml.org,2002:pairs": ft,
1710
+ "tag:yaml.org,2002:set": Ot,
1711
+ "tag:yaml.org,2002:timestamp": Nt
1712
+ };
1713
+ function Rt(e, t, n) {
1714
+ let r = Ft.get(t);
1715
+ if (r && !e) return n && !r.includes(R) ? r.concat(R) : r.slice();
1716
+ let i = r;
1717
+ if (!i) if (Array.isArray(e)) i = [];
1718
+ else {
1719
+ let e = Array.from(Ft.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
1720
+ throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
1721
+ }
1722
+ if (Array.isArray(e)) for (let t of e) i = i.concat(t);
1723
+ else typeof e == "function" && (i = e(i.slice()));
1724
+ return n && (i = i.concat(R)), i.reduce((e, t) => {
1725
+ let n = typeof t == "string" ? It[t] : t;
1726
+ if (!n) {
1727
+ let e = JSON.stringify(t), n = Object.keys(It).map((e) => JSON.stringify(e)).join(", ");
1728
+ throw Error(`Unknown custom tag ${e}; use one of ${n}`);
1729
+ }
1730
+ return e.includes(n) || e.push(n), e;
1731
+ }, []);
1732
+ }
1733
+ //#endregion
1734
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/Schema.js
1735
+ var zt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Bt = class e {
1736
+ constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: s, sortMapEntries: c, toStringDefaults: l }) {
1737
+ this.compat = Array.isArray(e) ? Rt(e, "compat") : e ? Rt(null, e) : null, this.name = typeof s == "string" && s || "core", this.knownTags = i ? Lt : {}, this.tags = Rt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, r, { value: H }), Object.defineProperty(this, a, { value: Ke }), Object.defineProperty(this, o, { value: W }), this.sortMapEntries = typeof c == "function" ? c : c === !0 ? zt : null;
1738
+ }
1739
+ clone() {
1740
+ let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
1741
+ return t.tags = this.tags.slice(), t;
1742
+ }
1743
+ };
1744
+ //#endregion
1745
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
1746
+ function Vt(e, t) {
1747
+ let n = [], r = t.directives === !0;
1748
+ if (t.directives !== !1 && e.directives) {
1749
+ let t = e.directives.toString(e);
1750
+ t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
1751
+ }
1752
+ r && n.push("---");
1753
+ let i = Oe(e, t), { commentString: a } = i.options;
1754
+ if (e.commentBefore) {
1755
+ n.length !== 1 && n.unshift("");
1756
+ let t = a(e.commentBefore);
1757
+ n.unshift(N(t, ""));
1758
+ }
1759
+ let o = !1, s = null;
1760
+ if (e.contents) {
1761
+ if (h(e.contents)) {
1762
+ if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
1763
+ let t = a(e.contents.commentBefore);
1764
+ n.push(N(t, ""));
1765
+ }
1766
+ i.forceBlockIndent = !!e.comment, s = e.contents.comment;
1767
+ }
1768
+ let t = s ? void 0 : () => o = !0, c = L(e.contents, i, () => s = null, t);
1769
+ s && (c += P(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1770
+ } else n.push(L(e.contents, i));
1771
+ if (e.directives?.docEnd) if (e.comment) {
1772
+ let t = a(e.comment);
1773
+ t.includes("\n") ? (n.push("..."), n.push(N(t, ""))) : n.push(`... ${t}`);
1774
+ } else n.push("...");
1775
+ else {
1776
+ let t = e.comment;
1777
+ t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(N(a(t), "")));
1778
+ }
1779
+ return n.join("\n") + "\n";
1780
+ }
1781
+ //#endregion
1782
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/Document.js
1783
+ var Ht = class e {
1784
+ constructor(e, t, r) {
1785
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, s, { value: n });
1786
+ let i = null;
1787
+ typeof t == "function" || Array.isArray(t) ? i = t : r === void 0 && t && (r = t, t = void 0);
1788
+ let a = Object.assign({
1789
+ intAsBigInt: !1,
1790
+ keepSourceTokens: !1,
1791
+ logLevel: "warn",
1792
+ prettyErrors: !0,
1793
+ strict: !0,
1794
+ stringKeys: !1,
1795
+ uniqueKeys: !0,
1796
+ version: "1.2"
1797
+ }, r);
1798
+ this.options = a;
1799
+ let { version: o } = a;
1800
+ r?._directives ? (this.directives = r._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new E({ version: o }), this.setSchema(o, r), this.contents = e === void 0 ? null : this.createNode(e, i, r);
1801
+ }
1802
+ clone() {
1803
+ let t = Object.create(e.prototype, { [s]: { value: n } });
1804
+ return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = h(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
1805
+ }
1806
+ add(e) {
1807
+ q(this.contents) && this.contents.add(e);
1808
+ }
1809
+ addIn(e, t) {
1810
+ q(this.contents) && this.contents.addIn(e, t);
1811
+ }
1812
+ createAlias(e, t) {
1813
+ if (!e.anchor) {
1814
+ let n = ie(this);
1815
+ e.anchor = !t || n.has(t) ? ae(t || "a", n) : t;
1816
+ }
1817
+ return new k(e.anchor);
1818
+ }
1819
+ createNode(e, t, n) {
1820
+ let r;
1821
+ if (typeof t == "function") e = t.call({ "": e }, "", e), r = t;
1822
+ else if (Array.isArray(t)) {
1823
+ let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
1824
+ e.length > 0 && (t = t.concat(e)), r = t;
1825
+ } else n === void 0 && t && (n = t, t = void 0);
1826
+ let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = oe(this, a || "a"), p = {
1827
+ aliasDuplicateObjects: i ?? !0,
1828
+ keepUndefined: s ?? !1,
1829
+ onAnchor: u,
1830
+ onTagObj: c,
1831
+ replacer: r,
1832
+ schema: this.schema,
1833
+ sourceObjects: f
1834
+ }, h = j(e, l, p);
1835
+ return o && m(h) && (h.flow = !0), d(), h;
1836
+ }
1837
+ createPair(e, t, n = {}) {
1838
+ return new z(this.createNode(e, null, n), this.createNode(t, null, n));
1839
+ }
1840
+ delete(e) {
1841
+ return q(this.contents) ? this.contents.delete(e) : !1;
1842
+ }
1843
+ deleteIn(e) {
1844
+ return M(e) ? this.contents == null ? !1 : (this.contents = null, !0) : q(this.contents) ? this.contents.deleteIn(e) : !1;
1845
+ }
1846
+ get(e, t) {
1847
+ return m(this.contents) ? this.contents.get(e, t) : void 0;
1848
+ }
1849
+ getIn(e, t) {
1850
+ return M(e) ? !t && f(this.contents) ? this.contents.value : this.contents : m(this.contents) ? this.contents.getIn(e, t) : void 0;
1851
+ }
1852
+ has(e) {
1853
+ return m(this.contents) ? this.contents.has(e) : !1;
1854
+ }
1855
+ hasIn(e) {
1856
+ return M(e) ? this.contents !== void 0 : m(this.contents) ? this.contents.hasIn(e) : !1;
1857
+ }
1858
+ set(e, t) {
1859
+ this.contents == null ? this.contents = fe(this.schema, [e], t) : q(this.contents) && this.contents.set(e, t);
1860
+ }
1861
+ setIn(e, t) {
1862
+ M(e) ? this.contents = t : this.contents == null ? this.contents = fe(this.schema, Array.from(e), t) : q(this.contents) && this.contents.setIn(e, t);
1863
+ }
1864
+ setSchema(e, t = {}) {
1865
+ typeof e == "number" && (e = String(e));
1866
+ let n;
1867
+ switch (e) {
1868
+ case "1.1":
1869
+ this.directives ? this.directives.yaml.version = "1.1" : this.directives = new E({ version: "1.1" }), n = {
1870
+ resolveKnownTags: !1,
1871
+ schema: "yaml-1.1"
1872
+ };
1873
+ break;
1874
+ case "1.2":
1875
+ case "next":
1876
+ this.directives ? this.directives.yaml.version = e : this.directives = new E({ version: e }), n = {
1877
+ resolveKnownTags: !0,
1878
+ schema: "core"
1879
+ };
1880
+ break;
1881
+ case null:
1882
+ this.directives && delete this.directives, n = null;
1883
+ break;
1884
+ default: {
1885
+ let t = JSON.stringify(e);
1886
+ throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`);
1887
+ }
1888
+ }
1889
+ if (t.schema instanceof Object) this.schema = t.schema;
1890
+ else if (n) this.schema = new Bt(Object.assign(n, t));
1891
+ else throw Error("With a null YAML version, the { schema: Schema } option is required");
1892
+ }
1893
+ toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
1894
+ let o = {
1895
+ anchors: /* @__PURE__ */ new Map(),
1896
+ doc: this,
1897
+ keep: !e,
1898
+ mapAsMap: n === !0,
1899
+ mapKeyWarned: !1,
1900
+ maxAliasCount: typeof r == "number" ? r : 100
1901
+ }, s = O(this.contents, t ?? "", o);
1902
+ if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
1903
+ return typeof a == "function" ? D(a, { "": s }, "", s) : s;
1904
+ }
1905
+ toJSON(e, t) {
1906
+ return this.toJS({
1907
+ json: !0,
1908
+ jsonArg: e,
1909
+ mapAsMap: !1,
1910
+ onAnchor: t
1911
+ });
1912
+ }
1913
+ toString(e = {}) {
1914
+ if (this.errors.length > 0) throw Error("Document with errors cannot be stringified");
1915
+ if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
1916
+ let t = JSON.stringify(e.indent);
1917
+ throw Error(`"indent" option must be a positive integer, not ${t}`);
1918
+ }
1919
+ return Vt(this, e);
1920
+ }
1921
+ };
1922
+ function q(e) {
1923
+ if (m(e)) return !0;
1924
+ throw Error("Expected a YAML collection as document contents");
1925
+ }
1926
+ //#endregion
1927
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/errors.js
1928
+ var Ut = class extends Error {
1929
+ constructor(e, t, n, r) {
1930
+ super(), this.name = e, this.code = n, this.message = r, this.pos = t;
1931
+ }
1932
+ }, J = class extends Ut {
1933
+ constructor(e, t, n) {
1934
+ super("YAMLParseError", e, t, n);
1935
+ }
1936
+ }, Wt = class extends Ut {
1937
+ constructor(e, t, n) {
1938
+ super("YAMLWarning", e, t, n);
1939
+ }
1940
+ }, Gt = (e, t) => (n) => {
1941
+ if (n.pos[0] === -1) return;
1942
+ n.linePos = n.pos.map((e) => t.linePos(e));
1943
+ let { line: r, col: i } = n.linePos[0];
1944
+ n.message += ` at line ${r}, column ${i}`;
1945
+ let a = i - 1, o = e.substring(t.lineStarts[r - 1], t.lineStarts[r]).replace(/[\n\r]+$/, "");
1946
+ if (a >= 60 && o.length > 80) {
1947
+ let e = Math.min(a - 39, o.length - 79);
1948
+ o = "…" + o.substring(e), a -= e - 1;
1949
+ }
1950
+ if (o.length > 80 && (o = o.substring(0, 79) + "…"), r > 1 && /^ *$/.test(o.substring(0, a))) {
1951
+ let n = e.substring(t.lineStarts[r - 2], t.lineStarts[r - 1]);
1952
+ n.length > 80 && (n = n.substring(0, 79) + "…\n"), o = n + o;
1953
+ }
1954
+ if (/[^ ]/.test(o)) {
1955
+ let e = 1, t = n.linePos[1];
1956
+ t?.line === r && t.col > i && (e = Math.max(1, Math.min(t.col - i, 80 - a)));
1957
+ let s = " ".repeat(a) + "^".repeat(e);
1958
+ n.message += `:\n\n${o}\n${s}\n`;
1959
+ }
1960
+ };
1961
+ //#endregion
1962
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-props.js
1963
+ function Y(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
1964
+ let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
1965
+ for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
1966
+ case "space":
1967
+ !t && (n !== "doc-start" || r?.type !== "flow-collection") && i.source.includes(" ") && (h = i), u = !0;
1968
+ break;
1969
+ case "comment": {
1970
+ u || a(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
1971
+ let e = i.source.substring(1) || " ";
1972
+ d ? d += f + e : d = e, f = "", l = !1;
1973
+ break;
1974
+ }
1975
+ case "newline":
1976
+ l ? d ? d += i.source : (!b || n !== "seq-item-ind") && (c = !0) : f += i.source, l = !0, p = !0, (g || _) && (v = i), u = !0;
1977
+ break;
1978
+ case "anchor":
1979
+ g && a(i, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), i.source.endsWith(":") && a(i.offset + i.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = i, x ??= i.offset, l = !1, u = !1, m = !0;
1980
+ break;
1981
+ case "tag":
1982
+ _ && a(i, "MULTIPLE_TAGS", "A node can have at most one tag"), _ = i, x ??= i.offset, l = !1, u = !1, m = !0;
1983
+ break;
1984
+ case n:
1985
+ (g || _) && a(i, "BAD_PROP_ORDER", `Anchors and tags must be after the ${i.source} indicator`), b && a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.source} in ${t ?? "collection"}`), b = i, l = n === "seq-item-ind" || n === "explicit-key-ind", u = !1;
1986
+ break;
1987
+ case "comma": if (t) {
1988
+ y && a(i, "UNEXPECTED_TOKEN", `Unexpected , in ${t}`), y = i, l = !1, u = !1;
1989
+ break;
1990
+ }
1991
+ default: a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.type} token`), l = !1, u = !1;
1992
+ }
1993
+ let S = e[e.length - 1], C = S ? S.offset + S.source.length : i;
1994
+ return m && r && r.type !== "space" && r.type !== "newline" && r.type !== "comma" && (r.type !== "scalar" || r.source !== "") && a(r.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), h && (l && h.indent <= o || r?.type === "block-map" || r?.type === "block-seq") && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
1995
+ comma: y,
1996
+ found: b,
1997
+ spaceBefore: c,
1998
+ comment: d,
1999
+ hasNewline: p,
2000
+ anchor: g,
2001
+ tag: _,
2002
+ newlineAfterProp: v,
2003
+ end: C,
2004
+ start: x ?? C
2005
+ };
2006
+ }
2007
+ //#endregion
2008
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-contains-newline.js
2009
+ function Kt(e) {
2010
+ if (!e) return null;
2011
+ switch (e.type) {
2012
+ case "alias":
2013
+ case "scalar":
2014
+ case "double-quoted-scalar":
2015
+ case "single-quoted-scalar":
2016
+ if (e.source.includes("\n")) return !0;
2017
+ if (e.end) {
2018
+ for (let t of e.end) if (t.type === "newline") return !0;
2019
+ }
2020
+ return !1;
2021
+ case "flow-collection":
2022
+ for (let t of e.items) {
2023
+ for (let e of t.start) if (e.type === "newline") return !0;
2024
+ if (t.sep) {
2025
+ for (let e of t.sep) if (e.type === "newline") return !0;
2026
+ }
2027
+ if (Kt(t.key) || Kt(t.value)) return !0;
2028
+ }
2029
+ return !1;
2030
+ default: return !0;
2031
+ }
2032
+ }
2033
+ //#endregion
2034
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
2035
+ function qt(e, t, n) {
2036
+ if (t?.type === "flow-collection") {
2037
+ let r = t.end[0];
2038
+ r.indent === e && (r.source === "]" || r.source === "}") && Kt(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2039
+ }
2040
+ }
2041
+ //#endregion
2042
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-map-includes.js
2043
+ function Jt(e, t, n) {
2044
+ let { uniqueKeys: r } = e.options;
2045
+ if (r === !1) return !1;
2046
+ let i = typeof r == "function" ? r : (e, t) => e === t || f(e) && f(t) && e.value === t.value;
2047
+ return t.some((e) => i(e.key, n));
2048
+ }
2049
+ //#endregion
2050
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-map.js
2051
+ var Yt = "All mapping items must start at the same column";
2052
+ function Xt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2053
+ let o = new (a?.nodeClass ?? V)(n.schema);
2054
+ n.atRoot &&= !1;
2055
+ let s = r.offset, c = null;
2056
+ for (let a of r.items) {
2057
+ let { start: l, key: u, sep: d, value: f } = a, p = Y(l, {
2058
+ indicator: "explicit-key-ind",
2059
+ next: u ?? d?.[0],
2060
+ offset: s,
2061
+ onError: i,
2062
+ parentIndent: r.indent,
2063
+ startOnNewline: !0
2064
+ }), m = !p.found;
2065
+ if (m) {
2066
+ if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", Yt)), !p.anchor && !p.tag && !d) {
2067
+ c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
2068
+ continue;
2069
+ }
2070
+ (p.newlineAfterProp || Kt(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2071
+ } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", Yt);
2072
+ n.atKey = !0;
2073
+ let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
2074
+ n.schema.compat && qt(r.indent, u, i), n.atKey = !1, Jt(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2075
+ let _ = Y(d ?? [], {
2076
+ indicator: "map-value-ind",
2077
+ next: f,
2078
+ offset: g.range[2],
2079
+ onError: i,
2080
+ parentIndent: r.indent,
2081
+ startOnNewline: !u || u.type === "block-scalar"
2082
+ });
2083
+ if (s = _.end, _.found) {
2084
+ m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2085
+ let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
2086
+ n.schema.compat && qt(r.indent, f, i), s = c.range[2];
2087
+ let l = new z(g, c);
2088
+ n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
2089
+ } else {
2090
+ m && i(g.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2091
+ let e = new z(g);
2092
+ n.options.keepSourceTokens && (e.srcToken = a), o.items.push(e);
2093
+ }
2094
+ }
2095
+ return c && c < s && i(c, "IMPOSSIBLE", "Map comment with trailing content"), o.range = [
2096
+ r.offset,
2097
+ s,
2098
+ c ?? s
2099
+ ], o;
2100
+ }
2101
+ //#endregion
2102
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
2103
+ function Zt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2104
+ let o = new (a?.nodeClass ?? U)(n.schema);
2105
+ n.atRoot &&= !1, n.atKey &&= !1;
2106
+ let s = r.offset, c = null;
2107
+ for (let { start: a, value: l } of r.items) {
2108
+ let u = Y(a, {
2109
+ indicator: "seq-item-ind",
2110
+ next: l,
2111
+ offset: s,
2112
+ onError: i,
2113
+ parentIndent: r.indent,
2114
+ startOnNewline: !0
2115
+ });
2116
+ if (!u.found) if (u.anchor || u.tag || l) l?.type === "block-seq" ? i(u.end, "BAD_INDENT", "All sequence items must start at the same column") : i(s, "MISSING_CHAR", "Sequence item without - indicator");
2117
+ else {
2118
+ c = u.end, u.comment && (o.comment = u.comment);
2119
+ continue;
2120
+ }
2121
+ let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
2122
+ n.schema.compat && qt(r.indent, l, i), s = d.range[2], o.items.push(d);
2123
+ }
2124
+ return o.range = [
2125
+ r.offset,
2126
+ s,
2127
+ c ?? s
2128
+ ], o;
2129
+ }
2130
+ //#endregion
2131
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-end.js
2132
+ function Qt(e, t, n, r) {
2133
+ let i = "";
2134
+ if (e) {
2135
+ let a = !1, o = "";
2136
+ for (let s of e) {
2137
+ let { source: e, type: c } = s;
2138
+ switch (c) {
2139
+ case "space":
2140
+ a = !0;
2141
+ break;
2142
+ case "comment": {
2143
+ n && !a && r(s, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2144
+ let t = e.substring(1) || " ";
2145
+ i ? i += o + t : i = t, o = "";
2146
+ break;
2147
+ }
2148
+ case "newline":
2149
+ i && (o += e), a = !0;
2150
+ break;
2151
+ default: r(s, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2152
+ }
2153
+ t += e.length;
2154
+ }
2155
+ }
2156
+ return {
2157
+ comment: i,
2158
+ offset: t
2159
+ };
2160
+ }
2161
+ //#endregion
2162
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
2163
+ var $t = "Block collections are not allowed within flow collections", en = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2164
+ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2165
+ let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new (a?.nodeClass ?? (o ? V : U))(n.schema);
2166
+ c.flow = !0;
2167
+ let l = n.atRoot;
2168
+ l && (n.atRoot = !1), n.atKey &&= !1;
2169
+ let u = r.offset + r.start.source.length;
2170
+ for (let a = 0; a < r.items.length; ++a) {
2171
+ let l = r.items[a], { start: f, key: p, sep: m, value: h } = l, g = Y(f, {
2172
+ flow: s,
2173
+ indicator: "explicit-key-ind",
2174
+ next: p ?? m?.[0],
2175
+ offset: u,
2176
+ onError: i,
2177
+ parentIndent: r.indent,
2178
+ startOnNewline: !1
2179
+ });
2180
+ if (!g.found) {
2181
+ if (!g.anchor && !g.tag && !m && !h) {
2182
+ a === 0 && g.comma ? i(g.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(g.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), g.comment && (c.comment ? c.comment += "\n" + g.comment : c.comment = g.comment), u = g.end;
2183
+ continue;
2184
+ }
2185
+ !o && n.options.strict && Kt(p) && i(p, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2186
+ }
2187
+ if (a === 0) g.comma && i(g.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
2188
+ else if (g.comma || i(g.start, "MISSING_CHAR", `Missing , between ${s} items`), g.comment) {
2189
+ let e = "";
2190
+ loop: for (let t of f) switch (t.type) {
2191
+ case "comma":
2192
+ case "space": break;
2193
+ case "comment":
2194
+ e = t.source.substring(1);
2195
+ break loop;
2196
+ default: break loop;
2197
+ }
2198
+ if (e) {
2199
+ let t = c.items[c.items.length - 1];
2200
+ d(t) && (t = t.value ?? t.key), t.comment ? t.comment += "\n" + e : t.comment = e, g.comment = g.comment.substring(e.length + 1);
2201
+ }
2202
+ }
2203
+ if (!o && !m && !g.found) {
2204
+ let r = h ? e(n, h, g, i) : t(n, g.end, m, null, g, i);
2205
+ c.items.push(r), u = r.range[2], en(h) && i(r.range, "BLOCK_IN_FLOW", $t);
2206
+ } else {
2207
+ n.atKey = !0;
2208
+ let a = g.end, d = p ? e(n, p, g, i) : t(n, a, f, null, g, i);
2209
+ en(p) && i(d.range, "BLOCK_IN_FLOW", $t), n.atKey = !1;
2210
+ let _ = Y(m ?? [], {
2211
+ flow: s,
2212
+ indicator: "map-value-ind",
2213
+ next: h,
2214
+ offset: d.range[2],
2215
+ onError: i,
2216
+ parentIndent: r.indent,
2217
+ startOnNewline: !1
2218
+ });
2219
+ if (_.found) {
2220
+ if (!o && !g.found && n.options.strict) {
2221
+ if (m) for (let e of m) {
2222
+ if (e === _.found) break;
2223
+ if (e.type === "newline") {
2224
+ i(e, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2225
+ break;
2226
+ }
2227
+ }
2228
+ g.start < _.found.offset - 1024 && i(_.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2229
+ }
2230
+ } else h && ("source" in h && h.source?.[0] === ":" ? i(h, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
2231
+ let v = h ? e(n, h, _, i) : _.found ? t(n, _.end, m, null, _, i) : null;
2232
+ v ? en(h) && i(v.range, "BLOCK_IN_FLOW", $t) : _.comment && (d.comment ? d.comment += "\n" + _.comment : d.comment = _.comment);
2233
+ let y = new z(d, v);
2234
+ if (n.options.keepSourceTokens && (y.srcToken = l), o) {
2235
+ let e = c;
2236
+ Jt(n, e.items, d) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2237
+ } else {
2238
+ let e = new V(n.schema);
2239
+ e.flow = !0, e.items.push(y);
2240
+ let t = (v ?? d).range;
2241
+ e.range = [
2242
+ d.range[0],
2243
+ t[1],
2244
+ t[2]
2245
+ ], c.items.push(e);
2246
+ }
2247
+ u = v ? v.range[2] : _.end;
2248
+ }
2249
+ }
2250
+ let f = o ? "}" : "]", [p, ...m] = r.end, h = u;
2251
+ if (p?.source === f) h = p.offset + p.source.length;
2252
+ else {
2253
+ let e = s[0].toUpperCase() + s.substring(1), t = l ? `${e} must end with a ${f}` : `${e} in block collection must be sufficiently indented and end with a ${f}`;
2254
+ i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), p && p.source.length !== 1 && m.unshift(p);
2255
+ }
2256
+ if (m.length > 0) {
2257
+ let e = Qt(m, h, n.options.strict, i);
2258
+ e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
2259
+ r.offset,
2260
+ h,
2261
+ e.offset
2262
+ ];
2263
+ } else c.range = [
2264
+ r.offset,
2265
+ h,
2266
+ h
2267
+ ];
2268
+ return c;
2269
+ }
2270
+ //#endregion
2271
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-collection.js
2272
+ function nn(e, t, n, r, i, a) {
2273
+ let o = n.type === "block-map" ? Xt(e, t, n, r, a) : n.type === "block-seq" ? Zt(e, t, n, r, a) : tn(e, t, n, r, a), s = o.constructor;
2274
+ return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
2275
+ }
2276
+ function rn(e, t, n, r, i) {
2277
+ let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
2278
+ if (n.type === "block-seq") {
2279
+ let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
2280
+ n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
2281
+ }
2282
+ let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
2283
+ if (!a || !o || o === "!" || o === V.tagName && s === "map" || o === U.tagName && s === "seq") return nn(e, t, n, i, o);
2284
+ let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
2285
+ if (!c) {
2286
+ let r = t.schema.knownTags[o];
2287
+ if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
2288
+ else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), nn(e, t, n, i, o);
2289
+ }
2290
+ let l = nn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = h(u) ? u : new A(u);
2291
+ return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
2292
+ }
2293
+ //#endregion
2294
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
2295
+ function an(e, t, n) {
2296
+ let r = t.offset, i = on(t, e.options.strict, n);
2297
+ if (!i) return {
2298
+ value: "",
2299
+ type: null,
2300
+ comment: "",
2301
+ range: [
2302
+ r,
2303
+ r,
2304
+ r
2305
+ ]
2306
+ };
2307
+ let a = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = t.source ? sn(t.source) : [], s = o.length;
2308
+ for (let e = o.length - 1; e >= 0; --e) {
2309
+ let t = o[e][1];
2310
+ if (t === "" || t === "\r") s = e;
2311
+ else break;
2312
+ }
2313
+ if (s === 0) {
2314
+ let e = i.chomp === "+" && o.length > 0 ? "\n".repeat(Math.max(1, o.length - 1)) : "", n = r + i.length;
2315
+ return t.source && (n += t.source.length), {
2316
+ value: e,
2317
+ type: a,
2318
+ comment: i.comment,
2319
+ range: [
2320
+ r,
2321
+ n,
2322
+ n
2323
+ ]
2324
+ };
2325
+ }
2326
+ let c = t.indent + i.indent, l = t.offset + i.length, u = 0;
2327
+ for (let t = 0; t < s; ++t) {
2328
+ let [r, a] = o[t];
2329
+ if (a === "" || a === "\r") i.indent === 0 && r.length > c && (c = r.length);
2330
+ else {
2331
+ r.length < c && n(l + r.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (c = r.length), u = t, c === 0 && !e.atRoot && n(l, "BAD_INDENT", "Block scalar values in collections must be indented");
2332
+ break;
2333
+ }
2334
+ l += r.length + a.length + 1;
2335
+ }
2336
+ for (let e = o.length - 1; e >= s; --e) o[e][0].length > c && (s = e + 1);
2337
+ let d = "", f = "", p = !1;
2338
+ for (let e = 0; e < u; ++e) d += o[e][0].slice(c) + "\n";
2339
+ for (let e = u; e < s; ++e) {
2340
+ let [t, r] = o[e];
2341
+ l += t.length + r.length + 1;
2342
+ let s = r[r.length - 1] === "\r";
2343
+ /* istanbul ignore if already caught in lexer */
2344
+ if (s && (r = r.slice(0, -1)), r && t.length < c) {
2345
+ let e = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2346
+ n(l - r.length - (s ? 2 : 1), "BAD_INDENT", e), t = "";
2347
+ }
2348
+ a === A.BLOCK_LITERAL ? (d += f + t.slice(c) + r, f = "\n") : t.length > c || r[0] === " " ? (f === " " ? f = "\n" : !p && f === "\n" && (f = "\n\n"), d += f + t.slice(c) + r, f = "\n", p = !0) : r === "" ? f === "\n" ? d += "\n" : f = "\n" : (d += f + r, f = " ", p = !1);
2349
+ }
2350
+ switch (i.chomp) {
2351
+ case "-": break;
2352
+ case "+":
2353
+ for (let e = s; e < o.length; ++e) d += "\n" + o[e][0].slice(c);
2354
+ d[d.length - 1] !== "\n" && (d += "\n");
2355
+ break;
2356
+ default: d += "\n";
2357
+ }
2358
+ let m = r + i.length + t.source.length;
2359
+ return {
2360
+ value: d,
2361
+ type: a,
2362
+ comment: i.comment,
2363
+ range: [
2364
+ r,
2365
+ m,
2366
+ m
2367
+ ]
2368
+ };
2369
+ }
2370
+ function on({ offset: e, props: t }, n, r) {
2371
+ /* istanbul ignore if should not happen */
2372
+ if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2373
+ let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
2374
+ for (let t = 1; t < i.length; ++t) {
2375
+ let n = i[t];
2376
+ if (!s && (n === "-" || n === "+")) s = n;
2377
+ else {
2378
+ let r = Number(n);
2379
+ !o && r ? o = r : c === -1 && (c = e + t);
2380
+ }
2381
+ }
2382
+ c !== -1 && r(c, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2383
+ let l = !1, u = "", d = i.length;
2384
+ for (let e = 1; e < t.length; ++e) {
2385
+ let i = t[e];
2386
+ switch (i.type) {
2387
+ case "space": l = !0;
2388
+ case "newline":
2389
+ d += i.source.length;
2390
+ break;
2391
+ case "comment":
2392
+ n && !l && r(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), d += i.source.length, u = i.source.substring(1);
2393
+ break;
2394
+ case "error":
2395
+ r(i, "UNEXPECTED_TOKEN", i.message), d += i.source.length;
2396
+ break;
2397
+ /* istanbul ignore next should not happen */
2398
+ default: {
2399
+ r(i, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${i.type}`);
2400
+ let e = i.source;
2401
+ e && typeof e == "string" && (d += e.length);
2402
+ }
2403
+ }
2404
+ }
2405
+ return {
2406
+ mode: a,
2407
+ indent: o,
2408
+ chomp: s,
2409
+ comment: u,
2410
+ length: d
2411
+ };
2412
+ }
2413
+ function sn(e) {
2414
+ let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
2415
+ for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
2416
+ return i;
2417
+ }
2418
+ //#endregion
2419
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
2420
+ function cn(e, t, n) {
2421
+ let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
2422
+ switch (i) {
2423
+ case "scalar":
2424
+ s = A.PLAIN, c = ln(a, l);
2425
+ break;
2426
+ case "single-quoted-scalar":
2427
+ s = A.QUOTE_SINGLE, c = un(a, l);
2428
+ break;
2429
+ case "double-quoted-scalar":
2430
+ s = A.QUOTE_DOUBLE, c = fn(a, l);
2431
+ break;
2432
+ /* istanbul ignore next should not happen */
2433
+ default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2434
+ value: "",
2435
+ type: null,
2436
+ comment: "",
2437
+ range: [
2438
+ r,
2439
+ r + a.length,
2440
+ r + a.length
2441
+ ]
2442
+ };
2443
+ }
2444
+ let u = r + a.length, d = Qt(o, u, t, n);
2445
+ return {
2446
+ value: c,
2447
+ type: s,
2448
+ comment: d.comment,
2449
+ range: [
2450
+ r,
2451
+ u,
2452
+ d.offset
2453
+ ]
2454
+ };
2455
+ }
2456
+ function ln(e, t) {
2457
+ let n = "";
2458
+ switch (e[0]) {
2459
+ /* istanbul ignore next should not happen */
2460
+ case " ":
2461
+ n = "a tab character";
2462
+ break;
2463
+ case ",":
2464
+ n = "flow indicator character ,";
2465
+ break;
2466
+ case "%":
2467
+ n = "directive indicator character %";
2468
+ break;
2469
+ case "|":
2470
+ case ">":
2471
+ n = `block scalar indicator ${e[0]}`;
2472
+ break;
2473
+ case "@":
2474
+ case "`":
2475
+ n = `reserved character ${e[0]}`;
2476
+ break;
2477
+ }
2478
+ return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), dn(e);
2479
+ }
2480
+ function un(e, t) {
2481
+ return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), dn(e.slice(1, -1)).replace(/''/g, "'");
2482
+ }
2483
+ function dn(e) {
2484
+ let t = /(.*?)\r?\n/sy, n = t.exec(e);
2485
+ if (!n) return e;
2486
+ let r, i;
2487
+ try {
2488
+ r = /* @__PURE__ */ RegExp("(?<![ ])[ ]+$"), i = /* @__PURE__ */ RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
2489
+ } catch {
2490
+ r = /[ \t]+$/, i = /^[ \t]+|[ \t]+$/g;
2491
+ }
2492
+ let a = n[1].replace(r, ""), o = " ", s = t.lastIndex;
2493
+ for (; n = t.exec(e);) {
2494
+ let e = n[1].replace(i, "");
2495
+ e === "" ? o === "\n" ? a += o : o = "\n" : (a += o + e, o = " "), s = t.lastIndex;
2496
+ }
2497
+ let c = /[ \t]*(.*)/sy;
2498
+ return c.lastIndex = s, n = c.exec(e), a + o + (n?.[1] ?? "");
2499
+ }
2500
+ function fn(e, t) {
2501
+ let n = "";
2502
+ for (let r = 1; r < e.length - 1; ++r) {
2503
+ let i = e[r];
2504
+ if (!(i === "\r" && e[r + 1] === "\n")) if (i === "\n") {
2505
+ let { fold: t, offset: i } = pn(e, r);
2506
+ n += t, r = i;
2507
+ } else if (i === "\\") {
2508
+ let i = e[++r], a = mn[i];
2509
+ if (a) n += a;
2510
+ else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
2511
+ else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
2512
+ else if (i === "x" || i === "u" || i === "U") {
2513
+ let a = i === "x" ? 2 : i === "u" ? 4 : 8;
2514
+ n += hn(e, r + 1, a, t), r += a;
2515
+ } else {
2516
+ let i = e.substr(r - 1, 2);
2517
+ t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
2518
+ }
2519
+ } else if (i === " " || i === " ") {
2520
+ let t = r, a = e[r + 1];
2521
+ for (; a === " " || a === " ";) a = e[++r + 1];
2522
+ a !== "\n" && !(a === "\r" && e[r + 2] === "\n") && (n += r > t ? e.slice(t, r + 1) : i);
2523
+ } else n += i;
2524
+ }
2525
+ return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
2526
+ }
2527
+ function pn(e, t) {
2528
+ let n = "", r = e[t + 1];
2529
+ for (; (r === " " || r === " " || r === "\n" || r === "\r") && !(r === "\r" && e[t + 2] !== "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
2530
+ return n ||= " ", {
2531
+ fold: n,
2532
+ offset: t
2533
+ };
2534
+ }
2535
+ var mn = {
2536
+ 0: "\0",
2537
+ a: "\x07",
2538
+ b: "\b",
2539
+ e: "\x1B",
2540
+ f: "\f",
2541
+ n: "\n",
2542
+ r: "\r",
2543
+ t: " ",
2544
+ v: "\v",
2545
+ N: "…",
2546
+ _: "\xA0",
2547
+ L: "\u2028",
2548
+ P: "\u2029",
2549
+ " ": " ",
2550
+ "\"": "\"",
2551
+ "/": "/",
2552
+ "\\": "\\",
2553
+ " ": " "
2554
+ };
2555
+ function hn(e, t, n, r) {
2556
+ let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
2557
+ try {
2558
+ return String.fromCodePoint(a);
2559
+ } catch {
2560
+ let i = e.substr(t - 2, n + 2);
2561
+ return r(t - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), i;
2562
+ }
2563
+ }
2564
+ //#endregion
2565
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-scalar.js
2566
+ function gn(e, t, n, r) {
2567
+ let { value: i, type: o, comment: s, range: c } = t.type === "block-scalar" ? an(e, t, r) : cn(t, e.options.strict, r), l = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, u;
2568
+ u = e.options.stringKeys && e.atKey ? e.schema[a] : l ? _n(e.schema, i, l, n, r) : t.type === "scalar" ? vn(e, i, t, r) : e.schema[a];
2569
+ let d;
2570
+ try {
2571
+ let a = u.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
2572
+ d = f(a) ? a : new A(a);
2573
+ } catch (e) {
2574
+ let a = e instanceof Error ? e.message : String(e);
2575
+ r(n ?? t, "TAG_RESOLVE_FAILED", a), d = new A(i);
2576
+ }
2577
+ return d.range = c, d.source = i, o && (d.type = o), l && (d.tag = l), u.format && (d.format = u.format), s && (d.comment = s), d;
2578
+ }
2579
+ function _n(e, t, n, r, i) {
2580
+ if (n === "!") return e[a];
2581
+ let o = [];
2582
+ for (let t of e.tags) if (!t.collection && t.tag === n) if (t.default && t.test) o.push(t);
2583
+ else return t;
2584
+ for (let e of o) if (e.test?.test(t)) return e;
2585
+ let s = e.knownTags[n];
2586
+ return s && !s.collection ? (e.tags.push(Object.assign({}, s, {
2587
+ default: !1,
2588
+ test: void 0
2589
+ })), s) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[a]);
2590
+ }
2591
+ function vn({ atKey: e, directives: t, schema: n }, r, i, o) {
2592
+ let s = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[a];
2593
+ if (n.compat) {
2594
+ let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[a];
2595
+ s.tag !== e.tag && o(i, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`, !0);
2596
+ }
2597
+ return s;
2598
+ }
2599
+ //#endregion
2600
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
2601
+ function yn(e, t, n) {
2602
+ if (t) {
2603
+ n ??= t.length;
2604
+ for (let r = n - 1; r >= 0; --r) {
2605
+ let n = t[r];
2606
+ switch (n.type) {
2607
+ case "space":
2608
+ case "comment":
2609
+ case "newline":
2610
+ e -= n.source.length;
2611
+ continue;
2612
+ }
2613
+ for (n = t[++r]; n?.type === "space";) e += n.source.length, n = t[++r];
2614
+ break;
2615
+ }
2616
+ }
2617
+ return e;
2618
+ }
2619
+ //#endregion
2620
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-node.js
2621
+ var bn = {
2622
+ composeNode: xn,
2623
+ composeEmptyNode: Sn
2624
+ };
2625
+ function xn(e, t, n, r) {
2626
+ let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
2627
+ switch (t.type) {
2628
+ case "alias":
2629
+ l = Cn(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
2630
+ break;
2631
+ case "scalar":
2632
+ case "single-quoted-scalar":
2633
+ case "double-quoted-scalar":
2634
+ case "block-scalar":
2635
+ l = gn(e, t, c, r), s && (l.anchor = s.source.substring(1));
2636
+ break;
2637
+ case "block-map":
2638
+ case "block-seq":
2639
+ case "flow-collection":
2640
+ try {
2641
+ l = rn(bn, e, t, n, r), s && (l.anchor = s.source.substring(1));
2642
+ } catch (e) {
2643
+ r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
2644
+ }
2645
+ break;
2646
+ default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
2647
+ }
2648
+ return l ??= Sn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!f(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
2649
+ }
2650
+ function Sn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2651
+ let u = gn(e, {
2652
+ type: "scalar",
2653
+ offset: yn(t, n, r),
2654
+ indent: -1,
2655
+ source: ""
2656
+ }, s, l);
2657
+ return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
2658
+ }
2659
+ function Cn({ options: e }, { offset: t, source: n, end: r }, i) {
2660
+ let a = new k(n.substring(1));
2661
+ a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
2662
+ let o = t + n.length, s = Qt(r, o, e.strict, i);
2663
+ return a.range = [
2664
+ t,
2665
+ o,
2666
+ s.offset
2667
+ ], s.comment && (a.comment = s.comment), a;
2668
+ }
2669
+ //#endregion
2670
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-doc.js
2671
+ function wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2672
+ let s = new Ht(void 0, Object.assign({ _directives: t }, e)), c = {
2673
+ atKey: !1,
2674
+ atRoot: !0,
2675
+ directives: s.directives,
2676
+ options: s.options,
2677
+ schema: s.schema
2678
+ }, l = Y(r, {
2679
+ indicator: "doc-start",
2680
+ next: i ?? a?.[0],
2681
+ offset: n,
2682
+ onError: o,
2683
+ parentIndent: 0,
2684
+ startOnNewline: !0
2685
+ });
2686
+ l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? xn(c, i, l, o) : Sn(c, l.end, r, null, l, o);
2687
+ let u = s.contents.range[2], d = Qt(a, u, !1, o);
2688
+ return d.comment && (s.comment = d.comment), s.range = [
2689
+ n,
2690
+ u,
2691
+ d.offset
2692
+ ], s;
2693
+ }
2694
+ //#endregion
2695
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/composer.js
2696
+ function Tn(e) {
2697
+ if (typeof e == "number") return [e, e + 1];
2698
+ if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
2699
+ let { offset: t, source: n } = e;
2700
+ return [t, t + (typeof n == "string" ? n.length : 1)];
2701
+ }
2702
+ function En(e) {
2703
+ let t = "", n = !1, r = !1;
2704
+ for (let i = 0; i < e.length; ++i) {
2705
+ let a = e[i];
2706
+ switch (a[0]) {
2707
+ case "#":
2708
+ t += (t === "" ? "" : r ? "\n\n" : "\n") + (a.substring(1) || " "), n = !0, r = !1;
2709
+ break;
2710
+ case "%":
2711
+ e[i + 1]?.[0] !== "#" && (i += 1), n = !1;
2712
+ break;
2713
+ default: n || (r = !0), n = !1;
2714
+ }
2715
+ }
2716
+ return {
2717
+ comment: t,
2718
+ afterEmptyLine: r
2719
+ };
2720
+ }
2721
+ var Dn = class {
2722
+ constructor(e = {}) {
2723
+ this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
2724
+ let i = Tn(e);
2725
+ r ? this.warnings.push(new Wt(i, t, n)) : this.errors.push(new J(i, t, n));
2726
+ }, this.directives = new E({ version: e.version || "1.2" }), this.options = e;
2727
+ }
2728
+ decorate(e, t) {
2729
+ let { comment: n, afterEmptyLine: r } = En(this.prelude);
2730
+ if (n) {
2731
+ let i = e.contents;
2732
+ if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
2733
+ else if (r || e.directives.docStart || !i) e.commentBefore = n;
2734
+ else if (m(i) && !i.flow && i.items.length > 0) {
2735
+ let e = i.items[0];
2736
+ d(e) && (e = e.key);
2737
+ let t = e.commentBefore;
2738
+ e.commentBefore = t ? `${n}\n${t}` : n;
2739
+ } else {
2740
+ let e = i.commentBefore;
2741
+ i.commentBefore = e ? `${n}\n${e}` : n;
2742
+ }
2743
+ }
2744
+ if (t) {
2745
+ for (let t = 0; t < this.errors.length; ++t) e.errors.push(this.errors[t]);
2746
+ for (let t = 0; t < this.warnings.length; ++t) e.warnings.push(this.warnings[t]);
2747
+ } else e.errors = this.errors, e.warnings = this.warnings;
2748
+ this.prelude = [], this.errors = [], this.warnings = [];
2749
+ }
2750
+ streamInfo() {
2751
+ return {
2752
+ comment: En(this.prelude).comment,
2753
+ directives: this.directives,
2754
+ errors: this.errors,
2755
+ warnings: this.warnings
2756
+ };
2757
+ }
2758
+ *compose(e, t = !1, n = -1) {
2759
+ for (let t of e) yield* this.next(t);
2760
+ yield* this.end(t, n);
2761
+ }
2762
+ *next(e) {
2763
+ switch (e.type) {
2764
+ case "directive":
2765
+ this.directives.add(e.source, (t, n, r) => {
2766
+ let i = Tn(e);
2767
+ i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
2768
+ }), this.prelude.push(e.source), this.atDirectives = !0;
2769
+ break;
2770
+ case "document": {
2771
+ let t = wn(this.options, this.directives, e, this.onError);
2772
+ this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
2773
+ break;
2774
+ }
2775
+ case "byte-order-mark":
2776
+ case "space": break;
2777
+ case "comment":
2778
+ case "newline":
2779
+ this.prelude.push(e.source);
2780
+ break;
2781
+ case "error": {
2782
+ let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new J(Tn(e), "UNEXPECTED_TOKEN", t);
2783
+ this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
2784
+ break;
2785
+ }
2786
+ case "doc-end": {
2787
+ if (!this.doc) {
2788
+ this.errors.push(new J(Tn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2789
+ break;
2790
+ }
2791
+ this.doc.directives.docEnd = !0;
2792
+ let t = Qt(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
2793
+ if (this.decorate(this.doc, !0), t.comment) {
2794
+ let e = this.doc.comment;
2795
+ this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
2796
+ }
2797
+ this.doc.range[2] = t.offset;
2798
+ break;
2799
+ }
2800
+ default: this.errors.push(new J(Tn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
2801
+ }
2802
+ }
2803
+ *end(e = !1, t = -1) {
2804
+ if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
2805
+ else if (e) {
2806
+ let e = new Ht(void 0, Object.assign({ _directives: this.directives }, this.options));
2807
+ this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
2808
+ 0,
2809
+ t,
2810
+ t
2811
+ ], this.decorate(e, !1), yield e;
2812
+ }
2813
+ }
2814
+ };
2815
+ //#endregion
2816
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-scalar.js
2817
+ function On(e, t = !0, n) {
2818
+ if (e) {
2819
+ let r = (e, t, r) => {
2820
+ let i = typeof e == "number" ? e : Array.isArray(e) ? e[0] : e.offset;
2821
+ if (n) n(i, t, r);
2822
+ else throw new J([i, i + 1], t, r);
2823
+ };
2824
+ switch (e.type) {
2825
+ case "scalar":
2826
+ case "single-quoted-scalar":
2827
+ case "double-quoted-scalar": return cn(e, t, r);
2828
+ case "block-scalar": return an({ options: { strict: t } }, e, r);
2829
+ }
2830
+ }
2831
+ return null;
2832
+ }
2833
+ function kn(e, t) {
2834
+ let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = I({
2835
+ type: o,
2836
+ value: e
2837
+ }, {
2838
+ implicitKey: n,
2839
+ indent: r > 0 ? " ".repeat(r) : "",
2840
+ inFlow: i,
2841
+ options: {
2842
+ blockQuote: !0,
2843
+ lineWidth: -1
2844
+ }
2845
+ }), c = t.end ?? [{
2846
+ type: "newline",
2847
+ offset: -1,
2848
+ indent: r,
2849
+ source: "\n"
2850
+ }];
2851
+ switch (s[0]) {
2852
+ case "|":
2853
+ case ">": {
2854
+ let e = s.indexOf("\n"), t = s.substring(0, e), n = s.substring(e + 1) + "\n", i = [{
2855
+ type: "block-scalar-header",
2856
+ offset: a,
2857
+ indent: r,
2858
+ source: t
2859
+ }];
2860
+ return Mn(i, c) || i.push({
2861
+ type: "newline",
2862
+ offset: -1,
2863
+ indent: r,
2864
+ source: "\n"
2865
+ }), {
2866
+ type: "block-scalar",
2867
+ offset: a,
2868
+ indent: r,
2869
+ props: i,
2870
+ source: n
2871
+ };
2872
+ }
2873
+ case "\"": return {
2874
+ type: "double-quoted-scalar",
2875
+ offset: a,
2876
+ indent: r,
2877
+ source: s,
2878
+ end: c
2879
+ };
2880
+ case "'": return {
2881
+ type: "single-quoted-scalar",
2882
+ offset: a,
2883
+ indent: r,
2884
+ source: s,
2885
+ end: c
2886
+ };
2887
+ default: return {
2888
+ type: "scalar",
2889
+ offset: a,
2890
+ indent: r,
2891
+ source: s,
2892
+ end: c
2893
+ };
2894
+ }
2895
+ }
2896
+ function An(e, t, n = {}) {
2897
+ let { afterKey: r = !1, implicitKey: i = !1, inFlow: a = !1, type: o } = n, s = "indent" in e ? e.indent : null;
2898
+ if (r && typeof s == "number" && (s += 2), !o) switch (e.type) {
2899
+ case "single-quoted-scalar":
2900
+ o = "QUOTE_SINGLE";
2901
+ break;
2902
+ case "double-quoted-scalar":
2903
+ o = "QUOTE_DOUBLE";
2904
+ break;
2905
+ case "block-scalar": {
2906
+ let t = e.props[0];
2907
+ if (t.type !== "block-scalar-header") throw Error("Invalid block scalar header");
2908
+ o = t.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
2909
+ break;
2910
+ }
2911
+ default: o = "PLAIN";
2912
+ }
2913
+ let c = I({
2914
+ type: o,
2915
+ value: t
2916
+ }, {
2917
+ implicitKey: i || s === null,
2918
+ indent: s !== null && s > 0 ? " ".repeat(s) : "",
2919
+ inFlow: a,
2920
+ options: {
2921
+ blockQuote: !0,
2922
+ lineWidth: -1
2923
+ }
2924
+ });
2925
+ switch (c[0]) {
2926
+ case "|":
2927
+ case ">":
2928
+ jn(e, c);
2929
+ break;
2930
+ case "\"":
2931
+ Nn(e, c, "double-quoted-scalar");
2932
+ break;
2933
+ case "'":
2934
+ Nn(e, c, "single-quoted-scalar");
2935
+ break;
2936
+ default: Nn(e, c, "scalar");
2937
+ }
2938
+ }
2939
+ function jn(e, t) {
2940
+ let n = t.indexOf("\n"), r = t.substring(0, n), i = t.substring(n + 1) + "\n";
2941
+ if (e.type === "block-scalar") {
2942
+ let t = e.props[0];
2943
+ if (t.type !== "block-scalar-header") throw Error("Invalid block scalar header");
2944
+ t.source = r, e.source = i;
2945
+ } else {
2946
+ let { offset: t } = e, n = "indent" in e ? e.indent : -1, a = [{
2947
+ type: "block-scalar-header",
2948
+ offset: t,
2949
+ indent: n,
2950
+ source: r
2951
+ }];
2952
+ Mn(a, "end" in e ? e.end : void 0) || a.push({
2953
+ type: "newline",
2954
+ offset: -1,
2955
+ indent: n,
2956
+ source: "\n"
2957
+ });
2958
+ for (let t of Object.keys(e)) t !== "type" && t !== "offset" && delete e[t];
2959
+ Object.assign(e, {
2960
+ type: "block-scalar",
2961
+ indent: n,
2962
+ props: a,
2963
+ source: i
2964
+ });
2965
+ }
2966
+ }
2967
+ function Mn(e, t) {
2968
+ if (t) for (let n of t) switch (n.type) {
2969
+ case "space":
2970
+ case "comment":
2971
+ e.push(n);
2972
+ break;
2973
+ case "newline": return e.push(n), !0;
2974
+ }
2975
+ return !1;
2976
+ }
2977
+ function Nn(e, t, n) {
2978
+ switch (e.type) {
2979
+ case "scalar":
2980
+ case "double-quoted-scalar":
2981
+ case "single-quoted-scalar":
2982
+ e.type = n, e.source = t;
2983
+ break;
2984
+ case "block-scalar": {
2985
+ let r = e.props.slice(1), i = t.length;
2986
+ e.props[0].type === "block-scalar-header" && (i -= e.props[0].source.length);
2987
+ for (let e of r) e.offset += i;
2988
+ delete e.props, Object.assign(e, {
2989
+ type: n,
2990
+ source: t,
2991
+ end: r
2992
+ });
2993
+ break;
2994
+ }
2995
+ case "block-map":
2996
+ case "block-seq": {
2997
+ let r = {
2998
+ type: "newline",
2999
+ offset: e.offset + t.length,
3000
+ indent: e.indent,
3001
+ source: "\n"
3002
+ };
3003
+ delete e.items, Object.assign(e, {
3004
+ type: n,
3005
+ source: t,
3006
+ end: [r]
3007
+ });
3008
+ break;
3009
+ }
3010
+ default: {
3011
+ let r = "indent" in e ? e.indent : -1, i = "end" in e && Array.isArray(e.end) ? e.end.filter((e) => e.type === "space" || e.type === "comment" || e.type === "newline") : [];
3012
+ for (let t of Object.keys(e)) t !== "type" && t !== "offset" && delete e[t];
3013
+ Object.assign(e, {
3014
+ type: n,
3015
+ indent: r,
3016
+ source: t,
3017
+ end: i
3018
+ });
3019
+ }
3020
+ }
3021
+ }
3022
+ //#endregion
3023
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-stringify.js
3024
+ var Pn = (e) => "type" in e ? Fn(e) : In(e);
3025
+ function Fn(e) {
3026
+ switch (e.type) {
3027
+ case "block-scalar": {
3028
+ let t = "";
3029
+ for (let n of e.props) t += Fn(n);
3030
+ return t + e.source;
3031
+ }
3032
+ case "block-map":
3033
+ case "block-seq": {
3034
+ let t = "";
3035
+ for (let n of e.items) t += In(n);
3036
+ return t;
3037
+ }
3038
+ case "flow-collection": {
3039
+ let t = e.start.source;
3040
+ for (let n of e.items) t += In(n);
3041
+ for (let n of e.end) t += n.source;
3042
+ return t;
3043
+ }
3044
+ case "document": {
3045
+ let t = In(e);
3046
+ if (e.end) for (let n of e.end) t += n.source;
3047
+ return t;
3048
+ }
3049
+ default: {
3050
+ let t = e.source;
3051
+ if ("end" in e && e.end) for (let n of e.end) t += n.source;
3052
+ return t;
3053
+ }
3054
+ }
3055
+ }
3056
+ function In({ start: e, key: t, sep: n, value: r }) {
3057
+ let i = "";
3058
+ for (let t of e) i += t.source;
3059
+ if (t && (i += Fn(t)), n) for (let e of n) i += e.source;
3060
+ return r && (i += Fn(r)), i;
3061
+ }
3062
+ //#endregion
3063
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-visit.js
3064
+ var Ln = Symbol("break visit"), Rn = Symbol("skip children"), zn = Symbol("remove item");
3065
+ function X(e, t) {
3066
+ "type" in e && e.type === "document" && (e = {
3067
+ start: e.start,
3068
+ value: e.value
3069
+ }), Bn(Object.freeze([]), e, t);
3070
+ }
3071
+ X.BREAK = Ln, X.SKIP = Rn, X.REMOVE = zn, X.itemAtPath = (e, t) => {
3072
+ let n = e;
3073
+ for (let [e, r] of t) {
3074
+ let t = n?.[e];
3075
+ if (t && "items" in t) n = t.items[r];
3076
+ else return;
3077
+ }
3078
+ return n;
3079
+ }, X.parentCollection = (e, t) => {
3080
+ let n = X.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
3081
+ if (i && "items" in i) return i;
3082
+ throw Error("Parent collection not found");
3083
+ };
3084
+ function Bn(e, t, n) {
3085
+ let r = n(t, e);
3086
+ if (typeof r == "symbol") return r;
3087
+ for (let i of ["key", "value"]) {
3088
+ let a = t[i];
3089
+ if (a && "items" in a) {
3090
+ for (let t = 0; t < a.items.length; ++t) {
3091
+ let r = Bn(Object.freeze(e.concat([[i, t]])), a.items[t], n);
3092
+ if (typeof r == "number") t = r - 1;
3093
+ else if (r === Ln) return Ln;
3094
+ else r === zn && (a.items.splice(t, 1), --t);
3095
+ }
3096
+ typeof r == "function" && i === "key" && (r = r(t, e));
3097
+ }
3098
+ }
3099
+ return typeof r == "function" ? r(t, e) : r;
3100
+ }
3101
+ //#endregion
3102
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst.js
3103
+ var Vn = /* @__PURE__ */ e({
3104
+ BOM: () => "",
3105
+ DOCUMENT: () => "",
3106
+ FLOW_END: () => "",
3107
+ SCALAR: () => "",
3108
+ createScalarToken: () => kn,
3109
+ isCollection: () => Hn,
3110
+ isScalar: () => Un,
3111
+ prettyToken: () => Wn,
3112
+ resolveAsScalar: () => On,
3113
+ setScalarValue: () => An,
3114
+ stringify: () => Pn,
3115
+ tokenType: () => Gn,
3116
+ visit: () => X
3117
+ }), Hn = (e) => !!e && "items" in e, Un = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
3118
+ /* istanbul ignore next */
3119
+ function Wn(e) {
3120
+ switch (e) {
3121
+ case "": return "<BOM>";
3122
+ case "": return "<DOC>";
3123
+ case "": return "<FLOW_END>";
3124
+ case "": return "<SCALAR>";
3125
+ default: return JSON.stringify(e);
3126
+ }
3127
+ }
3128
+ function Gn(e) {
3129
+ switch (e) {
3130
+ case "": return "byte-order-mark";
3131
+ case "": return "doc-mode";
3132
+ case "": return "flow-error-end";
3133
+ case "": return "scalar";
3134
+ case "---": return "doc-start";
3135
+ case "...": return "doc-end";
3136
+ case "":
3137
+ case "\n":
3138
+ case "\r\n": return "newline";
3139
+ case "-": return "seq-item-ind";
3140
+ case "?": return "explicit-key-ind";
3141
+ case ":": return "map-value-ind";
3142
+ case "{": return "flow-map-start";
3143
+ case "}": return "flow-map-end";
3144
+ case "[": return "flow-seq-start";
3145
+ case "]": return "flow-seq-end";
3146
+ case ",": return "comma";
3147
+ }
3148
+ switch (e[0]) {
3149
+ case " ":
3150
+ case " ": return "space";
3151
+ case "#": return "comment";
3152
+ case "%": return "directive-line";
3153
+ case "*": return "alias";
3154
+ case "&": return "anchor";
3155
+ case "!": return "tag";
3156
+ case "'": return "single-quoted-scalar";
3157
+ case "\"": return "double-quoted-scalar";
3158
+ case "|":
3159
+ case ">": return "block-scalar-header";
3160
+ }
3161
+ return null;
3162
+ }
3163
+ //#endregion
3164
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/lexer.js
3165
+ function Z(e) {
3166
+ switch (e) {
3167
+ case void 0:
3168
+ case " ":
3169
+ case "\n":
3170
+ case "\r":
3171
+ case " ": return !0;
3172
+ default: return !1;
3173
+ }
3174
+ }
3175
+ var Kn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), qn = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Jn = /* @__PURE__ */ new Set(",[]{}"), Yn = /* @__PURE__ */ new Set(" ,[]{}\n\r "), Xn = (e) => !e || Yn.has(e), Zn = class {
3176
+ constructor() {
3177
+ this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3178
+ }
3179
+ *lex(e, t = !1) {
3180
+ if (e) {
3181
+ if (typeof e != "string") throw TypeError("source is not a string");
3182
+ this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
3183
+ }
3184
+ this.atEnd = !t;
3185
+ let n = this.next ?? "stream";
3186
+ for (; n && (t || this.hasChars(1));) n = yield* this.parseNext(n);
3187
+ }
3188
+ atLineEnd() {
3189
+ let e = this.pos, t = this.buffer[e];
3190
+ for (; t === " " || t === " ";) t = this.buffer[++e];
3191
+ return !t || t === "#" || t === "\n" ? !0 : t === "\r" ? this.buffer[e + 1] === "\n" : !1;
3192
+ }
3193
+ charAt(e) {
3194
+ return this.buffer[this.pos + e];
3195
+ }
3196
+ continueScalar(e) {
3197
+ let t = this.buffer[e];
3198
+ if (this.indentNext > 0) {
3199
+ let n = 0;
3200
+ for (; t === " ";) t = this.buffer[++n + e];
3201
+ if (t === "\r") {
3202
+ let t = this.buffer[n + e + 1];
3203
+ if (t === "\n" || !t && !this.atEnd) return e + n + 1;
3204
+ }
3205
+ return t === "\n" || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
3206
+ }
3207
+ if (t === "-" || t === ".") {
3208
+ let t = this.buffer.substr(e, 3);
3209
+ if ((t === "---" || t === "...") && Z(this.buffer[e + 3])) return -1;
3210
+ }
3211
+ return e;
3212
+ }
3213
+ getLine() {
3214
+ let e = this.lineEndPos;
3215
+ return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf("\n", this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && --e, this.buffer.substring(this.pos, e));
3216
+ }
3217
+ hasChars(e) {
3218
+ return this.pos + e <= this.buffer.length;
3219
+ }
3220
+ setNext(e) {
3221
+ return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
3222
+ }
3223
+ peek(e) {
3224
+ return this.buffer.substr(this.pos, e);
3225
+ }
3226
+ *parseNext(e) {
3227
+ switch (e) {
3228
+ case "stream": return yield* this.parseStream();
3229
+ case "line-start": return yield* this.parseLineStart();
3230
+ case "block-start": return yield* this.parseBlockStart();
3231
+ case "doc": return yield* this.parseDocument();
3232
+ case "flow": return yield* this.parseFlowCollection();
3233
+ case "quoted-scalar": return yield* this.parseQuotedScalar();
3234
+ case "block-scalar": return yield* this.parseBlockScalar();
3235
+ case "plain-scalar": return yield* this.parsePlainScalar();
3236
+ }
3237
+ }
3238
+ *parseStream() {
3239
+ let e = this.getLine();
3240
+ if (e === null) return this.setNext("stream");
3241
+ if (e[0] === "" && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3242
+ let t = e.length, n = e.indexOf("#");
3243
+ for (; n !== -1;) {
3244
+ let r = e[n - 1];
3245
+ if (r === " " || r === " ") {
3246
+ t = n - 1;
3247
+ break;
3248
+ } else n = e.indexOf("#", n + 1);
3249
+ }
3250
+ for (;;) {
3251
+ let n = e[t - 1];
3252
+ if (n === " " || n === " ") --t;
3253
+ else break;
3254
+ }
3255
+ let r = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
3256
+ return yield* this.pushCount(e.length - r), this.pushNewline(), "stream";
3257
+ }
3258
+ if (this.atLineEnd()) {
3259
+ let t = yield* this.pushSpaces(!0);
3260
+ return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3261
+ }
3262
+ return yield "", yield* this.parseLineStart();
3263
+ }
3264
+ *parseLineStart() {
3265
+ let e = this.charAt(0);
3266
+ if (!e && !this.atEnd) return this.setNext("line-start");
3267
+ if (e === "-" || e === ".") {
3268
+ if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
3269
+ let e = this.peek(3);
3270
+ if ((e === "---" || e === "...") && Z(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
3271
+ }
3272
+ return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !Z(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3273
+ }
3274
+ *parseBlockStart() {
3275
+ let [e, t] = this.peek(2);
3276
+ if (!t && !this.atEnd) return this.setNext("block-start");
3277
+ if ((e === "-" || e === "?" || e === ":") && Z(t)) {
3278
+ let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3279
+ return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
3280
+ }
3281
+ return "doc";
3282
+ }
3283
+ *parseDocument() {
3284
+ yield* this.pushSpaces(!0);
3285
+ let e = this.getLine();
3286
+ if (e === null) return this.setNext("doc");
3287
+ let t = yield* this.pushIndicators();
3288
+ switch (e[t]) {
3289
+ case "#": yield* this.pushCount(e.length - t);
3290
+ case void 0: return yield* this.pushNewline(), yield* this.parseLineStart();
3291
+ case "{":
3292
+ case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3293
+ case "}":
3294
+ case "]": return yield* this.pushCount(1), "doc";
3295
+ case "*": return yield* this.pushUntil(Xn), "doc";
3296
+ case "\"":
3297
+ case "'": return yield* this.parseQuotedScalar();
3298
+ case "|":
3299
+ case ">": return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3300
+ default: return yield* this.parsePlainScalar();
3301
+ }
3302
+ }
3303
+ *parseFlowCollection() {
3304
+ let e, t, n = -1;
3305
+ do
3306
+ e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3307
+ while (e + t > 0);
3308
+ let r = this.getLine();
3309
+ if (r === null) return this.setNext("flow");
3310
+ if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && Z(r[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (r[0] === "]" || r[0] === "}"))) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
3311
+ let i = 0;
3312
+ for (; r[i] === ",";) i += yield* this.pushCount(1), i += yield* this.pushSpaces(!0), this.flowKey = !1;
3313
+ switch (i += yield* this.pushIndicators(), r[i]) {
3314
+ case void 0: return "flow";
3315
+ case "#": return yield* this.pushCount(r.length - i), "flow";
3316
+ case "{":
3317
+ case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3318
+ case "}":
3319
+ case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
3320
+ case "*": return yield* this.pushUntil(Xn), "flow";
3321
+ case "\"":
3322
+ case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
3323
+ case ":": {
3324
+ let e = this.charAt(1);
3325
+ if (this.flowKey || Z(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3326
+ }
3327
+ default: return this.flowKey = !1, yield* this.parsePlainScalar();
3328
+ }
3329
+ }
3330
+ *parseQuotedScalar() {
3331
+ let e = this.charAt(0), t = this.buffer.indexOf(e, this.pos + 1);
3332
+ if (e === "'") for (; t !== -1 && this.buffer[t + 1] === "'";) t = this.buffer.indexOf("'", t + 2);
3333
+ else for (; t !== -1;) {
3334
+ let e = 0;
3335
+ for (; this.buffer[t - 1 - e] === "\\";) e += 1;
3336
+ if (e % 2 == 0) break;
3337
+ t = this.buffer.indexOf("\"", t + 1);
3338
+ }
3339
+ let n = this.buffer.substring(0, t), r = n.indexOf("\n", this.pos);
3340
+ if (r !== -1) {
3341
+ for (; r !== -1;) {
3342
+ let e = this.continueScalar(r + 1);
3343
+ if (e === -1) break;
3344
+ r = n.indexOf("\n", e);
3345
+ }
3346
+ r !== -1 && (t = r - (n[r - 1] === "\r" ? 2 : 1));
3347
+ }
3348
+ if (t === -1) {
3349
+ if (!this.atEnd) return this.setNext("quoted-scalar");
3350
+ t = this.buffer.length;
3351
+ }
3352
+ return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3353
+ }
3354
+ *parseBlockScalarHeader() {
3355
+ this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3356
+ let e = this.pos;
3357
+ for (;;) {
3358
+ let t = this.buffer[++e];
3359
+ if (t === "+") this.blockScalarKeep = !0;
3360
+ else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
3361
+ else if (t !== "-") break;
3362
+ }
3363
+ return yield* this.pushUntil((e) => Z(e) || e === "#");
3364
+ }
3365
+ *parseBlockScalar() {
3366
+ let e = this.pos - 1, t = 0, n;
3367
+ loop: for (let r = this.pos; n = this.buffer[r]; ++r) switch (n) {
3368
+ case " ":
3369
+ t += 1;
3370
+ break;
3371
+ case "\n":
3372
+ e = r, t = 0;
3373
+ break;
3374
+ case "\r": {
3375
+ let e = this.buffer[r + 1];
3376
+ if (!e && !this.atEnd) return this.setNext("block-scalar");
3377
+ if (e === "\n") break;
3378
+ }
3379
+ default: break loop;
3380
+ }
3381
+ if (!n && !this.atEnd) return this.setNext("block-scalar");
3382
+ if (t >= this.indentNext) {
3383
+ this.blockScalarIndent === -1 ? this.indentNext = t : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3384
+ do {
3385
+ let t = this.continueScalar(e + 1);
3386
+ if (t === -1) break;
3387
+ e = this.buffer.indexOf("\n", t);
3388
+ } while (e !== -1);
3389
+ if (e === -1) {
3390
+ if (!this.atEnd) return this.setNext("block-scalar");
3391
+ e = this.buffer.length;
3392
+ }
3393
+ }
3394
+ let r = e + 1;
3395
+ for (n = this.buffer[r]; n === " ";) n = this.buffer[++r];
3396
+ if (n === " ") {
3397
+ for (; n === " " || n === " " || n === "\r" || n === "\n";) n = this.buffer[++r];
3398
+ e = r - 1;
3399
+ } else if (!this.blockScalarKeep) do {
3400
+ let n = e - 1, r = this.buffer[n];
3401
+ r === "\r" && (r = this.buffer[--n]);
3402
+ let i = n;
3403
+ for (; r === " ";) r = this.buffer[--n];
3404
+ if (r === "\n" && n >= this.pos && n + 1 + t > i) e = n;
3405
+ else break;
3406
+ } while (!0);
3407
+ return yield "", yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3408
+ }
3409
+ *parsePlainScalar() {
3410
+ let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
3411
+ for (; r = this.buffer[++n];) if (r === ":") {
3412
+ let r = this.buffer[n + 1];
3413
+ if (Z(r) || e && Jn.has(r)) break;
3414
+ t = n;
3415
+ } else if (Z(r)) {
3416
+ let i = this.buffer[n + 1];
3417
+ if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && Jn.has(i)) break;
3418
+ if (r === "\n") {
3419
+ let e = this.continueScalar(n + 1);
3420
+ if (e === -1) break;
3421
+ n = Math.max(n, e - 2);
3422
+ }
3423
+ } else {
3424
+ if (e && Jn.has(r)) break;
3425
+ t = n;
3426
+ }
3427
+ return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3428
+ }
3429
+ *pushCount(e) {
3430
+ return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
3431
+ }
3432
+ *pushToIndex(e, t) {
3433
+ let n = this.buffer.slice(this.pos, e);
3434
+ return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
3435
+ }
3436
+ *pushIndicators() {
3437
+ let e = 0;
3438
+ loop: for (;;) {
3439
+ switch (this.charAt(0)) {
3440
+ case "!":
3441
+ e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
3442
+ continue loop;
3443
+ case "&":
3444
+ e += yield* this.pushUntil(Xn), e += yield* this.pushSpaces(!0);
3445
+ continue loop;
3446
+ case "-":
3447
+ case "?":
3448
+ case ":": {
3449
+ let t = this.flowLevel > 0, n = this.charAt(1);
3450
+ if (Z(n) || t && Jn.has(n)) {
3451
+ t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
3452
+ continue loop;
3453
+ }
3454
+ }
3455
+ }
3456
+ break loop;
3457
+ }
3458
+ return e;
3459
+ }
3460
+ *pushTag() {
3461
+ if (this.charAt(1) === "<") {
3462
+ let e = this.pos + 2, t = this.buffer[e];
3463
+ for (; !Z(t) && t !== ">";) t = this.buffer[++e];
3464
+ return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
3465
+ } else {
3466
+ let e = this.pos + 1, t = this.buffer[e];
3467
+ for (; t;) if (qn.has(t)) t = this.buffer[++e];
3468
+ else if (t === "%" && Kn.has(this.buffer[e + 1]) && Kn.has(this.buffer[e + 2])) t = this.buffer[e += 3];
3469
+ else break;
3470
+ return yield* this.pushToIndex(e, !1);
3471
+ }
3472
+ }
3473
+ *pushNewline() {
3474
+ let e = this.buffer[this.pos];
3475
+ return e === "\n" ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === "\n" ? yield* this.pushCount(2) : 0;
3476
+ }
3477
+ *pushSpaces(e) {
3478
+ let t = this.pos - 1, n;
3479
+ do
3480
+ n = this.buffer[++t];
3481
+ while (n === " " || e && n === " ");
3482
+ let r = t - this.pos;
3483
+ return r > 0 && (yield this.buffer.substr(this.pos, r), this.pos = t), r;
3484
+ }
3485
+ *pushUntil(e) {
3486
+ let t = this.pos, n = this.buffer[t];
3487
+ for (; !e(n);) n = this.buffer[++t];
3488
+ return yield* this.pushToIndex(t, !1);
3489
+ }
3490
+ }, Qn = class {
3491
+ constructor() {
3492
+ this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
3493
+ let t = 0, n = this.lineStarts.length;
3494
+ for (; t < n;) {
3495
+ let r = t + n >> 1;
3496
+ this.lineStarts[r] < e ? t = r + 1 : n = r;
3497
+ }
3498
+ if (this.lineStarts[t] === e) return {
3499
+ line: t + 1,
3500
+ col: 1
3501
+ };
3502
+ if (t === 0) return {
3503
+ line: 0,
3504
+ col: e
3505
+ };
3506
+ let r = this.lineStarts[t - 1];
3507
+ return {
3508
+ line: t,
3509
+ col: e - r + 1
3510
+ };
3511
+ };
3512
+ }
3513
+ };
3514
+ //#endregion
3515
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/parser.js
3516
+ function Q(e, t) {
3517
+ for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
3518
+ return !1;
3519
+ }
3520
+ function $n(e) {
3521
+ for (let t = 0; t < e.length; ++t) switch (e[t].type) {
3522
+ case "space":
3523
+ case "comment":
3524
+ case "newline": break;
3525
+ default: return t;
3526
+ }
3527
+ return -1;
3528
+ }
3529
+ function er(e) {
3530
+ switch (e?.type) {
3531
+ case "alias":
3532
+ case "scalar":
3533
+ case "single-quoted-scalar":
3534
+ case "double-quoted-scalar":
3535
+ case "flow-collection": return !0;
3536
+ default: return !1;
3537
+ }
3538
+ }
3539
+ function tr(e) {
3540
+ switch (e.type) {
3541
+ case "document": return e.start;
3542
+ case "block-map": {
3543
+ let t = e.items[e.items.length - 1];
3544
+ return t.sep ?? t.start;
3545
+ }
3546
+ case "block-seq": return e.items[e.items.length - 1].start;
3547
+ /* istanbul ignore next should not happen */
3548
+ default: return [];
3549
+ }
3550
+ }
3551
+ function $(e) {
3552
+ if (e.length === 0) return [];
3553
+ let t = e.length;
3554
+ loop: for (; --t >= 0;) switch (e[t].type) {
3555
+ case "doc-start":
3556
+ case "explicit-key-ind":
3557
+ case "map-value-ind":
3558
+ case "seq-item-ind":
3559
+ case "newline": break loop;
3560
+ }
3561
+ for (; e[++t]?.type === "space";);
3562
+ return e.splice(t, e.length);
3563
+ }
3564
+ function nr(e, t) {
3565
+ if (t.length < 1e5) Array.prototype.push.apply(e, t);
3566
+ else for (let n = 0; n < t.length; ++n) e.push(t[n]);
3567
+ }
3568
+ function rr(e) {
3569
+ if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !Q(t.start, "explicit-key-ind") && !Q(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, er(t.value) ? t.value.end ? nr(t.value.end, t.sep) : t.value.end = t.sep : nr(t.start, t.sep), delete t.sep);
3570
+ }
3571
+ var ir = class {
3572
+ constructor(e) {
3573
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Zn(), this.onNewLine = e;
3574
+ }
3575
+ *parse(e, t = !1) {
3576
+ this.onNewLine && this.offset === 0 && this.onNewLine(0);
3577
+ for (let n of this.lexer.lex(e, t)) yield* this.next(n);
3578
+ t || (yield* this.end());
3579
+ }
3580
+ *next(e) {
3581
+ if (this.source = e, this.atScalar) {
3582
+ this.atScalar = !1, yield* this.step(), this.offset += e.length;
3583
+ return;
3584
+ }
3585
+ let t = Gn(e);
3586
+ if (!t) {
3587
+ let t = `Not a YAML token: ${e}`;
3588
+ yield* this.pop({
3589
+ type: "error",
3590
+ offset: this.offset,
3591
+ message: t,
3592
+ source: e
3593
+ }), this.offset += e.length;
3594
+ } else if (t === "scalar") this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
3595
+ else {
3596
+ switch (this.type = t, yield* this.step(), t) {
3597
+ case "newline":
3598
+ this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
3599
+ break;
3600
+ case "space":
3601
+ this.atNewLine && e[0] === " " && (this.indent += e.length);
3602
+ break;
3603
+ case "explicit-key-ind":
3604
+ case "map-value-ind":
3605
+ case "seq-item-ind":
3606
+ this.atNewLine && (this.indent += e.length);
3607
+ break;
3608
+ case "doc-mode":
3609
+ case "flow-error-end": return;
3610
+ default: this.atNewLine = !1;
3611
+ }
3612
+ this.offset += e.length;
3613
+ }
3614
+ }
3615
+ *end() {
3616
+ for (; this.stack.length > 0;) yield* this.pop();
3617
+ }
3618
+ get sourceToken() {
3619
+ return {
3620
+ type: this.type,
3621
+ offset: this.offset,
3622
+ indent: this.indent,
3623
+ source: this.source
3624
+ };
3625
+ }
3626
+ *step() {
3627
+ let e = this.peek(1);
3628
+ if (this.type === "doc-end" && e?.type !== "doc-end") {
3629
+ for (; this.stack.length > 0;) yield* this.pop();
3630
+ this.stack.push({
3631
+ type: "doc-end",
3632
+ offset: this.offset,
3633
+ source: this.source
3634
+ });
3635
+ return;
3636
+ }
3637
+ if (!e) return yield* this.stream();
3638
+ switch (e.type) {
3639
+ case "document": return yield* this.document(e);
3640
+ case "alias":
3641
+ case "scalar":
3642
+ case "single-quoted-scalar":
3643
+ case "double-quoted-scalar": return yield* this.scalar(e);
3644
+ case "block-scalar": return yield* this.blockScalar(e);
3645
+ case "block-map": return yield* this.blockMap(e);
3646
+ case "block-seq": return yield* this.blockSequence(e);
3647
+ case "flow-collection": return yield* this.flowCollection(e);
3648
+ case "doc-end": return yield* this.documentEnd(e);
3649
+ }
3650
+ /* istanbul ignore next should not happen */
3651
+ yield* this.pop();
3652
+ }
3653
+ peek(e) {
3654
+ return this.stack[this.stack.length - e];
3655
+ }
3656
+ *pop(e) {
3657
+ let t = e ?? this.stack.pop();
3658
+ /* istanbul ignore if should not happen */
3659
+ if (!t) yield {
3660
+ type: "error",
3661
+ offset: this.offset,
3662
+ source: "",
3663
+ message: "Tried to pop an empty stack"
3664
+ };
3665
+ else if (this.stack.length === 0) yield t;
3666
+ else {
3667
+ let e = this.peek(1);
3668
+ switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && rr(t), e.type) {
3669
+ case "document":
3670
+ e.value = t;
3671
+ break;
3672
+ case "block-scalar":
3673
+ e.props.push(t);
3674
+ break;
3675
+ case "block-map": {
3676
+ let n = e.items[e.items.length - 1];
3677
+ if (n.value) {
3678
+ e.items.push({
3679
+ start: [],
3680
+ key: t,
3681
+ sep: []
3682
+ }), this.onKeyLine = !0;
3683
+ return;
3684
+ } else if (n.sep) n.value = t;
3685
+ else {
3686
+ Object.assign(n, {
3687
+ key: t,
3688
+ sep: []
3689
+ }), this.onKeyLine = !n.explicitKey;
3690
+ return;
3691
+ }
3692
+ break;
3693
+ }
3694
+ case "block-seq": {
3695
+ let n = e.items[e.items.length - 1];
3696
+ n.value ? e.items.push({
3697
+ start: [],
3698
+ value: t
3699
+ }) : n.value = t;
3700
+ break;
3701
+ }
3702
+ case "flow-collection": {
3703
+ let n = e.items[e.items.length - 1];
3704
+ !n || n.value ? e.items.push({
3705
+ start: [],
3706
+ key: t,
3707
+ sep: []
3708
+ }) : n.sep ? n.value = t : Object.assign(n, {
3709
+ key: t,
3710
+ sep: []
3711
+ });
3712
+ return;
3713
+ }
3714
+ /* istanbul ignore next should not happen */
3715
+ default: yield* this.pop(), yield* this.pop(t);
3716
+ }
3717
+ if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
3718
+ let n = t.items[t.items.length - 1];
3719
+ n && !n.sep && !n.value && n.start.length > 0 && $n(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
3720
+ }
3721
+ }
3722
+ }
3723
+ *stream() {
3724
+ switch (this.type) {
3725
+ case "directive-line":
3726
+ yield {
3727
+ type: "directive",
3728
+ offset: this.offset,
3729
+ source: this.source
3730
+ };
3731
+ return;
3732
+ case "byte-order-mark":
3733
+ case "space":
3734
+ case "comment":
3735
+ case "newline":
3736
+ yield this.sourceToken;
3737
+ return;
3738
+ case "doc-mode":
3739
+ case "doc-start": {
3740
+ let e = {
3741
+ type: "document",
3742
+ offset: this.offset,
3743
+ start: []
3744
+ };
3745
+ this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
3746
+ return;
3747
+ }
3748
+ }
3749
+ yield {
3750
+ type: "error",
3751
+ offset: this.offset,
3752
+ message: `Unexpected ${this.type} token in YAML stream`,
3753
+ source: this.source
3754
+ };
3755
+ }
3756
+ *document(e) {
3757
+ if (e.value) return yield* this.lineEnd(e);
3758
+ switch (this.type) {
3759
+ case "doc-start":
3760
+ $n(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
3761
+ return;
3762
+ case "anchor":
3763
+ case "tag":
3764
+ case "space":
3765
+ case "comment":
3766
+ case "newline":
3767
+ e.start.push(this.sourceToken);
3768
+ return;
3769
+ }
3770
+ let t = this.startBlockValue(e);
3771
+ t ? this.stack.push(t) : yield {
3772
+ type: "error",
3773
+ offset: this.offset,
3774
+ message: `Unexpected ${this.type} token in YAML document`,
3775
+ source: this.source
3776
+ };
3777
+ }
3778
+ *scalar(e) {
3779
+ if (this.type === "map-value-ind") {
3780
+ let t = $(tr(this.peek(2))), n;
3781
+ e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
3782
+ let r = {
3783
+ type: "block-map",
3784
+ offset: e.offset,
3785
+ indent: e.indent,
3786
+ items: [{
3787
+ start: t,
3788
+ key: e,
3789
+ sep: n
3790
+ }]
3791
+ };
3792
+ this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
3793
+ } else yield* this.lineEnd(e);
3794
+ }
3795
+ *blockScalar(e) {
3796
+ switch (this.type) {
3797
+ case "space":
3798
+ case "comment":
3799
+ case "newline":
3800
+ e.props.push(this.sourceToken);
3801
+ return;
3802
+ case "scalar":
3803
+ if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
3804
+ let e = this.source.indexOf("\n") + 1;
3805
+ for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
3806
+ }
3807
+ yield* this.pop();
3808
+ break;
3809
+ /* istanbul ignore next should not happen */
3810
+ default: yield* this.pop(), yield* this.step();
3811
+ }
3812
+ }
3813
+ *blockMap(e) {
3814
+ let t = e.items[e.items.length - 1];
3815
+ switch (this.type) {
3816
+ case "newline":
3817
+ if (this.onKeyLine = !1, t.value) {
3818
+ let n = "end" in t.value ? t.value.end : void 0;
3819
+ (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
3820
+ } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
3821
+ return;
3822
+ case "space":
3823
+ case "comment":
3824
+ if (t.value) e.items.push({ start: [this.sourceToken] });
3825
+ else if (t.sep) t.sep.push(this.sourceToken);
3826
+ else {
3827
+ if (this.atIndentedComment(t.start, e.indent)) {
3828
+ let n = e.items[e.items.length - 2]?.value?.end;
3829
+ if (Array.isArray(n)) {
3830
+ nr(n, t.start), n.push(this.sourceToken), e.items.pop();
3831
+ return;
3832
+ }
3833
+ }
3834
+ t.start.push(this.sourceToken);
3835
+ }
3836
+ return;
3837
+ }
3838
+ if (this.indent >= e.indent) {
3839
+ let n = !this.onKeyLine && this.indent === e.indent, r = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind", i = [];
3840
+ if (r && t.sep && !t.value) {
3841
+ let n = [];
3842
+ for (let r = 0; r < t.sep.length; ++r) {
3843
+ let i = t.sep[r];
3844
+ switch (i.type) {
3845
+ case "newline":
3846
+ n.push(r);
3847
+ break;
3848
+ case "space": break;
3849
+ case "comment":
3850
+ i.indent > e.indent && (n.length = 0);
3851
+ break;
3852
+ default: n.length = 0;
3853
+ }
3854
+ }
3855
+ n.length >= 2 && (i = t.sep.splice(n[1]));
3856
+ }
3857
+ switch (this.type) {
3858
+ case "anchor":
3859
+ case "tag":
3860
+ r || t.value ? (i.push(this.sourceToken), e.items.push({ start: i }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
3861
+ return;
3862
+ case "explicit-key-ind":
3863
+ !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (i.push(this.sourceToken), e.items.push({
3864
+ start: i,
3865
+ explicitKey: !0
3866
+ })) : this.stack.push({
3867
+ type: "block-map",
3868
+ offset: this.offset,
3869
+ indent: this.indent,
3870
+ items: [{
3871
+ start: [this.sourceToken],
3872
+ explicitKey: !0
3873
+ }]
3874
+ }), this.onKeyLine = !0;
3875
+ return;
3876
+ case "map-value-ind":
3877
+ if (t.explicitKey) if (!t.sep) if (Q(t.start, "newline")) Object.assign(t, {
3878
+ key: null,
3879
+ sep: [this.sourceToken]
3880
+ });
3881
+ else {
3882
+ let e = $(t.start);
3883
+ this.stack.push({
3884
+ type: "block-map",
3885
+ offset: this.offset,
3886
+ indent: this.indent,
3887
+ items: [{
3888
+ start: e,
3889
+ key: null,
3890
+ sep: [this.sourceToken]
3891
+ }]
3892
+ });
3893
+ }
3894
+ else if (t.value) e.items.push({
3895
+ start: [],
3896
+ key: null,
3897
+ sep: [this.sourceToken]
3898
+ });
3899
+ else if (Q(t.sep, "map-value-ind")) this.stack.push({
3900
+ type: "block-map",
3901
+ offset: this.offset,
3902
+ indent: this.indent,
3903
+ items: [{
3904
+ start: i,
3905
+ key: null,
3906
+ sep: [this.sourceToken]
3907
+ }]
3908
+ });
3909
+ else if (er(t.key) && !Q(t.sep, "newline")) {
3910
+ let e = $(t.start), n = t.key, r = t.sep;
3911
+ r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
3912
+ type: "block-map",
3913
+ offset: this.offset,
3914
+ indent: this.indent,
3915
+ items: [{
3916
+ start: e,
3917
+ key: n,
3918
+ sep: r
3919
+ }]
3920
+ });
3921
+ } else i.length > 0 ? t.sep = t.sep.concat(i, this.sourceToken) : t.sep.push(this.sourceToken);
3922
+ else t.sep ? t.value || r ? e.items.push({
3923
+ start: i,
3924
+ key: null,
3925
+ sep: [this.sourceToken]
3926
+ }) : Q(t.sep, "map-value-ind") ? this.stack.push({
3927
+ type: "block-map",
3928
+ offset: this.offset,
3929
+ indent: this.indent,
3930
+ items: [{
3931
+ start: [],
3932
+ key: null,
3933
+ sep: [this.sourceToken]
3934
+ }]
3935
+ }) : t.sep.push(this.sourceToken) : Object.assign(t, {
3936
+ key: null,
3937
+ sep: [this.sourceToken]
3938
+ });
3939
+ this.onKeyLine = !0;
3940
+ return;
3941
+ case "alias":
3942
+ case "scalar":
3943
+ case "single-quoted-scalar":
3944
+ case "double-quoted-scalar": {
3945
+ let n = this.flowScalar(this.type);
3946
+ r || t.value ? (e.items.push({
3947
+ start: i,
3948
+ key: n,
3949
+ sep: []
3950
+ }), this.onKeyLine = !0) : t.sep ? this.stack.push(n) : (Object.assign(t, {
3951
+ key: n,
3952
+ sep: []
3953
+ }), this.onKeyLine = !0);
3954
+ return;
3955
+ }
3956
+ default: {
3957
+ let r = this.startBlockValue(e);
3958
+ if (r) {
3959
+ if (r.type === "block-seq") {
3960
+ if (!t.explicitKey && t.sep && !Q(t.sep, "newline")) {
3961
+ yield* this.pop({
3962
+ type: "error",
3963
+ offset: this.offset,
3964
+ message: "Unexpected block-seq-ind on same line with key",
3965
+ source: this.source
3966
+ });
3967
+ return;
3968
+ }
3969
+ } else n && e.items.push({ start: i });
3970
+ this.stack.push(r);
3971
+ return;
3972
+ }
3973
+ }
3974
+ }
3975
+ }
3976
+ yield* this.pop(), yield* this.step();
3977
+ }
3978
+ *blockSequence(e) {
3979
+ let t = e.items[e.items.length - 1];
3980
+ switch (this.type) {
3981
+ case "newline":
3982
+ if (t.value) {
3983
+ let n = "end" in t.value ? t.value.end : void 0;
3984
+ (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
3985
+ } else t.start.push(this.sourceToken);
3986
+ return;
3987
+ case "space":
3988
+ case "comment":
3989
+ if (t.value) e.items.push({ start: [this.sourceToken] });
3990
+ else {
3991
+ if (this.atIndentedComment(t.start, e.indent)) {
3992
+ let n = e.items[e.items.length - 2]?.value?.end;
3993
+ if (Array.isArray(n)) {
3994
+ nr(n, t.start), n.push(this.sourceToken), e.items.pop();
3995
+ return;
3996
+ }
3997
+ }
3998
+ t.start.push(this.sourceToken);
3999
+ }
4000
+ return;
4001
+ case "anchor":
4002
+ case "tag":
4003
+ if (t.value || this.indent <= e.indent) break;
4004
+ t.start.push(this.sourceToken);
4005
+ return;
4006
+ case "seq-item-ind":
4007
+ if (this.indent !== e.indent) break;
4008
+ t.value || Q(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4009
+ return;
4010
+ }
4011
+ if (this.indent > e.indent) {
4012
+ let t = this.startBlockValue(e);
4013
+ if (t) {
4014
+ this.stack.push(t);
4015
+ return;
4016
+ }
4017
+ }
4018
+ yield* this.pop(), yield* this.step();
4019
+ }
4020
+ *flowCollection(e) {
4021
+ let t = e.items[e.items.length - 1];
4022
+ if (this.type === "flow-error-end") {
4023
+ let e;
4024
+ do
4025
+ yield* this.pop(), e = this.peek(1);
4026
+ while (e?.type === "flow-collection");
4027
+ } else if (e.end.length === 0) {
4028
+ switch (this.type) {
4029
+ case "comma":
4030
+ case "explicit-key-ind":
4031
+ !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4032
+ return;
4033
+ case "map-value-ind":
4034
+ !t || t.value ? e.items.push({
4035
+ start: [],
4036
+ key: null,
4037
+ sep: [this.sourceToken]
4038
+ }) : t.sep ? t.sep.push(this.sourceToken) : Object.assign(t, {
4039
+ key: null,
4040
+ sep: [this.sourceToken]
4041
+ });
4042
+ return;
4043
+ case "space":
4044
+ case "comment":
4045
+ case "newline":
4046
+ case "anchor":
4047
+ case "tag":
4048
+ !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4049
+ return;
4050
+ case "alias":
4051
+ case "scalar":
4052
+ case "single-quoted-scalar":
4053
+ case "double-quoted-scalar": {
4054
+ let n = this.flowScalar(this.type);
4055
+ !t || t.value ? e.items.push({
4056
+ start: [],
4057
+ key: n,
4058
+ sep: []
4059
+ }) : t.sep ? this.stack.push(n) : Object.assign(t, {
4060
+ key: n,
4061
+ sep: []
4062
+ });
4063
+ return;
4064
+ }
4065
+ case "flow-map-end":
4066
+ case "flow-seq-end":
4067
+ e.end.push(this.sourceToken);
4068
+ return;
4069
+ }
4070
+ let n = this.startBlockValue(e);
4071
+ /* istanbul ignore else should not happen */
4072
+ n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
4073
+ } else {
4074
+ let t = this.peek(2);
4075
+ if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
4076
+ else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
4077
+ let n = $(tr(t));
4078
+ rr(e);
4079
+ let r = e.end.splice(1, e.end.length);
4080
+ r.push(this.sourceToken);
4081
+ let i = {
4082
+ type: "block-map",
4083
+ offset: e.offset,
4084
+ indent: e.indent,
4085
+ items: [{
4086
+ start: n,
4087
+ key: e,
4088
+ sep: r
4089
+ }]
4090
+ };
4091
+ this.onKeyLine = !0, this.stack[this.stack.length - 1] = i;
4092
+ } else yield* this.lineEnd(e);
4093
+ }
4094
+ }
4095
+ flowScalar(e) {
4096
+ if (this.onNewLine) {
4097
+ let e = this.source.indexOf("\n") + 1;
4098
+ for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
4099
+ }
4100
+ return {
4101
+ type: e,
4102
+ offset: this.offset,
4103
+ indent: this.indent,
4104
+ source: this.source
4105
+ };
4106
+ }
4107
+ startBlockValue(e) {
4108
+ switch (this.type) {
4109
+ case "alias":
4110
+ case "scalar":
4111
+ case "single-quoted-scalar":
4112
+ case "double-quoted-scalar": return this.flowScalar(this.type);
4113
+ case "block-scalar-header": return {
4114
+ type: "block-scalar",
4115
+ offset: this.offset,
4116
+ indent: this.indent,
4117
+ props: [this.sourceToken],
4118
+ source: ""
4119
+ };
4120
+ case "flow-map-start":
4121
+ case "flow-seq-start": return {
4122
+ type: "flow-collection",
4123
+ offset: this.offset,
4124
+ indent: this.indent,
4125
+ start: this.sourceToken,
4126
+ items: [],
4127
+ end: []
4128
+ };
4129
+ case "seq-item-ind": return {
4130
+ type: "block-seq",
4131
+ offset: this.offset,
4132
+ indent: this.indent,
4133
+ items: [{ start: [this.sourceToken] }]
4134
+ };
4135
+ case "explicit-key-ind": {
4136
+ this.onKeyLine = !0;
4137
+ let t = $(tr(e));
4138
+ return t.push(this.sourceToken), {
4139
+ type: "block-map",
4140
+ offset: this.offset,
4141
+ indent: this.indent,
4142
+ items: [{
4143
+ start: t,
4144
+ explicitKey: !0
4145
+ }]
4146
+ };
4147
+ }
4148
+ case "map-value-ind": {
4149
+ this.onKeyLine = !0;
4150
+ let t = $(tr(e));
4151
+ return {
4152
+ type: "block-map",
4153
+ offset: this.offset,
4154
+ indent: this.indent,
4155
+ items: [{
4156
+ start: t,
4157
+ key: null,
4158
+ sep: [this.sourceToken]
4159
+ }]
4160
+ };
4161
+ }
4162
+ }
4163
+ return null;
4164
+ }
4165
+ atIndentedComment(e, t) {
4166
+ return this.type !== "comment" || this.indent <= t ? !1 : e.every((e) => e.type === "newline" || e.type === "space");
4167
+ }
4168
+ *documentEnd(e) {
4169
+ this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
4170
+ }
4171
+ *lineEnd(e) {
4172
+ switch (this.type) {
4173
+ case "comma":
4174
+ case "doc-start":
4175
+ case "doc-end":
4176
+ case "flow-seq-end":
4177
+ case "flow-map-end":
4178
+ case "map-value-ind":
4179
+ yield* this.pop(), yield* this.step();
4180
+ break;
4181
+ case "newline": this.onKeyLine = !1;
4182
+ default: e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
4183
+ }
4184
+ }
4185
+ };
4186
+ //#endregion
4187
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js
4188
+ function ar(e) {
4189
+ let t = e.prettyErrors !== !1;
4190
+ return {
4191
+ lineCounter: e.lineCounter || t && new Qn() || null,
4192
+ prettyErrors: t
4193
+ };
4194
+ }
4195
+ function or(e, t = {}) {
4196
+ let { lineCounter: n, prettyErrors: r } = ar(t), i = new ir(n?.addNewLine), a = new Dn(t), o = Array.from(a.compose(i.parse(e)));
4197
+ if (r && n) for (let t of o) t.errors.forEach(Gt(e, n)), t.warnings.forEach(Gt(e, n));
4198
+ return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
4199
+ }
4200
+ function sr(e, t = {}) {
4201
+ let { lineCounter: n, prettyErrors: r } = ar(t), i = new ir(n?.addNewLine), a = new Dn(t), o = null;
4202
+ for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
4203
+ else if (o.options.logLevel !== "silent") {
4204
+ o.errors.push(new J(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4205
+ break;
4206
+ }
4207
+ return r && n && (o.errors.forEach(Gt(e, n)), o.warnings.forEach(Gt(e, n))), o;
4208
+ }
4209
+ function cr(e, t, n) {
4210
+ let r;
4211
+ typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
4212
+ let i = sr(e, n);
4213
+ if (!i) return null;
4214
+ if (i.warnings.forEach((e) => Me(i.options.logLevel, e)), i.errors.length > 0) {
4215
+ if (i.options.logLevel !== "silent") throw i.errors[0];
4216
+ i.errors = [];
4217
+ }
4218
+ return i.toJS(Object.assign({ reviver: r }, n));
4219
+ }
4220
+ function lr(e, t, n) {
4221
+ let r = null;
4222
+ if (typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t), typeof n == "string" && (n = n.length), typeof n == "number") {
4223
+ let e = Math.round(n);
4224
+ n = e < 1 ? void 0 : e > 8 ? { indent: 8 } : { indent: e };
4225
+ }
4226
+ if (e === void 0) {
4227
+ let { keepUndefined: e } = n ?? t ?? {};
4228
+ if (!e) return;
4229
+ }
4230
+ return l(e) && !r ? e.toString(n) : new Ht(e, r, n).toString(n);
4231
+ }
4232
+ //#endregion
4233
+ //#region node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/index.js
4234
+ var ur = /* @__PURE__ */ e({
4235
+ Alias: () => k,
4236
+ CST: () => Vn,
4237
+ Composer: () => Dn,
4238
+ Document: () => Ht,
4239
+ Lexer: () => Zn,
4240
+ LineCounter: () => Qn,
4241
+ Pair: () => z,
4242
+ Parser: () => ir,
4243
+ Scalar: () => A,
4244
+ Schema: () => Bt,
4245
+ YAMLError: () => Ut,
4246
+ YAMLMap: () => V,
4247
+ YAMLParseError: () => J,
4248
+ YAMLSeq: () => U,
4249
+ YAMLWarning: () => Wt,
4250
+ isAlias: () => c,
4251
+ isCollection: () => m,
4252
+ isDocument: () => l,
4253
+ isMap: () => u,
4254
+ isNode: () => h,
4255
+ isPair: () => d,
4256
+ isScalar: () => f,
4257
+ isSeq: () => p,
4258
+ parse: () => cr,
4259
+ parseAllDocuments: () => or,
4260
+ parseDocument: () => sr,
4261
+ stringify: () => lr,
4262
+ visit: () => b,
4263
+ visitAsync: () => S
4264
+ }), dr = /* @__PURE__ */ e({
4265
+ Alias: () => k,
4266
+ CST: () => Vn,
4267
+ Composer: () => Dn,
4268
+ Document: () => Ht,
4269
+ Lexer: () => Zn,
4270
+ LineCounter: () => Qn,
4271
+ Pair: () => z,
4272
+ Parser: () => ir,
4273
+ Scalar: () => A,
4274
+ Schema: () => Bt,
4275
+ YAMLError: () => Ut,
4276
+ YAMLMap: () => V,
4277
+ YAMLParseError: () => J,
4278
+ YAMLSeq: () => U,
4279
+ YAMLWarning: () => Wt,
4280
+ default: () => fr,
4281
+ isAlias: () => c,
4282
+ isCollection: () => m,
4283
+ isDocument: () => l,
4284
+ isMap: () => u,
4285
+ isNode: () => h,
4286
+ isPair: () => d,
4287
+ isScalar: () => f,
4288
+ isSeq: () => p,
4289
+ parse: () => cr,
4290
+ parseAllDocuments: () => or,
4291
+ parseDocument: () => sr,
4292
+ stringify: () => lr,
4293
+ visit: () => b,
4294
+ visitAsync: () => S
4295
+ }), fr = ur;
4296
+ //#endregion
4297
+ export { dr as t };