@kubb/oas 4.5.0 → 4.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,4302 @@
1
+ import { createRequire } from "node:module";
1
2
  import { findSchemaDefinition, matchesMimeType, matchesMimeType as matchesMimeType$1 } from "oas/utils";
2
3
  import jsonpointer from "jsonpointer";
3
4
  import BaseOas from "oas";
4
5
  import OASNormalize from "oas-normalize";
5
- import { isRef } from "oas/types";
6
+ import path from "node:path";
6
7
  import { isPlainObject, mergeDeep } from "remeda";
8
+ import { isRef } from "oas/types";
7
9
  import swagger2openapi from "swagger2openapi";
8
10
 
11
+ //#region rolldown:runtime
12
+ var __create = Object.create;
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __getOwnPropNames = Object.getOwnPropertyNames;
16
+ var __getProtoOf = Object.getPrototypeOf;
17
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
+ var __esm = (fn, res) => function() {
19
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
20
+ };
21
+ var __commonJS = (cb, mod) => function() {
22
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
23
+ };
24
+ var __export$1 = (all) => {
25
+ let target = {};
26
+ for (var name in all) __defProp(target, name, {
27
+ get: all[name],
28
+ enumerable: true
29
+ });
30
+ return target;
31
+ };
32
+ var __copyProps = (to, from, except, desc) => {
33
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n = keys.length, key; i$1 < n; i$1++) {
34
+ key = keys[i$1];
35
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
36
+ get: ((k) => from[k]).bind(null, key),
37
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
38
+ });
39
+ }
40
+ return to;
41
+ };
42
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
43
+ value: mod,
44
+ enumerable: true
45
+ }) : target, mod));
46
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
47
+ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
48
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
49
+
50
+ //#endregion
51
+ //#region ../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js
52
+ const UPPERCASE = /[\p{Lu}]/u;
53
+ const LOWERCASE = /[\p{Ll}]/u;
54
+ const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
55
+ const IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
56
+ const SEPARATORS = /[_.\- ]+/;
57
+ const LEADING_SEPARATORS = /* @__PURE__ */ new RegExp("^" + SEPARATORS.source);
58
+ const SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
59
+ const NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
60
+ const preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase$1) => {
61
+ let isLastCharLower = false;
62
+ let isLastCharUpper = false;
63
+ let isLastLastCharUpper = false;
64
+ let isLastLastCharPreserved = false;
65
+ for (let index = 0; index < string.length; index++) {
66
+ const character = string[index];
67
+ isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
68
+ if (isLastCharLower && UPPERCASE.test(character)) {
69
+ string = string.slice(0, index) + "-" + string.slice(index);
70
+ isLastCharLower = false;
71
+ isLastLastCharUpper = isLastCharUpper;
72
+ isLastCharUpper = true;
73
+ index++;
74
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase$1)) {
75
+ string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
76
+ isLastLastCharUpper = isLastCharUpper;
77
+ isLastCharUpper = false;
78
+ isLastCharLower = true;
79
+ } else {
80
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
81
+ isLastLastCharUpper = isLastCharUpper;
82
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
83
+ }
84
+ }
85
+ return string;
86
+ };
87
+ const preserveConsecutiveUppercase = (input, toLowerCase) => {
88
+ LEADING_CAPITAL.lastIndex = 0;
89
+ return input.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
90
+ };
91
+ const postProcess = (input, toUpperCase) => {
92
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
93
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
94
+ return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));
95
+ };
96
+ function camelCase$1(input, options) {
97
+ if (!(typeof input === "string" || Array.isArray(input))) throw new TypeError("Expected the input to be `string | string[]`");
98
+ options = {
99
+ pascalCase: false,
100
+ preserveConsecutiveUppercase: false,
101
+ ...options
102
+ };
103
+ if (Array.isArray(input)) input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
104
+ else input = input.trim();
105
+ if (input.length === 0) return "";
106
+ const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
107
+ const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
108
+ if (input.length === 1) {
109
+ if (SEPARATORS.test(input)) return "";
110
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
111
+ }
112
+ if (input !== toLowerCase(input)) input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
113
+ input = input.replace(LEADING_SEPARATORS, "");
114
+ input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
115
+ if (options.pascalCase) input = toUpperCase(input.charAt(0)) + input.slice(1);
116
+ return postProcess(input, toUpperCase);
117
+ }
118
+
119
+ //#endregion
120
+ //#region ../core/src/transformers/casing.ts
121
+ function camelCase(text, { isFile, prefix = "", suffix = "" } = {}) {
122
+ if (isFile) {
123
+ const splitArray = text.split(".");
124
+ return splitArray.map((item, i$1) => i$1 === splitArray.length - 1 ? camelCase(item, {
125
+ prefix,
126
+ suffix
127
+ }) : camelCase(item)).join("/");
128
+ }
129
+ return camelCase$1(`${prefix} ${text} ${suffix}`, {
130
+ pascalCase: false,
131
+ preserveConsecutiveUppercase: true
132
+ }).replace(/[^a-zA-Z0-9]/g, "");
133
+ }
134
+
135
+ //#endregion
136
+ //#region ../core/src/transformers/transformReservedWord.ts
137
+ function isValidVarName(name) {
138
+ try {
139
+ Function(`var ${name}`);
140
+ } catch (_e) {
141
+ return false;
142
+ }
143
+ return true;
144
+ }
145
+
146
+ //#endregion
147
+ //#region ../core/src/utils/URLPath.ts
148
+ var URLPath = class {
149
+ path;
150
+ #options;
151
+ constructor(path$1, options = {}) {
152
+ this.path = path$1;
153
+ this.#options = options;
154
+ return this;
155
+ }
156
+ /**
157
+ * Convert Swagger path to URLPath(syntax of Express)
158
+ * @example /pet/{petId} => /pet/:petId
159
+ */
160
+ get URL() {
161
+ return this.toURLPath();
162
+ }
163
+ get isURL() {
164
+ try {
165
+ if (new URL(this.path)?.href) return true;
166
+ } catch (_error) {
167
+ return false;
168
+ }
169
+ return false;
170
+ }
171
+ /**
172
+ * Convert Swagger path to template literals/ template strings(camelcase)
173
+ * @example /pet/{petId} => `/pet/${petId}`
174
+ * @example /account/monetary-accountID => `/account/${monetaryAccountId}`
175
+ * @example /account/userID => `/account/${userId}`
176
+ */
177
+ get template() {
178
+ return this.toTemplateString();
179
+ }
180
+ get object() {
181
+ return this.toObject();
182
+ }
183
+ get params() {
184
+ return this.getParams();
185
+ }
186
+ toObject({ type = "path", replacer, stringify } = {}) {
187
+ const object = {
188
+ url: type === "path" ? this.toURLPath() : this.toTemplateString({ replacer }),
189
+ params: this.getParams()
190
+ };
191
+ if (stringify) {
192
+ if (type === "template") return JSON.stringify(object).replaceAll("'", "").replaceAll(`"`, "");
193
+ if (object.params) return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll("'", "").replaceAll(`"`, "")} }`;
194
+ return `{ url: '${object.url}' }`;
195
+ }
196
+ return object;
197
+ }
198
+ /**
199
+ * Convert Swagger path to template literals/ template strings(camelcase)
200
+ * @example /pet/{petId} => `/pet/${petId}`
201
+ * @example /account/monetary-accountID => `/account/${monetaryAccountId}`
202
+ * @example /account/userID => `/account/${userId}`
203
+ */
204
+ toTemplateString({ prefix = "", replacer } = {}) {
205
+ const found = this.path.match(/{(\w|-)*}/g);
206
+ let newPath = this.path.replaceAll("{", "${");
207
+ if (found) newPath = found.reduce((prev, path$1) => {
208
+ const pathWithoutBrackets = path$1.replaceAll("{", "").replaceAll("}", "");
209
+ let param = isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : camelCase(pathWithoutBrackets);
210
+ if (this.#options.casing === "camelcase") param = camelCase(param);
211
+ return prev.replace(path$1, `\${${replacer ? replacer(param) : param}}`);
212
+ }, this.path);
213
+ return `\`${prefix}${newPath}\``;
214
+ }
215
+ getParams(replacer) {
216
+ const found = this.path.match(/{(\w|-)*}/g);
217
+ if (!found) return;
218
+ const params = {};
219
+ found.forEach((item) => {
220
+ item = item.replaceAll("{", "").replaceAll("}", "");
221
+ let param = isValidVarName(item) ? item : camelCase(item);
222
+ if (this.#options.casing === "camelcase") param = camelCase(param);
223
+ const key = replacer ? replacer(param) : param;
224
+ params[key] = key;
225
+ }, this.path);
226
+ return params;
227
+ }
228
+ /**
229
+ * Convert Swagger path to URLPath(syntax of Express)
230
+ * @example /pet/{petId} => /pet/:petId
231
+ */
232
+ toURLPath() {
233
+ return this.path.replaceAll("{", ":").replaceAll("}", "");
234
+ }
235
+ };
236
+
237
+ //#endregion
238
+ //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
239
+ var tslib_es6_exports = /* @__PURE__ */ __export$1({
240
+ __addDisposableResource: () => __addDisposableResource,
241
+ __assign: () => __assign,
242
+ __asyncDelegator: () => __asyncDelegator,
243
+ __asyncGenerator: () => __asyncGenerator,
244
+ __asyncValues: () => __asyncValues,
245
+ __await: () => __await,
246
+ __awaiter: () => __awaiter,
247
+ __classPrivateFieldGet: () => __classPrivateFieldGet,
248
+ __classPrivateFieldIn: () => __classPrivateFieldIn,
249
+ __classPrivateFieldSet: () => __classPrivateFieldSet,
250
+ __createBinding: () => __createBinding,
251
+ __decorate: () => __decorate,
252
+ __disposeResources: () => __disposeResources,
253
+ __esDecorate: () => __esDecorate,
254
+ __exportStar: () => __exportStar,
255
+ __extends: () => __extends,
256
+ __generator: () => __generator,
257
+ __importDefault: () => __importDefault,
258
+ __importStar: () => __importStar,
259
+ __makeTemplateObject: () => __makeTemplateObject,
260
+ __metadata: () => __metadata,
261
+ __param: () => __param,
262
+ __propKey: () => __propKey,
263
+ __read: () => __read,
264
+ __rest: () => __rest,
265
+ __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
266
+ __runInitializers: () => __runInitializers,
267
+ __setFunctionName: () => __setFunctionName,
268
+ __spread: () => __spread,
269
+ __spreadArray: () => __spreadArray,
270
+ __spreadArrays: () => __spreadArrays,
271
+ __values: () => __values,
272
+ default: () => tslib_es6_default
273
+ });
274
+ function __extends(d, b) {
275
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
276
+ extendStatics(d, b);
277
+ function __() {
278
+ this.constructor = d;
279
+ }
280
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
281
+ }
282
+ function __rest(s, e) {
283
+ var t = {};
284
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
285
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") {
286
+ for (var i$1 = 0, p = Object.getOwnPropertySymbols(s); i$1 < p.length; i$1++) if (e.indexOf(p[i$1]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i$1])) t[p[i$1]] = s[p[i$1]];
287
+ }
288
+ return t;
289
+ }
290
+ function __decorate(decorators, target, key, desc) {
291
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
292
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
293
+ else for (var i$1 = decorators.length - 1; i$1 >= 0; i$1--) if (d = decorators[i$1]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
294
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
295
+ }
296
+ function __param(paramIndex, decorator) {
297
+ return function(target, key) {
298
+ decorator(target, key, paramIndex);
299
+ };
300
+ }
301
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
302
+ function accept(f) {
303
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
304
+ return f;
305
+ }
306
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
307
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
308
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
309
+ var _, done = false;
310
+ for (var i$1 = decorators.length - 1; i$1 >= 0; i$1--) {
311
+ var context = {};
312
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
313
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
314
+ context.addInitializer = function(f) {
315
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
316
+ extraInitializers.push(accept(f || null));
317
+ };
318
+ var result = (0, decorators[i$1])(kind === "accessor" ? {
319
+ get: descriptor.get,
320
+ set: descriptor.set
321
+ } : descriptor[key], context);
322
+ if (kind === "accessor") {
323
+ if (result === void 0) continue;
324
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
325
+ if (_ = accept(result.get)) descriptor.get = _;
326
+ if (_ = accept(result.set)) descriptor.set = _;
327
+ if (_ = accept(result.init)) initializers.unshift(_);
328
+ } else if (_ = accept(result)) if (kind === "field") initializers.unshift(_);
329
+ else descriptor[key] = _;
330
+ }
331
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
332
+ done = true;
333
+ }
334
+ function __runInitializers(thisArg, initializers, value) {
335
+ var useValue = arguments.length > 2;
336
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) value = useValue ? initializers[i$1].call(thisArg, value) : initializers[i$1].call(thisArg);
337
+ return useValue ? value : void 0;
338
+ }
339
+ function __propKey(x) {
340
+ return typeof x === "symbol" ? x : "".concat(x);
341
+ }
342
+ function __setFunctionName(f, name, prefix) {
343
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
344
+ return Object.defineProperty(f, "name", {
345
+ configurable: true,
346
+ value: prefix ? "".concat(prefix, " ", name) : name
347
+ });
348
+ }
349
+ function __metadata(metadataKey, metadataValue) {
350
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
351
+ }
352
+ function __awaiter(thisArg, _arguments, P, generator) {
353
+ function adopt(value) {
354
+ return value instanceof P ? value : new P(function(resolve) {
355
+ resolve(value);
356
+ });
357
+ }
358
+ return new (P || (P = Promise))(function(resolve, reject) {
359
+ function fulfilled(value) {
360
+ try {
361
+ step(generator.next(value));
362
+ } catch (e) {
363
+ reject(e);
364
+ }
365
+ }
366
+ function rejected(value) {
367
+ try {
368
+ step(generator["throw"](value));
369
+ } catch (e) {
370
+ reject(e);
371
+ }
372
+ }
373
+ function step(result) {
374
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
375
+ }
376
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
377
+ });
378
+ }
379
+ function __generator(thisArg, body) {
380
+ var _ = {
381
+ label: 0,
382
+ sent: function() {
383
+ if (t[0] & 1) throw t[1];
384
+ return t[1];
385
+ },
386
+ trys: [],
387
+ ops: []
388
+ }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
389
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
390
+ return this;
391
+ }), g;
392
+ function verb(n) {
393
+ return function(v) {
394
+ return step([n, v]);
395
+ };
396
+ }
397
+ function step(op) {
398
+ if (f) throw new TypeError("Generator is already executing.");
399
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
400
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
401
+ if (y = 0, t) op = [op[0] & 2, t.value];
402
+ switch (op[0]) {
403
+ case 0:
404
+ case 1:
405
+ t = op;
406
+ break;
407
+ case 4:
408
+ _.label++;
409
+ return {
410
+ value: op[1],
411
+ done: false
412
+ };
413
+ case 5:
414
+ _.label++;
415
+ y = op[1];
416
+ op = [0];
417
+ continue;
418
+ case 7:
419
+ op = _.ops.pop();
420
+ _.trys.pop();
421
+ continue;
422
+ default:
423
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
424
+ _ = 0;
425
+ continue;
426
+ }
427
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
428
+ _.label = op[1];
429
+ break;
430
+ }
431
+ if (op[0] === 6 && _.label < t[1]) {
432
+ _.label = t[1];
433
+ t = op;
434
+ break;
435
+ }
436
+ if (t && _.label < t[2]) {
437
+ _.label = t[2];
438
+ _.ops.push(op);
439
+ break;
440
+ }
441
+ if (t[2]) _.ops.pop();
442
+ _.trys.pop();
443
+ continue;
444
+ }
445
+ op = body.call(thisArg, _);
446
+ } catch (e) {
447
+ op = [6, e];
448
+ y = 0;
449
+ } finally {
450
+ f = t = 0;
451
+ }
452
+ if (op[0] & 5) throw op[1];
453
+ return {
454
+ value: op[0] ? op[1] : void 0,
455
+ done: true
456
+ };
457
+ }
458
+ }
459
+ function __exportStar(m, o) {
460
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
461
+ }
462
+ function __values(o) {
463
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i$1 = 0;
464
+ if (m) return m.call(o);
465
+ if (o && typeof o.length === "number") return { next: function() {
466
+ if (o && i$1 >= o.length) o = void 0;
467
+ return {
468
+ value: o && o[i$1++],
469
+ done: !o
470
+ };
471
+ } };
472
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
473
+ }
474
+ function __read(o, n) {
475
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
476
+ if (!m) return o;
477
+ var i$1 = m.call(o), r, ar = [], e;
478
+ try {
479
+ while ((n === void 0 || n-- > 0) && !(r = i$1.next()).done) ar.push(r.value);
480
+ } catch (error) {
481
+ e = { error };
482
+ } finally {
483
+ try {
484
+ if (r && !r.done && (m = i$1["return"])) m.call(i$1);
485
+ } finally {
486
+ if (e) throw e.error;
487
+ }
488
+ }
489
+ return ar;
490
+ }
491
+ /** @deprecated */
492
+ function __spread() {
493
+ for (var ar = [], i$1 = 0; i$1 < arguments.length; i$1++) ar = ar.concat(__read(arguments[i$1]));
494
+ return ar;
495
+ }
496
+ /** @deprecated */
497
+ function __spreadArrays() {
498
+ for (var s = 0, i$1 = 0, il = arguments.length; i$1 < il; i$1++) s += arguments[i$1].length;
499
+ for (var r = Array(s), k = 0, i$1 = 0; i$1 < il; i$1++) for (var a = arguments[i$1], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
500
+ return r;
501
+ }
502
+ function __spreadArray(to, from, pack) {
503
+ if (pack || arguments.length === 2) {
504
+ for (var i$1 = 0, l = from.length, ar; i$1 < l; i$1++) if (ar || !(i$1 in from)) {
505
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i$1);
506
+ ar[i$1] = from[i$1];
507
+ }
508
+ }
509
+ return to.concat(ar || Array.prototype.slice.call(from));
510
+ }
511
+ function __await(v) {
512
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
513
+ }
514
+ function __asyncGenerator(thisArg, _arguments, generator) {
515
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
516
+ var g = generator.apply(thisArg, _arguments || []), i$1, q = [];
517
+ return i$1 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i$1[Symbol.asyncIterator] = function() {
518
+ return this;
519
+ }, i$1;
520
+ function awaitReturn(f) {
521
+ return function(v) {
522
+ return Promise.resolve(v).then(f, reject);
523
+ };
524
+ }
525
+ function verb(n, f) {
526
+ if (g[n]) {
527
+ i$1[n] = function(v) {
528
+ return new Promise(function(a, b) {
529
+ q.push([
530
+ n,
531
+ v,
532
+ a,
533
+ b
534
+ ]) > 1 || resume(n, v);
535
+ });
536
+ };
537
+ if (f) i$1[n] = f(i$1[n]);
538
+ }
539
+ }
540
+ function resume(n, v) {
541
+ try {
542
+ step(g[n](v));
543
+ } catch (e) {
544
+ settle(q[0][3], e);
545
+ }
546
+ }
547
+ function step(r) {
548
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
549
+ }
550
+ function fulfill(value) {
551
+ resume("next", value);
552
+ }
553
+ function reject(value) {
554
+ resume("throw", value);
555
+ }
556
+ function settle(f, v) {
557
+ if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
558
+ }
559
+ }
560
+ function __asyncDelegator(o) {
561
+ var i$1, p;
562
+ return i$1 = {}, verb("next"), verb("throw", function(e) {
563
+ throw e;
564
+ }), verb("return"), i$1[Symbol.iterator] = function() {
565
+ return this;
566
+ }, i$1;
567
+ function verb(n, f) {
568
+ i$1[n] = o[n] ? function(v) {
569
+ return (p = !p) ? {
570
+ value: __await(o[n](v)),
571
+ done: false
572
+ } : f ? f(v) : v;
573
+ } : f;
574
+ }
575
+ }
576
+ function __asyncValues(o) {
577
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
578
+ var m = o[Symbol.asyncIterator], i$1;
579
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i$1 = {}, verb("next"), verb("throw"), verb("return"), i$1[Symbol.asyncIterator] = function() {
580
+ return this;
581
+ }, i$1);
582
+ function verb(n) {
583
+ i$1[n] = o[n] && function(v) {
584
+ return new Promise(function(resolve, reject) {
585
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
586
+ });
587
+ };
588
+ }
589
+ function settle(resolve, reject, d, v) {
590
+ Promise.resolve(v).then(function(v$1) {
591
+ resolve({
592
+ value: v$1,
593
+ done: d
594
+ });
595
+ }, reject);
596
+ }
597
+ }
598
+ function __makeTemplateObject(cooked, raw) {
599
+ if (Object.defineProperty) Object.defineProperty(cooked, "raw", { value: raw });
600
+ else cooked.raw = raw;
601
+ return cooked;
602
+ }
603
+ function __importStar(mod) {
604
+ if (mod && mod.__esModule) return mod;
605
+ var result = {};
606
+ if (mod != null) {
607
+ for (var k = ownKeys(mod), i$1 = 0; i$1 < k.length; i$1++) if (k[i$1] !== "default") __createBinding(result, mod, k[i$1]);
608
+ }
609
+ __setModuleDefault(result, mod);
610
+ return result;
611
+ }
612
+ function __importDefault(mod) {
613
+ return mod && mod.__esModule ? mod : { default: mod };
614
+ }
615
+ function __classPrivateFieldGet(receiver, state, kind, f) {
616
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
617
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
618
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
619
+ }
620
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
621
+ if (kind === "m") throw new TypeError("Private method is not writable");
622
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
623
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
624
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
625
+ }
626
+ function __classPrivateFieldIn(state, receiver) {
627
+ if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
628
+ return typeof state === "function" ? receiver === state : state.has(receiver);
629
+ }
630
+ function __addDisposableResource(env, value, async) {
631
+ if (value !== null && value !== void 0) {
632
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
633
+ var dispose, inner;
634
+ if (async) {
635
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
636
+ dispose = value[Symbol.asyncDispose];
637
+ }
638
+ if (dispose === void 0) {
639
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
640
+ dispose = value[Symbol.dispose];
641
+ if (async) inner = dispose;
642
+ }
643
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
644
+ if (inner) dispose = function() {
645
+ try {
646
+ inner.call(this);
647
+ } catch (e) {
648
+ return Promise.reject(e);
649
+ }
650
+ };
651
+ env.stack.push({
652
+ value,
653
+ dispose,
654
+ async
655
+ });
656
+ } else if (async) env.stack.push({ async: true });
657
+ return value;
658
+ }
659
+ function __disposeResources(env) {
660
+ function fail(e) {
661
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
662
+ env.hasError = true;
663
+ }
664
+ var r, s = 0;
665
+ function next() {
666
+ while (r = env.stack.pop()) try {
667
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
668
+ if (r.dispose) {
669
+ var result = r.dispose.call(r.value);
670
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
671
+ fail(e);
672
+ return next();
673
+ });
674
+ } else s |= 1;
675
+ } catch (e) {
676
+ fail(e);
677
+ }
678
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
679
+ if (env.hasError) throw env.error;
680
+ }
681
+ return next();
682
+ }
683
+ function __rewriteRelativeImportExtension(path$1, preserveJsx) {
684
+ if (typeof path$1 === "string" && /^\.\.?\//.test(path$1)) return path$1.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
685
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
686
+ });
687
+ return path$1;
688
+ }
689
+ var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
690
+ var init_tslib_es6 = __esm({ "../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs": (() => {
691
+ extendStatics = function(d, b) {
692
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d$1, b$1) {
693
+ d$1.__proto__ = b$1;
694
+ } || function(d$1, b$1) {
695
+ for (var p in b$1) if (Object.prototype.hasOwnProperty.call(b$1, p)) d$1[p] = b$1[p];
696
+ };
697
+ return extendStatics(d, b);
698
+ };
699
+ __assign = function() {
700
+ __assign = Object.assign || function __assign$1(t) {
701
+ for (var s, i$1 = 1, n = arguments.length; i$1 < n; i$1++) {
702
+ s = arguments[i$1];
703
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
704
+ }
705
+ return t;
706
+ };
707
+ return __assign.apply(this, arguments);
708
+ };
709
+ __createBinding = Object.create ? (function(o, m, k, k2) {
710
+ if (k2 === void 0) k2 = k;
711
+ var desc = Object.getOwnPropertyDescriptor(m, k);
712
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
713
+ enumerable: true,
714
+ get: function() {
715
+ return m[k];
716
+ }
717
+ };
718
+ Object.defineProperty(o, k2, desc);
719
+ }) : (function(o, m, k, k2) {
720
+ if (k2 === void 0) k2 = k;
721
+ o[k2] = m[k];
722
+ });
723
+ __setModuleDefault = Object.create ? (function(o, v) {
724
+ Object.defineProperty(o, "default", {
725
+ enumerable: true,
726
+ value: v
727
+ });
728
+ }) : function(o, v) {
729
+ o["default"] = v;
730
+ };
731
+ ownKeys = function(o) {
732
+ ownKeys = Object.getOwnPropertyNames || function(o$1) {
733
+ var ar = [];
734
+ for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
735
+ return ar;
736
+ };
737
+ return ownKeys(o);
738
+ };
739
+ _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
740
+ var e = new Error(message);
741
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
742
+ };
743
+ tslib_es6_default = {
744
+ __extends,
745
+ __assign,
746
+ __rest,
747
+ __decorate,
748
+ __param,
749
+ __esDecorate,
750
+ __runInitializers,
751
+ __propKey,
752
+ __setFunctionName,
753
+ __metadata,
754
+ __awaiter,
755
+ __generator,
756
+ __createBinding,
757
+ __exportStar,
758
+ __values,
759
+ __read,
760
+ __spread,
761
+ __spreadArrays,
762
+ __spreadArray,
763
+ __await,
764
+ __asyncGenerator,
765
+ __asyncDelegator,
766
+ __asyncValues,
767
+ __makeTemplateObject,
768
+ __importStar,
769
+ __importDefault,
770
+ __classPrivateFieldGet,
771
+ __classPrivateFieldSet,
772
+ __classPrivateFieldIn,
773
+ __addDisposableResource,
774
+ __disposeResources,
775
+ __rewriteRelativeImportExtension
776
+ };
777
+ }) });
778
+
779
+ //#endregion
780
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/yamlAST.js
781
+ var require_yamlAST = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/yamlAST.js": ((exports) => {
782
+ Object.defineProperty(exports, "__esModule", { value: true });
783
+ var Kind;
784
+ (function(Kind$1) {
785
+ Kind$1[Kind$1["SCALAR"] = 0] = "SCALAR";
786
+ Kind$1[Kind$1["MAPPING"] = 1] = "MAPPING";
787
+ Kind$1[Kind$1["MAP"] = 2] = "MAP";
788
+ Kind$1[Kind$1["SEQ"] = 3] = "SEQ";
789
+ Kind$1[Kind$1["ANCHOR_REF"] = 4] = "ANCHOR_REF";
790
+ Kind$1[Kind$1["INCLUDE_REF"] = 5] = "INCLUDE_REF";
791
+ })(Kind = exports.Kind || (exports.Kind = {}));
792
+ function newMapping(key, value) {
793
+ var end = value ? value.endPosition : key.endPosition + 1;
794
+ return {
795
+ key,
796
+ value,
797
+ startPosition: key.startPosition,
798
+ endPosition: end,
799
+ kind: Kind.MAPPING,
800
+ parent: null,
801
+ errors: []
802
+ };
803
+ }
804
+ exports.newMapping = newMapping;
805
+ function newAnchorRef(key, start, end, value) {
806
+ return {
807
+ errors: [],
808
+ referencesAnchor: key,
809
+ value,
810
+ startPosition: start,
811
+ endPosition: end,
812
+ kind: Kind.ANCHOR_REF,
813
+ parent: null
814
+ };
815
+ }
816
+ exports.newAnchorRef = newAnchorRef;
817
+ function newScalar(v = "") {
818
+ const result = {
819
+ errors: [],
820
+ startPosition: -1,
821
+ endPosition: -1,
822
+ value: "" + v,
823
+ kind: Kind.SCALAR,
824
+ parent: null,
825
+ doubleQuoted: false,
826
+ rawValue: "" + v
827
+ };
828
+ if (typeof v !== "string") result.valueObject = v;
829
+ return result;
830
+ }
831
+ exports.newScalar = newScalar;
832
+ function newItems() {
833
+ return {
834
+ errors: [],
835
+ startPosition: -1,
836
+ endPosition: -1,
837
+ items: [],
838
+ kind: Kind.SEQ,
839
+ parent: null
840
+ };
841
+ }
842
+ exports.newItems = newItems;
843
+ function newSeq() {
844
+ return newItems();
845
+ }
846
+ exports.newSeq = newSeq;
847
+ function newMap(mappings) {
848
+ return {
849
+ errors: [],
850
+ startPosition: -1,
851
+ endPosition: -1,
852
+ mappings: mappings ? mappings : [],
853
+ kind: Kind.MAP,
854
+ parent: null
855
+ };
856
+ }
857
+ exports.newMap = newMap;
858
+ }) });
859
+
860
+ //#endregion
861
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/common.js
862
+ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/common.js": ((exports) => {
863
+ Object.defineProperty(exports, "__esModule", { value: true });
864
+ function isNothing(subject) {
865
+ return typeof subject === "undefined" || null === subject;
866
+ }
867
+ exports.isNothing = isNothing;
868
+ function isObject$1(subject) {
869
+ return typeof subject === "object" && null !== subject;
870
+ }
871
+ exports.isObject = isObject$1;
872
+ function toArray(sequence) {
873
+ if (Array.isArray(sequence)) return sequence;
874
+ else if (isNothing(sequence)) return [];
875
+ return [sequence];
876
+ }
877
+ exports.toArray = toArray;
878
+ function extend(target, source) {
879
+ var index, length, key, sourceKeys;
880
+ if (source) {
881
+ sourceKeys = Object.keys(source);
882
+ for (index = 0, length = sourceKeys.length; index < length; index += 1) {
883
+ key = sourceKeys[index];
884
+ target[key] = source[key];
885
+ }
886
+ }
887
+ return target;
888
+ }
889
+ exports.extend = extend;
890
+ function repeat(string, count) {
891
+ var result = "", cycle;
892
+ for (cycle = 0; cycle < count; cycle += 1) result += string;
893
+ return result;
894
+ }
895
+ exports.repeat = repeat;
896
+ function isNegativeZero(number) {
897
+ return 0 === number && Number.NEGATIVE_INFINITY === 1 / number;
898
+ }
899
+ exports.isNegativeZero = isNegativeZero;
900
+ }) });
901
+
902
+ //#endregion
903
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/exception.js
904
+ var require_exception = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/exception.js": ((exports, module) => {
905
+ var YAMLException$4 = class YAMLException$4 {
906
+ constructor(reason, mark = null, isWarning = false) {
907
+ this.name = "YAMLException";
908
+ this.reason = reason;
909
+ this.mark = mark;
910
+ this.message = this.toString(false);
911
+ this.isWarning = isWarning;
912
+ }
913
+ static isInstance(instance) {
914
+ if (instance != null && instance.getClassIdentifier && typeof instance.getClassIdentifier == "function") {
915
+ for (let currentIdentifier of instance.getClassIdentifier()) if (currentIdentifier == YAMLException$4.CLASS_IDENTIFIER) return true;
916
+ }
917
+ return false;
918
+ }
919
+ getClassIdentifier() {
920
+ return [].concat(YAMLException$4.CLASS_IDENTIFIER);
921
+ }
922
+ toString(compact = false) {
923
+ var result = "JS-YAML: " + (this.reason || "(unknown reason)");
924
+ if (!compact && this.mark) result += " " + this.mark.toString();
925
+ return result;
926
+ }
927
+ };
928
+ YAMLException$4.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException";
929
+ module.exports = YAMLException$4;
930
+ }) });
931
+
932
+ //#endregion
933
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/mark.js
934
+ var require_mark = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/mark.js": ((exports, module) => {
935
+ const common$5 = require_common();
936
+ var Mark$1 = class {
937
+ constructor(name, buffer, position, line, column) {
938
+ this.name = name;
939
+ this.buffer = buffer;
940
+ this.position = position;
941
+ this.line = line;
942
+ this.column = column;
943
+ }
944
+ getSnippet(indent = 0, maxLength = 75) {
945
+ var head, start, tail, end, snippet;
946
+ if (!this.buffer) return null;
947
+ indent = indent || 4;
948
+ maxLength = maxLength || 75;
949
+ head = "";
950
+ start = this.position;
951
+ while (start > 0 && -1 === "\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start - 1))) {
952
+ start -= 1;
953
+ if (this.position - start > maxLength / 2 - 1) {
954
+ head = " ... ";
955
+ start += 5;
956
+ break;
957
+ }
958
+ }
959
+ tail = "";
960
+ end = this.position;
961
+ while (end < this.buffer.length && -1 === "\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(end))) {
962
+ end += 1;
963
+ if (end - this.position > maxLength / 2 - 1) {
964
+ tail = " ... ";
965
+ end -= 5;
966
+ break;
967
+ }
968
+ }
969
+ snippet = this.buffer.slice(start, end);
970
+ return common$5.repeat(" ", indent) + head + snippet + tail + "\n" + common$5.repeat(" ", indent + this.position - start + head.length) + "^";
971
+ }
972
+ toString(compact = true) {
973
+ var snippet, where = "";
974
+ if (this.name) where += "in \"" + this.name + "\" ";
975
+ where += "at line " + (this.line + 1) + ", column " + (this.column + 1);
976
+ if (!compact) {
977
+ snippet = this.getSnippet();
978
+ if (snippet) where += ":\n" + snippet;
979
+ }
980
+ return where;
981
+ }
982
+ };
983
+ module.exports = Mark$1;
984
+ }) });
985
+
986
+ //#endregion
987
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type.js
988
+ var require_type = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type.js": ((exports) => {
989
+ Object.defineProperty(exports, "__esModule", { value: true });
990
+ const YAMLException$3 = require_exception();
991
+ var TYPE_CONSTRUCTOR_OPTIONS = [
992
+ "kind",
993
+ "resolve",
994
+ "construct",
995
+ "instanceOf",
996
+ "predicate",
997
+ "represent",
998
+ "defaultStyle",
999
+ "styleAliases"
1000
+ ];
1001
+ var YAML_NODE_KINDS = [
1002
+ "scalar",
1003
+ "sequence",
1004
+ "mapping"
1005
+ ];
1006
+ function compileStyleAliases(map) {
1007
+ var result = {};
1008
+ if (null !== map) Object.keys(map).forEach(function(style) {
1009
+ map[style].forEach(function(alias) {
1010
+ result[String(alias)] = style;
1011
+ });
1012
+ });
1013
+ return result;
1014
+ }
1015
+ var Type = class {
1016
+ constructor(tag, options) {
1017
+ options = options || {};
1018
+ Object.keys(options).forEach(function(name) {
1019
+ if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) throw new YAMLException$3("Unknown option \"" + name + "\" is met in definition of \"" + tag + "\" YAML type.");
1020
+ });
1021
+ this.tag = tag;
1022
+ this.kind = options["kind"] || null;
1023
+ this.resolve = options["resolve"] || function() {
1024
+ return true;
1025
+ };
1026
+ this.construct = options["construct"] || function(data) {
1027
+ return data;
1028
+ };
1029
+ this.instanceOf = options["instanceOf"] || null;
1030
+ this.predicate = options["predicate"] || null;
1031
+ this.represent = options["represent"] || null;
1032
+ this.defaultStyle = options["defaultStyle"] || null;
1033
+ this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
1034
+ if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) throw new YAMLException$3("Unknown kind \"" + this.kind + "\" is specified for \"" + tag + "\" YAML type.");
1035
+ }
1036
+ };
1037
+ exports.Type = Type;
1038
+ }) });
1039
+
1040
+ //#endregion
1041
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema.js
1042
+ var require_schema = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema.js": ((exports) => {
1043
+ Object.defineProperty(exports, "__esModule", { value: true });
1044
+ const common$4 = require_common();
1045
+ const YAMLException$2 = require_exception();
1046
+ const type_1$15 = require_type();
1047
+ function compileList(schema$2, name, result) {
1048
+ var exclude = [];
1049
+ schema$2.include.forEach(function(includedSchema) {
1050
+ result = compileList(includedSchema, name, result);
1051
+ });
1052
+ schema$2[name].forEach(function(currentType) {
1053
+ result.forEach(function(previousType, previousIndex) {
1054
+ if (previousType.tag === currentType.tag) exclude.push(previousIndex);
1055
+ });
1056
+ result.push(currentType);
1057
+ });
1058
+ return result.filter(function(type, index) {
1059
+ return -1 === exclude.indexOf(index);
1060
+ });
1061
+ }
1062
+ function compileMap() {
1063
+ var result = {}, index, length;
1064
+ function collectType(type) {
1065
+ result[type.tag] = type;
1066
+ }
1067
+ for (index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType);
1068
+ return result;
1069
+ }
1070
+ var Schema = class {
1071
+ constructor(definition) {
1072
+ this.include = definition.include || [];
1073
+ this.implicit = definition.implicit || [];
1074
+ this.explicit = definition.explicit || [];
1075
+ this.implicit.forEach(function(type) {
1076
+ if (type.loadKind && "scalar" !== type.loadKind) throw new YAMLException$2("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
1077
+ });
1078
+ this.compiledImplicit = compileList(this, "implicit", []);
1079
+ this.compiledExplicit = compileList(this, "explicit", []);
1080
+ this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
1081
+ }
1082
+ };
1083
+ exports.Schema = Schema;
1084
+ Schema.DEFAULT = null;
1085
+ Schema.create = function createSchema() {
1086
+ var schemas, types;
1087
+ switch (arguments.length) {
1088
+ case 1:
1089
+ schemas = Schema.DEFAULT;
1090
+ types = arguments[0];
1091
+ break;
1092
+ case 2:
1093
+ schemas = arguments[0];
1094
+ types = arguments[1];
1095
+ break;
1096
+ default: throw new YAMLException$2("Wrong number of arguments for Schema.create function");
1097
+ }
1098
+ schemas = common$4.toArray(schemas);
1099
+ types = common$4.toArray(types);
1100
+ if (!schemas.every(function(schema$2) {
1101
+ return schema$2 instanceof Schema;
1102
+ })) throw new YAMLException$2("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");
1103
+ if (!types.every(function(type) {
1104
+ return type instanceof type_1$15.Type;
1105
+ })) throw new YAMLException$2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
1106
+ return new Schema({
1107
+ include: schemas,
1108
+ explicit: types
1109
+ });
1110
+ };
1111
+ }) });
1112
+
1113
+ //#endregion
1114
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/str.js
1115
+ var require_str = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/str.js": ((exports, module) => {
1116
+ const type_1$14 = require_type();
1117
+ module.exports = new type_1$14.Type("tag:yaml.org,2002:str", {
1118
+ kind: "scalar",
1119
+ construct: function(data) {
1120
+ return null !== data ? data : "";
1121
+ }
1122
+ });
1123
+ }) });
1124
+
1125
+ //#endregion
1126
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/seq.js
1127
+ var require_seq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/seq.js": ((exports, module) => {
1128
+ const type_1$13 = require_type();
1129
+ module.exports = new type_1$13.Type("tag:yaml.org,2002:seq", {
1130
+ kind: "sequence",
1131
+ construct: function(data) {
1132
+ return null !== data ? data : [];
1133
+ }
1134
+ });
1135
+ }) });
1136
+
1137
+ //#endregion
1138
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/map.js
1139
+ var require_map = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/map.js": ((exports, module) => {
1140
+ const type_1$12 = require_type();
1141
+ module.exports = new type_1$12.Type("tag:yaml.org,2002:map", {
1142
+ kind: "mapping",
1143
+ construct: function(data) {
1144
+ return null !== data ? data : {};
1145
+ }
1146
+ });
1147
+ }) });
1148
+
1149
+ //#endregion
1150
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/failsafe.js
1151
+ var require_failsafe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/failsafe.js": ((exports, module) => {
1152
+ const schema_1$3 = require_schema();
1153
+ module.exports = new schema_1$3.Schema({ explicit: [
1154
+ require_str(),
1155
+ require_seq(),
1156
+ require_map()
1157
+ ] });
1158
+ }) });
1159
+
1160
+ //#endregion
1161
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/null.js
1162
+ var require_null = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/null.js": ((exports, module) => {
1163
+ const type_1$11 = require_type();
1164
+ function resolveYamlNull(data) {
1165
+ if (null === data) return true;
1166
+ var max = data.length;
1167
+ return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
1168
+ }
1169
+ function constructYamlNull() {
1170
+ return null;
1171
+ }
1172
+ function isNull(object) {
1173
+ return null === object;
1174
+ }
1175
+ module.exports = new type_1$11.Type("tag:yaml.org,2002:null", {
1176
+ kind: "scalar",
1177
+ resolve: resolveYamlNull,
1178
+ construct: constructYamlNull,
1179
+ predicate: isNull,
1180
+ represent: {
1181
+ canonical: function() {
1182
+ return "~";
1183
+ },
1184
+ lowercase: function() {
1185
+ return "null";
1186
+ },
1187
+ uppercase: function() {
1188
+ return "NULL";
1189
+ },
1190
+ camelcase: function() {
1191
+ return "Null";
1192
+ }
1193
+ },
1194
+ defaultStyle: "lowercase"
1195
+ });
1196
+ }) });
1197
+
1198
+ //#endregion
1199
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/bool.js
1200
+ var require_bool = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/bool.js": ((exports, module) => {
1201
+ const type_1$10 = require_type();
1202
+ function resolveYamlBoolean(data) {
1203
+ if (null === data) return false;
1204
+ var max = data.length;
1205
+ return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
1206
+ }
1207
+ function constructYamlBoolean(data) {
1208
+ return data === "true" || data === "True" || data === "TRUE";
1209
+ }
1210
+ function isBoolean(object) {
1211
+ return "[object Boolean]" === Object.prototype.toString.call(object);
1212
+ }
1213
+ module.exports = new type_1$10.Type("tag:yaml.org,2002:bool", {
1214
+ kind: "scalar",
1215
+ resolve: resolveYamlBoolean,
1216
+ construct: constructYamlBoolean,
1217
+ predicate: isBoolean,
1218
+ represent: {
1219
+ lowercase: function(object) {
1220
+ return object ? "true" : "false";
1221
+ },
1222
+ uppercase: function(object) {
1223
+ return object ? "TRUE" : "FALSE";
1224
+ },
1225
+ camelcase: function(object) {
1226
+ return object ? "True" : "False";
1227
+ }
1228
+ },
1229
+ defaultStyle: "lowercase"
1230
+ });
1231
+ }) });
1232
+
1233
+ //#endregion
1234
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/int.js
1235
+ var require_int = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/int.js": ((exports, module) => {
1236
+ const common$3 = require_common();
1237
+ const type_1$9 = require_type();
1238
+ function isHexCode(c) {
1239
+ return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
1240
+ }
1241
+ function isOctCode(c) {
1242
+ return 48 <= c && c <= 55;
1243
+ }
1244
+ function isDecCode(c) {
1245
+ return 48 <= c && c <= 57;
1246
+ }
1247
+ function resolveYamlInteger(data) {
1248
+ if (null === data) return false;
1249
+ var max = data.length, index = 0, hasDigits = false, ch;
1250
+ if (!max) return false;
1251
+ ch = data[index];
1252
+ if (ch === "-" || ch === "+") ch = data[++index];
1253
+ if (ch === "0") {
1254
+ if (index + 1 === max) return true;
1255
+ ch = data[++index];
1256
+ if (ch === "b") {
1257
+ index++;
1258
+ for (; index < max; index++) {
1259
+ ch = data[index];
1260
+ if (ch === "_") continue;
1261
+ if (ch !== "0" && ch !== "1") return false;
1262
+ hasDigits = true;
1263
+ }
1264
+ return hasDigits;
1265
+ }
1266
+ if (ch === "x") {
1267
+ index++;
1268
+ for (; index < max; index++) {
1269
+ ch = data[index];
1270
+ if (ch === "_") continue;
1271
+ if (!isHexCode(data.charCodeAt(index))) return false;
1272
+ hasDigits = true;
1273
+ }
1274
+ return hasDigits;
1275
+ }
1276
+ for (; index < max; index++) {
1277
+ ch = data[index];
1278
+ if (ch === "_") continue;
1279
+ if (!isOctCode(data.charCodeAt(index))) {
1280
+ hasDigits = false;
1281
+ break;
1282
+ }
1283
+ hasDigits = true;
1284
+ }
1285
+ if (hasDigits) return hasDigits;
1286
+ }
1287
+ for (; index < max; index++) {
1288
+ ch = data[index];
1289
+ if (ch === "_") continue;
1290
+ if (ch === ":") break;
1291
+ if (!isDecCode(data.charCodeAt(index))) return false;
1292
+ hasDigits = true;
1293
+ }
1294
+ if (!hasDigits) return false;
1295
+ if (ch !== ":") return true;
1296
+ return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
1297
+ }
1298
+ function constructYamlInteger(data) {
1299
+ var value = data, sign = 1, ch, base, digits = [];
1300
+ if (value.indexOf("_") !== -1) value = value.replace(/_/g, "");
1301
+ ch = value[0];
1302
+ if (ch === "-" || ch === "+") {
1303
+ if (ch === "-") sign = -1;
1304
+ value = value.slice(1);
1305
+ ch = value[0];
1306
+ }
1307
+ if ("0" === value) return 0;
1308
+ if (ch === "0") {
1309
+ if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
1310
+ if (value[1] === "x") return sign * parseInt(value, 16);
1311
+ return sign * parseInt(value, 8);
1312
+ }
1313
+ if (value.indexOf(":") !== -1) {
1314
+ value.split(":").forEach(function(v) {
1315
+ digits.unshift(parseInt(v, 10));
1316
+ });
1317
+ value = 0;
1318
+ base = 1;
1319
+ digits.forEach(function(d) {
1320
+ value += d * base;
1321
+ base *= 60;
1322
+ });
1323
+ return sign * value;
1324
+ }
1325
+ return sign * parseInt(value, 10);
1326
+ }
1327
+ function isInteger(object) {
1328
+ const type = Object.prototype.toString.call(object);
1329
+ return "[object Number]" === type && 0 === object % 1 && !common$3.isNegativeZero(object) || "[object BigInt]" === type;
1330
+ }
1331
+ module.exports = new type_1$9.Type("tag:yaml.org,2002:int", {
1332
+ kind: "scalar",
1333
+ resolve: resolveYamlInteger,
1334
+ construct: constructYamlInteger,
1335
+ predicate: isInteger,
1336
+ represent: {
1337
+ binary: function(object) {
1338
+ return "0b" + object.toString(2);
1339
+ },
1340
+ octal: function(object) {
1341
+ return "0" + object.toString(8);
1342
+ },
1343
+ decimal: function(object) {
1344
+ return object.toString(10);
1345
+ },
1346
+ hexadecimal: function(object) {
1347
+ return "0x" + object.toString(16).toUpperCase();
1348
+ }
1349
+ },
1350
+ defaultStyle: "decimal",
1351
+ styleAliases: {
1352
+ binary: [2, "bin"],
1353
+ octal: [8, "oct"],
1354
+ decimal: [10, "dec"],
1355
+ hexadecimal: [16, "hex"]
1356
+ }
1357
+ });
1358
+ }) });
1359
+
1360
+ //#endregion
1361
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/float.js
1362
+ var require_float = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/float.js": ((exports, module) => {
1363
+ const common$2 = require_common();
1364
+ const type_1$8 = require_type();
1365
+ var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
1366
+ function resolveYamlFloat(data) {
1367
+ if (null === data) return false;
1368
+ if (!YAML_FLOAT_PATTERN.test(data)) return false;
1369
+ return true;
1370
+ }
1371
+ function constructYamlFloat(data) {
1372
+ var value = data.replace(/_/g, "").toLowerCase(), sign = "-" === value[0] ? -1 : 1, base, digits = [];
1373
+ if (0 <= "+-".indexOf(value[0])) value = value.slice(1);
1374
+ if (".inf" === value) return 1 === sign ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
1375
+ else if (".nan" === value) return NaN;
1376
+ else if (0 <= value.indexOf(":")) {
1377
+ value.split(":").forEach(function(v) {
1378
+ digits.unshift(parseFloat(v, 10));
1379
+ });
1380
+ value = 0;
1381
+ base = 1;
1382
+ digits.forEach(function(d) {
1383
+ value += d * base;
1384
+ base *= 60;
1385
+ });
1386
+ return sign * value;
1387
+ }
1388
+ return sign * parseFloat(value, 10);
1389
+ }
1390
+ function representYamlFloat(object, style) {
1391
+ if (isNaN(object)) switch (style) {
1392
+ case "lowercase": return ".nan";
1393
+ case "uppercase": return ".NAN";
1394
+ case "camelcase": return ".NaN";
1395
+ }
1396
+ else if (Number.POSITIVE_INFINITY === object) switch (style) {
1397
+ case "lowercase": return ".inf";
1398
+ case "uppercase": return ".INF";
1399
+ case "camelcase": return ".Inf";
1400
+ }
1401
+ else if (Number.NEGATIVE_INFINITY === object) switch (style) {
1402
+ case "lowercase": return "-.inf";
1403
+ case "uppercase": return "-.INF";
1404
+ case "camelcase": return "-.Inf";
1405
+ }
1406
+ else if (common$2.isNegativeZero(object)) return "-0.0";
1407
+ return object.toString(10);
1408
+ }
1409
+ function isFloat(object) {
1410
+ return "[object Number]" === Object.prototype.toString.call(object) && (0 !== object % 1 || common$2.isNegativeZero(object));
1411
+ }
1412
+ module.exports = new type_1$8.Type("tag:yaml.org,2002:float", {
1413
+ kind: "scalar",
1414
+ resolve: resolveYamlFloat,
1415
+ construct: constructYamlFloat,
1416
+ predicate: isFloat,
1417
+ represent: representYamlFloat,
1418
+ defaultStyle: "lowercase"
1419
+ });
1420
+ }) });
1421
+
1422
+ //#endregion
1423
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/json.js
1424
+ var require_json = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/json.js": ((exports, module) => {
1425
+ const schema_1$2 = require_schema();
1426
+ module.exports = new schema_1$2.Schema({
1427
+ include: [require_failsafe()],
1428
+ implicit: [
1429
+ require_null(),
1430
+ require_bool(),
1431
+ require_int(),
1432
+ require_float()
1433
+ ]
1434
+ });
1435
+ }) });
1436
+
1437
+ //#endregion
1438
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/core.js
1439
+ var require_core = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/core.js": ((exports, module) => {
1440
+ const schema_1$1 = require_schema();
1441
+ module.exports = new schema_1$1.Schema({ include: [require_json()] });
1442
+ }) });
1443
+
1444
+ //#endregion
1445
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/timestamp.js
1446
+ var require_timestamp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/timestamp.js": ((exports, module) => {
1447
+ const type_1$7 = require_type();
1448
+ var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");
1449
+ function resolveYamlTimestamp(data) {
1450
+ if (null === data) return false;
1451
+ if (null === YAML_TIMESTAMP_REGEXP.exec(data)) return false;
1452
+ return true;
1453
+ }
1454
+ function constructYamlTimestamp(data) {
1455
+ var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
1456
+ match = YAML_TIMESTAMP_REGEXP.exec(data);
1457
+ if (null === match) throw new Error("Date resolve error");
1458
+ year = +match[1];
1459
+ month = +match[2] - 1;
1460
+ day = +match[3];
1461
+ if (!match[4]) return new Date(Date.UTC(year, month, day));
1462
+ hour = +match[4];
1463
+ minute = +match[5];
1464
+ second = +match[6];
1465
+ if (match[7]) {
1466
+ fraction = match[7].slice(0, 3);
1467
+ while (fraction.length < 3) fraction = fraction + "0";
1468
+ fraction = +fraction;
1469
+ }
1470
+ if (match[9]) {
1471
+ tz_hour = +match[10];
1472
+ tz_minute = +(match[11] || 0);
1473
+ delta = (tz_hour * 60 + tz_minute) * 6e4;
1474
+ if ("-" === match[9]) delta = -delta;
1475
+ }
1476
+ date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
1477
+ if (delta) date.setTime(date.getTime() - delta);
1478
+ return date;
1479
+ }
1480
+ function representYamlTimestamp(object) {
1481
+ return object.toISOString();
1482
+ }
1483
+ module.exports = new type_1$7.Type("tag:yaml.org,2002:timestamp", {
1484
+ kind: "scalar",
1485
+ resolve: resolveYamlTimestamp,
1486
+ construct: constructYamlTimestamp,
1487
+ instanceOf: Date,
1488
+ represent: representYamlTimestamp
1489
+ });
1490
+ }) });
1491
+
1492
+ //#endregion
1493
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/merge.js
1494
+ var require_merge = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/merge.js": ((exports, module) => {
1495
+ const type_1$6 = require_type();
1496
+ function resolveYamlMerge(data) {
1497
+ return "<<" === data || null === data;
1498
+ }
1499
+ module.exports = new type_1$6.Type("tag:yaml.org,2002:merge", {
1500
+ kind: "scalar",
1501
+ resolve: resolveYamlMerge
1502
+ });
1503
+ }) });
1504
+
1505
+ //#endregion
1506
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/binary.js
1507
+ var require_binary = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/binary.js": ((exports, module) => {
1508
+ var NodeBuffer = __require("buffer").Buffer;
1509
+ const type_1$5 = require_type();
1510
+ var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
1511
+ function resolveYamlBinary(data) {
1512
+ if (null === data) return false;
1513
+ var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
1514
+ for (idx = 0; idx < max; idx++) {
1515
+ code = map.indexOf(data.charAt(idx));
1516
+ if (code > 64) continue;
1517
+ if (code < 0) return false;
1518
+ bitlen += 6;
1519
+ }
1520
+ return bitlen % 8 === 0;
1521
+ }
1522
+ function constructYamlBinary(data) {
1523
+ var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
1524
+ for (idx = 0; idx < max; idx++) {
1525
+ if (idx % 4 === 0 && idx) {
1526
+ result.push(bits >> 16 & 255);
1527
+ result.push(bits >> 8 & 255);
1528
+ result.push(bits & 255);
1529
+ }
1530
+ bits = bits << 6 | map.indexOf(input.charAt(idx));
1531
+ }
1532
+ tailbits = max % 4 * 6;
1533
+ if (tailbits === 0) {
1534
+ result.push(bits >> 16 & 255);
1535
+ result.push(bits >> 8 & 255);
1536
+ result.push(bits & 255);
1537
+ } else if (tailbits === 18) {
1538
+ result.push(bits >> 10 & 255);
1539
+ result.push(bits >> 2 & 255);
1540
+ } else if (tailbits === 12) result.push(bits >> 4 & 255);
1541
+ if (NodeBuffer) return new NodeBuffer(result);
1542
+ return result;
1543
+ }
1544
+ function representYamlBinary(object) {
1545
+ var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
1546
+ for (idx = 0; idx < max; idx++) {
1547
+ if (idx % 3 === 0 && idx) {
1548
+ result += map[bits >> 18 & 63];
1549
+ result += map[bits >> 12 & 63];
1550
+ result += map[bits >> 6 & 63];
1551
+ result += map[bits & 63];
1552
+ }
1553
+ bits = (bits << 8) + object[idx];
1554
+ }
1555
+ tail = max % 3;
1556
+ if (tail === 0) {
1557
+ result += map[bits >> 18 & 63];
1558
+ result += map[bits >> 12 & 63];
1559
+ result += map[bits >> 6 & 63];
1560
+ result += map[bits & 63];
1561
+ } else if (tail === 2) {
1562
+ result += map[bits >> 10 & 63];
1563
+ result += map[bits >> 4 & 63];
1564
+ result += map[bits << 2 & 63];
1565
+ result += map[64];
1566
+ } else if (tail === 1) {
1567
+ result += map[bits >> 2 & 63];
1568
+ result += map[bits << 4 & 63];
1569
+ result += map[64];
1570
+ result += map[64];
1571
+ }
1572
+ return result;
1573
+ }
1574
+ function isBinary(object) {
1575
+ return NodeBuffer && NodeBuffer.isBuffer(object);
1576
+ }
1577
+ module.exports = new type_1$5.Type("tag:yaml.org,2002:binary", {
1578
+ kind: "scalar",
1579
+ resolve: resolveYamlBinary,
1580
+ construct: constructYamlBinary,
1581
+ predicate: isBinary,
1582
+ represent: representYamlBinary
1583
+ });
1584
+ }) });
1585
+
1586
+ //#endregion
1587
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/omap.js
1588
+ var require_omap = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/omap.js": ((exports, module) => {
1589
+ const type_1$4 = require_type();
1590
+ var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
1591
+ var _toString$2 = Object.prototype.toString;
1592
+ function resolveYamlOmap(data) {
1593
+ if (null === data) return true;
1594
+ var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
1595
+ for (index = 0, length = object.length; index < length; index += 1) {
1596
+ pair = object[index];
1597
+ pairHasKey = false;
1598
+ if ("[object Object]" !== _toString$2.call(pair)) return false;
1599
+ for (pairKey in pair) if (_hasOwnProperty$2.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true;
1600
+ else return false;
1601
+ if (!pairHasKey) return false;
1602
+ if (-1 === objectKeys.indexOf(pairKey)) objectKeys.push(pairKey);
1603
+ else return false;
1604
+ }
1605
+ return true;
1606
+ }
1607
+ function constructYamlOmap(data) {
1608
+ return null !== data ? data : [];
1609
+ }
1610
+ module.exports = new type_1$4.Type("tag:yaml.org,2002:omap", {
1611
+ kind: "sequence",
1612
+ resolve: resolveYamlOmap,
1613
+ construct: constructYamlOmap
1614
+ });
1615
+ }) });
1616
+
1617
+ //#endregion
1618
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/pairs.js
1619
+ var require_pairs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/pairs.js": ((exports, module) => {
1620
+ const type_1$3 = require_type();
1621
+ const ast$2 = require_yamlAST();
1622
+ var _toString$1 = Object.prototype.toString;
1623
+ function resolveYamlPairs(data) {
1624
+ if (null === data) return true;
1625
+ if (data.kind != ast$2.Kind.SEQ) return false;
1626
+ var index, length, pair, object = data.items;
1627
+ for (index = 0, length = object.length; index < length; index += 1) {
1628
+ pair = object[index];
1629
+ if ("[object Object]" !== _toString$1.call(pair)) return false;
1630
+ if (!Array.isArray(pair.mappings)) return false;
1631
+ if (1 !== pair.mappings.length) return false;
1632
+ }
1633
+ return true;
1634
+ }
1635
+ function constructYamlPairs(data) {
1636
+ if (null === data || !Array.isArray(data.items)) return [];
1637
+ let index, length, result, object = data.items;
1638
+ result = ast$2.newItems();
1639
+ result.parent = data.parent;
1640
+ result.startPosition = data.startPosition;
1641
+ result.endPosition = data.endPosition;
1642
+ for (index = 0, length = object.length; index < length; index += 1) {
1643
+ let mapping = object[index].mappings[0];
1644
+ let pairSeq = ast$2.newItems();
1645
+ pairSeq.parent = result;
1646
+ pairSeq.startPosition = mapping.key.startPosition;
1647
+ pairSeq.endPosition = mapping.value.startPosition;
1648
+ mapping.key.parent = pairSeq;
1649
+ mapping.value.parent = pairSeq;
1650
+ pairSeq.items = [mapping.key, mapping.value];
1651
+ result.items.push(pairSeq);
1652
+ }
1653
+ return result;
1654
+ }
1655
+ module.exports = new type_1$3.Type("tag:yaml.org,2002:pairs", {
1656
+ kind: "sequence",
1657
+ resolve: resolveYamlPairs,
1658
+ construct: constructYamlPairs
1659
+ });
1660
+ }) });
1661
+
1662
+ //#endregion
1663
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/set.js
1664
+ var require_set = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/set.js": ((exports, module) => {
1665
+ const type_1$2 = require_type();
1666
+ const ast$1 = require_yamlAST();
1667
+ function resolveYamlSet(data) {
1668
+ if (null === data) return true;
1669
+ if (data.kind != ast$1.Kind.MAP) return false;
1670
+ return true;
1671
+ }
1672
+ function constructYamlSet(data) {
1673
+ return null !== data ? data : {};
1674
+ }
1675
+ module.exports = new type_1$2.Type("tag:yaml.org,2002:set", {
1676
+ kind: "mapping",
1677
+ resolve: resolveYamlSet,
1678
+ construct: constructYamlSet
1679
+ });
1680
+ }) });
1681
+
1682
+ //#endregion
1683
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/default_safe.js
1684
+ var require_default_safe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/default_safe.js": ((exports, module) => {
1685
+ var schema$1 = new (require_schema()).Schema({
1686
+ include: [require_core()],
1687
+ implicit: [require_timestamp(), require_merge()],
1688
+ explicit: [
1689
+ require_binary(),
1690
+ require_omap(),
1691
+ require_pairs(),
1692
+ require_set()
1693
+ ]
1694
+ });
1695
+ module.exports = schema$1;
1696
+ }) });
1697
+
1698
+ //#endregion
1699
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/js/undefined.js
1700
+ var require_undefined = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/js/undefined.js": ((exports, module) => {
1701
+ const type_1$1 = require_type();
1702
+ function resolveJavascriptUndefined() {
1703
+ return true;
1704
+ }
1705
+ function constructJavascriptUndefined() {}
1706
+ function representJavascriptUndefined() {
1707
+ return "";
1708
+ }
1709
+ function isUndefined(object) {
1710
+ return "undefined" === typeof object;
1711
+ }
1712
+ module.exports = new type_1$1.Type("tag:yaml.org,2002:js/undefined", {
1713
+ kind: "scalar",
1714
+ resolve: resolveJavascriptUndefined,
1715
+ construct: constructJavascriptUndefined,
1716
+ predicate: isUndefined,
1717
+ represent: representJavascriptUndefined
1718
+ });
1719
+ }) });
1720
+
1721
+ //#endregion
1722
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/js/regexp.js
1723
+ var require_regexp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/type/js/regexp.js": ((exports, module) => {
1724
+ const type_1 = require_type();
1725
+ function resolveJavascriptRegExp(data) {
1726
+ if (null === data) return false;
1727
+ if (0 === data.length) return false;
1728
+ var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
1729
+ if ("/" === regexp[0]) {
1730
+ if (tail) modifiers = tail[1];
1731
+ if (modifiers.length > 3) return false;
1732
+ if (regexp[regexp.length - modifiers.length - 1] !== "/") return false;
1733
+ regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
1734
+ }
1735
+ try {
1736
+ return true;
1737
+ } catch (error) {
1738
+ return false;
1739
+ }
1740
+ }
1741
+ function constructJavascriptRegExp(data) {
1742
+ var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
1743
+ if ("/" === regexp[0]) {
1744
+ if (tail) modifiers = tail[1];
1745
+ regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
1746
+ }
1747
+ return new RegExp(regexp, modifiers);
1748
+ }
1749
+ function representJavascriptRegExp(object) {
1750
+ var result = "/" + object.source + "/";
1751
+ if (object.global) result += "g";
1752
+ if (object.multiline) result += "m";
1753
+ if (object.ignoreCase) result += "i";
1754
+ return result;
1755
+ }
1756
+ function isRegExp(object) {
1757
+ return "[object RegExp]" === Object.prototype.toString.call(object);
1758
+ }
1759
+ module.exports = new type_1.Type("tag:yaml.org,2002:js/regexp", {
1760
+ kind: "scalar",
1761
+ resolve: resolveJavascriptRegExp,
1762
+ construct: constructJavascriptRegExp,
1763
+ predicate: isRegExp,
1764
+ represent: representJavascriptRegExp
1765
+ });
1766
+ }) });
1767
+
1768
+ //#endregion
1769
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/default_full.js
1770
+ var require_default_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/schema/default_full.js": ((exports, module) => {
1771
+ const schema_1 = require_schema();
1772
+ var schema = new schema_1.Schema({
1773
+ include: [require_default_safe()],
1774
+ explicit: [require_undefined(), require_regexp()]
1775
+ });
1776
+ schema_1.Schema.DEFAULT = schema;
1777
+ module.exports = schema;
1778
+ }) });
1779
+
1780
+ //#endregion
1781
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/loader.js
1782
+ var require_loader = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/loader.js": ((exports, module) => {
1783
+ Object.defineProperty(exports, "__esModule", { value: true });
1784
+ const ast = require_yamlAST();
1785
+ const common$1 = require_common();
1786
+ const YAMLException$1 = require_exception();
1787
+ const Mark = require_mark();
1788
+ const DEFAULT_SAFE_SCHEMA$1 = require_default_safe();
1789
+ const DEFAULT_FULL_SCHEMA$1 = require_default_full();
1790
+ var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1791
+ var CONTEXT_FLOW_IN = 1;
1792
+ var CONTEXT_FLOW_OUT = 2;
1793
+ var CONTEXT_BLOCK_IN = 3;
1794
+ var CONTEXT_BLOCK_OUT = 4;
1795
+ var CHOMPING_CLIP = 1;
1796
+ var CHOMPING_STRIP = 2;
1797
+ var CHOMPING_KEEP = 3;
1798
+ var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
1799
+ var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
1800
+ var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
1801
+ var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
1802
+ var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1803
+ function is_EOL(c) {
1804
+ return c === 10 || c === 13;
1805
+ }
1806
+ function is_WHITE_SPACE(c) {
1807
+ return c === 9 || c === 32;
1808
+ }
1809
+ function is_WS_OR_EOL(c) {
1810
+ return c === 9 || c === 32 || c === 10 || c === 13;
1811
+ }
1812
+ function is_FLOW_INDICATOR(c) {
1813
+ return 44 === c || 91 === c || 93 === c || 123 === c || 125 === c;
1814
+ }
1815
+ function fromHexCode(c) {
1816
+ var lc;
1817
+ if (48 <= c && c <= 57) return c - 48;
1818
+ lc = c | 32;
1819
+ if (97 <= lc && lc <= 102) return lc - 97 + 10;
1820
+ return -1;
1821
+ }
1822
+ function escapedHexLen(c) {
1823
+ if (c === 120) return 2;
1824
+ if (c === 117) return 4;
1825
+ if (c === 85) return 8;
1826
+ return 0;
1827
+ }
1828
+ function fromDecimalCode(c) {
1829
+ if (48 <= c && c <= 57) return c - 48;
1830
+ return -1;
1831
+ }
1832
+ function simpleEscapeSequence(c) {
1833
+ return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? "\"" : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "…" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
1834
+ }
1835
+ function charFromCodepoint(c) {
1836
+ if (c <= 65535) return String.fromCharCode(c);
1837
+ return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
1838
+ }
1839
+ var simpleEscapeCheck = new Array(256);
1840
+ var simpleEscapeMap = new Array(256);
1841
+ var customEscapeCheck = new Array(256);
1842
+ var customEscapeMap = new Array(256);
1843
+ for (var i = 0; i < 256; i++) {
1844
+ customEscapeMap[i] = simpleEscapeMap[i] = simpleEscapeSequence(i);
1845
+ simpleEscapeCheck[i] = simpleEscapeMap[i] ? 1 : 0;
1846
+ customEscapeCheck[i] = 1;
1847
+ if (!simpleEscapeCheck[i]) customEscapeMap[i] = "\\" + String.fromCharCode(i);
1848
+ }
1849
+ var State$1 = class {
1850
+ constructor(input, options) {
1851
+ this.errorMap = {};
1852
+ this.errors = [];
1853
+ this.lines = [];
1854
+ this.input = input;
1855
+ this.filename = options["filename"] || null;
1856
+ this.schema = options["schema"] || DEFAULT_FULL_SCHEMA$1;
1857
+ this.onWarning = options["onWarning"] || null;
1858
+ this.legacy = options["legacy"] || false;
1859
+ this.allowAnyEscape = options["allowAnyEscape"] || false;
1860
+ this.ignoreDuplicateKeys = options["ignoreDuplicateKeys"] || false;
1861
+ this.implicitTypes = this.schema.compiledImplicit;
1862
+ this.typeMap = this.schema.compiledTypeMap;
1863
+ this.length = input.length;
1864
+ this.position = 0;
1865
+ this.line = 0;
1866
+ this.lineStart = 0;
1867
+ this.lineIndent = 0;
1868
+ this.documents = [];
1869
+ }
1870
+ };
1871
+ function generateError(state, message, isWarning = false) {
1872
+ return new YAMLException$1(message, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart), isWarning);
1873
+ }
1874
+ function throwErrorFromPosition(state, position, message, isWarning = false, toLineEnd = false) {
1875
+ var line = positionToLine(state, position);
1876
+ if (!line) return;
1877
+ var hash = message + position;
1878
+ if (state.errorMap[hash]) return;
1879
+ var mark = new Mark(state.filename, state.input, position, line.line, position - line.start);
1880
+ if (toLineEnd) mark.toLineEnd = true;
1881
+ var error = new YAMLException$1(message, mark, isWarning);
1882
+ state.errors.push(error);
1883
+ }
1884
+ function throwError(state, message) {
1885
+ var error = generateError(state, message);
1886
+ var hash = error.message + error.mark.position;
1887
+ if (state.errorMap[hash]) return;
1888
+ state.errors.push(error);
1889
+ state.errorMap[hash] = 1;
1890
+ var or = state.position;
1891
+ while (true) {
1892
+ if (state.position >= state.input.length - 1) return;
1893
+ var c = state.input.charAt(state.position);
1894
+ if (c == "\n") {
1895
+ state.position--;
1896
+ if (state.position == or) state.position += 1;
1897
+ return;
1898
+ }
1899
+ if (c == "\r") {
1900
+ state.position--;
1901
+ if (state.position == or) state.position += 1;
1902
+ return;
1903
+ }
1904
+ state.position++;
1905
+ }
1906
+ }
1907
+ function throwWarning(state, message) {
1908
+ var error = generateError(state, message);
1909
+ if (state.onWarning) state.onWarning.call(null, error);
1910
+ }
1911
+ var directiveHandlers = {
1912
+ YAML: function handleYamlDirective(state, name, args) {
1913
+ var match, major, minor;
1914
+ if (null !== state.version) throwError(state, "duplication of %YAML directive");
1915
+ if (1 !== args.length) throwError(state, "YAML directive accepts exactly one argument");
1916
+ match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
1917
+ if (null === match) throwError(state, "ill-formed argument of the YAML directive");
1918
+ major = parseInt(match[1], 10);
1919
+ minor = parseInt(match[2], 10);
1920
+ if (1 !== major) throwError(state, "found incompatible YAML document (version 1.2 is required)");
1921
+ state.version = args[0];
1922
+ state.checkLineBreaks = minor < 2;
1923
+ if (2 !== minor) throwError(state, "found incompatible YAML document (version 1.2 is required)");
1924
+ },
1925
+ TAG: function handleTagDirective(state, name, args) {
1926
+ var handle, prefix;
1927
+ if (2 !== args.length) throwError(state, "TAG directive accepts exactly two arguments");
1928
+ handle = args[0];
1929
+ prefix = args[1];
1930
+ if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
1931
+ if (_hasOwnProperty$1.call(state.tagMap, handle)) throwError(state, "there is a previously declared suffix for \"" + handle + "\" tag handle");
1932
+ if (!PATTERN_TAG_URI.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
1933
+ state.tagMap[handle] = prefix;
1934
+ }
1935
+ };
1936
+ function captureSegment(state, start, end, checkJson) {
1937
+ var _position, _length, _character, _result;
1938
+ var scalar = state.result;
1939
+ if (scalar.startPosition == -1) scalar.startPosition = start;
1940
+ if (start <= end) {
1941
+ _result = state.input.slice(start, end);
1942
+ if (checkJson) for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
1943
+ _character = _result.charCodeAt(_position);
1944
+ if (!(9 === _character || 32 <= _character && _character <= 1114111)) throwError(state, "expected valid JSON character");
1945
+ }
1946
+ else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters");
1947
+ scalar.value += _result;
1948
+ scalar.endPosition = end;
1949
+ }
1950
+ }
1951
+ function storeMappingPair(state, _result, keyTag, keyNode, valueNode) {
1952
+ if (keyNode == null) return;
1953
+ if (null === _result) _result = {
1954
+ startPosition: keyNode.startPosition,
1955
+ endPosition: valueNode.endPosition,
1956
+ parent: null,
1957
+ errors: [],
1958
+ mappings: [],
1959
+ kind: ast.Kind.MAP
1960
+ };
1961
+ var mapping = ast.newMapping(keyNode, valueNode);
1962
+ mapping.parent = _result;
1963
+ keyNode.parent = mapping;
1964
+ if (valueNode != null) valueNode.parent = mapping;
1965
+ !state.ignoreDuplicateKeys && _result.mappings.forEach((sibling) => {
1966
+ if (sibling.key && sibling.key.value === (mapping.key && mapping.key.value)) {
1967
+ throwErrorFromPosition(state, mapping.key.startPosition, "duplicate key");
1968
+ throwErrorFromPosition(state, sibling.key.startPosition, "duplicate key");
1969
+ }
1970
+ });
1971
+ _result.mappings.push(mapping);
1972
+ _result.endPosition = valueNode ? valueNode.endPosition : keyNode.endPosition + 1;
1973
+ return _result;
1974
+ }
1975
+ function readLineBreak(state) {
1976
+ var ch = state.input.charCodeAt(state.position);
1977
+ if (10 === ch) state.position++;
1978
+ else if (13 === ch) {
1979
+ state.position++;
1980
+ if (10 === state.input.charCodeAt(state.position)) state.position++;
1981
+ } else throwError(state, "a line break is expected");
1982
+ state.line += 1;
1983
+ state.lineStart = state.position;
1984
+ state.lines.push({
1985
+ start: state.lineStart,
1986
+ line: state.line
1987
+ });
1988
+ }
1989
+ function positionToLine(state, position) {
1990
+ var line;
1991
+ for (var i$1 = 0; i$1 < state.lines.length; i$1++) {
1992
+ if (state.lines[i$1].start > position) break;
1993
+ line = state.lines[i$1];
1994
+ }
1995
+ if (!line) return {
1996
+ start: 0,
1997
+ line: 0
1998
+ };
1999
+ return line;
2000
+ }
2001
+ function readComment(state) {
2002
+ var ch = 0, _position = state.position;
2003
+ do
2004
+ ch = state.input.charCodeAt(++state.position);
2005
+ while (0 !== ch && !is_EOL(ch));
2006
+ state.comments.push({
2007
+ startPosition: _position,
2008
+ endPosition: state.position,
2009
+ value: state.input.slice(_position + 1, state.position)
2010
+ });
2011
+ }
2012
+ function skipSeparationSpace(state, allowComments, checkIndent) {
2013
+ var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
2014
+ while (0 !== ch) {
2015
+ while (is_WHITE_SPACE(ch)) {
2016
+ if (ch === 9) state.errors.push(generateError(state, "Using tabs can lead to unpredictable results", true));
2017
+ ch = state.input.charCodeAt(++state.position);
2018
+ }
2019
+ if (allowComments && 35 === ch) {
2020
+ readComment(state);
2021
+ ch = state.input.charCodeAt(state.position);
2022
+ }
2023
+ if (is_EOL(ch)) {
2024
+ readLineBreak(state);
2025
+ ch = state.input.charCodeAt(state.position);
2026
+ lineBreaks++;
2027
+ state.lineIndent = 0;
2028
+ while (32 === ch) {
2029
+ state.lineIndent++;
2030
+ ch = state.input.charCodeAt(++state.position);
2031
+ }
2032
+ } else break;
2033
+ }
2034
+ if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) throwWarning(state, "deficient indentation");
2035
+ return lineBreaks;
2036
+ }
2037
+ function testDocumentSeparator(state) {
2038
+ var _position = state.position, ch = state.input.charCodeAt(_position);
2039
+ if ((45 === ch || 46 === ch) && state.input.charCodeAt(_position + 1) === ch && state.input.charCodeAt(_position + 2) === ch) {
2040
+ _position += 3;
2041
+ ch = state.input.charCodeAt(_position);
2042
+ if (ch === 0 || is_WS_OR_EOL(ch)) return true;
2043
+ }
2044
+ return false;
2045
+ }
2046
+ function writeFoldedLines(state, scalar, count) {
2047
+ if (1 === count) scalar.value += " ";
2048
+ else if (count > 1) scalar.value += common$1.repeat("\n", count - 1);
2049
+ }
2050
+ function readPlainScalar(state, nodeIndent, withinFlowCollection) {
2051
+ var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
2052
+ var state_result = ast.newScalar();
2053
+ state_result.plainScalar = true;
2054
+ state.result = state_result;
2055
+ ch = state.input.charCodeAt(state.position);
2056
+ if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || 35 === ch || 38 === ch || 42 === ch || 33 === ch || 124 === ch || 62 === ch || 39 === ch || 34 === ch || 37 === ch || 64 === ch || 96 === ch) return false;
2057
+ if (63 === ch || 45 === ch) {
2058
+ following = state.input.charCodeAt(state.position + 1);
2059
+ if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) return false;
2060
+ }
2061
+ state.kind = "scalar";
2062
+ captureStart = captureEnd = state.position;
2063
+ hasPendingContent = false;
2064
+ while (0 !== ch) {
2065
+ if (58 === ch) {
2066
+ following = state.input.charCodeAt(state.position + 1);
2067
+ if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) break;
2068
+ } else if (35 === ch) {
2069
+ preceding = state.input.charCodeAt(state.position - 1);
2070
+ if (is_WS_OR_EOL(preceding)) break;
2071
+ } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) break;
2072
+ else if (is_EOL(ch)) {
2073
+ _line = state.line;
2074
+ _lineStart = state.lineStart;
2075
+ _lineIndent = state.lineIndent;
2076
+ skipSeparationSpace(state, false, -1);
2077
+ if (state.lineIndent >= nodeIndent) {
2078
+ hasPendingContent = true;
2079
+ ch = state.input.charCodeAt(state.position);
2080
+ continue;
2081
+ } else {
2082
+ state.position = captureEnd;
2083
+ state.line = _line;
2084
+ state.lineStart = _lineStart;
2085
+ state.lineIndent = _lineIndent;
2086
+ break;
2087
+ }
2088
+ }
2089
+ if (hasPendingContent) {
2090
+ captureSegment(state, captureStart, captureEnd, false);
2091
+ writeFoldedLines(state, state_result, state.line - _line);
2092
+ captureStart = captureEnd = state.position;
2093
+ hasPendingContent = false;
2094
+ }
2095
+ if (!is_WHITE_SPACE(ch)) captureEnd = state.position + 1;
2096
+ ch = state.input.charCodeAt(++state.position);
2097
+ if (state.position >= state.input.length) return false;
2098
+ }
2099
+ captureSegment(state, captureStart, captureEnd, false);
2100
+ if (state.result.startPosition != -1) {
2101
+ state_result.rawValue = state.input.substring(state_result.startPosition, state_result.endPosition);
2102
+ return true;
2103
+ }
2104
+ state.kind = _kind;
2105
+ state.result = _result;
2106
+ return false;
2107
+ }
2108
+ function readSingleQuotedScalar(state, nodeIndent) {
2109
+ var ch = state.input.charCodeAt(state.position), captureStart, captureEnd;
2110
+ if (39 !== ch) return false;
2111
+ var scalar = ast.newScalar();
2112
+ scalar.singleQuoted = true;
2113
+ state.kind = "scalar";
2114
+ state.result = scalar;
2115
+ scalar.startPosition = state.position;
2116
+ state.position++;
2117
+ captureStart = captureEnd = state.position;
2118
+ while (0 !== (ch = state.input.charCodeAt(state.position))) if (39 === ch) {
2119
+ captureSegment(state, captureStart, state.position, true);
2120
+ ch = state.input.charCodeAt(++state.position);
2121
+ scalar.endPosition = state.position;
2122
+ if (39 === ch) {
2123
+ captureStart = captureEnd = state.position;
2124
+ state.position++;
2125
+ } else return true;
2126
+ } else if (is_EOL(ch)) {
2127
+ captureSegment(state, captureStart, captureEnd, true);
2128
+ writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent));
2129
+ captureStart = captureEnd = state.position;
2130
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar");
2131
+ else {
2132
+ state.position++;
2133
+ captureEnd = state.position;
2134
+ scalar.endPosition = state.position;
2135
+ }
2136
+ throwError(state, "unexpected end of the stream within a single quoted scalar");
2137
+ }
2138
+ function readDoubleQuotedScalar(state, nodeIndent) {
2139
+ var captureStart, captureEnd, hexLength, hexResult, tmp, ch = state.input.charCodeAt(state.position);
2140
+ if (34 !== ch) return false;
2141
+ state.kind = "scalar";
2142
+ var scalar = ast.newScalar();
2143
+ scalar.doubleQuoted = true;
2144
+ state.result = scalar;
2145
+ scalar.startPosition = state.position;
2146
+ state.position++;
2147
+ captureStart = captureEnd = state.position;
2148
+ while (0 !== (ch = state.input.charCodeAt(state.position))) if (34 === ch) {
2149
+ captureSegment(state, captureStart, state.position, true);
2150
+ state.position++;
2151
+ scalar.endPosition = state.position;
2152
+ scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition);
2153
+ return true;
2154
+ } else if (92 === ch) {
2155
+ captureSegment(state, captureStart, state.position, true);
2156
+ ch = state.input.charCodeAt(++state.position);
2157
+ if (is_EOL(ch)) skipSeparationSpace(state, false, nodeIndent);
2158
+ else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck[ch])) {
2159
+ scalar.value += state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap[ch];
2160
+ state.position++;
2161
+ } else if ((tmp = escapedHexLen(ch)) > 0) {
2162
+ hexLength = tmp;
2163
+ hexResult = 0;
2164
+ for (; hexLength > 0; hexLength--) {
2165
+ ch = state.input.charCodeAt(++state.position);
2166
+ if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp;
2167
+ else throwError(state, "expected hexadecimal character");
2168
+ }
2169
+ scalar.value += charFromCodepoint(hexResult);
2170
+ state.position++;
2171
+ } else throwError(state, "unknown escape sequence");
2172
+ captureStart = captureEnd = state.position;
2173
+ } else if (is_EOL(ch)) {
2174
+ captureSegment(state, captureStart, captureEnd, true);
2175
+ writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent));
2176
+ captureStart = captureEnd = state.position;
2177
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar");
2178
+ else {
2179
+ state.position++;
2180
+ captureEnd = state.position;
2181
+ }
2182
+ throwError(state, "unexpected end of the stream within a double quoted scalar");
2183
+ }
2184
+ function readFlowCollection(state, nodeIndent) {
2185
+ var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, keyNode, keyTag, valueNode, ch = state.input.charCodeAt(state.position);
2186
+ if (ch === 91) {
2187
+ terminator = 93;
2188
+ isMapping = false;
2189
+ _result = ast.newItems();
2190
+ _result.startPosition = state.position;
2191
+ } else if (ch === 123) {
2192
+ terminator = 125;
2193
+ isMapping = true;
2194
+ _result = ast.newMap();
2195
+ _result.startPosition = state.position;
2196
+ } else return false;
2197
+ if (null !== state.anchor) {
2198
+ _result.anchorId = state.anchor;
2199
+ state.anchorMap[state.anchor] = _result;
2200
+ }
2201
+ ch = state.input.charCodeAt(++state.position);
2202
+ while (0 !== ch) {
2203
+ skipSeparationSpace(state, true, nodeIndent);
2204
+ ch = state.input.charCodeAt(state.position);
2205
+ if (ch === terminator) {
2206
+ state.position++;
2207
+ state.tag = _tag;
2208
+ state.anchor = _anchor;
2209
+ state.kind = isMapping ? "mapping" : "sequence";
2210
+ state.result = _result;
2211
+ _result.endPosition = state.position;
2212
+ return true;
2213
+ } else if (!readNext) {
2214
+ var p = state.position;
2215
+ throwError(state, "missed comma between flow collection entries");
2216
+ state.position = p + 1;
2217
+ }
2218
+ keyTag = keyNode = valueNode = null;
2219
+ isPair = isExplicitPair = false;
2220
+ if (63 === ch) {
2221
+ following = state.input.charCodeAt(state.position + 1);
2222
+ if (is_WS_OR_EOL(following)) {
2223
+ isPair = isExplicitPair = true;
2224
+ state.position++;
2225
+ skipSeparationSpace(state, true, nodeIndent);
2226
+ }
2227
+ }
2228
+ _line = state.line;
2229
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
2230
+ keyTag = state.tag;
2231
+ keyNode = state.result;
2232
+ skipSeparationSpace(state, true, nodeIndent);
2233
+ ch = state.input.charCodeAt(state.position);
2234
+ if ((isExplicitPair || state.line === _line) && 58 === ch) {
2235
+ isPair = true;
2236
+ ch = state.input.charCodeAt(++state.position);
2237
+ skipSeparationSpace(state, true, nodeIndent);
2238
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
2239
+ valueNode = state.result;
2240
+ }
2241
+ if (isMapping) storeMappingPair(state, _result, keyTag, keyNode, valueNode);
2242
+ else if (isPair) {
2243
+ var mp = storeMappingPair(state, null, keyTag, keyNode, valueNode);
2244
+ mp.parent = _result;
2245
+ _result.items.push(mp);
2246
+ } else {
2247
+ if (keyNode) keyNode.parent = _result;
2248
+ _result.items.push(keyNode);
2249
+ }
2250
+ _result.endPosition = state.position + 1;
2251
+ skipSeparationSpace(state, true, nodeIndent);
2252
+ ch = state.input.charCodeAt(state.position);
2253
+ if (44 === ch) {
2254
+ readNext = true;
2255
+ ch = state.input.charCodeAt(++state.position);
2256
+ } else readNext = false;
2257
+ }
2258
+ throwError(state, "unexpected end of the stream within a flow collection");
2259
+ }
2260
+ function readBlockScalar(state, nodeIndent) {
2261
+ var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch = state.input.charCodeAt(state.position);
2262
+ if (ch === 124) folding = false;
2263
+ else if (ch === 62) folding = true;
2264
+ else return false;
2265
+ var sc = ast.newScalar();
2266
+ state.kind = "scalar";
2267
+ state.result = sc;
2268
+ sc.startPosition = state.position;
2269
+ while (0 !== ch) {
2270
+ ch = state.input.charCodeAt(++state.position);
2271
+ if (43 === ch || 45 === ch) if (CHOMPING_CLIP === chomping) chomping = 43 === ch ? CHOMPING_KEEP : CHOMPING_STRIP;
2272
+ else throwError(state, "repeat of a chomping mode identifier");
2273
+ else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
2274
+ else if (!detectedIndent) {
2275
+ textIndent = nodeIndent + tmp - 1;
2276
+ detectedIndent = true;
2277
+ } else throwError(state, "repeat of an indentation width identifier");
2278
+ else break;
2279
+ }
2280
+ if (is_WHITE_SPACE(ch)) {
2281
+ do
2282
+ ch = state.input.charCodeAt(++state.position);
2283
+ while (is_WHITE_SPACE(ch));
2284
+ if (35 === ch) {
2285
+ readComment(state);
2286
+ ch = state.input.charCodeAt(state.position);
2287
+ }
2288
+ }
2289
+ while (0 !== ch) {
2290
+ readLineBreak(state);
2291
+ state.lineIndent = 0;
2292
+ ch = state.input.charCodeAt(state.position);
2293
+ while ((!detectedIndent || state.lineIndent < textIndent) && 32 === ch) {
2294
+ state.lineIndent++;
2295
+ ch = state.input.charCodeAt(++state.position);
2296
+ }
2297
+ if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent;
2298
+ if (is_EOL(ch)) {
2299
+ emptyLines++;
2300
+ continue;
2301
+ }
2302
+ if (state.lineIndent < textIndent) {
2303
+ if (chomping === CHOMPING_KEEP) sc.value += common$1.repeat("\n", emptyLines);
2304
+ else if (chomping === CHOMPING_CLIP) {
2305
+ if (detectedIndent) sc.value += "\n";
2306
+ }
2307
+ break;
2308
+ }
2309
+ if (folding) if (is_WHITE_SPACE(ch)) {
2310
+ atMoreIndented = true;
2311
+ sc.value += common$1.repeat("\n", emptyLines + 1);
2312
+ } else if (atMoreIndented) {
2313
+ atMoreIndented = false;
2314
+ sc.value += common$1.repeat("\n", emptyLines + 1);
2315
+ } else if (0 === emptyLines) {
2316
+ if (detectedIndent) sc.value += " ";
2317
+ } else sc.value += common$1.repeat("\n", emptyLines);
2318
+ else if (detectedIndent) sc.value += common$1.repeat("\n", emptyLines + 1);
2319
+ detectedIndent = true;
2320
+ emptyLines = 0;
2321
+ captureStart = state.position;
2322
+ while (!is_EOL(ch) && 0 !== ch) ch = state.input.charCodeAt(++state.position);
2323
+ captureSegment(state, captureStart, state.position, false);
2324
+ }
2325
+ sc.endPosition = state.position;
2326
+ var i$1 = state.position - 1;
2327
+ var needMinus = false;
2328
+ while (true) {
2329
+ var c = state.input[i$1];
2330
+ if (c == "\r" || c == "\n") {
2331
+ if (needMinus) i$1--;
2332
+ break;
2333
+ }
2334
+ if (c != " " && c != " ") break;
2335
+ i$1--;
2336
+ }
2337
+ sc.endPosition = i$1;
2338
+ sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition);
2339
+ return true;
2340
+ }
2341
+ function readBlockSequence(state, nodeIndent) {
2342
+ var _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newItems(), following, detected = false, ch;
2343
+ if (null !== state.anchor) {
2344
+ _result.anchorId = state.anchor;
2345
+ state.anchorMap[state.anchor] = _result;
2346
+ }
2347
+ _result.startPosition = state.position;
2348
+ ch = state.input.charCodeAt(state.position);
2349
+ while (0 !== ch) {
2350
+ if (45 !== ch) break;
2351
+ following = state.input.charCodeAt(state.position + 1);
2352
+ if (!is_WS_OR_EOL(following)) break;
2353
+ detected = true;
2354
+ state.position++;
2355
+ if (skipSeparationSpace(state, true, -1)) {
2356
+ if (state.lineIndent <= nodeIndent) {
2357
+ _result.items.push(null);
2358
+ ch = state.input.charCodeAt(state.position);
2359
+ continue;
2360
+ }
2361
+ }
2362
+ _line = state.line;
2363
+ composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
2364
+ if (state.result) {
2365
+ state.result.parent = _result;
2366
+ _result.items.push(state.result);
2367
+ }
2368
+ skipSeparationSpace(state, true, -1);
2369
+ ch = state.input.charCodeAt(state.position);
2370
+ if ((state.line === _line || state.lineIndent > nodeIndent) && 0 !== ch) throwError(state, "bad indentation of a sequence entry");
2371
+ else if (state.lineIndent < nodeIndent) break;
2372
+ }
2373
+ _result.endPosition = state.position;
2374
+ if (detected) {
2375
+ state.tag = _tag;
2376
+ state.anchor = _anchor;
2377
+ state.kind = "sequence";
2378
+ state.result = _result;
2379
+ _result.endPosition = state.position;
2380
+ return true;
2381
+ }
2382
+ return false;
2383
+ }
2384
+ function readBlockMapping(state, nodeIndent, flowIndent) {
2385
+ var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newMap(), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
2386
+ _result.startPosition = state.position;
2387
+ if (null !== state.anchor) {
2388
+ _result.anchorId = state.anchor;
2389
+ state.anchorMap[state.anchor] = _result;
2390
+ }
2391
+ ch = state.input.charCodeAt(state.position);
2392
+ while (0 !== ch) {
2393
+ following = state.input.charCodeAt(state.position + 1);
2394
+ _line = state.line;
2395
+ if ((63 === ch || 58 === ch) && is_WS_OR_EOL(following)) {
2396
+ if (63 === ch) {
2397
+ if (atExplicitKey) {
2398
+ storeMappingPair(state, _result, keyTag, keyNode, null);
2399
+ keyTag = keyNode = valueNode = null;
2400
+ }
2401
+ detected = true;
2402
+ atExplicitKey = true;
2403
+ allowCompact = true;
2404
+ } else if (atExplicitKey) {
2405
+ atExplicitKey = false;
2406
+ allowCompact = true;
2407
+ } else throwError(state, "incomplete explicit mapping pair; a key node is missed");
2408
+ state.position += 1;
2409
+ ch = following;
2410
+ } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) if (state.line === _line) {
2411
+ ch = state.input.charCodeAt(state.position);
2412
+ while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position);
2413
+ if (58 === ch) {
2414
+ ch = state.input.charCodeAt(++state.position);
2415
+ if (!is_WS_OR_EOL(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
2416
+ if (atExplicitKey) {
2417
+ storeMappingPair(state, _result, keyTag, keyNode, null);
2418
+ keyTag = keyNode = valueNode = null;
2419
+ }
2420
+ detected = true;
2421
+ atExplicitKey = false;
2422
+ allowCompact = false;
2423
+ keyTag = state.tag;
2424
+ keyNode = state.result;
2425
+ } else if (state.position == state.lineStart && testDocumentSeparator(state)) break;
2426
+ else if (detected) throwError(state, "can not read an implicit mapping pair; a colon is missed");
2427
+ else {
2428
+ state.tag = _tag;
2429
+ state.anchor = _anchor;
2430
+ return true;
2431
+ }
2432
+ } else if (detected) {
2433
+ throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
2434
+ while (state.position > 0) {
2435
+ ch = state.input.charCodeAt(--state.position);
2436
+ if (is_EOL(ch)) {
2437
+ state.position++;
2438
+ break;
2439
+ }
2440
+ }
2441
+ } else {
2442
+ state.tag = _tag;
2443
+ state.anchor = _anchor;
2444
+ return true;
2445
+ }
2446
+ else break;
2447
+ if (state.line === _line || state.lineIndent > nodeIndent) {
2448
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state.result;
2449
+ else valueNode = state.result;
2450
+ if (!atExplicitKey) {
2451
+ storeMappingPair(state, _result, keyTag, keyNode, valueNode);
2452
+ keyTag = keyNode = valueNode = null;
2453
+ }
2454
+ skipSeparationSpace(state, true, -1);
2455
+ ch = state.input.charCodeAt(state.position);
2456
+ }
2457
+ if (state.lineIndent > nodeIndent && 0 !== ch) throwError(state, "bad indentation of a mapping entry");
2458
+ else if (state.lineIndent < nodeIndent) break;
2459
+ }
2460
+ if (atExplicitKey) storeMappingPair(state, _result, keyTag, keyNode, null);
2461
+ if (detected) {
2462
+ state.tag = _tag;
2463
+ state.anchor = _anchor;
2464
+ state.kind = "mapping";
2465
+ state.result = _result;
2466
+ }
2467
+ return detected;
2468
+ }
2469
+ function readTagProperty(state) {
2470
+ var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch = state.input.charCodeAt(state.position);
2471
+ if (33 !== ch) return false;
2472
+ if (null !== state.tag) throwError(state, "duplication of a tag property");
2473
+ ch = state.input.charCodeAt(++state.position);
2474
+ if (60 === ch) {
2475
+ isVerbatim = true;
2476
+ ch = state.input.charCodeAt(++state.position);
2477
+ } else if (33 === ch) {
2478
+ isNamed = true;
2479
+ tagHandle = "!!";
2480
+ ch = state.input.charCodeAt(++state.position);
2481
+ } else tagHandle = "!";
2482
+ _position = state.position;
2483
+ if (isVerbatim) {
2484
+ do
2485
+ ch = state.input.charCodeAt(++state.position);
2486
+ while (0 !== ch && 62 !== ch);
2487
+ if (state.position < state.length) {
2488
+ tagName = state.input.slice(_position, state.position);
2489
+ ch = state.input.charCodeAt(++state.position);
2490
+ } else throwError(state, "unexpected end of the stream within a verbatim tag");
2491
+ } else {
2492
+ while (0 !== ch && !is_WS_OR_EOL(ch)) {
2493
+ if (33 === ch) if (!isNamed) {
2494
+ tagHandle = state.input.slice(_position - 1, state.position + 1);
2495
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters");
2496
+ isNamed = true;
2497
+ _position = state.position + 1;
2498
+ } else throwError(state, "tag suffix cannot contain exclamation marks");
2499
+ ch = state.input.charCodeAt(++state.position);
2500
+ }
2501
+ tagName = state.input.slice(_position, state.position);
2502
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters");
2503
+ }
2504
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state, "tag name cannot contain such characters: " + tagName);
2505
+ if (isVerbatim) state.tag = tagName;
2506
+ else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) state.tag = state.tagMap[tagHandle] + tagName;
2507
+ else if ("!" === tagHandle) state.tag = "!" + tagName;
2508
+ else if ("!!" === tagHandle) state.tag = "tag:yaml.org,2002:" + tagName;
2509
+ else throwError(state, "undeclared tag handle \"" + tagHandle + "\"");
2510
+ return true;
2511
+ }
2512
+ function readAnchorProperty(state) {
2513
+ var _position, ch = state.input.charCodeAt(state.position);
2514
+ if (38 !== ch) return false;
2515
+ if (null !== state.anchor) throwError(state, "duplication of an anchor property");
2516
+ ch = state.input.charCodeAt(++state.position);
2517
+ _position = state.position;
2518
+ while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position);
2519
+ if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character");
2520
+ state.anchor = state.input.slice(_position, state.position);
2521
+ return true;
2522
+ }
2523
+ function readAlias(state) {
2524
+ var _position, alias;
2525
+ state.length;
2526
+ state.input;
2527
+ var ch = state.input.charCodeAt(state.position);
2528
+ if (42 !== ch) return false;
2529
+ ch = state.input.charCodeAt(++state.position);
2530
+ _position = state.position;
2531
+ while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position);
2532
+ if (state.position <= _position) {
2533
+ throwError(state, "name of an alias node must contain at least one character");
2534
+ state.position = _position + 1;
2535
+ }
2536
+ alias = state.input.slice(_position, state.position);
2537
+ if (!state.anchorMap.hasOwnProperty(alias)) {
2538
+ throwError(state, "unidentified alias \"" + alias + "\"");
2539
+ if (state.position <= _position) state.position = _position + 1;
2540
+ }
2541
+ state.result = ast.newAnchorRef(alias, _position, state.position, state.anchorMap[alias]);
2542
+ skipSeparationSpace(state, true, -1);
2543
+ return true;
2544
+ }
2545
+ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
2546
+ var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent;
2547
+ state.tag = null;
2548
+ state.anchor = null;
2549
+ state.kind = null;
2550
+ state.result = null;
2551
+ allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
2552
+ if (allowToSeek) {
2553
+ if (skipSeparationSpace(state, true, -1)) {
2554
+ atNewLine = true;
2555
+ if (state.lineIndent > parentIndent) indentStatus = 1;
2556
+ else if (state.lineIndent === parentIndent) indentStatus = 0;
2557
+ else if (state.lineIndent < parentIndent) indentStatus = -1;
2558
+ }
2559
+ }
2560
+ let tagStart = state.position;
2561
+ state.position - state.lineStart;
2562
+ if (1 === indentStatus) while (readTagProperty(state) || readAnchorProperty(state)) if (skipSeparationSpace(state, true, -1)) {
2563
+ atNewLine = true;
2564
+ allowBlockCollections = allowBlockStyles;
2565
+ if (state.lineIndent > parentIndent) indentStatus = 1;
2566
+ else if (state.lineIndent === parentIndent) indentStatus = 0;
2567
+ else if (state.lineIndent < parentIndent) indentStatus = -1;
2568
+ } else allowBlockCollections = false;
2569
+ if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact;
2570
+ if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) {
2571
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent;
2572
+ else flowIndent = parentIndent + 1;
2573
+ blockIndent = state.position - state.lineStart;
2574
+ if (1 === indentStatus) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true;
2575
+ else {
2576
+ if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true;
2577
+ else if (readAlias(state)) {
2578
+ hasContent = true;
2579
+ if (null !== state.tag || null !== state.anchor) throwError(state, "alias node should not have any properties");
2580
+ } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
2581
+ hasContent = true;
2582
+ if (null === state.tag) state.tag = "?";
2583
+ }
2584
+ if (null !== state.anchor) {
2585
+ state.anchorMap[state.anchor] = state.result;
2586
+ state.result.anchorId = state.anchor;
2587
+ }
2588
+ }
2589
+ else if (0 === indentStatus) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
2590
+ }
2591
+ if (null !== state.tag && "!" !== state.tag) if (state.tag == "!include") {
2592
+ if (!state.result) {
2593
+ state.result = ast.newScalar();
2594
+ state.result.startPosition = state.position;
2595
+ state.result.endPosition = state.position;
2596
+ throwError(state, "!include without value");
2597
+ }
2598
+ state.result.kind = ast.Kind.INCLUDE_REF;
2599
+ } else if ("?" === state.tag) for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
2600
+ type = state.implicitTypes[typeIndex];
2601
+ var vl = state.result["value"];
2602
+ if (type.resolve(vl)) {
2603
+ state.result.valueObject = type.construct(state.result["value"]);
2604
+ state.tag = type.tag;
2605
+ if (null !== state.anchor) {
2606
+ state.result.anchorId = state.anchor;
2607
+ state.anchorMap[state.anchor] = state.result;
2608
+ }
2609
+ break;
2610
+ }
2611
+ }
2612
+ else if (_hasOwnProperty$1.call(state.typeMap, state.tag)) {
2613
+ type = state.typeMap[state.tag];
2614
+ if (null !== state.result && type.kind !== state.kind) throwError(state, "unacceptable node kind for !<" + state.tag + "> tag; it should be \"" + type.kind + "\", not \"" + state.kind + "\"");
2615
+ if (!type.resolve(state.result)) throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
2616
+ else {
2617
+ state.result = type.construct(state.result);
2618
+ if (null !== state.anchor) {
2619
+ state.result.anchorId = state.anchor;
2620
+ state.anchorMap[state.anchor] = state.result;
2621
+ }
2622
+ }
2623
+ } else throwErrorFromPosition(state, tagStart, "unknown tag <" + state.tag + ">", false, true);
2624
+ return null !== state.tag || null !== state.anchor || hasContent;
2625
+ }
2626
+ function readDocument(state) {
2627
+ var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
2628
+ state.version = null;
2629
+ state.checkLineBreaks = state.legacy;
2630
+ state.tagMap = {};
2631
+ state.anchorMap = {};
2632
+ state.comments = [];
2633
+ while (0 !== (ch = state.input.charCodeAt(state.position))) {
2634
+ skipSeparationSpace(state, true, -1);
2635
+ ch = state.input.charCodeAt(state.position);
2636
+ if (state.lineIndent > 0 || 37 !== ch) break;
2637
+ hasDirectives = true;
2638
+ ch = state.input.charCodeAt(++state.position);
2639
+ _position = state.position;
2640
+ while (0 !== ch && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position);
2641
+ directiveName = state.input.slice(_position, state.position);
2642
+ directiveArgs = [];
2643
+ if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length");
2644
+ while (0 !== ch) {
2645
+ while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position);
2646
+ if (35 === ch) {
2647
+ readComment(state);
2648
+ ch = state.input.charCodeAt(state.position);
2649
+ break;
2650
+ }
2651
+ if (is_EOL(ch)) break;
2652
+ _position = state.position;
2653
+ while (0 !== ch && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position);
2654
+ directiveArgs.push(state.input.slice(_position, state.position));
2655
+ }
2656
+ if (0 !== ch) readLineBreak(state);
2657
+ if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state, directiveName, directiveArgs);
2658
+ else {
2659
+ throwWarning(state, "unknown document directive \"" + directiveName + "\"");
2660
+ state.position++;
2661
+ }
2662
+ }
2663
+ skipSeparationSpace(state, true, -1);
2664
+ if (0 === state.lineIndent && 45 === state.input.charCodeAt(state.position) && 45 === state.input.charCodeAt(state.position + 1) && 45 === state.input.charCodeAt(state.position + 2)) {
2665
+ state.position += 3;
2666
+ skipSeparationSpace(state, true, -1);
2667
+ } else if (hasDirectives) throwError(state, "directives end mark is expected");
2668
+ composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
2669
+ skipSeparationSpace(state, true, -1);
2670
+ if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) throwWarning(state, "non-ASCII line breaks are interpreted as content");
2671
+ state.result.comments = state.comments;
2672
+ state.documents.push(state.result);
2673
+ if (state.position === state.lineStart && testDocumentSeparator(state)) {
2674
+ if (46 === state.input.charCodeAt(state.position)) {
2675
+ state.position += 3;
2676
+ skipSeparationSpace(state, true, -1);
2677
+ }
2678
+ return;
2679
+ }
2680
+ if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected");
2681
+ else return;
2682
+ }
2683
+ function loadDocuments(input, options) {
2684
+ input = String(input);
2685
+ options = options || {};
2686
+ let inputLength = input.length;
2687
+ if (inputLength !== 0) {
2688
+ if (10 !== input.charCodeAt(inputLength - 1) && 13 !== input.charCodeAt(inputLength - 1)) input += "\n";
2689
+ if (input.charCodeAt(0) === 65279) input = input.slice(1);
2690
+ }
2691
+ var state = new State$1(input, options);
2692
+ state.input += "\0";
2693
+ while (32 === state.input.charCodeAt(state.position)) {
2694
+ state.lineIndent += 1;
2695
+ state.position += 1;
2696
+ }
2697
+ while (state.position < state.length - 1) {
2698
+ var q = state.position;
2699
+ readDocument(state);
2700
+ if (state.position <= q) {
2701
+ for (; state.position < state.length - 1; state.position++) if (state.input.charAt(state.position) == "\n") break;
2702
+ }
2703
+ }
2704
+ let documents = state.documents;
2705
+ let docsCount = documents.length;
2706
+ if (docsCount > 0) documents[docsCount - 1].endPosition = inputLength;
2707
+ for (let x of documents) {
2708
+ x.errors = state.errors;
2709
+ if (x.startPosition > x.endPosition) x.startPosition = x.endPosition;
2710
+ }
2711
+ return documents;
2712
+ }
2713
+ function loadAll(input, iterator, options = {}) {
2714
+ var documents = loadDocuments(input, options), index, length;
2715
+ for (index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]);
2716
+ }
2717
+ exports.loadAll = loadAll;
2718
+ function load(input, options = {}) {
2719
+ var documents = loadDocuments(input, options);
2720
+ if (0 === documents.length) return;
2721
+ else if (1 === documents.length) return documents[0];
2722
+ var e = new YAMLException$1("expected a single document in the stream, but found more");
2723
+ e.mark = new Mark("", "", 0, 0, 0);
2724
+ e.mark.position = documents[0].endPosition;
2725
+ documents[0].errors.push(e);
2726
+ return documents[0];
2727
+ }
2728
+ exports.load = load;
2729
+ function safeLoadAll(input, output, options = {}) {
2730
+ loadAll(input, output, common$1.extend({ schema: DEFAULT_SAFE_SCHEMA$1 }, options));
2731
+ }
2732
+ exports.safeLoadAll = safeLoadAll;
2733
+ function safeLoad(input, options = {}) {
2734
+ return load(input, common$1.extend({ schema: DEFAULT_SAFE_SCHEMA$1 }, options));
2735
+ }
2736
+ exports.safeLoad = safeLoad;
2737
+ module.exports.loadAll = loadAll;
2738
+ module.exports.load = load;
2739
+ module.exports.safeLoadAll = safeLoadAll;
2740
+ module.exports.safeLoad = safeLoad;
2741
+ }) });
2742
+
2743
+ //#endregion
2744
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/dumper.js
2745
+ var require_dumper = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/dumper.js": ((exports) => {
2746
+ Object.defineProperty(exports, "__esModule", { value: true });
2747
+ var common = require_common();
2748
+ var YAMLException = require_exception();
2749
+ var DEFAULT_FULL_SCHEMA = require_default_full();
2750
+ var DEFAULT_SAFE_SCHEMA = require_default_safe();
2751
+ var _toString = Object.prototype.toString;
2752
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
2753
+ var CHAR_TAB = 9;
2754
+ var CHAR_LINE_FEED = 10;
2755
+ var CHAR_CARRIAGE_RETURN = 13;
2756
+ var CHAR_SPACE = 32;
2757
+ var CHAR_EXCLAMATION = 33;
2758
+ var CHAR_DOUBLE_QUOTE = 34;
2759
+ var CHAR_SHARP = 35;
2760
+ var CHAR_PERCENT = 37;
2761
+ var CHAR_AMPERSAND = 38;
2762
+ var CHAR_SINGLE_QUOTE = 39;
2763
+ var CHAR_ASTERISK = 42;
2764
+ var CHAR_COMMA = 44;
2765
+ var CHAR_MINUS = 45;
2766
+ var CHAR_COLON = 58;
2767
+ var CHAR_EQUALS = 61;
2768
+ var CHAR_GREATER_THAN = 62;
2769
+ var CHAR_QUESTION = 63;
2770
+ var CHAR_COMMERCIAL_AT = 64;
2771
+ var CHAR_LEFT_SQUARE_BRACKET = 91;
2772
+ var CHAR_RIGHT_SQUARE_BRACKET = 93;
2773
+ var CHAR_GRAVE_ACCENT = 96;
2774
+ var CHAR_LEFT_CURLY_BRACKET = 123;
2775
+ var CHAR_VERTICAL_LINE = 124;
2776
+ var CHAR_RIGHT_CURLY_BRACKET = 125;
2777
+ var ESCAPE_SEQUENCES = {};
2778
+ ESCAPE_SEQUENCES[0] = "\\0";
2779
+ ESCAPE_SEQUENCES[7] = "\\a";
2780
+ ESCAPE_SEQUENCES[8] = "\\b";
2781
+ ESCAPE_SEQUENCES[9] = "\\t";
2782
+ ESCAPE_SEQUENCES[10] = "\\n";
2783
+ ESCAPE_SEQUENCES[11] = "\\v";
2784
+ ESCAPE_SEQUENCES[12] = "\\f";
2785
+ ESCAPE_SEQUENCES[13] = "\\r";
2786
+ ESCAPE_SEQUENCES[27] = "\\e";
2787
+ ESCAPE_SEQUENCES[34] = "\\\"";
2788
+ ESCAPE_SEQUENCES[92] = "\\\\";
2789
+ ESCAPE_SEQUENCES[133] = "\\N";
2790
+ ESCAPE_SEQUENCES[160] = "\\_";
2791
+ ESCAPE_SEQUENCES[8232] = "\\L";
2792
+ ESCAPE_SEQUENCES[8233] = "\\P";
2793
+ var DEPRECATED_BOOLEANS_SYNTAX = [
2794
+ "y",
2795
+ "Y",
2796
+ "yes",
2797
+ "Yes",
2798
+ "YES",
2799
+ "on",
2800
+ "On",
2801
+ "ON",
2802
+ "n",
2803
+ "N",
2804
+ "no",
2805
+ "No",
2806
+ "NO",
2807
+ "off",
2808
+ "Off",
2809
+ "OFF"
2810
+ ];
2811
+ function compileStyleMap(schema$2, map) {
2812
+ var result, keys, index, length, tag, style, type;
2813
+ if (map === null) return {};
2814
+ result = {};
2815
+ keys = Object.keys(map);
2816
+ for (index = 0, length = keys.length; index < length; index += 1) {
2817
+ tag = keys[index];
2818
+ style = String(map[tag]);
2819
+ if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2);
2820
+ type = schema$2.compiledTypeMap["fallback"][tag];
2821
+ if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style];
2822
+ result[tag] = style;
2823
+ }
2824
+ return result;
2825
+ }
2826
+ function encodeHex(character) {
2827
+ var string = character.toString(16).toUpperCase(), handle, length;
2828
+ if (character <= 255) {
2829
+ handle = "x";
2830
+ length = 2;
2831
+ } else if (character <= 65535) {
2832
+ handle = "u";
2833
+ length = 4;
2834
+ } else if (character <= 4294967295) {
2835
+ handle = "U";
2836
+ length = 8;
2837
+ } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
2838
+ return "\\" + handle + common.repeat("0", length - string.length) + string;
2839
+ }
2840
+ function State(options) {
2841
+ this.schema = options["schema"] || DEFAULT_FULL_SCHEMA;
2842
+ this.indent = Math.max(1, options["indent"] || 2);
2843
+ this.noArrayIndent = options["noArrayIndent"] || false;
2844
+ this.skipInvalid = options["skipInvalid"] || false;
2845
+ this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
2846
+ this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
2847
+ this.sortKeys = options["sortKeys"] || false;
2848
+ this.lineWidth = options["lineWidth"] || 80;
2849
+ this.noRefs = options["noRefs"] || false;
2850
+ this.noCompatMode = options["noCompatMode"] || false;
2851
+ this.condenseFlow = options["condenseFlow"] || false;
2852
+ this.implicitTypes = this.schema.compiledImplicit;
2853
+ this.explicitTypes = this.schema.compiledExplicit;
2854
+ this.comments = options["comments"] || {};
2855
+ this.tag = null;
2856
+ this.result = "";
2857
+ this.duplicates = [];
2858
+ this.usedDuplicates = null;
2859
+ }
2860
+ function indentString(string, spaces) {
2861
+ var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
2862
+ while (position < length) {
2863
+ next = string.indexOf("\n", position);
2864
+ if (next === -1) {
2865
+ line = string.slice(position);
2866
+ position = length;
2867
+ } else {
2868
+ line = string.slice(position, next + 1);
2869
+ position = next + 1;
2870
+ }
2871
+ if (line.length && line !== "\n") result += ind;
2872
+ result += line;
2873
+ }
2874
+ return result;
2875
+ }
2876
+ function generateNextLine(state, level) {
2877
+ return "\n" + common.repeat(" ", state.indent * level);
2878
+ }
2879
+ function testImplicitResolving(state, str) {
2880
+ var index, length, type;
2881
+ for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
2882
+ type = state.implicitTypes[index];
2883
+ if (type.resolve(str)) return true;
2884
+ }
2885
+ return false;
2886
+ }
2887
+ function isWhitespace(c) {
2888
+ return c === CHAR_SPACE || c === CHAR_TAB;
2889
+ }
2890
+ function isPrintable(c) {
2891
+ return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111;
2892
+ }
2893
+ function isNsChar(c) {
2894
+ return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
2895
+ }
2896
+ function isPlainSafe(c, prev) {
2897
+ return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev));
2898
+ }
2899
+ function isPlainSafeFirst(c) {
2900
+ return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
2901
+ }
2902
+ function needIndentIndicator(string) {
2903
+ return /^\n* /.test(string);
2904
+ }
2905
+ var STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5;
2906
+ function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
2907
+ var i$1;
2908
+ var char, prev_char;
2909
+ var hasLineBreak = false;
2910
+ var hasFoldableLine = false;
2911
+ var shouldTrackWidth = lineWidth !== -1;
2912
+ var previousLineBreak = -1;
2913
+ var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1));
2914
+ if (singleLineOnly) for (i$1 = 0; i$1 < string.length; i$1++) {
2915
+ char = string.charCodeAt(i$1);
2916
+ if (!isPrintable(char)) return STYLE_DOUBLE;
2917
+ prev_char = i$1 > 0 ? string.charCodeAt(i$1 - 1) : null;
2918
+ plain = plain && isPlainSafe(char, prev_char);
2919
+ }
2920
+ else {
2921
+ for (i$1 = 0; i$1 < string.length; i$1++) {
2922
+ char = string.charCodeAt(i$1);
2923
+ if (char === CHAR_LINE_FEED) {
2924
+ hasLineBreak = true;
2925
+ if (shouldTrackWidth) {
2926
+ hasFoldableLine = hasFoldableLine || i$1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
2927
+ previousLineBreak = i$1;
2928
+ }
2929
+ } else if (!isPrintable(char)) return STYLE_DOUBLE;
2930
+ prev_char = i$1 > 0 ? string.charCodeAt(i$1 - 1) : null;
2931
+ plain = plain && isPlainSafe(char, prev_char);
2932
+ }
2933
+ hasFoldableLine = hasFoldableLine || shouldTrackWidth && i$1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
2934
+ }
2935
+ if (!hasLineBreak && !hasFoldableLine) return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE;
2936
+ if (indentPerLevel > 9 && needIndentIndicator(string)) return STYLE_DOUBLE;
2937
+ return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
2938
+ }
2939
+ function writeScalar(state, string, level, iskey, pointer) {
2940
+ var _result = function() {
2941
+ if (string.length === 0) return "''";
2942
+ if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) return "'" + string + "'";
2943
+ var indent = state.indent * Math.max(1, level);
2944
+ var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
2945
+ var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
2946
+ function testAmbiguity(string$1) {
2947
+ return testImplicitResolving(state, string$1);
2948
+ }
2949
+ switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {
2950
+ case STYLE_PLAIN: return string;
2951
+ case STYLE_SINGLE: return "'" + string.replace(/'/g, "''") + "'";
2952
+ case STYLE_LITERAL: return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));
2953
+ case STYLE_FOLDED: return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
2954
+ case STYLE_DOUBLE: return "\"" + escapeString(string) + "\"";
2955
+ default: throw new YAMLException("impossible error: invalid scalar style");
2956
+ }
2957
+ }();
2958
+ if (!iskey) {
2959
+ let comment = new Comments$1(state, pointer).write(level, "before-eol");
2960
+ if (comment !== "") _result += " " + comment;
2961
+ }
2962
+ state.dump = _result;
2963
+ }
2964
+ function blockHeader(string, indentPerLevel) {
2965
+ var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
2966
+ var clip = string[string.length - 1] === "\n";
2967
+ return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + "\n";
2968
+ }
2969
+ function dropEndingNewline(string) {
2970
+ return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
2971
+ }
2972
+ function foldString(string, width) {
2973
+ var lineRe = /(\n+)([^\n]*)/g;
2974
+ var result = function() {
2975
+ var nextLF = string.indexOf("\n");
2976
+ nextLF = nextLF !== -1 ? nextLF : string.length;
2977
+ lineRe.lastIndex = nextLF;
2978
+ return foldLine(string.slice(0, nextLF), width);
2979
+ }();
2980
+ var prevMoreIndented = string[0] === "\n" || string[0] === " ";
2981
+ var moreIndented;
2982
+ var match;
2983
+ while (match = lineRe.exec(string)) {
2984
+ var prefix = match[1], line = match[2];
2985
+ moreIndented = line[0] === " ";
2986
+ result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
2987
+ prevMoreIndented = moreIndented;
2988
+ }
2989
+ return result;
2990
+ }
2991
+ function foldLine(line, width) {
2992
+ if (line === "" || line[0] === " ") return line;
2993
+ var breakRe = / [^ ]/g;
2994
+ var match;
2995
+ var start = 0, end, curr = 0, next = 0;
2996
+ var result = "";
2997
+ while (match = breakRe.exec(line)) {
2998
+ next = match.index;
2999
+ if (next - start > width) {
3000
+ end = curr > start ? curr : next;
3001
+ result += "\n" + line.slice(start, end);
3002
+ start = end + 1;
3003
+ }
3004
+ curr = next;
3005
+ }
3006
+ result += "\n";
3007
+ if (line.length - start > width && curr > start) result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
3008
+ else result += line.slice(start);
3009
+ return result.slice(1);
3010
+ }
3011
+ function escapeString(string) {
3012
+ var result = "";
3013
+ var char, nextChar;
3014
+ var escapeSeq;
3015
+ for (var i$1 = 0; i$1 < string.length; i$1++) {
3016
+ char = string.charCodeAt(i$1);
3017
+ if (char >= 55296 && char <= 56319) {
3018
+ nextChar = string.charCodeAt(i$1 + 1);
3019
+ if (nextChar >= 56320 && nextChar <= 57343) {
3020
+ result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536);
3021
+ i$1++;
3022
+ continue;
3023
+ }
3024
+ }
3025
+ escapeSeq = ESCAPE_SEQUENCES[char];
3026
+ result += !escapeSeq && isPrintable(char) ? string[i$1] : escapeSeq || encodeHex(char);
3027
+ }
3028
+ return result;
3029
+ }
3030
+ function writeFlowSequence(state, level, object, pointer) {
3031
+ var _result = "", _tag = state.tag, index, length;
3032
+ for (index = 0, length = object.length; index < length; index += 1) if (writeNode(state, level, object[index], false, false, false, pointer)) {
3033
+ if (index !== 0) _result += "," + (!state.condenseFlow ? " " : "");
3034
+ _result += state.dump;
3035
+ }
3036
+ state.tag = _tag;
3037
+ state.dump = "[" + _result + "]";
3038
+ }
3039
+ function writeBlockSequence(state, level, object, compact, pointer) {
3040
+ var _result = "", _tag = state.tag, index, length;
3041
+ var comments = new Comments$1(state, pointer);
3042
+ _result += comments.write(level, "before-eol");
3043
+ _result += comments.write(level, "leading");
3044
+ for (index = 0, length = object.length; index < length; index += 1) {
3045
+ _result += comments.writeAt(String(index), level, "before");
3046
+ if (writeNode(state, level + 1, object[index], true, true, false, `${pointer}/${index}`)) {
3047
+ if (!compact || index !== 0) _result += generateNextLine(state, level);
3048
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) _result += "-";
3049
+ else _result += "- ";
3050
+ _result += state.dump;
3051
+ }
3052
+ _result += comments.writeAt(String(index), level, "after");
3053
+ }
3054
+ state.tag = _tag;
3055
+ state.dump = _result || "[]";
3056
+ state.dump += comments.write(level, "trailing");
3057
+ }
3058
+ function writeFlowMapping(state, level, object, pointer) {
3059
+ var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
3060
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
3061
+ pairBuffer = "";
3062
+ if (index !== 0) pairBuffer += ", ";
3063
+ if (state.condenseFlow) pairBuffer += "\"";
3064
+ objectKey = objectKeyList[index];
3065
+ objectValue = object[objectKey];
3066
+ if (!writeNode(state, level, objectKey, false, false, false, pointer)) continue;
3067
+ if (state.dump.length > 1024) pairBuffer += "? ";
3068
+ pairBuffer += state.dump + (state.condenseFlow ? "\"" : "") + ":" + (state.condenseFlow ? "" : " ");
3069
+ if (!writeNode(state, level, objectValue, false, false, false, pointer)) continue;
3070
+ pairBuffer += state.dump;
3071
+ _result += pairBuffer;
3072
+ }
3073
+ state.tag = _tag;
3074
+ state.dump = "{" + _result + "}";
3075
+ }
3076
+ function writeBlockMapping(state, level, object, compact, pointer) {
3077
+ var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
3078
+ if (state.sortKeys === true) objectKeyList.sort();
3079
+ else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys);
3080
+ else if (state.sortKeys) throw new YAMLException("sortKeys must be a boolean or a function");
3081
+ var comments = new Comments$1(state, pointer);
3082
+ _result += comments.write(level, "before-eol");
3083
+ _result += comments.write(level, "leading");
3084
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
3085
+ pairBuffer = "";
3086
+ if (!compact || index !== 0) pairBuffer += generateNextLine(state, level);
3087
+ objectKey = objectKeyList[index];
3088
+ objectValue = object[objectKey];
3089
+ _result += comments.writeAt(objectKey, level, "before");
3090
+ if (!writeNode(state, level + 1, objectKey, true, true, true, pointer)) continue;
3091
+ explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
3092
+ if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?";
3093
+ else pairBuffer += "? ";
3094
+ pairBuffer += state.dump;
3095
+ if (explicitPair) pairBuffer += generateNextLine(state, level);
3096
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair, false, `${pointer}/${encodeSegment$1(objectKey)}`)) continue;
3097
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += ":";
3098
+ else pairBuffer += ": ";
3099
+ pairBuffer += state.dump;
3100
+ _result += pairBuffer;
3101
+ _result += comments.writeAt(level, objectKey, "after");
3102
+ }
3103
+ state.tag = _tag;
3104
+ state.dump = _result || "{}";
3105
+ state.dump += comments.write(level, "trailing");
3106
+ }
3107
+ function detectType(state, object, explicit) {
3108
+ var _result, typeList = explicit ? state.explicitTypes : state.implicitTypes, index, length, type, style;
3109
+ for (index = 0, length = typeList.length; index < length; index += 1) {
3110
+ type = typeList[index];
3111
+ if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
3112
+ state.tag = explicit ? type.tag : "?";
3113
+ if (type.represent) {
3114
+ style = state.styleMap[type.tag] || type.defaultStyle;
3115
+ if (_toString.call(type.represent) === "[object Function]") _result = type.represent(object, style);
3116
+ else if (_hasOwnProperty.call(type.represent, style)) _result = type.represent[style](object, style);
3117
+ else throw new YAMLException("!<" + type.tag + "> tag resolver accepts not \"" + style + "\" style");
3118
+ state.dump = _result;
3119
+ }
3120
+ return true;
3121
+ }
3122
+ }
3123
+ return false;
3124
+ }
3125
+ function writeNode(state, level, object, block, compact, iskey, pointer) {
3126
+ state.tag = null;
3127
+ state.dump = object;
3128
+ if (!detectType(state, object, false)) detectType(state, object, true);
3129
+ var type = _toString.call(state.dump);
3130
+ if (block) block = state.flowLevel < 0 || state.flowLevel > level;
3131
+ if (state.tag !== null && state.tag !== "?" || state.indent !== 2 && level > 0) compact = false;
3132
+ var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
3133
+ if (objectOrArray) {
3134
+ duplicateIndex = state.duplicates.indexOf(object);
3135
+ duplicate = duplicateIndex !== -1;
3136
+ }
3137
+ if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) compact = false;
3138
+ if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = "*ref_" + duplicateIndex;
3139
+ else {
3140
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true;
3141
+ if (type === "[object Object]") if (block && Object.keys(state.dump).length !== 0) {
3142
+ writeBlockMapping(state, level, state.dump, compact, pointer);
3143
+ if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump;
3144
+ } else {
3145
+ writeFlowMapping(state, level, state.dump, pointer);
3146
+ if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump;
3147
+ }
3148
+ else if (type === "[object Array]") {
3149
+ var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level;
3150
+ if (block && state.dump.length !== 0) {
3151
+ writeBlockSequence(state, arrayLevel, state.dump, compact, pointer);
3152
+ if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump;
3153
+ } else {
3154
+ writeFlowSequence(state, arrayLevel, state.dump, pointer);
3155
+ if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump;
3156
+ }
3157
+ } else if (type === "[object String]") {
3158
+ if (state.tag !== "?") writeScalar(state, state.dump, level, iskey, pointer);
3159
+ } else {
3160
+ if (state.skipInvalid) return false;
3161
+ throw new YAMLException("unacceptable kind of an object to dump " + type);
3162
+ }
3163
+ if (state.tag !== null && state.tag !== "?") state.dump = "!<" + state.tag + "> " + state.dump;
3164
+ }
3165
+ return true;
3166
+ }
3167
+ function getDuplicateReferences(object, state) {
3168
+ var objects = [], duplicatesIndexes = [], index, length;
3169
+ inspectNode(object, objects, duplicatesIndexes);
3170
+ for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]);
3171
+ state.usedDuplicates = new Array(length);
3172
+ }
3173
+ function inspectNode(object, objects, duplicatesIndexes) {
3174
+ var objectKeyList, index, length;
3175
+ if (object !== null && typeof object === "object") {
3176
+ index = objects.indexOf(object);
3177
+ if (index !== -1) {
3178
+ if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index);
3179
+ } else {
3180
+ objects.push(object);
3181
+ if (Array.isArray(object)) for (index = 0, length = object.length; index < length; index += 1) inspectNode(object[index], objects, duplicatesIndexes);
3182
+ else {
3183
+ objectKeyList = Object.keys(object);
3184
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
3185
+ }
3186
+ }
3187
+ }
3188
+ }
3189
+ function dump(input, options) {
3190
+ options = options || {};
3191
+ var state = new State(options);
3192
+ if (!options.noRefs) getDuplicateReferences(input, state);
3193
+ if (writeNode(state, 0, input, true, true, false, "#")) return state.dump + "\n";
3194
+ return "";
3195
+ }
3196
+ exports.dump = dump;
3197
+ function safeDump(input, options) {
3198
+ return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
3199
+ }
3200
+ exports.safeDump = safeDump;
3201
+ const TILDE_REGEXP$1 = /~/g;
3202
+ const SLASH_REGEXP$1 = /\//g;
3203
+ function encodeSegment$1(input) {
3204
+ return input.replace(TILDE_REGEXP$1, "~0").replace(SLASH_REGEXP$1, "~1");
3205
+ }
3206
+ function Comments$1(state, pointer) {
3207
+ this.state = state;
3208
+ this.comments = {
3209
+ "before-eol": /* @__PURE__ */ new Set(),
3210
+ leading: /* @__PURE__ */ new Set(),
3211
+ trailing: /* @__PURE__ */ new Set(),
3212
+ before: /* @__PURE__ */ new Map(),
3213
+ after: /* @__PURE__ */ new Map()
3214
+ };
3215
+ this.written = /* @__PURE__ */ new WeakSet();
3216
+ if (state.comments !== null && pointer in state.comments) for (let comment of state.comments[pointer]) switch (comment.placement) {
3217
+ case "before-eol":
3218
+ case "leading":
3219
+ case "trailing":
3220
+ this.comments[comment.placement].add(comment);
3221
+ break;
3222
+ case "between":
3223
+ let before = this.comments.before.get(comment.between[1]);
3224
+ if (!before) this.comments.before.set(comment.between[1], new Set([comment]));
3225
+ else before.add(comment);
3226
+ let after = this.comments.after.get(comment.between[0]);
3227
+ if (!after) this.comments.after.set(comment.between[0], new Set([comment]));
3228
+ else after.add(comment);
3229
+ break;
3230
+ }
3231
+ }
3232
+ Comments$1.prototype.write = function(level, placement) {
3233
+ let result = "";
3234
+ for (let comment of this.comments[placement]) result += this._write(comment, level);
3235
+ return result;
3236
+ };
3237
+ Comments$1.prototype.writeAt = function(key, level, placement) {
3238
+ let result = "";
3239
+ let comments = this.comments[placement].get(key);
3240
+ if (comments) for (let comment of comments) result += this._write(comment, level);
3241
+ return result;
3242
+ };
3243
+ Comments$1.prototype._write = function(comment, level) {
3244
+ if (this.written.has(comment)) return "";
3245
+ this.written.add(comment);
3246
+ let result = "#" + comment.value;
3247
+ if (comment.placement === "before-eol") return result;
3248
+ else if (level === 0 && comment.placement === "leading") return result + "\n";
3249
+ else return generateNextLine(this.state, level) + result;
3250
+ };
3251
+ }) });
3252
+
3253
+ //#endregion
3254
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/scalarInference.js
3255
+ var require_scalarInference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/scalarInference.js": ((exports) => {
3256
+ Object.defineProperty(exports, "__esModule", { value: true });
3257
+ function parseYamlBoolean(input) {
3258
+ if ([
3259
+ "true",
3260
+ "True",
3261
+ "TRUE"
3262
+ ].lastIndexOf(input) >= 0) return true;
3263
+ else if ([
3264
+ "false",
3265
+ "False",
3266
+ "FALSE"
3267
+ ].lastIndexOf(input) >= 0) return false;
3268
+ throw `Invalid boolean "${input}"`;
3269
+ }
3270
+ exports.parseYamlBoolean = parseYamlBoolean;
3271
+ function safeParseYamlInteger(input) {
3272
+ if (input.lastIndexOf("0o", 0) === 0) return parseInt(input.substring(2), 8);
3273
+ return parseInt(input);
3274
+ }
3275
+ function parseYamlInteger(input) {
3276
+ const result = safeParseYamlInteger(input);
3277
+ if (Number.isNaN(result)) throw `Invalid integer "${input}"`;
3278
+ return result;
3279
+ }
3280
+ exports.parseYamlInteger = parseYamlInteger;
3281
+ function parseYamlBigInteger(input) {
3282
+ const result = parseYamlInteger(input);
3283
+ if (result > Number.MAX_SAFE_INTEGER && input.lastIndexOf("0o", 0) === -1) return BigInt(input);
3284
+ return result;
3285
+ }
3286
+ exports.parseYamlBigInteger = parseYamlBigInteger;
3287
+ function parseYamlFloat(input) {
3288
+ if ([
3289
+ ".nan",
3290
+ ".NaN",
3291
+ ".NAN"
3292
+ ].lastIndexOf(input) >= 0) return NaN;
3293
+ const match = /^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(input);
3294
+ if (match) return match[1] === "-" ? -Infinity : Infinity;
3295
+ const result = parseFloat(input);
3296
+ if (!isNaN(result)) return result;
3297
+ throw `Invalid float "${input}"`;
3298
+ }
3299
+ exports.parseYamlFloat = parseYamlFloat;
3300
+ var ScalarType;
3301
+ (function(ScalarType$1) {
3302
+ ScalarType$1[ScalarType$1["null"] = 0] = "null";
3303
+ ScalarType$1[ScalarType$1["bool"] = 1] = "bool";
3304
+ ScalarType$1[ScalarType$1["int"] = 2] = "int";
3305
+ ScalarType$1[ScalarType$1["float"] = 3] = "float";
3306
+ ScalarType$1[ScalarType$1["string"] = 4] = "string";
3307
+ })(ScalarType = exports.ScalarType || (exports.ScalarType = {}));
3308
+ function determineScalarType(node) {
3309
+ if (node === void 0) return ScalarType.null;
3310
+ if (node.doubleQuoted || !node.plainScalar || node["singleQuoted"]) return ScalarType.string;
3311
+ const value = node.value;
3312
+ if ([
3313
+ "null",
3314
+ "Null",
3315
+ "NULL",
3316
+ "~",
3317
+ ""
3318
+ ].indexOf(value) >= 0) return ScalarType.null;
3319
+ if (value === null || value === void 0) return ScalarType.null;
3320
+ if ([
3321
+ "true",
3322
+ "True",
3323
+ "TRUE",
3324
+ "false",
3325
+ "False",
3326
+ "FALSE"
3327
+ ].indexOf(value) >= 0) return ScalarType.bool;
3328
+ if (/^[-+]?[0-9]+$/.test(value) || /^0o[0-7]+$/.test(value) || /^0x[0-9a-fA-F]+$/.test(value)) return ScalarType.int;
3329
+ if (/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/.test(value) || /^[-+]?(\.inf|\.Inf|\.INF)$/.test(value) || [
3330
+ ".nan",
3331
+ ".NaN",
3332
+ ".NAN"
3333
+ ].indexOf(value) >= 0) return ScalarType.float;
3334
+ return ScalarType.string;
3335
+ }
3336
+ exports.determineScalarType = determineScalarType;
3337
+ }) });
3338
+
3339
+ //#endregion
3340
+ //#region ../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/index.js
3341
+ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml-ast-parser@0.0.50/node_modules/@stoplight/yaml-ast-parser/dist/src/index.js": ((exports) => {
3342
+ function __export(m) {
3343
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
3344
+ }
3345
+ Object.defineProperty(exports, "__esModule", { value: true });
3346
+ var loader_1 = require_loader();
3347
+ exports.load = loader_1.load;
3348
+ exports.loadAll = loader_1.loadAll;
3349
+ exports.safeLoad = loader_1.safeLoad;
3350
+ exports.safeLoadAll = loader_1.safeLoadAll;
3351
+ var dumper_1 = require_dumper();
3352
+ exports.dump = dumper_1.dump;
3353
+ exports.safeDump = dumper_1.safeDump;
3354
+ exports.YAMLException = require_exception();
3355
+ __export(require_yamlAST());
3356
+ __export(require_scalarInference());
3357
+ }) });
3358
+
3359
+ //#endregion
3360
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/types.js
3361
+ var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/types.js": ((exports) => {
3362
+ Object.defineProperty(exports, "__esModule", { value: true });
3363
+ const yaml_ast_parser_1$2 = require_src$1();
3364
+ exports.Kind = yaml_ast_parser_1$2.Kind;
3365
+ exports.ScalarType = yaml_ast_parser_1$2.ScalarType;
3366
+ }) });
3367
+
3368
+ //#endregion
3369
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/utils.js
3370
+ var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/utils.js": ((exports) => {
3371
+ Object.defineProperty(exports, "__esModule", { value: true });
3372
+ exports.isObject = (sth) => sth !== null && typeof sth === "object";
3373
+ }) });
3374
+
3375
+ //#endregion
3376
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/buildJsonPath.js
3377
+ var require_buildJsonPath = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/buildJsonPath.js": ((exports) => {
3378
+ Object.defineProperty(exports, "__esModule", { value: true });
3379
+ const types_1$4 = require_types();
3380
+ const utils_1$4 = require_utils();
3381
+ function buildJsonPath(node) {
3382
+ const path$1 = [];
3383
+ let prevNode = node;
3384
+ while (node) {
3385
+ switch (node.kind) {
3386
+ case types_1$4.Kind.SCALAR:
3387
+ path$1.unshift(node.value);
3388
+ break;
3389
+ case types_1$4.Kind.MAPPING:
3390
+ if (prevNode !== node.key) if (path$1.length > 0 && utils_1$4.isObject(node.value) && node.value.value === path$1[0]) path$1[0] = node.key.value;
3391
+ else path$1.unshift(node.key.value);
3392
+ break;
3393
+ case types_1$4.Kind.SEQ:
3394
+ if (prevNode) {
3395
+ const index = node.items.indexOf(prevNode);
3396
+ if (prevNode.kind === types_1$4.Kind.SCALAR) path$1[0] = index;
3397
+ else if (index !== -1) path$1.unshift(index);
3398
+ }
3399
+ break;
3400
+ }
3401
+ prevNode = node;
3402
+ node = node.parent;
3403
+ }
3404
+ return path$1;
3405
+ }
3406
+ exports.buildJsonPath = buildJsonPath;
3407
+ }) });
3408
+
3409
+ //#endregion
3410
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/dereferenceAnchor.js
3411
+ var require_dereferenceAnchor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/dereferenceAnchor.js": ((exports) => {
3412
+ Object.defineProperty(exports, "__esModule", { value: true });
3413
+ const types_1$3 = require_types();
3414
+ const utils_1$3 = require_utils();
3415
+ exports.dereferenceAnchor = (node, anchorId) => {
3416
+ if (!utils_1$3.isObject(node)) return node;
3417
+ if (node.kind === types_1$3.Kind.ANCHOR_REF && node.referencesAnchor === anchorId) return null;
3418
+ switch (node.kind) {
3419
+ case types_1$3.Kind.MAP: return Object.assign({}, node, { mappings: node.mappings.map((mapping) => exports.dereferenceAnchor(mapping, anchorId)) });
3420
+ case types_1$3.Kind.SEQ: return Object.assign({}, node, { items: node.items.map((item) => exports.dereferenceAnchor(item, anchorId)) });
3421
+ case types_1$3.Kind.MAPPING: return Object.assign({}, node, { value: exports.dereferenceAnchor(node.value, anchorId) });
3422
+ case types_1$3.Kind.SCALAR: return node;
3423
+ case types_1$3.Kind.ANCHOR_REF:
3424
+ if (utils_1$3.isObject(node.value) && isSelfReferencingAnchorRef(node)) return null;
3425
+ return node;
3426
+ default: return node;
3427
+ }
3428
+ };
3429
+ const isSelfReferencingAnchorRef = (anchorRef) => {
3430
+ const { referencesAnchor } = anchorRef;
3431
+ let node = anchorRef;
3432
+ while (node = node.parent) if ("anchorId" in node && node.anchorId === referencesAnchor) return true;
3433
+ return false;
3434
+ };
3435
+ }) });
3436
+
3437
+ //#endregion
3438
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/getJsonPathForPosition.js
3439
+ var require_getJsonPathForPosition = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/getJsonPathForPosition.js": ((exports) => {
3440
+ Object.defineProperty(exports, "__esModule", { value: true });
3441
+ const buildJsonPath_1$1 = require_buildJsonPath();
3442
+ const types_1$2 = require_types();
3443
+ const utils_1$2 = require_utils();
3444
+ exports.getJsonPathForPosition = ({ ast: ast$3, lineMap }, { line, character }) => {
3445
+ if (line >= lineMap.length || character >= lineMap[line]) return;
3446
+ const startOffset = line === 0 ? 0 : lineMap[line - 1] + 1;
3447
+ const node = findClosestScalar(ast$3, Math.min(lineMap[line] - 1, startOffset + character), line, lineMap);
3448
+ if (!utils_1$2.isObject(node)) return;
3449
+ const path$1 = buildJsonPath_1$1.buildJsonPath(node);
3450
+ if (path$1.length === 0) return;
3451
+ return path$1;
3452
+ };
3453
+ function* walk(node) {
3454
+ switch (node.kind) {
3455
+ case types_1$2.Kind.MAP:
3456
+ if (node.mappings.length !== 0) {
3457
+ for (const mapping of node.mappings) if (utils_1$2.isObject(mapping)) yield mapping;
3458
+ }
3459
+ break;
3460
+ case types_1$2.Kind.MAPPING:
3461
+ if (utils_1$2.isObject(node.key)) yield node.key;
3462
+ if (utils_1$2.isObject(node.value)) yield node.value;
3463
+ break;
3464
+ case types_1$2.Kind.SEQ:
3465
+ if (node.items.length !== 0) {
3466
+ for (const item of node.items) if (utils_1$2.isObject(item)) yield item;
3467
+ }
3468
+ break;
3469
+ case types_1$2.Kind.SCALAR:
3470
+ yield node;
3471
+ break;
3472
+ }
3473
+ }
3474
+ function getFirstScalarChild(node, line, lineMap) {
3475
+ const startOffset = lineMap[line - 1] + 1;
3476
+ const endOffset = lineMap[line];
3477
+ switch (node.kind) {
3478
+ case types_1$2.Kind.MAPPING: return node.key;
3479
+ case types_1$2.Kind.MAP:
3480
+ if (node.mappings.length !== 0) {
3481
+ for (const mapping of node.mappings) if (mapping.startPosition > startOffset && mapping.startPosition <= endOffset) return getFirstScalarChild(mapping, line, lineMap);
3482
+ }
3483
+ break;
3484
+ case types_1$2.Kind.SEQ:
3485
+ if (node.items.length !== 0) {
3486
+ for (const item of node.items) if (item !== null && item.startPosition > startOffset && item.startPosition <= endOffset) return getFirstScalarChild(item, line, lineMap);
3487
+ }
3488
+ break;
3489
+ }
3490
+ return node;
3491
+ }
3492
+ function findClosestScalar(container, offset, line, lineMap) {
3493
+ for (const node of walk(container)) if (node.startPosition <= offset && offset <= node.endPosition) return node.kind === types_1$2.Kind.SCALAR ? node : findClosestScalar(node, offset, line, lineMap);
3494
+ if (lineMap[line - 1] === lineMap[line] - 1) return container;
3495
+ if (container.startPosition < lineMap[line - 1] && offset <= container.endPosition) {
3496
+ if (container.kind !== types_1$2.Kind.MAPPING) return getFirstScalarChild(container, line, lineMap);
3497
+ if (container.value && container.key.endPosition < offset) return getFirstScalarChild(container.value, line, lineMap);
3498
+ }
3499
+ return container;
3500
+ }
3501
+ }) });
3502
+
3503
+ //#endregion
3504
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/lineForPosition.js
3505
+ var require_lineForPosition = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/lineForPosition.js": ((exports) => {
3506
+ Object.defineProperty(exports, "__esModule", { value: true });
3507
+ exports.lineForPosition = (pos, lines, start = 0, end) => {
3508
+ if (pos === 0 || lines.length === 0 || pos < lines[0]) return 0;
3509
+ if (typeof end === "undefined") end = lines.length;
3510
+ const target = Math.floor((end - start) / 2) + start;
3511
+ if (pos >= lines[target] && !lines[target + 1]) return target + 1;
3512
+ const nextLinePos = lines[Math.min(target + 1, lines.length)];
3513
+ if (pos === lines[target] - 1) return target;
3514
+ if (pos >= lines[target] && pos <= nextLinePos) {
3515
+ if (pos === nextLinePos) return target + 2;
3516
+ return target + 1;
3517
+ }
3518
+ if (pos > lines[target]) return exports.lineForPosition(pos, lines, target + 1, end);
3519
+ else return exports.lineForPosition(pos, lines, start, target - 1);
3520
+ };
3521
+ }) });
3522
+
3523
+ //#endregion
3524
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/getLocationForJsonPath.js
3525
+ var require_getLocationForJsonPath = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/getLocationForJsonPath.js": ((exports) => {
3526
+ Object.defineProperty(exports, "__esModule", { value: true });
3527
+ const lineForPosition_1$1 = require_lineForPosition();
3528
+ const types_1$1 = require_types();
3529
+ const utils_1$1 = require_utils();
3530
+ exports.getLocationForJsonPath = ({ ast: ast$3, lineMap, metadata }, path$1, closest = false) => {
3531
+ const node = findNodeAtPath(ast$3, path$1, {
3532
+ closest,
3533
+ mergeKeys: metadata !== void 0 && metadata.mergeKeys === true
3534
+ });
3535
+ if (node === void 0) return;
3536
+ return getLoc(lineMap, {
3537
+ start: getStartPosition(node, lineMap.length > 0 ? lineMap[0] : 0),
3538
+ end: getEndPosition(node)
3539
+ });
3540
+ };
3541
+ function getStartPosition(node, offset) {
3542
+ if (node.parent && node.parent.kind === types_1$1.Kind.MAPPING) {
3543
+ if (node.parent.value === null) return node.parent.endPosition;
3544
+ if (node.kind !== types_1$1.Kind.SCALAR) return node.parent.key.endPosition + 1;
3545
+ }
3546
+ if (node.parent === null && offset - node.startPosition === 0) return 0;
3547
+ return node.startPosition;
3548
+ }
3549
+ function getEndPosition(node) {
3550
+ switch (node.kind) {
3551
+ case types_1$1.Kind.SEQ:
3552
+ const { items } = node;
3553
+ if (items.length !== 0) {
3554
+ const lastItem = items[items.length - 1];
3555
+ if (lastItem !== null) return getEndPosition(lastItem);
3556
+ }
3557
+ break;
3558
+ case types_1$1.Kind.MAPPING:
3559
+ if (node.value !== null) return getEndPosition(node.value);
3560
+ break;
3561
+ case types_1$1.Kind.MAP:
3562
+ if (node.value !== null && node.mappings.length !== 0) return getEndPosition(node.mappings[node.mappings.length - 1]);
3563
+ break;
3564
+ case types_1$1.Kind.SCALAR:
3565
+ if (node.parent !== null && node.parent.kind === types_1$1.Kind.MAPPING && node.parent.value === null) return node.parent.endPosition;
3566
+ break;
3567
+ }
3568
+ return node.endPosition;
3569
+ }
3570
+ function findNodeAtPath(node, path$1, { closest, mergeKeys }) {
3571
+ pathLoop: for (const segment of path$1) {
3572
+ if (!utils_1$1.isObject(node)) return closest ? node : void 0;
3573
+ switch (node.kind) {
3574
+ case types_1$1.Kind.MAP:
3575
+ const mappings = getMappings(node.mappings, mergeKeys);
3576
+ for (let i$1 = mappings.length - 1; i$1 >= 0; i$1--) {
3577
+ const item = mappings[i$1];
3578
+ if (item.key.value === segment) {
3579
+ if (item.value === null) node = item.key;
3580
+ else node = item.value;
3581
+ continue pathLoop;
3582
+ }
3583
+ }
3584
+ return closest ? node : void 0;
3585
+ case types_1$1.Kind.SEQ:
3586
+ for (let i$1 = 0; i$1 < node.items.length; i$1++) if (i$1 === Number(segment)) {
3587
+ const item = node.items[i$1];
3588
+ if (item === null) break;
3589
+ node = item;
3590
+ continue pathLoop;
3591
+ }
3592
+ return closest ? node : void 0;
3593
+ default: return closest ? node : void 0;
3594
+ }
3595
+ }
3596
+ return node;
3597
+ }
3598
+ function getMappings(mappings, mergeKeys) {
3599
+ if (!mergeKeys) return mappings;
3600
+ return mappings.reduce((mergedMappings, mapping) => {
3601
+ if (utils_1$1.isObject(mapping)) if (mapping.key.value === "<<") mergedMappings.push(...reduceMergeKeys$1(mapping.value));
3602
+ else mergedMappings.push(mapping);
3603
+ return mergedMappings;
3604
+ }, []);
3605
+ }
3606
+ function reduceMergeKeys$1(node) {
3607
+ if (!utils_1$1.isObject(node)) return [];
3608
+ switch (node.kind) {
3609
+ case types_1$1.Kind.SEQ: return node.items.reduceRight((items, item) => {
3610
+ items.push(...reduceMergeKeys$1(item));
3611
+ return items;
3612
+ }, []);
3613
+ case types_1$1.Kind.MAP: return node.mappings;
3614
+ case types_1$1.Kind.ANCHOR_REF: return reduceMergeKeys$1(node.value);
3615
+ default: return [];
3616
+ }
3617
+ }
3618
+ const getLoc = (lineMap, { start = 0, end = 0 }) => {
3619
+ const startLine = lineForPosition_1$1.lineForPosition(start, lineMap);
3620
+ const endLine = lineForPosition_1$1.lineForPosition(end, lineMap);
3621
+ return { range: {
3622
+ start: {
3623
+ line: startLine,
3624
+ character: start - (startLine === 0 ? 0 : lineMap[startLine - 1])
3625
+ },
3626
+ end: {
3627
+ line: endLine,
3628
+ character: end - (endLine === 0 ? 0 : lineMap[endLine - 1])
3629
+ }
3630
+ } };
3631
+ };
3632
+ }) });
3633
+
3634
+ //#endregion
3635
+ //#region ../../node_modules/.pnpm/@stoplight+ordered-object-literal@1.0.5/node_modules/@stoplight/ordered-object-literal/src/index.cjs
3636
+ var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+ordered-object-literal@1.0.5/node_modules/@stoplight/ordered-object-literal/src/index.cjs": ((exports) => {
3637
+ Object.defineProperty(exports, "__esModule", { value: true });
3638
+ const ORDER_KEY_ID = `__object_order_${Math.floor(Date.now() / 36e5)}__`;
3639
+ const ORDER_KEY = Symbol.for(ORDER_KEY_ID);
3640
+ const STRINGIFIED_ORDER_KEY = String(ORDER_KEY);
3641
+ const traps$1 = {
3642
+ defineProperty(target, key, descriptor) {
3643
+ if (!Object.prototype.hasOwnProperty.call(target, key) && ORDER_KEY in target) target[ORDER_KEY].push(key);
3644
+ else if ("value" in descriptor && key === ORDER_KEY && descriptor.value.lastIndexOf(ORDER_KEY) === -1) descriptor.value.push(ORDER_KEY);
3645
+ return Reflect.defineProperty(target, key, descriptor);
3646
+ },
3647
+ deleteProperty(target, key) {
3648
+ const hasKey = Object.prototype.hasOwnProperty.call(target, key);
3649
+ const deleted = Reflect.deleteProperty(target, key);
3650
+ if (deleted && hasKey && ORDER_KEY in target) {
3651
+ const index = target[ORDER_KEY].indexOf(key);
3652
+ if (index !== -1) target[ORDER_KEY].splice(index, 1);
3653
+ }
3654
+ return deleted;
3655
+ },
3656
+ ownKeys(target) {
3657
+ if (ORDER_KEY in target) return target[ORDER_KEY];
3658
+ return Reflect.ownKeys(target);
3659
+ },
3660
+ set(target, key, value) {
3661
+ const hasKey = Object.prototype.hasOwnProperty.call(target, key);
3662
+ const set = Reflect.set(target, key, value);
3663
+ if (set && !hasKey && ORDER_KEY in target) target[ORDER_KEY].push(key);
3664
+ return set;
3665
+ }
3666
+ };
3667
+ function createObj(target, order = Reflect.ownKeys(target)) {
3668
+ assertObjectLiteral(target);
3669
+ const t = new Proxy(target, traps$1);
3670
+ setOrder(t, order);
3671
+ return t;
3672
+ }
3673
+ function setOrder(target, order) {
3674
+ if (ORDER_KEY in target) {
3675
+ target[ORDER_KEY].length = 0;
3676
+ target[ORDER_KEY].push(...order);
3677
+ return true;
3678
+ } else return Reflect.defineProperty(target, ORDER_KEY, {
3679
+ configurable: true,
3680
+ value: order
3681
+ });
3682
+ }
3683
+ function getOrder(target) {
3684
+ return target[ORDER_KEY];
3685
+ }
3686
+ function serializeArray(target) {
3687
+ const newTarget = target.slice();
3688
+ for (let i$1 = 0; i$1 < newTarget.length; i$1 += 1) {
3689
+ const value = newTarget[i$1];
3690
+ if (isObject(value)) newTarget[i$1] = Array.isArray(value) ? serializeArray(value) : serialize(value, true);
3691
+ }
3692
+ return newTarget;
3693
+ }
3694
+ function serialize(target, deep) {
3695
+ assertObjectLiteral(target, "Invalid target provided");
3696
+ const newTarget = { ...target };
3697
+ if (ORDER_KEY in target) Object.defineProperty(newTarget, STRINGIFIED_ORDER_KEY, {
3698
+ enumerable: true,
3699
+ value: target[ORDER_KEY].filter((item) => item !== ORDER_KEY)
3700
+ });
3701
+ if (deep) for (const key of Object.keys(target)) {
3702
+ if (key === STRINGIFIED_ORDER_KEY) continue;
3703
+ const value = target[key];
3704
+ if (isObject(value)) newTarget[key] = Array.isArray(value) ? serializeArray(value) : serialize(value, true);
3705
+ }
3706
+ return newTarget;
3707
+ }
3708
+ function deserializeArray(target) {
3709
+ for (let i$1 = 0; i$1 < target.length; i$1 += 1) {
3710
+ const value = target[i$1];
3711
+ if (isObject(value)) target[i$1] = Array.isArray(value) ? deserializeArray(value) : deserialize(value, true);
3712
+ }
3713
+ return target;
3714
+ }
3715
+ function deserialize(target, deep) {
3716
+ assertObjectLiteral(target, "Invalid target provided");
3717
+ const newTarget = createObj(target, STRINGIFIED_ORDER_KEY in target ? target[STRINGIFIED_ORDER_KEY] : Reflect.ownKeys(target));
3718
+ delete newTarget[STRINGIFIED_ORDER_KEY];
3719
+ if (deep) for (const key of Object.keys(target)) {
3720
+ const value = target[key];
3721
+ if (isObject(value)) target[key] = Array.isArray(value) ? deserializeArray(value) : deserialize(value, true);
3722
+ }
3723
+ return newTarget;
3724
+ }
3725
+ function isOrderedObject(target) {
3726
+ return ORDER_KEY in target;
3727
+ }
3728
+ function isObject(maybeObj) {
3729
+ return maybeObj !== null && typeof maybeObj === "object";
3730
+ }
3731
+ function isObjectLiteral(obj) {
3732
+ if (!isObject(obj)) return false;
3733
+ if (obj[Symbol.toStringTag] !== void 0) {
3734
+ const proto = Object.getPrototypeOf(obj);
3735
+ return proto === null || proto === Object.prototype;
3736
+ }
3737
+ return toStringTag(obj) === "Object";
3738
+ }
3739
+ function toStringTag(obj) {
3740
+ const tag = obj[Symbol.toStringTag];
3741
+ if (typeof tag === "string") return tag;
3742
+ const name = Reflect.apply(Object.prototype.toString, obj, []);
3743
+ return name.slice(8, name.length - 1);
3744
+ }
3745
+ function assertObjectLiteral(maybeObj, message) {
3746
+ if (isDevEnv() && !isObjectLiteral(maybeObj)) throw new TypeError(message);
3747
+ }
3748
+ function isDevEnv() {
3749
+ if (typeof process === "undefined" || !isObject(process) || !isObject(process.env)) return false;
3750
+ return process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
3751
+ }
3752
+ exports.ORDER_KEY_ID = ORDER_KEY_ID;
3753
+ exports.default = createObj;
3754
+ exports.deserialize = deserialize;
3755
+ exports.getOrder = getOrder;
3756
+ exports.isOrderedObject = isOrderedObject;
3757
+ exports.serialize = serialize;
3758
+ exports.setOrder = setOrder;
3759
+ }) });
3760
+
3761
+ //#endregion
3762
+ //#region ../../node_modules/.pnpm/@stoplight+types@14.1.1/node_modules/@stoplight/types/dist/index.js
3763
+ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+types@14.1.1/node_modules/@stoplight/types/dist/index.js": ((exports) => {
3764
+ Object.defineProperty(exports, "__esModule", { value: true });
3765
+ exports.HttpOperationSecurityDeclarationTypes = void 0;
3766
+ (function(HttpOperationSecurityDeclarationTypes) {
3767
+ /** Indicates that the operation has no security declarations. */
3768
+ HttpOperationSecurityDeclarationTypes["None"] = "none";
3769
+ /** Indicates that the operation has explicit security declarations. */
3770
+ HttpOperationSecurityDeclarationTypes["Declared"] = "declared";
3771
+ /** Indicates that the operation inherits its security declarations from the service. */
3772
+ HttpOperationSecurityDeclarationTypes["InheritedFromService"] = "inheritedFromService";
3773
+ })(exports.HttpOperationSecurityDeclarationTypes || (exports.HttpOperationSecurityDeclarationTypes = {}));
3774
+ exports.HttpParamStyles = void 0;
3775
+ (function(HttpParamStyles) {
3776
+ /** Used when OAS2 type !== array */
3777
+ HttpParamStyles["Unspecified"] = "unspecified";
3778
+ /**
3779
+ * OAS 3.x style simple
3780
+ * OAS 2 collectionFormat csv
3781
+ */
3782
+ HttpParamStyles["Simple"] = "simple";
3783
+ /**
3784
+ * OAS 3.x style matrix
3785
+ * OAS 2 collectionFormat no support
3786
+ */
3787
+ HttpParamStyles["Matrix"] = "matrix";
3788
+ /**
3789
+ * OAS 3.x style label
3790
+ * OAS 2 collectionFormat no support
3791
+ */
3792
+ HttpParamStyles["Label"] = "label";
3793
+ /**
3794
+ * OAS 3.x style form
3795
+ * OAS 2 collectionFormat
3796
+ * * csv, when explode === false
3797
+ * * multi, when explode === true
3798
+ */
3799
+ HttpParamStyles["Form"] = "form";
3800
+ /**
3801
+ * OAS 3.x no support
3802
+ * OAS 2 collectionFormat csv when explode === undefined
3803
+ */
3804
+ HttpParamStyles["CommaDelimited"] = "commaDelimited";
3805
+ /**
3806
+ * OAS 3.x style spaceDelimited
3807
+ * OAS 2 collectionFormat ssv
3808
+ */
3809
+ HttpParamStyles["SpaceDelimited"] = "spaceDelimited";
3810
+ /**
3811
+ * OAS 3.x style spaceDelimited
3812
+ * OAS 2 collectionFormat pipes
3813
+ */
3814
+ HttpParamStyles["PipeDelimited"] = "pipeDelimited";
3815
+ /**
3816
+ * OAS 3.x style deepObject
3817
+ * OAS 2 collectionFormat no support
3818
+ */
3819
+ HttpParamStyles["DeepObject"] = "deepObject";
3820
+ /**
3821
+ * OAS 3.x style no support
3822
+ * OAS 2 collectionFormat tsv
3823
+ */
3824
+ HttpParamStyles["TabDelimited"] = "tabDelimited";
3825
+ })(exports.HttpParamStyles || (exports.HttpParamStyles = {}));
3826
+ /**
3827
+ * Represents the severity of diagnostics.
3828
+ */
3829
+ exports.DiagnosticSeverity = void 0;
3830
+ (function(DiagnosticSeverity) {
3831
+ /**
3832
+ * Something not allowed by the rules of a language or other means.
3833
+ */
3834
+ DiagnosticSeverity[DiagnosticSeverity["Error"] = 0] = "Error";
3835
+ /**
3836
+ * Something suspicious but allowed.
3837
+ */
3838
+ DiagnosticSeverity[DiagnosticSeverity["Warning"] = 1] = "Warning";
3839
+ /**
3840
+ * Something to inform about but not a problem.
3841
+ */
3842
+ DiagnosticSeverity[DiagnosticSeverity["Information"] = 2] = "Information";
3843
+ /**
3844
+ * Something to hint to a better way of doing it, like proposing
3845
+ * a refactoring.
3846
+ */
3847
+ DiagnosticSeverity[DiagnosticSeverity["Hint"] = 3] = "Hint";
3848
+ })(exports.DiagnosticSeverity || (exports.DiagnosticSeverity = {}));
3849
+ /**
3850
+ * Stoplight node types
3851
+ */
3852
+ exports.NodeType = void 0;
3853
+ (function(NodeType) {
3854
+ NodeType["Article"] = "article";
3855
+ NodeType["HttpService"] = "http_service";
3856
+ NodeType["HttpServer"] = "http_server";
3857
+ NodeType["HttpOperation"] = "http_operation";
3858
+ NodeType["HttpCallback"] = "http_callback";
3859
+ NodeType["HttpWebhook"] = "http_webhook";
3860
+ NodeType["Model"] = "model";
3861
+ NodeType["Generic"] = "generic";
3862
+ NodeType["Unknown"] = "unknown";
3863
+ NodeType["TableOfContents"] = "table_of_contents";
3864
+ NodeType["SpectralRuleset"] = "spectral_ruleset";
3865
+ NodeType["Styleguide"] = "styleguide";
3866
+ NodeType["Image"] = "image";
3867
+ NodeType["StoplightResolutions"] = "stoplight_resolutions";
3868
+ NodeType["StoplightOverride"] = "stoplight_override";
3869
+ })(exports.NodeType || (exports.NodeType = {}));
3870
+ /**
3871
+ * Node data formats
3872
+ */
3873
+ exports.NodeFormat = void 0;
3874
+ (function(NodeFormat) {
3875
+ NodeFormat["Json"] = "json";
3876
+ NodeFormat["Markdown"] = "markdown";
3877
+ NodeFormat["Yaml"] = "yaml";
3878
+ NodeFormat["Javascript"] = "javascript";
3879
+ NodeFormat["Apng"] = "apng";
3880
+ NodeFormat["Avif"] = "avif";
3881
+ NodeFormat["Bmp"] = "bmp";
3882
+ NodeFormat["Gif"] = "gif";
3883
+ NodeFormat["Jpeg"] = "jpeg";
3884
+ NodeFormat["Png"] = "png";
3885
+ NodeFormat["Svg"] = "svg";
3886
+ NodeFormat["Webp"] = "webp";
3887
+ })(exports.NodeFormat || (exports.NodeFormat = {}));
3888
+ }) });
3889
+
3890
+ //#endregion
3891
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/parseWithPointers.js
3892
+ var require_parseWithPointers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/parseWithPointers.js": ((exports) => {
3893
+ Object.defineProperty(exports, "__esModule", { value: true });
3894
+ const ordered_object_literal_1$1 = require_src();
3895
+ const types_1 = require_dist();
3896
+ const yaml_ast_parser_1$1 = require_src$1();
3897
+ const buildJsonPath_1 = require_buildJsonPath();
3898
+ const dereferenceAnchor_1 = require_dereferenceAnchor();
3899
+ const lineForPosition_1 = require_lineForPosition();
3900
+ const types_2 = require_types();
3901
+ const utils_1 = require_utils();
3902
+ exports.parseWithPointers = (value, options) => {
3903
+ const lineMap = computeLineMap(value);
3904
+ const ast$3 = yaml_ast_parser_1$1.load(value, Object.assign({}, options, { ignoreDuplicateKeys: true }));
3905
+ const parsed = {
3906
+ ast: ast$3,
3907
+ lineMap,
3908
+ data: void 0,
3909
+ diagnostics: [],
3910
+ metadata: options,
3911
+ comments: {}
3912
+ };
3913
+ if (!ast$3) return parsed;
3914
+ const normalizedOptions = normalizeOptions(options);
3915
+ const comments = new Comments(parsed.comments, Comments.mapComments(normalizedOptions.attachComments && ast$3.comments ? ast$3.comments : [], lineMap), ast$3, lineMap, "#");
3916
+ parsed.data = walkAST({
3917
+ lineMap,
3918
+ diagnostics: parsed.diagnostics
3919
+ }, ast$3, comments, normalizedOptions);
3920
+ if (ast$3.errors) parsed.diagnostics.push(...transformErrors(ast$3.errors, lineMap));
3921
+ if (parsed.diagnostics.length > 0) parsed.diagnostics.sort((itemA, itemB) => itemA.range.start.line - itemB.range.start.line);
3922
+ if (Array.isArray(parsed.ast.errors)) parsed.ast.errors.length = 0;
3923
+ return parsed;
3924
+ };
3925
+ const TILDE_REGEXP = /~/g;
3926
+ const SLASH_REGEXP = /\//g;
3927
+ function encodeSegment(input) {
3928
+ return input.replace(TILDE_REGEXP, "~0").replace(SLASH_REGEXP, "~1");
3929
+ }
3930
+ const walkAST = (ctx, node, comments, options) => {
3931
+ if (node) switch (node.kind) {
3932
+ case types_2.Kind.MAP: {
3933
+ const mapComments = comments.enter(node);
3934
+ const { lineMap, diagnostics } = ctx;
3935
+ const { preserveKeyOrder, ignoreDuplicateKeys, json, mergeKeys } = options;
3936
+ const container = createMapContainer(preserveKeyOrder);
3937
+ const seenKeys = [];
3938
+ const handleMergeKeys = mergeKeys;
3939
+ const yamlMode = !json;
3940
+ const handleDuplicates = !ignoreDuplicateKeys;
3941
+ for (const mapping of node.mappings) {
3942
+ if (!validateMappingKey(mapping, lineMap, diagnostics, yamlMode)) continue;
3943
+ const key = String(getScalarValue(mapping.key));
3944
+ const mappingComments = mapComments.enter(mapping, encodeSegment(key));
3945
+ if ((yamlMode || handleDuplicates) && (!handleMergeKeys || key !== "<<")) if (seenKeys.includes(key)) {
3946
+ if (yamlMode) throw new Error("Duplicate YAML mapping key encountered");
3947
+ if (handleDuplicates) diagnostics.push(createYAMLException(mapping.key, lineMap, "duplicate key"));
3948
+ } else seenKeys.push(key);
3949
+ if (handleMergeKeys && key === "<<") {
3950
+ const reduced = reduceMergeKeys(walkAST(ctx, mapping.value, mappingComments, options), preserveKeyOrder);
3951
+ Object.assign(container, reduced);
3952
+ } else {
3953
+ container[key] = walkAST(ctx, mapping.value, mappingComments, options);
3954
+ if (preserveKeyOrder) pushKey(container, key);
3955
+ }
3956
+ mappingComments.attachComments();
3957
+ }
3958
+ mapComments.attachComments();
3959
+ return container;
3960
+ }
3961
+ case types_2.Kind.SEQ: {
3962
+ const nodeComments = comments.enter(node);
3963
+ const container = node.items.map((item, i$1) => {
3964
+ if (item !== null) {
3965
+ const sequenceItemComments = nodeComments.enter(item, i$1);
3966
+ const walked = walkAST(ctx, item, sequenceItemComments, options);
3967
+ sequenceItemComments.attachComments();
3968
+ return walked;
3969
+ } else return null;
3970
+ });
3971
+ nodeComments.attachComments();
3972
+ return container;
3973
+ }
3974
+ case types_2.Kind.SCALAR: {
3975
+ const value = getScalarValue(node);
3976
+ return !options.bigInt && typeof value === "bigint" ? Number(value) : value;
3977
+ }
3978
+ case types_2.Kind.ANCHOR_REF:
3979
+ if (utils_1.isObject(node.value)) node.value = dereferenceAnchor_1.dereferenceAnchor(node.value, node.referencesAnchor);
3980
+ return walkAST(ctx, node.value, comments, options);
3981
+ default: return null;
3982
+ }
3983
+ return node;
3984
+ };
3985
+ function getScalarValue(node) {
3986
+ switch (yaml_ast_parser_1$1.determineScalarType(node)) {
3987
+ case types_2.ScalarType.null: return null;
3988
+ case types_2.ScalarType.string: return String(node.value);
3989
+ case types_2.ScalarType.bool: return yaml_ast_parser_1$1.parseYamlBoolean(node.value);
3990
+ case types_2.ScalarType.int: return yaml_ast_parser_1$1.parseYamlBigInteger(node.value);
3991
+ case types_2.ScalarType.float: return yaml_ast_parser_1$1.parseYamlFloat(node.value);
3992
+ }
3993
+ }
3994
+ const computeLineMap = (input) => {
3995
+ const lineMap = [];
3996
+ let i$1 = 0;
3997
+ for (; i$1 < input.length; i$1++) if (input[i$1] === "\n") lineMap.push(i$1 + 1);
3998
+ lineMap.push(i$1 + 1);
3999
+ return lineMap;
4000
+ };
4001
+ function getLineLength(lineMap, line) {
4002
+ if (line === 0) return Math.max(0, lineMap[0] - 1);
4003
+ return Math.max(0, lineMap[line] - lineMap[line - 1] - 1);
4004
+ }
4005
+ const transformErrors = (errors, lineMap) => {
4006
+ const validations = [];
4007
+ let possiblyUnexpectedFlow = -1;
4008
+ let i$1 = 0;
4009
+ for (const error of errors) {
4010
+ const validation = {
4011
+ code: error.name,
4012
+ message: error.reason,
4013
+ severity: error.isWarning ? types_1.DiagnosticSeverity.Warning : types_1.DiagnosticSeverity.Error,
4014
+ range: {
4015
+ start: {
4016
+ line: error.mark.line,
4017
+ character: error.mark.column
4018
+ },
4019
+ end: {
4020
+ line: error.mark.line,
4021
+ character: error.mark.toLineEnd ? getLineLength(lineMap, error.mark.line) : error.mark.column
4022
+ }
4023
+ }
4024
+ };
4025
+ if (error.reason === "missed comma between flow collection entries") possiblyUnexpectedFlow = possiblyUnexpectedFlow === -1 ? i$1 : possiblyUnexpectedFlow;
4026
+ else if (possiblyUnexpectedFlow !== -1) {
4027
+ validations[possiblyUnexpectedFlow].range.end = validation.range.end;
4028
+ validations[possiblyUnexpectedFlow].message = "invalid mixed usage of block and flow styles";
4029
+ validations.length = possiblyUnexpectedFlow + 1;
4030
+ i$1 = validations.length;
4031
+ possiblyUnexpectedFlow = -1;
4032
+ }
4033
+ validations.push(validation);
4034
+ i$1++;
4035
+ }
4036
+ return validations;
4037
+ };
4038
+ const reduceMergeKeys = (items, preserveKeyOrder) => {
4039
+ if (Array.isArray(items)) return items.reduceRight(preserveKeyOrder ? (merged, item) => {
4040
+ const keys = Object.keys(item);
4041
+ Object.assign(merged, item);
4042
+ for (let i$1 = keys.length - 1; i$1 >= 0; i$1--) unshiftKey(merged, keys[i$1]);
4043
+ return merged;
4044
+ } : (merged, item) => Object.assign(merged, item), createMapContainer(preserveKeyOrder));
4045
+ return typeof items !== "object" || items === null ? null : Object(items);
4046
+ };
4047
+ function createMapContainer(preserveKeyOrder) {
4048
+ return preserveKeyOrder ? ordered_object_literal_1$1.default({}) : {};
4049
+ }
4050
+ function deleteKey(container, key) {
4051
+ if (!(key in container)) return;
4052
+ const order = ordered_object_literal_1$1.getOrder(container);
4053
+ const index = order.indexOf(key);
4054
+ if (index !== -1) order.splice(index, 1);
4055
+ }
4056
+ function unshiftKey(container, key) {
4057
+ deleteKey(container, key);
4058
+ ordered_object_literal_1$1.getOrder(container).unshift(key);
4059
+ }
4060
+ function pushKey(container, key) {
4061
+ deleteKey(container, key);
4062
+ ordered_object_literal_1$1.getOrder(container).push(key);
4063
+ }
4064
+ function validateMappingKey(mapping, lineMap, diagnostics, yamlMode) {
4065
+ if (mapping.key.kind !== types_2.Kind.SCALAR) {
4066
+ if (!yamlMode) diagnostics.push(createYAMLIncompatibilityException(mapping.key, lineMap, "mapping key must be a string scalar", yamlMode));
4067
+ return false;
4068
+ }
4069
+ if (!yamlMode) {
4070
+ const type = typeof getScalarValue(mapping.key);
4071
+ if (type !== "string") diagnostics.push(createYAMLIncompatibilityException(mapping.key, lineMap, `mapping key must be a string scalar rather than ${mapping.key.valueObject === null ? "null" : type}`, yamlMode));
4072
+ }
4073
+ return true;
4074
+ }
4075
+ function createYAMLIncompatibilityException(node, lineMap, message, yamlMode) {
4076
+ const exception = createYAMLException(node, lineMap, message);
4077
+ exception.code = "YAMLIncompatibleValue";
4078
+ exception.severity = yamlMode ? types_1.DiagnosticSeverity.Hint : types_1.DiagnosticSeverity.Warning;
4079
+ return exception;
4080
+ }
4081
+ function createYAMLException(node, lineMap, message) {
4082
+ return {
4083
+ code: "YAMLException",
4084
+ message,
4085
+ severity: types_1.DiagnosticSeverity.Error,
4086
+ path: buildJsonPath_1.buildJsonPath(node),
4087
+ range: getRange(lineMap, node.startPosition, node.endPosition)
4088
+ };
4089
+ }
4090
+ function getRange(lineMap, startPosition, endPosition) {
4091
+ const startLine = lineForPosition_1.lineForPosition(startPosition, lineMap);
4092
+ const endLine = lineForPosition_1.lineForPosition(endPosition, lineMap);
4093
+ return {
4094
+ start: {
4095
+ line: startLine,
4096
+ character: startLine === 0 ? startPosition : startPosition - lineMap[startLine - 1]
4097
+ },
4098
+ end: {
4099
+ line: endLine,
4100
+ character: endLine === 0 ? endPosition : endPosition - lineMap[endLine - 1]
4101
+ }
4102
+ };
4103
+ }
4104
+ var Comments = class Comments {
4105
+ constructor(attachedComments, comments, node, lineMap, pointer) {
4106
+ this.attachedComments = attachedComments;
4107
+ this.node = node;
4108
+ this.lineMap = lineMap;
4109
+ this.pointer = pointer;
4110
+ if (comments.length === 0) this.comments = [];
4111
+ else {
4112
+ const startPosition = this.getStartPosition(node);
4113
+ const endPosition = this.getEndPosition(node);
4114
+ const startLine = lineForPosition_1.lineForPosition(startPosition, this.lineMap);
4115
+ const endLine = lineForPosition_1.lineForPosition(endPosition, this.lineMap);
4116
+ const matchingComments = [];
4117
+ for (let i$1 = comments.length - 1; i$1 >= 0; i$1--) {
4118
+ const comment = comments[i$1];
4119
+ if (comment.range.start.line >= startLine && comment.range.end.line <= endLine) {
4120
+ matchingComments.push(comment);
4121
+ comments.splice(i$1, 1);
4122
+ }
4123
+ }
4124
+ this.comments = matchingComments;
4125
+ }
4126
+ }
4127
+ getStartPosition(node) {
4128
+ if (node.parent === null) return 0;
4129
+ return node.kind === types_2.Kind.MAPPING ? node.key.startPosition : node.startPosition;
4130
+ }
4131
+ getEndPosition(node) {
4132
+ switch (node.kind) {
4133
+ case types_2.Kind.MAPPING: return node.value === null ? node.endPosition : this.getEndPosition(node.value);
4134
+ case types_2.Kind.MAP: return node.mappings.length === 0 ? node.endPosition : node.mappings[node.mappings.length - 1].endPosition;
4135
+ case types_2.Kind.SEQ: {
4136
+ if (node.items.length === 0) return node.endPosition;
4137
+ const lastItem = node.items[node.items.length - 1];
4138
+ return lastItem === null ? node.endPosition : lastItem.endPosition;
4139
+ }
4140
+ default: return node.endPosition;
4141
+ }
4142
+ }
4143
+ static mapComments(comments, lineMap) {
4144
+ return comments.map((comment) => ({
4145
+ value: comment.value,
4146
+ range: getRange(lineMap, comment.startPosition, comment.endPosition),
4147
+ startPosition: comment.startPosition,
4148
+ endPosition: comment.endPosition
4149
+ }));
4150
+ }
4151
+ enter(node, key) {
4152
+ return new Comments(this.attachedComments, this.comments, node, this.lineMap, key === void 0 ? this.pointer : `${this.pointer}/${key}`);
4153
+ }
4154
+ static isLeading(node, startPosition) {
4155
+ switch (node.kind) {
4156
+ case types_2.Kind.MAP: return node.mappings.length === 0 || node.mappings[0].startPosition > startPosition;
4157
+ case types_2.Kind.SEQ: {
4158
+ if (node.items.length === 0) return true;
4159
+ const firstItem = node.items[0];
4160
+ return firstItem === null || firstItem.startPosition > startPosition;
4161
+ }
4162
+ case types_2.Kind.MAPPING: return node.value === null || node.value.startPosition > startPosition;
4163
+ default: return false;
4164
+ }
4165
+ }
4166
+ static isTrailing(node, endPosition) {
4167
+ switch (node.kind) {
4168
+ case types_2.Kind.MAP: return node.mappings.length > 0 && endPosition > node.mappings[node.mappings.length - 1].endPosition;
4169
+ case types_2.Kind.SEQ:
4170
+ if (node.items.length === 0) return false;
4171
+ const lastItem = node.items[node.items.length - 1];
4172
+ return lastItem !== null && endPosition > lastItem.endPosition;
4173
+ case types_2.Kind.MAPPING: return node.value !== null && endPosition > node.value.endPosition;
4174
+ default: return false;
4175
+ }
4176
+ }
4177
+ static findBetween(node, startPosition, endPosition) {
4178
+ switch (node.kind) {
4179
+ case types_2.Kind.MAP: {
4180
+ let left;
4181
+ for (const mapping of node.mappings) if (startPosition > mapping.startPosition) left = mapping.key.value;
4182
+ else if (left !== void 0 && mapping.startPosition > endPosition) return [left, mapping.key.value];
4183
+ return null;
4184
+ }
4185
+ case types_2.Kind.SEQ: {
4186
+ let left;
4187
+ for (let i$1 = 0; i$1 < node.items.length; i$1++) {
4188
+ const item = node.items[i$1];
4189
+ if (item === null) continue;
4190
+ if (startPosition > item.startPosition) left = String(i$1);
4191
+ else if (left !== void 0 && item.startPosition > endPosition) return [left, String(i$1)];
4192
+ }
4193
+ return null;
4194
+ }
4195
+ default: return null;
4196
+ }
4197
+ }
4198
+ isBeforeEOL(comment) {
4199
+ return this.node.kind === types_2.Kind.SCALAR || this.node.kind === types_2.Kind.MAPPING && comment.range.end.line === lineForPosition_1.lineForPosition(this.node.key.endPosition, this.lineMap);
4200
+ }
4201
+ attachComments() {
4202
+ if (this.comments.length === 0) return;
4203
+ const attachedComments = this.attachedComments[this.pointer] = this.attachedComments[this.pointer] || [];
4204
+ for (const comment of this.comments) if (this.isBeforeEOL(comment)) attachedComments.push({
4205
+ value: comment.value,
4206
+ placement: "before-eol"
4207
+ });
4208
+ else if (Comments.isLeading(this.node, comment.startPosition)) attachedComments.push({
4209
+ value: comment.value,
4210
+ placement: "leading"
4211
+ });
4212
+ else if (Comments.isTrailing(this.node, comment.endPosition)) attachedComments.push({
4213
+ value: comment.value,
4214
+ placement: "trailing"
4215
+ });
4216
+ else {
4217
+ const between = Comments.findBetween(this.node, comment.startPosition, comment.endPosition);
4218
+ if (between !== null) attachedComments.push({
4219
+ value: comment.value,
4220
+ placement: "between",
4221
+ between
4222
+ });
4223
+ else attachedComments.push({
4224
+ value: comment.value,
4225
+ placement: "trailing"
4226
+ });
4227
+ }
4228
+ }
4229
+ };
4230
+ function normalizeOptions(options) {
4231
+ if (options === void 0) return {
4232
+ attachComments: false,
4233
+ preserveKeyOrder: false,
4234
+ bigInt: false,
4235
+ mergeKeys: false,
4236
+ json: true,
4237
+ ignoreDuplicateKeys: false
4238
+ };
4239
+ return Object.assign({}, options, {
4240
+ attachComments: options.attachComments === true,
4241
+ preserveKeyOrder: options.preserveKeyOrder === true,
4242
+ bigInt: options.bigInt === true,
4243
+ mergeKeys: options.mergeKeys === true,
4244
+ json: options.json !== false,
4245
+ ignoreDuplicateKeys: options.ignoreDuplicateKeys !== false
4246
+ });
4247
+ }
4248
+ }) });
4249
+
4250
+ //#endregion
4251
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/parse.js
4252
+ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/parse.js": ((exports) => {
4253
+ Object.defineProperty(exports, "__esModule", { value: true });
4254
+ const parseWithPointers_1$1 = require_parseWithPointers();
4255
+ exports.parse = (value) => parseWithPointers_1$1.parseWithPointers(value).data;
4256
+ }) });
4257
+
4258
+ //#endregion
4259
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/safeStringify.js
4260
+ var require_safeStringify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/safeStringify.js": ((exports) => {
4261
+ Object.defineProperty(exports, "__esModule", { value: true });
4262
+ const yaml_ast_parser_1 = require_src$1();
4263
+ exports.safeStringify = (value, options) => typeof value === "string" ? value : yaml_ast_parser_1.safeDump(value, options);
4264
+ }) });
4265
+
4266
+ //#endregion
4267
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/trapAccess.js
4268
+ var require_trapAccess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/trapAccess.js": ((exports) => {
4269
+ Object.defineProperty(exports, "__esModule", { value: true });
4270
+ const ordered_object_literal_1 = require_src();
4271
+ exports.KEYS = Symbol.for(ordered_object_literal_1.ORDER_KEY_ID);
4272
+ const traps = { ownKeys(target) {
4273
+ return exports.KEYS in target ? target[exports.KEYS] : Reflect.ownKeys(target);
4274
+ } };
4275
+ exports.trapAccess = (target) => new Proxy(target, traps);
4276
+ }) });
4277
+
4278
+ //#endregion
4279
+ //#region ../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/index.js
4280
+ var require_yaml = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@stoplight+yaml@4.3.0/node_modules/@stoplight/yaml/index.js": ((exports) => {
4281
+ Object.defineProperty(exports, "__esModule", { value: true });
4282
+ const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
4283
+ tslib_1.__exportStar(require_buildJsonPath(), exports);
4284
+ tslib_1.__exportStar(require_dereferenceAnchor(), exports);
4285
+ tslib_1.__exportStar(require_getJsonPathForPosition(), exports);
4286
+ tslib_1.__exportStar(require_getLocationForJsonPath(), exports);
4287
+ tslib_1.__exportStar(require_lineForPosition(), exports);
4288
+ var parse_1 = require_parse();
4289
+ exports.parse = parse_1.parse;
4290
+ var parseWithPointers_1 = require_parseWithPointers();
4291
+ exports.parseWithPointers = parseWithPointers_1.parseWithPointers;
4292
+ tslib_1.__exportStar(require_safeStringify(), exports);
4293
+ tslib_1.__exportStar(require_types(), exports);
4294
+ tslib_1.__exportStar(require_trapAccess(), exports);
4295
+ }) });
4296
+
4297
+ //#endregion
9
4298
  //#region src/utils.ts
4299
+ var import_yaml = /* @__PURE__ */ __toESM(require_yaml(), 1);
10
4300
  function isOpenApiV2Document(doc) {
11
4301
  return doc && isPlainObject(doc) && !("openapi" in doc);
12
4302
  }
@@ -22,8 +4312,8 @@ function isParameterObject(obj) {
22
4312
  * @param schema - The schema object to check.
23
4313
  * @returns `true` if the schema is marked as nullable; otherwise, `false`.
24
4314
  */
25
- function isNullable(schema) {
26
- return schema?.nullable ?? schema?.["x-nullable"] ?? false;
4315
+ function isNullable(schema$2) {
4316
+ return schema$2?.nullable ?? schema$2?.["x-nullable"] ?? false;
27
4317
  }
28
4318
  /**
29
4319
  * Determines if the given object is an OpenAPI ReferenceObject.
@@ -49,12 +4339,12 @@ function isDiscriminator(obj) {
49
4339
  * @param schema - The schema object to check.
50
4340
  * @returns True if the schema is required; otherwise, false.
51
4341
  */
52
- function isRequired(schema) {
53
- if (!schema) return false;
54
- return Array.isArray(schema.required) ? !!schema.required?.length : !!schema.required;
4342
+ function isRequired(schema$2) {
4343
+ if (!schema$2) return false;
4344
+ return Array.isArray(schema$2.required) ? !!schema$2.required?.length : !!schema$2.required;
55
4345
  }
56
- function isOptional(schema) {
57
- return !isRequired(schema);
4346
+ function isOptional(schema$2) {
4347
+ return !isRequired(schema$2);
58
4348
  }
59
4349
  async function parse(pathOrApi, { oasClass = Oas, canBundle = true, enablePaths = true } = {}) {
60
4350
  const { loadConfig, bundle } = await import("@redocly/openapi-core");
@@ -92,6 +4382,19 @@ async function merge(pathOrApi, { oasClass = Oas } = {}) {
92
4382
  components: { schemas: {} }
93
4383
  }), { oasClass });
94
4384
  }
4385
+ function parseFromConfig(config, oasClass = Oas) {
4386
+ if ("data" in config.input) {
4387
+ if (typeof config.input.data === "object") return parse(JSON.parse(JSON.stringify(config.input.data)), { oasClass });
4388
+ try {
4389
+ return parse(import_yaml.parse(config.input.data), { oasClass });
4390
+ } catch (_e) {
4391
+ return parse(config.input.data, { oasClass });
4392
+ }
4393
+ }
4394
+ if (Array.isArray(config.input)) return merge(config.input.map((input) => path.resolve(config.root, input.path)), { oasClass });
4395
+ if (new URLPath(config.input.path).isURL) return parse(config.input.path, { oasClass });
4396
+ return parse(path.resolve(config.root, config.input.path), { oasClass });
4397
+ }
95
4398
 
96
4399
  //#endregion
97
4400
  //#region src/Oas.ts
@@ -131,9 +4434,9 @@ var Oas = class extends BaseOas {
131
4434
  jsonpointer.set(this.api, $ref, value);
132
4435
  }
133
4436
  }
134
- getDiscriminator(schema) {
135
- if (!isDiscriminator(schema)) return;
136
- const { mapping = {}, propertyName } = schema.discriminator;
4437
+ getDiscriminator(schema$2) {
4438
+ if (!isDiscriminator(schema$2)) return;
4439
+ const { mapping = {}, propertyName } = schema$2.discriminator;
137
4440
  if (this.#options.discriminator === "inherit") Object.entries(mapping).forEach(([mappingKey, mappingValue]) => {
138
4441
  if (mappingValue) {
139
4442
  const childSchema = this.get(mappingValue);
@@ -149,36 +4452,36 @@ var Oas = class extends BaseOas {
149
4452
  }
150
4453
  }
151
4454
  });
152
- if (schema.oneOf) schema.oneOf.forEach((schema$1) => {
153
- if (isReference(schema$1)) {
154
- const key = this.getKey(schema$1.$ref);
155
- const propertySchema = this.get(schema$1.$ref).properties?.[propertyName];
156
- const canAdd = key && !Object.values(mapping).includes(schema$1.$ref);
157
- if (canAdd && propertySchema?.enum?.length === 1) mapping[propertySchema.enum[0]] = schema$1.$ref;
158
- else if (canAdd) mapping[key] = schema$1.$ref;
4455
+ if (schema$2.oneOf) schema$2.oneOf.forEach((schema$3) => {
4456
+ if (isReference(schema$3)) {
4457
+ const key = this.getKey(schema$3.$ref);
4458
+ const propertySchema = this.get(schema$3.$ref).properties?.[propertyName];
4459
+ const canAdd = key && !Object.values(mapping).includes(schema$3.$ref);
4460
+ if (canAdd && propertySchema?.enum?.length === 1) mapping[propertySchema.enum[0]] = schema$3.$ref;
4461
+ else if (canAdd) mapping[key] = schema$3.$ref;
159
4462
  }
160
4463
  });
161
- if (schema.anyOf) schema.anyOf.forEach((schema$1) => {
162
- if (isReference(schema$1)) {
163
- const key = this.getKey(schema$1.$ref);
164
- const propertySchema = this.get(schema$1.$ref).properties?.[propertyName];
165
- const canAdd = key && !Object.values(mapping).includes(schema$1.$ref);
166
- if (canAdd && propertySchema?.enum?.length === 1) mapping[propertySchema.enum[0]] = schema$1.$ref;
167
- else if (canAdd) mapping[key] = schema$1.$ref;
4464
+ if (schema$2.anyOf) schema$2.anyOf.forEach((schema$3) => {
4465
+ if (isReference(schema$3)) {
4466
+ const key = this.getKey(schema$3.$ref);
4467
+ const propertySchema = this.get(schema$3.$ref).properties?.[propertyName];
4468
+ const canAdd = key && !Object.values(mapping).includes(schema$3.$ref);
4469
+ if (canAdd && propertySchema?.enum?.length === 1) mapping[propertySchema.enum[0]] = schema$3.$ref;
4470
+ else if (canAdd) mapping[key] = schema$3.$ref;
168
4471
  }
169
4472
  });
170
4473
  return {
171
- ...schema.discriminator,
4474
+ ...schema$2.discriminator,
172
4475
  mapping
173
4476
  };
174
4477
  }
175
- dereferenceWithRef(schema) {
176
- if (isReference(schema)) return {
177
- ...schema,
178
- ...this.get(schema.$ref),
179
- $ref: schema.$ref
4478
+ dereferenceWithRef(schema$2) {
4479
+ if (isReference(schema$2)) return {
4480
+ ...schema$2,
4481
+ ...this.get(schema$2.$ref),
4482
+ $ref: schema$2.$ref
180
4483
  };
181
- return schema;
4484
+ return schema$2;
182
4485
  }
183
4486
  /**
184
4487
  * Oas does not have a getResponseBody(contentType)
@@ -213,44 +4516,44 @@ var Oas = class extends BaseOas {
213
4516
  }
214
4517
  getResponseSchema(operation, statusCode) {
215
4518
  if (operation.schema.responses) Object.keys(operation.schema.responses).forEach((key) => {
216
- const schema$1 = operation.schema.responses[key];
217
- const $ref = isReference(schema$1) ? schema$1.$ref : void 0;
218
- if (schema$1 && $ref) operation.schema.responses[key] = this.get($ref);
4519
+ const schema$3 = operation.schema.responses[key];
4520
+ const $ref = isReference(schema$3) ? schema$3.$ref : void 0;
4521
+ if (schema$3 && $ref) operation.schema.responses[key] = this.get($ref);
219
4522
  });
220
4523
  const getResponseBody = this.#getResponseBodyFactory(operation.getResponseByStatusCode(statusCode));
221
4524
  const { contentType } = this.#options;
222
4525
  const responseBody = getResponseBody(contentType);
223
4526
  if (responseBody === false) return {};
224
- const schema = Array.isArray(responseBody) ? responseBody[1].schema : responseBody.schema;
225
- if (!schema) return {};
226
- return this.dereferenceWithRef(schema);
4527
+ const schema$2 = Array.isArray(responseBody) ? responseBody[1].schema : responseBody.schema;
4528
+ if (!schema$2) return {};
4529
+ return this.dereferenceWithRef(schema$2);
227
4530
  }
228
4531
  getRequestSchema(operation) {
229
4532
  const { contentType } = this.#options;
230
4533
  if (operation.schema.requestBody) operation.schema.requestBody = this.dereferenceWithRef(operation.schema.requestBody);
231
4534
  const requestBody = operation.getRequestBody(contentType);
232
4535
  if (requestBody === false) return;
233
- const schema = Array.isArray(requestBody) ? requestBody[1].schema : requestBody.schema;
234
- if (!schema) return;
235
- return this.dereferenceWithRef(schema);
4536
+ const schema$2 = Array.isArray(requestBody) ? requestBody[1].schema : requestBody.schema;
4537
+ if (!schema$2) return;
4538
+ return this.dereferenceWithRef(schema$2);
236
4539
  }
237
4540
  getParametersSchema(operation, inKey) {
238
4541
  const { contentType = operation.getContentType() } = this.#options;
239
- const params = operation.getParameters().map((schema) => {
240
- return this.dereferenceWithRef(schema);
4542
+ const params = operation.getParameters().map((schema$2) => {
4543
+ return this.dereferenceWithRef(schema$2);
241
4544
  }).filter((v) => v.in === inKey);
242
4545
  if (!params.length) return null;
243
- return params.reduce((schema, pathParameters) => {
4546
+ return params.reduce((schema$2, pathParameters) => {
244
4547
  const property = pathParameters.content?.[contentType]?.schema ?? pathParameters.schema;
245
- const required = [...schema.required || [], pathParameters.required ? pathParameters.name : void 0].filter(Boolean);
4548
+ const required = [...schema$2.required || [], pathParameters.required ? pathParameters.name : void 0].filter(Boolean);
246
4549
  return {
247
- ...schema,
248
- description: schema.description,
249
- deprecated: schema.deprecated,
250
- example: schema.example,
4550
+ ...schema$2,
4551
+ description: schema$2.description,
4552
+ deprecated: schema$2.deprecated,
4553
+ example: schema$2.example,
251
4554
  required,
252
4555
  properties: {
253
- ...schema.properties,
4556
+ ...schema$2.properties,
254
4557
  [pathParameters.name]: {
255
4558
  description: pathParameters.description,
256
4559
  ...property
@@ -285,5 +4588,5 @@ const HttpMethods = {
285
4588
  };
286
4589
 
287
4590
  //#endregion
288
- export { HttpMethods, Oas, findSchemaDefinition, isDiscriminator, isNullable, isOpenApiV3_1Document, isOptional, isParameterObject, isReference, isRequired, matchesMimeType, merge, parse };
4591
+ export { HttpMethods, Oas, findSchemaDefinition, isDiscriminator, isNullable, isOpenApiV3_1Document, isOptional, isParameterObject, isReference, isRequired, matchesMimeType, merge, parse, parseFromConfig };
289
4592
  //# sourceMappingURL=index.js.map