@rsbuild/plugin-babel 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/babel-loader/583.index.js +550 -0
- package/compiled/babel-loader/index.d.ts +1 -0
- package/compiled/babel-loader/index.js +9 -0
- package/compiled/babel-loader/license +22 -0
- package/compiled/babel-loader/package.json +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 583;
|
|
3
|
+
exports.ids = [583];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 2463:
|
|
7
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const { sep: DEFAULT_SEPARATOR } = __webpack_require__(1017)
|
|
11
|
+
|
|
12
|
+
const determineSeparator = paths => {
|
|
13
|
+
for (const path of paths) {
|
|
14
|
+
const match = /(\/|\\)/.exec(path)
|
|
15
|
+
if (match !== null) return match[0]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return DEFAULT_SEPARATOR
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = function commonPathPrefix (paths, sep = determineSeparator(paths)) {
|
|
22
|
+
const [first = '', ...remaining] = paths
|
|
23
|
+
if (first === '' || remaining.length === 0) return ''
|
|
24
|
+
|
|
25
|
+
const parts = first.split(sep)
|
|
26
|
+
|
|
27
|
+
let endOfPrefix = parts.length
|
|
28
|
+
for (const path of remaining) {
|
|
29
|
+
const compare = path.split(sep)
|
|
30
|
+
for (let i = 0; i < endOfPrefix; i++) {
|
|
31
|
+
if (compare[i] !== parts[i]) {
|
|
32
|
+
endOfPrefix = i
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (endOfPrefix === 0) return ''
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const prefix = parts.slice(0, endOfPrefix).join(sep)
|
|
40
|
+
return prefix.endsWith(sep) ? prefix : prefix + sep
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/***/ }),
|
|
45
|
+
|
|
46
|
+
/***/ 9583:
|
|
47
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
48
|
+
|
|
49
|
+
// ESM COMPAT FLAG
|
|
50
|
+
__webpack_require__.r(__webpack_exports__);
|
|
51
|
+
|
|
52
|
+
// EXPORTS
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"default": () => (/* binding */ findCacheDirectory)
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// EXTERNAL MODULE: external "node:process"
|
|
58
|
+
var external_node_process_ = __webpack_require__(7742);
|
|
59
|
+
// EXTERNAL MODULE: external "node:path"
|
|
60
|
+
var external_node_path_ = __webpack_require__(9411);
|
|
61
|
+
// EXTERNAL MODULE: external "node:fs"
|
|
62
|
+
var external_node_fs_ = __webpack_require__(7561);
|
|
63
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js
|
|
64
|
+
var common_path_prefix = __webpack_require__(2463);
|
|
65
|
+
// EXTERNAL MODULE: external "node:url"
|
|
66
|
+
var external_node_url_ = __webpack_require__(1041);
|
|
67
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
68
|
+
/*
|
|
69
|
+
How it works:
|
|
70
|
+
`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
class Node {
|
|
74
|
+
value;
|
|
75
|
+
next;
|
|
76
|
+
|
|
77
|
+
constructor(value) {
|
|
78
|
+
this.value = value;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
class yocto_queue_Queue {
|
|
83
|
+
#head;
|
|
84
|
+
#tail;
|
|
85
|
+
#size;
|
|
86
|
+
|
|
87
|
+
constructor() {
|
|
88
|
+
this.clear();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
enqueue(value) {
|
|
92
|
+
const node = new Node(value);
|
|
93
|
+
|
|
94
|
+
if (this.#head) {
|
|
95
|
+
this.#tail.next = node;
|
|
96
|
+
this.#tail = node;
|
|
97
|
+
} else {
|
|
98
|
+
this.#head = node;
|
|
99
|
+
this.#tail = node;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this.#size++;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
dequeue() {
|
|
106
|
+
const current = this.#head;
|
|
107
|
+
if (!current) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
this.#head = this.#head.next;
|
|
112
|
+
this.#size--;
|
|
113
|
+
return current.value;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
clear() {
|
|
117
|
+
this.#head = undefined;
|
|
118
|
+
this.#tail = undefined;
|
|
119
|
+
this.#size = 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get size() {
|
|
123
|
+
return this.#size;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
* [Symbol.iterator]() {
|
|
127
|
+
let current = this.#head;
|
|
128
|
+
|
|
129
|
+
while (current) {
|
|
130
|
+
yield current.value;
|
|
131
|
+
current = current.next;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
function p_limit_pLimit(concurrency) {
|
|
140
|
+
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
|
141
|
+
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const queue = new Queue();
|
|
145
|
+
let activeCount = 0;
|
|
146
|
+
|
|
147
|
+
const next = () => {
|
|
148
|
+
activeCount--;
|
|
149
|
+
|
|
150
|
+
if (queue.size > 0) {
|
|
151
|
+
queue.dequeue()();
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const run = async (fn, resolve, args) => {
|
|
156
|
+
activeCount++;
|
|
157
|
+
|
|
158
|
+
const result = (async () => fn(...args))();
|
|
159
|
+
|
|
160
|
+
resolve(result);
|
|
161
|
+
|
|
162
|
+
try {
|
|
163
|
+
await result;
|
|
164
|
+
} catch {}
|
|
165
|
+
|
|
166
|
+
next();
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const enqueue = (fn, resolve, args) => {
|
|
170
|
+
queue.enqueue(run.bind(undefined, fn, resolve, args));
|
|
171
|
+
|
|
172
|
+
(async () => {
|
|
173
|
+
// This function needs to wait until the next microtask before comparing
|
|
174
|
+
// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously
|
|
175
|
+
// when the run function is dequeued and called. The comparison in the if-statement
|
|
176
|
+
// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.
|
|
177
|
+
await Promise.resolve();
|
|
178
|
+
|
|
179
|
+
if (activeCount < concurrency && queue.size > 0) {
|
|
180
|
+
queue.dequeue()();
|
|
181
|
+
}
|
|
182
|
+
})();
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const generator = (fn, ...args) => new Promise(resolve => {
|
|
186
|
+
enqueue(fn, resolve, args);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
Object.defineProperties(generator, {
|
|
190
|
+
activeCount: {
|
|
191
|
+
get: () => activeCount,
|
|
192
|
+
},
|
|
193
|
+
pendingCount: {
|
|
194
|
+
get: () => queue.size,
|
|
195
|
+
},
|
|
196
|
+
clearQueue: {
|
|
197
|
+
value: () => {
|
|
198
|
+
queue.clear();
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return generator;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class EndError extends Error {
|
|
210
|
+
constructor(value) {
|
|
211
|
+
super();
|
|
212
|
+
this.value = value;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// The input can also be a promise, so we await it.
|
|
217
|
+
const testElement = async (element, tester) => tester(await element);
|
|
218
|
+
|
|
219
|
+
// The input can also be a promise, so we `Promise.all()` them both.
|
|
220
|
+
const finder = async element => {
|
|
221
|
+
const values = await Promise.all(element);
|
|
222
|
+
if (values[1] === true) {
|
|
223
|
+
throw new EndError(values[0]);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return false;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
async function p_locate_pLocate(
|
|
230
|
+
iterable,
|
|
231
|
+
tester,
|
|
232
|
+
{
|
|
233
|
+
concurrency = Number.POSITIVE_INFINITY,
|
|
234
|
+
preserveOrder = true,
|
|
235
|
+
} = {},
|
|
236
|
+
) {
|
|
237
|
+
const limit = pLimit(concurrency);
|
|
238
|
+
|
|
239
|
+
// Start all the promises concurrently with optional limit.
|
|
240
|
+
const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
|
|
241
|
+
|
|
242
|
+
// Check the promises either serially or concurrently.
|
|
243
|
+
const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);
|
|
244
|
+
|
|
245
|
+
try {
|
|
246
|
+
await Promise.all(items.map(element => checkLimit(finder, element)));
|
|
247
|
+
} catch (error) {
|
|
248
|
+
if (error instanceof EndError) {
|
|
249
|
+
return error.value;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
const typeMappings = {
|
|
264
|
+
directory: 'isDirectory',
|
|
265
|
+
file: 'isFile',
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
function checkType(type) {
|
|
269
|
+
if (Object.hasOwnProperty.call(typeMappings, type)) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
throw new Error(`Invalid type specified: ${type}`);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const matchType = (type, stat) => stat[typeMappings[type]]();
|
|
277
|
+
|
|
278
|
+
const toPath = urlOrPath => urlOrPath instanceof URL ? (0,external_node_url_.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
279
|
+
|
|
280
|
+
async function locate_path_locatePath(
|
|
281
|
+
paths,
|
|
282
|
+
{
|
|
283
|
+
cwd = process.cwd(),
|
|
284
|
+
type = 'file',
|
|
285
|
+
allowSymlinks = true,
|
|
286
|
+
concurrency,
|
|
287
|
+
preserveOrder,
|
|
288
|
+
} = {},
|
|
289
|
+
) {
|
|
290
|
+
checkType(type);
|
|
291
|
+
cwd = toPath(cwd);
|
|
292
|
+
|
|
293
|
+
const statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;
|
|
294
|
+
|
|
295
|
+
return pLocate(paths, async path_ => {
|
|
296
|
+
try {
|
|
297
|
+
const stat = await statFunction(path.resolve(cwd, path_));
|
|
298
|
+
return matchType(type, stat);
|
|
299
|
+
} catch {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
}, {concurrency, preserveOrder});
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function locatePathSync(
|
|
306
|
+
paths,
|
|
307
|
+
{
|
|
308
|
+
cwd = external_node_process_.cwd(),
|
|
309
|
+
type = 'file',
|
|
310
|
+
allowSymlinks = true,
|
|
311
|
+
} = {},
|
|
312
|
+
) {
|
|
313
|
+
checkType(type);
|
|
314
|
+
cwd = toPath(cwd);
|
|
315
|
+
|
|
316
|
+
const statFunction = allowSymlinks ? external_node_fs_.statSync : external_node_fs_.lstatSync;
|
|
317
|
+
|
|
318
|
+
for (const path_ of paths) {
|
|
319
|
+
try {
|
|
320
|
+
const stat = statFunction(external_node_path_.resolve(cwd, path_), {
|
|
321
|
+
throwIfNoEntry: false,
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
if (!stat) {
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (matchType(type, stat)) {
|
|
329
|
+
return path_;
|
|
330
|
+
}
|
|
331
|
+
} catch {}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
async function pathExists(path) {
|
|
339
|
+
try {
|
|
340
|
+
await fsPromises.access(path);
|
|
341
|
+
return true;
|
|
342
|
+
} catch {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function pathExistsSync(path) {
|
|
348
|
+
try {
|
|
349
|
+
fs.accessSync(path);
|
|
350
|
+
return true;
|
|
351
|
+
} catch {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
const find_up_toPath = urlOrPath => urlOrPath instanceof URL ? (0,external_node_url_.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
362
|
+
|
|
363
|
+
const findUpStop = Symbol('findUpStop');
|
|
364
|
+
|
|
365
|
+
async function findUpMultiple(name, options = {}) {
|
|
366
|
+
let directory = path.resolve(find_up_toPath(options.cwd) || '');
|
|
367
|
+
const {root} = path.parse(directory);
|
|
368
|
+
const stopAt = path.resolve(directory, options.stopAt || root);
|
|
369
|
+
const limit = options.limit || Number.POSITIVE_INFINITY;
|
|
370
|
+
const paths = [name].flat();
|
|
371
|
+
|
|
372
|
+
const runMatcher = async locateOptions => {
|
|
373
|
+
if (typeof name !== 'function') {
|
|
374
|
+
return locatePath(paths, locateOptions);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const foundPath = await name(locateOptions.cwd);
|
|
378
|
+
if (typeof foundPath === 'string') {
|
|
379
|
+
return locatePath([foundPath], locateOptions);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return foundPath;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const matches = [];
|
|
386
|
+
// eslint-disable-next-line no-constant-condition
|
|
387
|
+
while (true) {
|
|
388
|
+
// eslint-disable-next-line no-await-in-loop
|
|
389
|
+
const foundPath = await runMatcher({...options, cwd: directory});
|
|
390
|
+
|
|
391
|
+
if (foundPath === findUpStop) {
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (foundPath) {
|
|
396
|
+
matches.push(path.resolve(directory, foundPath));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (directory === stopAt || matches.length >= limit) {
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
directory = path.dirname(directory);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return matches;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
function findUpMultipleSync(name, options = {}) {
|
|
410
|
+
let directory = external_node_path_.resolve(find_up_toPath(options.cwd) || '');
|
|
411
|
+
const {root} = external_node_path_.parse(directory);
|
|
412
|
+
const stopAt = options.stopAt || root;
|
|
413
|
+
const limit = options.limit || Number.POSITIVE_INFINITY;
|
|
414
|
+
const paths = [name].flat();
|
|
415
|
+
|
|
416
|
+
const runMatcher = locateOptions => {
|
|
417
|
+
if (typeof name !== 'function') {
|
|
418
|
+
return locatePathSync(paths, locateOptions);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const foundPath = name(locateOptions.cwd);
|
|
422
|
+
if (typeof foundPath === 'string') {
|
|
423
|
+
return locatePathSync([foundPath], locateOptions);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return foundPath;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
const matches = [];
|
|
430
|
+
// eslint-disable-next-line no-constant-condition
|
|
431
|
+
while (true) {
|
|
432
|
+
const foundPath = runMatcher({...options, cwd: directory});
|
|
433
|
+
|
|
434
|
+
if (foundPath === findUpStop) {
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (foundPath) {
|
|
439
|
+
matches.push(external_node_path_.resolve(directory, foundPath));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
if (directory === stopAt || matches.length >= limit) {
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
directory = external_node_path_.dirname(directory);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
return matches;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
async function find_up_findUp(name, options = {}) {
|
|
453
|
+
const matches = await findUpMultiple(name, {...options, limit: 1});
|
|
454
|
+
return matches[0];
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function findUpSync(name, options = {}) {
|
|
458
|
+
const matches = findUpMultipleSync(name, {...options, limit: 1});
|
|
459
|
+
return matches[0];
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/pkg-dir@7.0.0/node_modules/pkg-dir/index.js
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
async function packageDirectory({cwd} = {}) {
|
|
469
|
+
const filePath = await findUp('package.json', {cwd});
|
|
470
|
+
return filePath && path.dirname(filePath);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
function packageDirectorySync({cwd} = {}) {
|
|
474
|
+
const filePath = findUpSync('package.json', {cwd});
|
|
475
|
+
return filePath && external_node_path_.dirname(filePath);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/find-cache-dir@4.0.0/node_modules/find-cache-dir/index.js
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
const {env, cwd} = external_node_process_;
|
|
486
|
+
|
|
487
|
+
const isWritable = path => {
|
|
488
|
+
try {
|
|
489
|
+
external_node_fs_.accessSync(path, external_node_fs_.constants.W_OK);
|
|
490
|
+
return true;
|
|
491
|
+
} catch {
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
function useDirectory(directory, options) {
|
|
497
|
+
if (options.create) {
|
|
498
|
+
external_node_fs_.mkdirSync(directory, {recursive: true});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
if (options.thunk) {
|
|
502
|
+
return (...arguments_) => external_node_path_.join(directory, ...arguments_);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
return directory;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function getNodeModuleDirectory(directory) {
|
|
509
|
+
const nodeModules = external_node_path_.join(directory, 'node_modules');
|
|
510
|
+
|
|
511
|
+
if (
|
|
512
|
+
!isWritable(nodeModules)
|
|
513
|
+
&& (external_node_fs_.existsSync(nodeModules) || !isWritable(external_node_path_.join(directory)))
|
|
514
|
+
) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return nodeModules;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
function findCacheDirectory(options = {}) {
|
|
522
|
+
if (env.CACHE_DIR && !['true', 'false', '1', '0'].includes(env.CACHE_DIR)) {
|
|
523
|
+
return useDirectory(external_node_path_.join(env.CACHE_DIR, options.name), options);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
let {cwd: directory = cwd()} = options;
|
|
527
|
+
|
|
528
|
+
if (options.files) {
|
|
529
|
+
directory = common_path_prefix(options.files.map(file => external_node_path_.resolve(directory, file)));
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
directory = packageDirectorySync({cwd: directory});
|
|
533
|
+
|
|
534
|
+
if (!directory) {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
const nodeModules = getNodeModuleDirectory(directory);
|
|
539
|
+
if (!nodeModules) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
return useDirectory(external_node_path_.join(directory, 'node_modules', '.cache', options.name), options);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
/***/ })
|
|
548
|
+
|
|
549
|
+
};
|
|
550
|
+
;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(()=>{var e={2630:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.formatNames=t.fastFormats=t.fullFormats=void 0;function fmtDef(e,t){return{validate:e,compare:t}}t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef(date_time,compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};t.formatNames=Object.keys(t.fullFormats);function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return false;const a=+t[1];const s=+t[2];const o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&isLeapYear(a)?29:n[s])}function compareDate(e,t){if(!(e&&t))return undefined;if(e>t)return 1;if(e<t)return-1;return 0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=a.exec(e);if(!r)return false;const n=+r[1];const s=+r[2];const o=+r[3];const i=r[5];return(n<=23&&s<=59&&o<=59||n===23&&s===59&&o===60)&&(!t||i!=="")}function compareTime(e,t){if(!(e&&t))return undefined;const r=a.exec(e);const n=a.exec(t);if(!(r&&n))return undefined;e=r[1]+r[2]+r[3]+(r[4]||"");t=n[1]+n[2]+n[3]+(n[4]||"");if(e>t)return 1;if(e<t)return-1;return 0}const s=/t|\s/i;function date_time(e){const t=e.split(s);return t.length===2&&date(t[0])&&time(t[1],true)}function compareDateTime(e,t){if(!(e&&t))return undefined;const[r,n]=e.split(s);const[a,o]=t.split(s);const i=compareDate(r,a);if(i===undefined)return undefined;return i||compareTime(n,o)}const o=/\/|:/;const i=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(e){return o.test(e)&&i.test(e)}const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(e){c.lastIndex=0;return c.test(e)}const u=-(2**31);const d=2**31-1;function validateInt32(e){return Number.isInteger(e)&&e<=d&&e>=u}function validateInt64(e){return Number.isInteger(e)}function validateNumber(){return true}const l=/[^\\]\\Z/;function regex(e){if(l.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},8506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2630);const a=r(9880);const s=r(8135);const o=new s.Name("fullFormats");const i=new s.Name("fastFormats");const formatsPlugin=(e,t={keywords:true})=>{if(Array.isArray(t)){addFormats(e,t,n.fullFormats,o);return e}const[r,s]=t.mode==="fast"?[n.fastFormats,i]:[n.fullFormats,o];const c=t.formats||n.formatNames;addFormats(e,c,r,s);if(t.keywords)a.default(e);return e};formatsPlugin.get=(e,t="full")=>{const r=t==="fast"?n.fastFormats:n.fullFormats;const a=r[e];if(!a)throw new Error(`Unknown format "${e}"`);return a};function addFormats(e,t,r,n){var a;var o;(a=(o=e.opts.code).formats)!==null&&a!==void 0?a:o.formats=s._`require("ajv-formats/dist/formats").${n}`;for(const n of t)e.addFormat(n,r[n])}e.exports=t=formatsPlugin;Object.defineProperty(t,"__esModule",{value:true});t["default"]=formatsPlugin},9880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.formatLimitDefinition=void 0;const n=r(7193);const a=r(8135);const s=a.operators;const o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}};const i={message:({keyword:e,schemaCode:t})=>a.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>a._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:true,error:i,code(e){const{gen:t,data:r,schemaCode:s,keyword:i,it:c}=e;const{opts:u,self:d}=c;if(!u.validateFormats)return;const l=new n.KeywordCxt(c,d.RULES.all.format.definition,"format");if(l.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const r=t.scopeValue("formats",{ref:d.formats,code:u.code.formats});const n=t.const("fmt",a._`${r}[${l.schemaCode}]`);e.fail$data(a.or(a._`typeof ${n} != "object"`,a._`${n} instanceof RegExp`,a._`typeof ${n}.compare != "function"`,compareCode(n)))}function validateFormat(){const r=l.schema;const n=d.formats[r];if(!n||n===true)return;if(typeof n!="object"||n instanceof RegExp||typeof n.compare!="function"){throw new Error(`"${i}": format "${r}" does not define "compare" function`)}const s=t.scopeValue("formats",{key:r,ref:n,code:u.code.formats?a._`${u.code.formats}${a.getProperty(r)}`:undefined});e.fail$data(compareCode(s))}function compareCode(e){return a._`${e}.compare(${r}, ${s}) ${o[i].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=e=>{e.addKeyword(t.formatLimitDefinition);return e};t["default"]=formatLimitPlugin},4911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getRangeDef(e){return()=>({keyword:e,type:"number",schemaType:"array",macro:function([t,r]){validateRangeSchema(t,r);return e==="range"?{minimum:t,maximum:r}:{exclusiveMinimum:t,exclusiveMaximum:r}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function validateRangeSchema(t,r){if(t>r||e==="exclusiveRange"&&t===r){throw new Error("There are no numbers in range")}}}t["default"]=getRangeDef},1613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getRequiredDef(e){return()=>({keyword:e,type:"object",schemaType:"array",macro(t){if(t.length===0)return true;if(t.length===1)return{required:t};const r=e==="anyRequired"?"anyOf":"oneOf";return{[r]:t.map((e=>({required:[e]})))}},metaSchema:{type:"array",items:{type:"string"}}})}t["default"]=getRequiredDef},5722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.usePattern=t.metaSchemaRef=void 0;const n=r(8135);const a="http://json-schema.org/schema";function metaSchemaRef({defaultMeta:e}={}){return e===false?{}:{$ref:e||a}}t.metaSchemaRef=metaSchemaRef;function usePattern({gen:e,it:{opts:t}},r,a=(t.unicodeRegExp?"u":"")){const s=new RegExp(r,a);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,n._)`new RegExp(${r}, ${a})`})}t.usePattern=usePattern},2576:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getDef(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(e,t){if(!e)return true;const r=Object.keys(t.properties);if(r.length===0)return true;return{required:r}},dependencies:["properties"]}}t["default"]=getDef;e.exports=getDef},1818:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(1613));const s=(0,a.default)("anyRequired");t["default"]=s;e.exports=s},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5722);function getDef(e){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(e){const t=[];for(const r in e)t.push(getSchema(r,e[r]));return{allOf:t}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,n.metaSchemaRef)(e)}}}t["default"]=getDef;function getSchema(e,t){const r=e.split("/");const n={};let a=n;for(let e=1;e<r.length;e++){let n=r[e];const s=e===r.length-1;n=unescapeJsonPointer(n);const o=a.properties={};let i;if(/[0-9]+/.test(n)){let e=+n;i=a.items=[];a.type=["object","array"];while(e--)i.push({})}else{a.type="object"}a=s?t:{};o[n]=a;if(i)i.push(a)}return n}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=getDef},5313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);function getDef(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(e){const{schema:t,data:r}=e;const a=t.map((e=>(0,n._)`(${getData(e)}) === undefined`));e.fail((0,n.or)(...a));function getData(e){if(e==="")throw new Error("empty JSON pointer not allowed");const t=e.split("/");let a=r;const s=t.map(((e,t)=>t?a=(0,n._)`${a}${(0,n.getProperty)(unescapeJPSegment(e))}`:a));return(0,n.and)(...s)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}t["default"]=getDef;function unescapeJPSegment(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=getDef},9990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={};const n={timestamp:()=>()=>Date.now(),datetime:()=>()=>(new Date).toISOString(),date:()=>()=>(new Date).toISOString().slice(0,10),time:()=>()=>(new Date).toISOString().slice(11),random:()=>()=>Math.random(),randomint:e=>{var t;const r=(t=e===null||e===void 0?void 0:e.max)!==null&&t!==void 0?t:2;return()=>Math.floor(Math.random()*r)},seq:e=>{var t;const n=(t=e===null||e===void 0?void 0:e.name)!==null&&t!==void 0?t:"";r[n]||(r[n]=0);return()=>r[n]++}};const a=Object.assign(_getDef,{DEFAULTS:n});function _getDef(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:true,valid:true,compile(e,t,r){if(!r.opts.useDefaults||r.compositeRule)return()=>true;const n={};for(const t in e)n[t]=getDefault(e[t]);const a=r.opts.useDefaults==="empty";return t=>{for(const r in e){if(t[r]===undefined||a&&(t[r]===null||t[r]==="")){t[r]=n[r]()}}return true}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:false,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function getDefault(e){return typeof e=="object"?getObjDefault(e):getStrDefault(e)}function getObjDefault({func:e,args:t}){const r=n[e];assertDefined(e,r);return r(t)}function getStrDefault(e=""){const t=n[e];assertDefined(e,t);return t()}function assertDefined(e,t){if(!t)throw new Error(`invalid "dynamicDefaults" keyword property value: ${e}`)}t["default"]=a;e.exports=a},9854:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(4911));const s=(0,a.default)("exclusiveRange");t["default"]=s;e.exports=s},7080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};if(typeof Buffer!="undefined")r.Buffer=Buffer;if(typeof Promise!="undefined")r.Promise=Promise;const n=Object.assign(_getDef,{CONSTRUCTORS:r});function _getDef(){return{keyword:"instanceof",schemaType:["string","array"],compile(e){if(typeof e=="string"){const t=getConstructor(e);return e=>e instanceof t}if(Array.isArray(e)){const t=e.map(getConstructor);return e=>{for(const r of t){if(e instanceof r)return true}return false}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function getConstructor(e){const t=r[e];if(t)return t;throw new Error(`invalid "instanceof" keyword value ${e}`)}t["default"]=n;e.exports=n},536:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(1613));const s=(0,a.default)("oneRequired");t["default"]=s;e.exports=s},3570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(5722);const s={message:({params:{missingPattern:e}})=>(0,n.str)`should have property matching pattern '${e}'`,params:({params:{missingPattern:e}})=>(0,n._)`{missingPattern: ${e}}`};function getDef(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:s,code(e){const{gen:t,schema:r,data:s}=e;if(r.length===0)return;const o=t.let("valid",true);for(const e of r)validateProperties(e);function validateProperties(r){const i=t.let("matched",false);t.forIn("key",s,(s=>{t.assign(i,(0,n._)`${(0,a.usePattern)(e,r)}.test(${s})`);t.if(i,(()=>t.break()))}));e.setParams({missingPattern:r});t.assign(o,(0,n.and)(o,i));e.pass(o)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:true}}}t["default"]=getDef;e.exports=getDef},9925:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getDef(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(e){if(e.length===0)return true;if(e.length===1)return{not:{required:e}};return{not:{anyOf:e.map((e=>({required:[e]})))}}},metaSchema:{type:"array",items:{type:"string"}}}}t["default"]=getDef;e.exports=getDef},2044:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(4911));const s=(0,a.default)("range");t["default"]=s;e.exports=s},4831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(5722);const s={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:true}},required:["pattern"],additionalProperties:false};const o=/^\/(.*)\/([gimuy]*)$/;function getDef(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(e){const{data:t,schema:r}=e;const s=getRegExp(r);e.pass((0,n._)`${s}.test(${t})`);function getRegExp(t){if(typeof t=="object")return(0,a.usePattern)(e,t.pattern,t.flags);const r=o.exec(t);if(r)return(0,a.usePattern)(e,r[1],r[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},s]}}}t["default"]=getDef;e.exports=getDef},493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(5722);const s={message:({params:{schemaProp:e}})=>e?(0,n.str)`should match case "${e}" schema`:(0,n.str)`should match default case schema`,params:({params:{schemaProp:e}})=>e?(0,n._)`{failingCase: ${e}}`:(0,n._)`{failingDefault: true}`};function getDef(e){const t=(0,a.metaSchemaRef)(e);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:true,error:s,dependencies:["selectCases"],code(e){const{gen:t,schemaCode:r,parentSchema:a}=e;e.block$data(n.nil,(()=>{const s=t.let("valid",true);const o=t.name("_valid");const i=t.const("value",(0,n._)`${r} === null ? "null" : ${r}`);t.if(false);for(const r in a.selectCases){e.setParams({schemaProp:r});t.elseIf((0,n._)`"" + ${i} == ${r}`);const a=e.subschema({keyword:"selectCases",schemaProp:r},o);e.mergeEvaluated(a,n.Name);t.assign(s,o)}t.else();if(a.selectDefault!==undefined){e.setParams({schemaProp:undefined});const r=e.subschema({keyword:"selectDefault"},o);e.mergeEvaluated(r,n.Name);t.assign(s,o)}t.endIf();e.pass(s)}))}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:t}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:t}]}t["default"]=getDef;e.exports=getDef},2943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={trimStart:e=>e.trimStart(),trimEnd:e=>e.trimEnd(),trimLeft:e=>e.trimStart(),trimRight:e=>e.trimEnd(),trim:e=>e.trim(),toLowerCase:e=>e.toLowerCase(),toUpperCase:e=>e.toUpperCase(),toEnumCase:(e,t)=>(t===null||t===void 0?void 0:t.hash[configKey(e)])||e};const s=Object.assign(_getDef,{transform:a});function _getDef(){return{keyword:"transform",schemaType:"array",before:"enum",code(e){const{gen:t,data:r,schema:s,parentSchema:o,it:i}=e;const{parentData:c,parentDataProperty:u}=i;const d=s;if(!d.length)return;let l;if(d.includes("toEnumCase")){const e=getEnumCaseCfg(o);l=t.scopeValue("obj",{ref:e,code:(0,n.stringify)(e)})}t.if((0,n._)`typeof ${r} == "string" && ${c} !== undefined`,(()=>{t.assign(r,transformExpr(d.slice()));t.assign((0,n._)`${c}[${u}]`,r)}));function transformExpr(e){if(!e.length)return r;const s=e.pop();if(!(s in a))throw new Error(`transform: unknown transformation ${s}`);const o=t.scopeValue("func",{ref:a[s],code:(0,n._)`require("ajv-keywords/dist/definitions/transform").transform${(0,n.getProperty)(s)}`});const i=transformExpr(e);return l&&s==="toEnumCase"?(0,n._)`${o}(${i}, ${l})`:(0,n._)`${o}(${i})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(a)}}}}function getEnumCaseCfg(e){const t={hash:{}};if(!e.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const r of e.enum){if(typeof r!=="string")continue;const e=configKey(r);if(t.hash[e]){throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique')}t.hash[e]=r}return t}function configKey(e){return e.toLowerCase()}t["default"]=s;e.exports=s},2174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=["undefined","string","number","object","function","boolean","symbol"];function getDef(){return{keyword:"typeof",schemaType:["string","array"],code(e){const{data:t,schema:r,schemaValue:a}=e;e.fail(typeof r=="string"?(0,n._)`typeof ${t} != ${r}`:(0,n._)`${a}.indexOf(typeof ${t}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:a},{type:"array",items:{type:"string",enum:a}}]}}}t["default"]=getDef;e.exports=getDef},7422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7447);const a=["number","integer","string","boolean","null"];function getDef(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(e,t){const r=getScalarKeys(e,t);return t=>{if(t.length<=1)return true;for(let a=0;a<e.length;a++){const s=e[a];if(r[a]){const e={};for(const r of t){if(!r||typeof r!="object")continue;let t=r[s];if(t&&typeof t=="object")continue;if(typeof t=="string")t='"'+t;if(e[t])return false;e[t]=true}}else{for(let e=t.length;e--;){const r=t[e];if(!r||typeof r!="object")continue;for(let a=e;a--;){const e=t[a];if(e&&typeof e=="object"&&n(r[s],e[s]))return false}}}}return true}},metaSchema:{type:"array",items:{type:"string"}}}}t["default"]=getDef;function getScalarKeys(e,t){return e.map((e=>{var r,n,s;const o=(s=(n=(r=t.items)===null||r===void 0?void 0:r.properties)===null||n===void 0?void 0:n[e])===null||s===void 0?void 0:s.type;return Array.isArray(o)?!o.includes("object")&&!o.includes("array"):a.includes(o)}))}e.exports=getDef},7903:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(1672));const ajvKeywords=(e,t)=>{if(Array.isArray(t)){for(const r of t)get(r)(e);return e}if(t){get(t)(e);return e}for(t in a.default)get(t)(e);return e};ajvKeywords.get=get;function get(e){const t=a.default[e];if(!t)throw new Error("Unknown keyword "+e);return t}t["default"]=ajvKeywords;e.exports=ajvKeywords;e.exports["default"]=ajvKeywords},8825:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(2576));const allRequired=e=>e.addKeyword((0,a.default)());t["default"]=allRequired;e.exports=allRequired},1113:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(1818));const anyRequired=e=>e.addKeyword((0,a.default)());t["default"]=anyRequired;e.exports=anyRequired},736:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(2531));const deepProperties=(e,t)=>e.addKeyword((0,a.default)(t));t["default"]=deepProperties;e.exports=deepProperties},2598:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(5313));const deepRequired=e=>e.addKeyword((0,a.default)());t["default"]=deepRequired;e.exports=deepRequired},4286:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(9990));const dynamicDefaults=e=>e.addKeyword((0,a.default)());t["default"]=dynamicDefaults;e.exports=dynamicDefaults},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(9854));const exclusiveRange=e=>e.addKeyword((0,a.default)());t["default"]=exclusiveRange;e.exports=exclusiveRange},1672:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(745));const s=n(r(4823));const o=n(r(2138));const i=n(r(4839));const c=n(r(6067));const u=n(r(7155));const d=n(r(4908));const l=n(r(8825));const f=n(r(1113));const p=n(r(3689));const m=n(r(3974));const h=n(r(6829));const y=n(r(736));const g=n(r(2598));const v=n(r(4286));const $=n(r(3524));const b={typeof:a.default,instanceof:s.default,range:o.default,exclusiveRange:i.default,regexp:c.default,transform:u.default,uniqueItemProperties:d.default,allRequired:l.default,anyRequired:f.default,oneRequired:p.default,patternRequired:m.default,prohibited:h.default,deepProperties:y.default,deepRequired:g.default,dynamicDefaults:v.default,select:$.default};t["default"]=b;e.exports=b},4823:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(7080));const instanceofPlugin=e=>e.addKeyword((0,a.default)());t["default"]=instanceofPlugin;e.exports=instanceofPlugin},3689:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(536));const oneRequired=e=>e.addKeyword((0,a.default)());t["default"]=oneRequired;e.exports=oneRequired},3974:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(3570));const patternRequired=e=>e.addKeyword((0,a.default)());t["default"]=patternRequired;e.exports=patternRequired},6829:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(9925));const prohibited=e=>e.addKeyword((0,a.default)());t["default"]=prohibited;e.exports=prohibited},2138:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(2044));const range=e=>e.addKeyword((0,a.default)());t["default"]=range;e.exports=range},6067:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(4831));const regexp=e=>e.addKeyword((0,a.default)());t["default"]=regexp;e.exports=regexp},3524:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(493));const select=(e,t)=>{(0,a.default)(t).forEach((t=>e.addKeyword(t)));return e};t["default"]=select;e.exports=select},7155:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(2943));const transform=e=>e.addKeyword((0,a.default)());t["default"]=transform;e.exports=transform},745:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(2174));const typeofPlugin=e=>e.addKeyword((0,a.default)());t["default"]=typeofPlugin;e.exports=typeofPlugin},4908:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(r(7422));const uniqueItemProperties=e=>e.addKeyword((0,a.default)());t["default"]=uniqueItemProperties;e.exports=uniqueItemProperties},7193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(1217);const a=r(8492);const s=r(7960);const o=r(543);const i=["/properties"];const c="http://json-schema.org/draft-07/schema";class Ajv extends n.default{_addVocabularies(){super._addVocabularies();a.default.forEach((e=>this.addVocabulary(e)));if(this.opts.discriminator)this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema(e,c,false);this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:undefined)}}e.exports=t=Ajv;Object.defineProperty(t,"__esModule",{value:true});t["default"]=Ajv;var u=r(9158);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return u.KeywordCxt}});var d=r(8135);Object.defineProperty(t,"_",{enumerable:true,get:function(){return d._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return d.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return d.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return d.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return d.CodeGen}});var l=r(953);Object.defineProperty(t,"ValidationError",{enumerable:true,get:function(){return l.default}});var f=r(3891);Object.defineProperty(t,"MissingRefError",{enumerable:true,get:function(){return f.default}})},545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName;t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){super();if(!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce(((e,t)=>{if(t instanceof Name)e[t.str]=(e[t.str]||0)+1;return e}),{})}}t._Code=_Code;t.nil=new _Code("");function _(e,...t){const r=[e[0]];let n=0;while(n<t.length){addCodeArg(r,t[n]);r.push(e[++n])}return new _Code(r)}t._=_;const r=new _Code("+");function str(e,...t){const n=[safeStringify(e[0])];let a=0;while(a<t.length){n.push(r);addCodeArg(n,t[a]);n.push(r,safeStringify(e[++a]))}optimize(n);return new _Code(n)}t.str=str;function addCodeArg(e,t){if(t instanceof _Code)e.push(...t._items);else if(t instanceof Name)e.push(t);else e.push(interpolate(t))}t.addCodeArg=addCodeArg;function optimize(e){let t=1;while(t<e.length-1){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(r!==undefined){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function mergeExprItems(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Name||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Name))return`"${e}${t.slice(1)}`;return}function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`}t.strConcat=strConcat;function interpolate(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:safeStringify(Array.isArray(e)?e.join(","):e)}function stringify(e){return new _Code(safeStringify(e))}t.stringify=stringify;function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=safeStringify;function getProperty(e){return typeof e=="string"&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`}t.getProperty=getProperty;function getEsmExportName(e){if(typeof e=="string"&&t.IDENTIFIER.test(e)){return new _Code(`${e}`)}throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}t.getEsmExportName=getEsmExportName;function regexpCode(e){return new _Code(e.toString())}t.regexpCode=regexpCode},8135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(545);const a=r(3185);var s=r(545);Object.defineProperty(t,"_",{enumerable:true,get:function(){return s._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return s.str}});Object.defineProperty(t,"strConcat",{enumerable:true,get:function(){return s.strConcat}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return s.nil}});Object.defineProperty(t,"getProperty",{enumerable:true,get:function(){return s.getProperty}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return s.stringify}});Object.defineProperty(t,"regexpCode",{enumerable:true,get:function(){return s.regexpCode}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return s.Name}});var o=r(3185);Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return o.Scope}});Object.defineProperty(t,"ValueScope",{enumerable:true,get:function(){return o.ValueScope}});Object.defineProperty(t,"ValueScopeName",{enumerable:true,get:function(){return o.ValueScopeName}});Object.defineProperty(t,"varKinds",{enumerable:true,get:function(){return o.varKinds}});t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super();this.varKind=e;this.name=t;this.rhs=r}render({es5:e,_n:t}){const r=e?a.varKinds.var:this.varKind;const n=this.rhs===undefined?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super();this.lhs=e;this.rhs=t;this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof n.Name&&!e[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){const e=this.lhs instanceof n.Name?{}:{...this.lhs.names};return addExprNames(e,this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){const t=this.label?` ${this.label}`:"";return`break${t};`+e}}class Throw extends Node{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(e,t){this.code=optimizeExpr(this.code,e,t);return this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;while(t--){const r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:undefined}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;while(n--){const a=r[n];if(a.optimizeNames(e,t))continue;subtractNames(e,a.names);r.splice(n,1)}return r.length>0?this:undefined}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(e===true)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}if(t){if(e===false)return t instanceof If?t:t.nodes;if(this.nodes.length)return this;return new If(not(e),t instanceof If?[t]:t.nodes)}if(e===false||!this.nodes.length)return undefined;return this}optimizeNames(e,t){var r;this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t);if(!(super.optimizeNames(e,t)||this.else))return;this.condition=optimizeExpr(this.condition,e,t);return this}get names(){const e=super.names;addExprNames(e,this.condition);if(this.else)addNames(e,this.else.names);return e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iteration=optimizeExpr(this.iteration,e,t);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,n){super();this.varKind=e;this.name=t;this.from=r;this.to=n}render(e){const t=e.es5?a.varKinds.var:this.varKind;const{name:r,from:n,to:s}=this;return`for(${t} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,n){super();this.loop=e;this.varKind=t;this.name=r;this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iterable=optimizeExpr(this.iterable,e,t);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super();this.name=e;this.args=t;this.async=r}render(e){const t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;super.optimizeNodes();(e=this.catch)===null||e===void 0?void 0:e.optimizeNodes();(t=this.finally)===null||t===void 0?void 0:t.optimizeNodes();return this}optimizeNames(e,t){var r,n;super.optimizeNames(e,t);(r=this.catch)===null||r===void 0?void 0:r.optimizeNames(e,t);(n=this.finally)===null||n===void 0?void 0:n.optimizeNames(e,t);return this}get names(){const e=super.names;if(this.catch)addNames(e,this.catch.names);if(this.finally)addNames(e,this.finally.names);return e}}class Catch extends BlockNode{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";class CodeGen{constructor(e,t={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...t,_n:t.lines?"\n":""};this._extScope=e;this._scope=new a.Scope({parent:e});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);const n=this._values[r.prefix]||(this._values[r.prefix]=new Set);n.add(r);return r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const a=this._scope.toName(t);if(r!==undefined&&n)this._constants[a.str]=r;this._leafNode(new Def(e,a,r));return a}const(e,t,r){return this._def(a.varKinds.const,e,t,r)}let(e,t,r){return this._def(a.varKinds.let,e,t,r)}var(e,t,r){return this._def(a.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){if(typeof e=="function")e();else if(e!==n.nil)this._leafNode(new AnyCode(e));return this}object(...e){const t=["{"];for(const[r,a]of e){if(t.length>1)t.push(",");t.push(r);if(r!==a||this.opts.es5){t.push(":");(0,n.addCodeArg)(t,a)}}t.push("}");return new n._Code(t)}if(e,t,r){this._blockNode(new If(e));if(t&&r){this.code(t).else().code(r).endIf()}else if(t){this.code(t).endIf()}else if(r){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){this._blockNode(e);if(t)this.code(t).endFor();return this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,n,s=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(s,o,t,r),(()=>n(o)))}forOf(e,t,r,s=a.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,n._)`${e}.length`,(t=>{this.var(o,(0,n._)`${e}[${t}]`);r(o)}))}return this._for(new ForIter("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties){return this.forOf(e,(0,n._)`Object.keys(${t})`,r)}const o=this._scope.toName(e);return this._for(new ForIter("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;this._blockNode(t);this.code(e);if(t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new Try;this._blockNode(n);this.code(e);if(t){const e=this.name("e");this._currNode=n.catch=new Catch(e);t(e)}if(r){this._currNode=n.finally=new Finally;this.code(r)}return this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){this._blockStarts.push(this._nodes.length);if(e)this.code(e).endBlock(t);return this}endBlock(e){const t=this._blockStarts.pop();if(t===undefined)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||e!==undefined&&r!==e){throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`)}this._nodes.length=t;return this}func(e,t=n.nil,r,a){this._blockNode(new Func(e,t,r));if(a)this.code(a).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){while(e-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(e){this._currNode.nodes.push(e);return this}_blockNode(e){this._currNode.nodes.push(e);this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=t.else=e;return this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}}t.CodeGen=CodeGen;function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof n._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){if(e instanceof n.Name)return replaceName(e);if(!canOptimize(e))return e;return new n._Code(e._items.reduce(((e,t)=>{if(t instanceof n.Name)t=replaceName(t);if(t instanceof n._Code)e.push(...t._items);else e.push(t);return e}),[]));function replaceName(e){const n=r[e.str];if(n===undefined||t[e.str]!==1)return e;delete t[e.str];return n}function canOptimize(e){return e instanceof n._Code&&e._items.some((e=>e instanceof n.Name&&t[e.str]===1&&r[e.str]!==undefined))}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,n._)`!${par(e)}`}t.not=not;const i=mappend(t.operators.AND);function and(...e){return e.reduce(i)}t.and=and;const c=mappend(t.operators.OR);function or(...e){return e.reduce(c)}t.or=or;function mappend(e){return(t,r)=>t===n.nil?r:r===n.nil?t:(0,n._)`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof n.Name?e:(0,n._)`(${e})`}},3185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(545);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var a;(function(e){e[e["Started"]=0]="Started";e[e["Completed"]=1]="Completed"})(a=t.UsedValueState||(t.UsedValueState={}));t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={};this._prefixes=e;this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){const t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e)){throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`)}return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends n.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e;this.scopePath=(0,n._)`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const s=(0,n._)`\n`;class ValueScope extends Scope{constructor(e){super(e);this._values={};this._scope=e.scope;this.opts={...e,_n:e.lines?s:n.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(t.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e);const{prefix:a}=n;const s=(r=t.key)!==null&&r!==void 0?r:t.ref;let o=this._values[a];if(o){const e=o.get(s);if(e)return e}else{o=this._values[a]=new Map}o.set(s,n);const i=this._scope[a]||(this._scope[a]=[]);const c=i.length;i[c]=t.ref;n.setValue(t,{property:a,itemIndex:c});return n}getValue(e,t){const r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(t.scopePath===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return(0,n._)`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(e.value===undefined)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},o){let i=n.nil;for(const c in e){const u=e[c];if(!u)continue;const d=s[c]=s[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,a.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;i=(0,n._)`${i}${r} ${e} = ${s};${this.opts._n}`}else if(s=o===null||o===void 0?void 0:o(e)){i=(0,n._)`${i}${s}${this.opts._n}`}else{throw new ValueError(e)}d.set(e,a.Completed)}))}return i}}t.ValueScope=ValueScope},3779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(8135);const a=r(2616);const s=r(5580);t.keywordError={message:({keyword:e})=>(0,n.str)`must pass "${e}" keyword validation`};t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,n.str)`"${e}" keyword must be ${t} ($data)`:(0,n.str)`"${e}" keyword is invalid ($data)`};function reportError(e,r=t.keywordError,a,s){const{it:o}=e;const{gen:i,compositeRule:c,allErrors:u}=o;const d=errorObjectCode(e,r,a);if(s!==null&&s!==void 0?s:c||u){addError(i,d)}else{returnErrors(o,(0,n._)`[${d}]`)}}t.reportError=reportError;function reportExtraError(e,r=t.keywordError,n){const{it:a}=e;const{gen:o,compositeRule:i,allErrors:c}=a;const u=errorObjectCode(e,r,n);addError(o,u);if(!(i||c)){returnErrors(a,s.default.vErrors)}}t.reportExtraError=reportExtraError;function resetErrorsCount(e,t){e.assign(s.default.errors,t);e.if((0,n._)`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign((0,n._)`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))}t.resetErrorsCount=resetErrorsCount;function extendErrors({gen:e,keyword:t,schemaValue:r,data:a,errsCount:o,it:i}){if(o===undefined)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,(0,n._)`${s.default.vErrors}[${o}]`);e.if((0,n._)`${c}.instancePath === undefined`,(()=>e.assign((0,n._)`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,i.errorPath))));e.assign((0,n._)`${c}.schemaPath`,(0,n.str)`${i.errSchemaPath}/${t}`);if(i.opts.verbose){e.assign((0,n._)`${c}.schema`,r);e.assign((0,n._)`${c}.data`,a)}}))}t.extendErrors=extendErrors;function addError(e,t){const r=e.const("err",t);e.if((0,n._)`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,(0,n._)`[${r}]`)),(0,n._)`${s.default.vErrors}.push(${r})`);e.code((0,n._)`${s.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:a,schemaEnv:s}=e;if(s.$async){r.throw((0,n._)`new ${e.ValidationError}(${t})`)}else{r.assign((0,n._)`${a}.errors`,t);r.return(false)}}const o={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:a}=e.it;if(a===false)return(0,n._)`{}`;return errorObject(e,t,r)}function errorObject(e,t,r={}){const{gen:n,it:a}=e;const s=[errorInstancePath(a,r),errorSchemaPath(e,r)];extraErrorProps(e,t,s);return n.object(...s)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?(0,n.str)`${e}${(0,a.getErrorPath)(t,a.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let i=s?t:(0,n.str)`${t}/${e}`;if(r){i=(0,n.str)`${i}${(0,a.getErrorPath)(r,a.Type.Str)}`}return[o.schemaPath,i]}function extraErrorProps(e,{params:t,message:r},a){const{keyword:i,data:c,schemaValue:u,it:d}=e;const{opts:l,propertyName:f,topSchemaRef:p,schemaPath:m}=d;a.push([o.keyword,i],[o.params,typeof t=="function"?t(e):t||(0,n._)`{}`]);if(l.messages){a.push([o.message,typeof r=="function"?r(e):r])}if(l.verbose){a.push([o.schema,u],[o.parentSchema,(0,n._)`${p}${m}`],[s.default.data,c])}if(f)a.push([o.propertyName,f])}},3067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(8135);const a=r(953);const s=r(5580);const o=r(7596);const i=r(2616);const c=r(9158);class SchemaEnv{constructor(e){var t;this.refs={};this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema;this.schemaId=e.schemaId;this.root=e.root||this;this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,o.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]);this.schemaPath=e.schemaPath;this.localRefs=e.localRefs;this.meta=e.meta;this.$async=r===null||r===void 0?void 0:r.$async;this.refs={}}}t.SchemaEnv=SchemaEnv;function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId);const{es5:i,lines:u}=this.opts.code;const{ownProperties:d}=this.opts;const l=new n.CodeGen(this.scope,{es5:i,lines:u,ownProperties:d});let f;if(e.$async){f=l.scopeValue("Error",{ref:a.default,code:(0,n._)`require("ajv/dist/runtime/validation_error").default`})}const p=l.scopeName("validate");e.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===true?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n._)`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e);(0,c.validateFunctionCode)(m);l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`;if(this.opts.code.process)h=this.opts.code.process(h,e);const r=new Function(`${s.default.self}`,`${s.default.scope}`,h);const a=r(this,this.scope.get());this.scope.value(p,{ref:a});a.errors=null;a.schema=e.schema;a.schemaEnv=e;if(e.$async)a.$async=true;if(this.opts.code.source===true){a.source={validateName:p,validateCode:t,scopeValues:l._values}}if(this.opts.unevaluated){const{props:e,items:t}=m;a.evaluated={props:e instanceof n.Name?undefined:e,items:t instanceof n.Name?undefined:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name};if(a.source)a.source.evaluated=(0,n.stringify)(a.evaluated)}e.validate=a;return e}catch(t){delete e.validate;delete e.validateName;if(h)this.logger.error("Error compiling schema, function code:",h);throw t}finally{this._compilations.delete(e)}}t.compileSchema=compileSchema;function resolveRef(e,t,r){var n;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let s=resolve.call(this,e,r);if(s===undefined){const a=(n=e.localRefs)===null||n===void 0?void 0:n[r];const{schemaId:o}=this.opts;if(a)s=new SchemaEnv({schema:a,schemaId:o,root:e,baseId:t})}if(s===undefined)return;return e.refs[r]=inlineOrCompile.call(this,s)}t.resolveRef=resolveRef;function inlineOrCompile(e){if((0,o.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const t of this._compilations){if(sameSchemaEnv(t,e))return t}}t.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function resolve(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t);const n=(0,o._getFullPath)(this.opts.uriResolver,r);let a=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,undefined);if(Object.keys(e.schema).length>0&&n===a){return getJsonPointer.call(this,r,e)}const s=(0,o.normalizeId)(n);const i=this.refs[s]||this.schemas[s];if(typeof i=="string"){const t=resolveSchema.call(this,e,i);if(typeof(t===null||t===void 0?void 0:t.schema)!=="object")return;return getJsonPointer.call(this,r,t)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)compileSchema.call(this,i);if(s===(0,o.normalizeId)(t)){const{schema:t}=i;const{schemaId:r}=this.opts;const n=t[r];if(n)a=(0,o.resolveUrl)(this.opts.uriResolver,a,n);return new SchemaEnv({schema:t,schemaId:r,root:e,baseId:a})}return getJsonPointer.call(this,r,i)}t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:n}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const n of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;const e=r[(0,i.unescapeFragment)(n)];if(e===undefined)return;r=e;const a=typeof r==="object"&&r[this.opts.schemaId];if(!u.has(n)&&a){t=(0,o.resolveUrl)(this.opts.uriResolver,t,a)}}let s;if(typeof r!="boolean"&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=resolveSchema.call(this,n,e)}const{schemaId:c}=this.opts;s=s||new SchemaEnv({schema:r,schemaId:c,root:n,baseId:t});if(s.schema!==s.root.schema)return s;return undefined}},5580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t["default"]=a},3891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7596);class MissingRefError extends Error{constructor(e,t,r,a){super(a||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,n.resolveUrl)(e,t,r);this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t["default"]=MissingRefError},7596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(2616);const a=r(7447);const s=r(7243);const o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(e,t=true){if(typeof e=="boolean")return true;if(t===true)return!hasRef(e);if(!t)return false;return countKeys(e)<=t}t.inlineRef=inlineRef;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(i.has(t))return true;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return true;if(typeof r=="object"&&hasRef(r))return true}return false}function countKeys(e){let t=0;for(const r in e){if(r==="$ref")return Infinity;t++;if(o.has(r))continue;if(typeof e[r]=="object"){(0,n.eachItem)(e[r],(e=>t+=countKeys(e)))}if(t===Infinity)return Infinity}return t}function getFullPath(e,t="",r){if(r!==false)t=normalizeId(t);const n=e.parse(t);return _getFullPath(e,n)}t.getFullPath=getFullPath;function _getFullPath(e,t){const r=e.serialize(t);return r.split("#")[0]+"#"}t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId;function resolveUrl(e,t,r){r=normalizeId(r);return e.resolve(t,r)}t.resolveUrl=resolveUrl;const u=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts;const o=normalizeId(e[r]||t);const i={"":o};const c=getFullPath(n,o,false);const d={};const l=new Set;s(e,{allKeys:true},((e,t,n,a)=>{if(a===undefined)return;const s=c+t;let o=i[a];if(typeof e[r]=="string")o=addRef.call(this,e[r]);addAnchor.call(this,e.$anchor);addAnchor.call(this,e.$dynamicAnchor);i[t]=o;function addRef(t){const r=this.opts.uriResolver.resolve;t=normalizeId(o?r(o,t):t);if(l.has(t))throw ambiguos(t);l.add(t);let n=this.refs[t];if(typeof n=="string")n=this.refs[n];if(typeof n=="object"){checkAmbiguosRef(e,n.schema,t)}else if(t!==normalizeId(s)){if(t[0]==="#"){checkAmbiguosRef(e,d[t],t);d[t]=e}else{this.refs[t]=s}}return t}function addAnchor(e){if(typeof e=="string"){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}}));return d;function checkAmbiguosRef(e,t,r){if(t!==undefined&&!a(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}t.getSchemaRefs=getSchemaRefs},868:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getRules=t.isJSONType=void 0;const r=["string","number","integer","boolean","null","object","array"];const n=new Set(r);function isJSONType(e){return typeof e=="string"&&n.has(e)}t.isJSONType=isJSONType;function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:true,boolean:true,null:true},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=getRules},2616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(8135);const a=r(545);function toHash(e){const t={};for(const r of e)t[r]=true;return t}t.toHash=toHash;function alwaysValidSchema(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return true;checkUnknownRules(e,t);return!schemaHasRules(t,e.self.RULES.all)}t.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;const a=n.RULES.keywords;for(const r in t){if(!a[r])checkStrictMode(e,`unknown keyword: "${r}"`)}}t.checkUnknownRules=checkUnknownRules;function schemaHasRules(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return true;return false}t.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return true;return false}t.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,a,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,n._)`${r}`}return(0,n._)`${e}${t}${(0,n.getProperty)(a)}`}t.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))}t.unescapeFragment=unescapeFragment;function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))}t.escapeFragment=escapeFragment;function escapeJsonPointer(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=unescapeJsonPointer;function eachItem(e,t){if(Array.isArray(e)){for(const r of e)t(r)}else{t(e)}}t.eachItem=eachItem;function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:a}){return(s,o,i,c)=>{const u=i===undefined?o:i instanceof n.Name?(o instanceof n.Name?e(s,o,i):t(s,o,i),i):o instanceof n.Name?(t(s,i,o),o):r(o,i);return c===n.Name&&!(u instanceof n.Name)?a(s,u):u}}t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,n._)`${r} !== true && ${t} !== undefined`,(()=>{e.if((0,n._)`${t} === true`,(()=>e.assign(r,true)),(()=>e.assign(r,(0,n._)`${r} || {}`).code((0,n._)`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if((0,n._)`${r} !== true`,(()=>{if(t===true){e.assign(r,true)}else{e.assign(r,(0,n._)`${r} || {}`);setEvaluated(e,r,t)}})),mergeValues:(e,t)=>e===true?true:{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,n._)`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,(0,n._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if((0,n._)`${r} !== true`,(()=>e.assign(r,t===true?true:(0,n._)`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>e===true?true:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function evaluatedPropsToName(e,t){if(t===true)return e.var("props",true);const r=e.var("props",(0,n._)`{}`);if(t!==undefined)setEvaluated(e,r,t);return r}t.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign((0,n._)`${t}${(0,n.getProperty)(r)}`,true)))}t.setEvaluated=setEvaluated;const s={};function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new a._Code(t.code))})}t.useFunc=useFunc;var o;(function(e){e[e["Num"]=0]="Num";e[e["Str"]=1]="Str"})(o=t.Type||(t.Type={}));function getErrorPath(e,t,r){if(e instanceof n.Name){const a=t===o.Num;return r?a?(0,n._)`"[" + ${e} + "]"`:(0,n._)`"['" + ${e} + "']"`:a?(0,n._)`"/" + ${e}`:(0,n._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+escapeJsonPointer(e)}t.getErrorPath=getErrorPath;function checkStrictMode(e,t,r=e.opts.strictSchema){if(!r)return;t=`strict mode: ${t}`;if(r===true)throw new Error(t);e.self.logger.warn(t)}t.checkStrictMode=checkStrictMode},8465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==true&&shouldUseGroup(e,n)}t.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}t.shouldUseGroup=shouldUseGroup;function shouldUseRule(e,t){var r;return e[t.keyword]!==undefined||((r=t.definition.implements)===null||r===void 0?void 0:r.some((t=>e[t]!==undefined)))}t.shouldUseRule=shouldUseRule},728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(3779);const a=r(8135);const s=r(5580);const o={message:"boolean schema is false"};function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:n}=e;if(r===false){falseSchemaError(e,false)}else if(typeof r=="object"&&r.$async===true){t.return(s.default.data)}else{t.assign((0,a._)`${n}.errors`,null);t.return(true)}}t.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(e,t){const{gen:r,schema:n}=e;if(n===false){r.var(t,false);falseSchemaError(e)}else{r.var(t,true)}}t.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(e,t){const{gen:r,data:a}=e;const s={gen:r,keyword:"false schema",data:a,schema:false,schemaCode:false,schemaValue:false,params:{},it:e};(0,n.reportError)(s,o,undefined,t)}},4608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(868);const a=r(8465);const s=r(3779);const o=r(8135);const i=r(2616);var c;(function(e){e[e["Correct"]=0]="Correct";e[e["Wrong"]=1]="Wrong"})(c=t.DataType||(t.DataType={}));function getSchemaTypes(e){const t=getJSONTypes(e.type);const r=t.includes("null");if(r){if(e.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(e.nullable===true)t.push("null")}return t}t.getSchemaTypes=getSchemaTypes;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}t.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(e,t){const{gen:r,data:n,opts:s}=e;const o=coerceToTypes(t,s.coerceTypes);const i=t.length>0&&!(o.length===0&&t.length===1&&(0,a.schemaHasRulesForType)(e,t[0]));if(i){const a=checkDataTypes(t,n,s.strictNumbers,c.Wrong);r.if(a,(()=>{if(o.length)coerceData(e,t,o);else reportTypeError(e)}))}return i}t.coerceAndCheckDataType=coerceAndCheckDataType;const u=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||t==="array"&&e==="array")):[]}function coerceData(e,t,r){const{gen:n,data:a,opts:s}=e;const i=n.let("dataType",(0,o._)`typeof ${a}`);const c=n.let("coerced",(0,o._)`undefined`);if(s.coerceTypes==="array"){n.if((0,o._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>n.assign(a,(0,o._)`${a}[0]`).assign(i,(0,o._)`typeof ${a}`).if(checkDataTypes(t,a,s.strictNumbers),(()=>n.assign(c,a)))))}n.if((0,o._)`${c} !== undefined`);for(const e of r){if(u.has(e)||e==="array"&&s.coerceTypes==="array"){coerceSpecificType(e)}}n.else();reportTypeError(e);n.endIf();n.if((0,o._)`${c} !== undefined`,(()=>{n.assign(a,c);assignParentData(e,c)}));function coerceSpecificType(e){switch(e){case"string":n.elseIf((0,o._)`${i} == "number" || ${i} == "boolean"`).assign(c,(0,o._)`"" + ${a}`).elseIf((0,o._)`${a} === null`).assign(c,(0,o._)`""`);return;case"number":n.elseIf((0,o._)`${i} == "boolean" || ${a} === null
|
|
2
|
+
|| (${i} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,o._)`+${a}`);return;case"integer":n.elseIf((0,o._)`${i} === "boolean" || ${a} === null
|
|
3
|
+
|| (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,o._)`+${a}`);return;case"boolean":n.elseIf((0,o._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,false).elseIf((0,o._)`${a} === "true" || ${a} === 1`).assign(c,true);return;case"null":n.elseIf((0,o._)`${a} === "" || ${a} === 0 || ${a} === false`);n.assign(c,null);return;case"array":n.elseIf((0,o._)`${i} === "string" || ${i} === "number"
|
|
4
|
+
|| ${i} === "boolean" || ${a} === null`).assign(c,(0,o._)`[${a}]`)}}}function assignParentData({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,o._)`${t} !== undefined`,(()=>e.assign((0,o._)`${t}[${r}]`,n)))}function checkDataType(e,t,r,n=c.Correct){const a=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return(0,o._)`${t} ${a} null`;case"array":s=(0,o._)`Array.isArray(${t})`;break;case"object":s=(0,o._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=numCond((0,o._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=numCond();break;default:return(0,o._)`typeof ${t} ${a} ${e}`}return n===c.Correct?s:(0,o.not)(s);function numCond(e=o.nil){return(0,o.and)((0,o._)`typeof ${t} == "number"`,e,r?(0,o._)`isFinite(${t})`:o.nil)}}t.checkDataType=checkDataType;function checkDataTypes(e,t,r,n){if(e.length===1){return checkDataType(e[0],t,r,n)}let a;const s=(0,i.toHash)(e);if(s.array&&s.object){const e=(0,o._)`typeof ${t} != "object"`;a=s.null?e:(0,o._)`!${t} || ${e}`;delete s.null;delete s.array;delete s.object}else{a=o.nil}if(s.number)delete s.integer;for(const e in s)a=(0,o.and)(a,checkDataType(e,t,r,n));return a}t.checkDataTypes=checkDataTypes;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,o._)`{type: ${e}}`:(0,o._)`{type: ${t}}`};function reportTypeError(e){const t=getTypeErrorContext(e);(0,s.reportError)(t,d)}t.reportTypeError=reportTypeError;function getTypeErrorContext(e){const{gen:t,data:r,schema:n}=e;const a=(0,i.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:e}}},7010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assignDefaults=void 0;const n=r(8135);const a=r(2616);function assignDefaults(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r){for(const t in r){assignDefault(e,t,r[t].default)}}else if(t==="array"&&Array.isArray(n)){n.forEach(((t,r)=>assignDefault(e,r,t.default)))}}t.assignDefaults=assignDefaults;function assignDefault(e,t,r){const{gen:s,compositeRule:o,data:i,opts:c}=e;if(r===undefined)return;const u=(0,n._)`${i}${(0,n.getProperty)(t)}`;if(o){(0,a.checkStrictMode)(e,`default is ignored for: ${u}`);return}let d=(0,n._)`${u} === undefined`;if(c.useDefaults==="empty"){d=(0,n._)`${d} || ${u} === null || ${u} === ""`}s.if(d,(0,n._)`${u} = ${(0,n.stringify)(r)}`)}},9158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(728);const a=r(4608);const s=r(8465);const o=r(4608);const i=r(7010);const c=r(8121);const u=r(537);const d=r(8135);const l=r(5580);const f=r(7596);const p=r(2616);const m=r(3779);function validateFunctionCode(e){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){topSchemaObjCode(e);return}}validateFunction(e,(()=>(0,n.topBoolOrEmptySchema)(e)))}t.validateFunctionCode=validateFunctionCode;function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:n,opts:a},s){if(a.code.es5){e.func(t,(0,d._)`${l.default.data}, ${l.default.valCxt}`,n.$async,(()=>{e.code((0,d._)`"use strict"; ${funcSourceUrl(r,a)}`);destructureValCxtES5(e,a);e.code(s)}))}else{e.func(t,(0,d._)`${l.default.data}, ${destructureValCxt(a)}`,n.$async,(()=>e.code(funcSourceUrl(r,a)).code(s)))}}function destructureValCxt(e){return(0,d._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,d._)`, ${l.default.dynamicAnchors}={}`:d.nil}}={}`}function destructureValCxtES5(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,(0,d._)`${l.default.valCxt}.${l.default.instancePath}`);e.var(l.default.parentData,(0,d._)`${l.default.valCxt}.${l.default.parentData}`);e.var(l.default.parentDataProperty,(0,d._)`${l.default.valCxt}.${l.default.parentDataProperty}`);e.var(l.default.rootData,(0,d._)`${l.default.valCxt}.${l.default.rootData}`);if(t.dynamicRef)e.var(l.default.dynamicAnchors,(0,d._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,(0,d._)`""`);e.var(l.default.parentData,(0,d._)`undefined`);e.var(l.default.parentDataProperty,(0,d._)`undefined`);e.var(l.default.rootData,l.default.data);if(t.dynamicRef)e.var(l.default.dynamicAnchors,(0,d._)`{}`)}))}function topSchemaObjCode(e){const{schema:t,opts:r,gen:n}=e;validateFunction(e,(()=>{if(r.$comment&&t.$comment)commentKeyword(e);checkNoDefault(e);n.let(l.default.vErrors,null);n.let(l.default.errors,0);if(r.unevaluated)resetEvaluated(e);typeAndKeywords(e);returnResults(e)}));return}function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`);t.if((0,d._)`${e.evaluated}.dynamicProps`,(()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)));t.if((0,d._)`${e.evaluated}.dynamicItems`,(()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`)))}function funcSourceUrl(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function subschemaCode(e,t){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){subSchemaObjCode(e,t);return}}(0,n.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return true;return false}function isSchemaObj(e){return typeof e.schema!="boolean"}function subSchemaObjCode(e,t){const{schema:r,gen:n,opts:a}=e;if(a.$comment&&r.$comment)commentKeyword(e);updateContext(e);checkAsyncSchema(e);const s=n.const("_errs",l.default.errors);typeAndKeywords(e,s);n.var(t,(0,d._)`${s} === ${l.default.errors}`)}function checkKeywords(e){(0,p.checkUnknownRules)(e);checkRefsAndKeywords(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],false,t);const r=(0,a.getSchemaTypes)(e.schema);const n=(0,a.coerceAndCheckDataType)(e,r);schemaKeywords(e,r,!n,t)}function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:n,self:a}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,a.RULES)){a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}}function checkNoDefault(e){const{schema:t,opts:r}=e;if(t.default!==undefined&&r.useDefaults&&r.strictSchema){(0,p.checkStrictMode)(e,"default is ignored in the schema root")}}function updateContext(e){const t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:a}){const s=r.$comment;if(a.$comment===true){e.code((0,d._)`${l.default.self}.logger.log(${s})`)}else if(typeof a.$comment=="function"){const r=(0,d.str)`${n}/$comment`;const a=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${l.default.self}.opts.$comment(${s}, ${r}, ${a}.schema)`)}}function returnResults(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=e;if(r.$async){t.if((0,d._)`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw((0,d._)`new ${a}(${l.default.vErrors})`)))}else{t.assign((0,d._)`${n}.errors`,l.default.vErrors);if(s.unevaluated)assignEvaluated(e);t.return((0,d._)`${l.default.errors} === 0`)}}function assignEvaluated({gen:e,evaluated:t,props:r,items:n}){if(r instanceof d.Name)e.assign((0,d._)`${t}.props`,r);if(n instanceof d.Name)e.assign((0,d._)`${t}.items`,n)}function schemaKeywords(e,t,r,n){const{gen:a,schema:i,data:c,allErrors:u,opts:f,self:m}=e;const{RULES:h}=m;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(i,h))){a.block((()=>keywordCode(e,"$ref",h.all.$ref.definition)));return}if(!f.jtd)checkStrictTypes(e,t);a.block((()=>{for(const e of h.rules)groupKeywords(e);groupKeywords(h.post)}));function groupKeywords(p){if(!(0,s.shouldUseGroup)(i,p))return;if(p.type){a.if((0,o.checkDataType)(p.type,c,f.strictNumbers));iterateKeywords(e,p);if(t.length===1&&t[0]===p.type&&r){a.else();(0,o.reportTypeError)(e)}a.endIf()}else{iterateKeywords(e,p)}if(!u)a.if((0,d._)`${l.default.errors} === ${n||0}`)}}function iterateKeywords(e,t){const{gen:r,schema:n,opts:{useDefaults:a}}=e;if(a)(0,i.assignDefaults)(e,t.type);r.block((()=>{for(const r of t.rules){if((0,s.shouldUseRule)(n,r)){keywordCode(e,r.keyword,r.definition,t.type)}}}))}function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;checkContextTypes(e,t);if(!e.opts.allowUnionTypes)checkMultipleTypes(e,t);checkKeywordTypes(e,e.dataTypes)}function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((t=>{if(!includesType(e.dataTypes,t)){strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}}));narrowSchemaTypes(e,t)}function checkMultipleTypes(e,t){if(t.length>1&&!(t.length===2&&t.includes("null"))){strictTypesError(e,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const n in r){const a=r[n];if(typeof a=="object"&&(0,s.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;if(r.length&&!r.some((e=>hasApplicableType(t,e)))){strictTypesError(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}}function hasApplicableType(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function includesType(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function narrowSchemaTypes(e,t){const r=[];for(const n of e.dataTypes){if(includesType(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer")}e.dataTypes=r}function strictTypesError(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`;(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}class KeywordCxt{constructor(e,t,r){(0,c.validateKeywordUsage)(e,t,r);this.gen=e.gen;this.allErrors=e.allErrors;this.keyword=r;this.data=e.data;this.schema=e.schema[r];this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data);this.schemaType=t.schemaType;this.parentSchema=e.schema;this.params={};this.it=e;this.def=t;if(this.$data){this.schemaCode=e.gen.const("vSchema",getData(this.$data,e))}else{this.schemaCode=this.schemaValue;if(!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined)){throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`)}}if("code"in t?t.trackErrors:t.errors!==false){this.errsCount=e.gen.const("_errs",l.default.errors)}}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e);if(r)r();else this.error();if(t){this.gen.else();t();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(e,t){this.failResult((0,d.not)(e),undefined,t)}fail(e){if(e===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(e);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t);this._error(e,r);this.setParams({});return}this._error(e,r)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=d.nil){this.gen.block((()=>{this.check$data(e,r);t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:a,def:s}=this;r.if((0,d.or)((0,d._)`${n} === undefined`,t));if(e!==d.nil)r.assign(e,true);if(a.length||s.validateSchema){r.elseIf(this.invalid$data());this.$dataError();if(e!==d.nil)r.assign(e,false)}r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:a}=this;return(0,d.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,a.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}function invalid$DataSchema(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e);(0,u.extendSubschemaMode)(r,e);const n={...this.it,...r,items:undefined,props:undefined};subschemaCode(n,t);return n}mergeEvaluated(e,t){const{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==true&&e.props!==undefined){r.props=p.mergeEvaluated.props(n,e.props,r.props,t)}if(r.items!==true&&e.items!==undefined){r.items=p.mergeEvaluated.items(n,e.items,r.items,t)}}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==true||r.items!==true)){n.if(t,(()=>this.mergeEvaluated(e,d.Name)));return true}}}t.KeywordCxt=KeywordCxt;function keywordCode(e,t,r,n){const a=new KeywordCxt(e,r,t);if("code"in r){r.code(a,n)}else if(a.$data&&r.validate){(0,c.funcKeywordCode)(a,r)}else if("macro"in r){(0,c.macroKeywordCode)(a,r)}else if(r.compile||r.validate){(0,c.funcKeywordCode)(a,r)}}const h=/^\/(?:[^~]|~0|~1)*$/;const y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let a;let s;if(e==="")return l.default.rootData;if(e[0]==="/"){if(!h.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e;s=l.default.rootData}else{const o=y.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+o[1];a=o[2];if(a==="#"){if(i>=t)throw new Error(errorMsg("property/index",i));return n[t-i]}if(i>t)throw new Error(errorMsg("data",i));s=r[t-i];if(!a)return s}let o=s;const i=a.split("/");for(const e of i){if(e){s=(0,d._)`${s}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`;o=(0,d._)`${o} && ${s}`}}return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},8121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(8135);const a=r(5580);const s=r(5259);const o=r(3779);function macroKeywordCode(e,t){const{gen:r,keyword:a,schema:s,parentSchema:o,it:i}=e;const c=t.macro.call(i.self,s,o,i);const u=useKeyword(r,a,c);if(i.opts.validateSchema!==false)i.self.validateSchema(c,true);const d=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${i.errSchemaPath}/${a}`,topSchemaRef:u,compositeRule:true},d);e.pass(d,(()=>e.error(true)))}t.macroKeywordCode=macroKeywordCode;function funcKeywordCode(e,t){var r;const{gen:o,keyword:i,schema:c,parentSchema:u,$data:d,it:l}=e;checkAsyncKeyword(l,t);const f=!d&&t.compile?t.compile.call(l.self,c,u,l):t.validate;const p=useKeyword(o,i,f);const m=o.let("valid");e.block$data(m,validateKeyword);e.ok((r=t.valid)!==null&&r!==void 0?r:m);function validateKeyword(){if(t.errors===false){assignValid();if(t.modifying)modifyData(e);reportErrs((()=>e.error()))}else{const r=t.async?validateAsync():validateSync();if(t.modifying)modifyData(e);reportErrs((()=>addErrs(e,r)))}}function validateAsync(){const e=o.let("ruleErrs",null);o.try((()=>assignValid((0,n._)`await `)),(t=>o.assign(m,false).if((0,n._)`${t} instanceof ${l.ValidationError}`,(()=>o.assign(e,(0,n._)`${t}.errors`)),(()=>o.throw(t)))));return e}function validateSync(){const e=(0,n._)`${p}.errors`;o.assign(e,null);assignValid(n.nil);return e}function assignValid(r=(t.async?(0,n._)`await `:n.nil)){const i=l.opts.passContext?a.default.this:a.default.self;const c=!("compile"in t&&!d||t.schema===false);o.assign(m,(0,n._)`${r}${(0,s.callValidateCode)(e,p,i,c)}`,t.modifying)}function reportErrs(e){var r;o.if((0,n.not)((r=t.valid)!==null&&r!==void 0?r:m),e)}}t.funcKeywordCode=funcKeywordCode;function modifyData(e){const{gen:t,data:r,it:a}=e;t.if(a.parentData,(()=>t.assign(r,(0,n._)`${a.parentData}[${a.parentDataProperty}]`)))}function addErrs(e,t){const{gen:r}=e;r.if((0,n._)`Array.isArray(${t})`,(()=>{r.assign(a.default.vErrors,(0,n._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`).assign(a.default.errors,(0,n._)`${a.default.vErrors}.length`);(0,o.extendErrors)(e)}),(()=>e.error()))}function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function useKeyword(e,t,r){if(r===undefined)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}function validSchemaType(e,t,r=false){return!t.length||t.some((t=>t==="array"?Array.isArray(e):t==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==t||r&&typeof e=="undefined"))}t.validSchemaType=validSchemaType;function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s){throw new Error("ajv implementation error")}const o=a.dependencies;if(o===null||o===void 0?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t)))){throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`)}if(a.validateSchema){const o=a.validateSchema(e[s]);if(!o){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(e);else throw new Error(e)}}}t.validateKeywordUsage=validateKeywordUsage},537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(8135);const a=r(2616);function getSubschema(e,{keyword:t,schemaProp:r,schema:s,schemaPath:o,errSchemaPath:i,topSchemaRef:c}){if(t!==undefined&&s!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(t!==undefined){const s=e.schema[t];return r===undefined?{schema:s,schemaPath:(0,n._)`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:(0,n._)`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,a.escapeFragment)(r)}`}}if(s!==undefined){if(o===undefined||i===undefined||c===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=getSubschema;function extendSubschemaData(e,t,{dataProp:r,dataPropType:s,data:o,dataTypes:i,propertyName:c}){if(o!==undefined&&r!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:u}=t;if(r!==undefined){const{errorPath:o,dataPathArr:i,opts:c}=t;const d=u.let("data",(0,n._)`${t.data}${(0,n.getProperty)(r)}`,true);dataContextProps(d);e.errorPath=(0,n.str)`${o}${(0,a.getErrorPath)(r,s,c.jsPropertySyntax)}`;e.parentDataProperty=(0,n._)`${r}`;e.dataPathArr=[...i,e.parentDataProperty]}if(o!==undefined){const t=o instanceof n.Name?o:u.let("data",o,true);dataContextProps(t);if(c!==undefined)e.propertyName=c}if(i)e.dataTypes=i;function dataContextProps(r){e.data=r;e.dataLevel=t.dataLevel+1;e.dataTypes=[];t.definedProperties=new Set;e.parentData=t.data;e.dataNames=[...t.dataNames,r]}}t.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){if(n!==undefined)e.compositeRule=n;if(a!==undefined)e.createErrors=a;if(s!==undefined)e.allErrors=s;e.jtdDiscriminator=t;e.jtdMetadata=r}t.extendSubschemaMode=extendSubschemaMode},1217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(9158);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return n.KeywordCxt}});var a=r(8135);Object.defineProperty(t,"_",{enumerable:true,get:function(){return a._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return a.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return a.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return a.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return a.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return a.CodeGen}});const s=r(953);const o=r(3891);const i=r(868);const c=r(3067);const u=r(8135);const d=r(7596);const l=r(4608);const f=r(2616);const p=r(5496);const m=r(9657);const defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"];const y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."};const v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const $=200;function requiredOptions(e){var t,r,n,a,s,o,i,c,u,d,l,f,p,h,y,g,v,b,w,S,P,E,x,k,O;const N=e.strict;const C=(t=e.code)===null||t===void 0?void 0:t.optimize;const j=C===true||C===undefined?1:C||0;const D=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:defaultRegExp;const T=(a=e.uriResolver)!==null&&a!==void 0?a:m.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:N)!==null&&o!==void 0?o:true,strictNumbers:(c=(i=e.strictNumbers)!==null&&i!==void 0?i:N)!==null&&c!==void 0?c:true,strictTypes:(d=(u=e.strictTypes)!==null&&u!==void 0?u:N)!==null&&d!==void 0?d:"log",strictTuples:(f=(l=e.strictTuples)!==null&&l!==void 0?l:N)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=e.strictRequired)!==null&&p!==void 0?p:N)!==null&&h!==void 0?h:false,code:e.code?{...e.code,optimize:j,regExp:D}:{optimize:j,regExp:D},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:$,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:$,meta:(v=e.meta)!==null&&v!==void 0?v:true,messages:(b=e.messages)!==null&&b!==void 0?b:true,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:true,schemaId:(S=e.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:true,validateSchema:(E=e.validateSchema)!==null&&E!==void 0?E:true,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:true,unicodeRegExp:(k=e.unicodeRegExp)!==null&&k!==void 0?k:true,int32range:(O=e.int32range)!==null&&O!==void 0?O:true,uriResolver:T}}class Ajv{constructor(e={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:y,es5:t,lines:r});this.logger=getLogger(e.logger);const n=e.validateFormats;e.validateFormats=false;this.RULES=(0,i.getRules)();checkOptions.call(this,g,e,"NOT SUPPORTED");checkOptions.call(this,v,e,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(e.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(e.keywords)addInitialKeywords.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);addInitialSchemas.call(this);e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;if(r==="id"){n={...p};n.id=n.$id;delete n.$id}if(t&&e)this.addMetaSchema(n,n[r],false)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:undefined}validate(e,t){let r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error(`no schema with key or ref "${e}"`)}else{r=this.compile(e)}const n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){if(e&&!this.getSchema(e)){await runCompileAsync.call(this,{$ref:e},true)}}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;checkLoaded.call(this,t);await loadMissingSchema.call(this,t.missingSchema);return _compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e]){throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);if(!this.refs[e])await loadMetaSchema.call(this,r.$schema);if(!this.refs[e])this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,undefined,r,n);return this}let a;if(typeof e==="object"){const{schemaId:t}=this.opts;a=e[t];if(a!==undefined&&typeof a!="string"){throw new Error(`schema ${t} must be string`)}}t=(0,d.normalizeId)(t||a);this._checkUnique(t);this.schemas[t]=this._addSchema(e,r,t,n,true);return this}addMetaSchema(e,t,r=this.opts.validateSchema){this.addSchema(e,t,true,r);return this}validateSchema(e,t){if(typeof e=="boolean")return true;let r;r=e.$schema;if(r!==undefined&&typeof r!="string"){throw new Error("$schema must be a string")}r=r||this.opts.defaultMeta||this.defaultMeta();if(!r){this.logger.warn("meta-schema not available");this.errors=null;return true}const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(e);else throw new Error(e)}return n}getSchema(e){let t;while(typeof(t=getSchEnv.call(this,e))=="string")e=t;if(t===undefined){const{schemaId:r}=this.opts;const n=new c.SchemaEnv({schema:{},schemaId:r});t=c.resolveSchema.call(this,n,e);if(!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp){this._removeAllSchemas(this.schemas,e);this._removeAllSchemas(this.refs,e);return this}switch(typeof e){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const t=getSchEnv.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);delete this.schemas[e];delete this.refs[e];return this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r){r=(0,d.normalizeId)(r);delete this.schemas[r];delete this.refs[r]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){r=e;if(typeof t=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");t.keyword=r}}else if(typeof e=="object"&&t===undefined){t=e;r=t.keyword;if(Array.isArray(r)&&!r.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,r,t);if(!t){(0,f.eachItem)(r,(e=>addRule.call(this,e)));return this}keywordMetaschema.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};(0,f.eachItem)(r,n.type.length===0?e=>addRule.call(this,e,n):e=>n.type.forEach((t=>addRule.call(this,e,n,t))));return this}getKeyword(e){const t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e];delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));if(t>=0)r.rules.splice(t,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);this.formats[e]=t;return this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r))}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in r){const t=r[e];if(typeof t!="object")continue;const{$data:n}=t.definition;const s=a[e];if(n&&s)a[e]=schemaOrData(s)}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];if(!t||t.test(r)){if(typeof n=="string"){delete e[r]}else if(n&&!n.meta){this._cache.delete(n.schema);delete e[r]}}}}_addSchema(e,t,r,n=this.opts.validateSchema,a=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if(typeof e=="object"){s=e[o]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(i!==undefined)return i;r=(0,d.normalizeId)(s||r);const u=d.getSchemaRefs.call(this,e,r);i=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u});this._cache.set(i.schema,i);if(a&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=i}if(n)this.validateSchema(e,true);return i}_checkUnique(e){if(this.schemas[e]||this.refs[e]){throw new Error(`schema with key or id "${e}" already exists`)}}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else c.compileSchema.call(this,e);if(!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}t["default"]=Ajv;Ajv.ValidationError=s.default;Ajv.MissingRefError=o.default;function checkOptions(e,t,r,n="error"){for(const a in e){const s=a;if(s in t)this.logger[n](`${r}: option ${a}. ${e[s]}`)}}function getSchEnv(e){e=(0,d.normalizeId)(e);return this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}const b={log(){},warn(){},error(){}};function getLogger(e){if(e===false)return b;if(e===undefined)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}const w=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;(0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!w.test(e))throw new Error(`Keyword ${e} has invalid name`)}));if(!t)return;if(t.$data&&!("code"in t||"validate"in t)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(e,t,r){var n;const a=t===null||t===void 0?void 0:t.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=a?s.post:s.rules.find((({type:e})=>e===r));if(!o){o={type:r,rules:[]};s.rules.push(o)}s.keywords[e]=true;if(!t)return;const i={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};if(t.before)addBeforeRule.call(this,o,i,t.before);else o.rules.push(i);s.all[e]=i;(n=t.implements)===null||n===void 0?void 0:n.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));if(n>=0){e.rules.splice(n,0,t)}else{e.rules.push(t);this.logger.warn(`rule ${r} is not defined`)}}function keywordMetaschema(e){let{metaSchema:t}=e;if(t===undefined)return;if(e.$data&&this.opts.$data)t=schemaOrData(t);e.validateSchema=this.compile(t,true)}const S={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,S]}}},1668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7447);n.code='require("ajv/dist/runtime/equal").default';t["default"]=n},7923:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function ucs2length(e){const t=e.length;let r=0;let n=0;let a;while(n<t){r++;a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<t){a=e.charCodeAt(n);if((a&64512)===56320)n++}}return r}t["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},9657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(199);n.code='require("ajv/dist/runtime/uri").default';t["default"]=n},953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class ValidationError extends Error{constructor(e){super("validation failed");this.errors=e;this.ajv=this.validation=true}}t["default"]=ValidationError},1739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateAdditionalItems=void 0;const n=r(8135);const a=r(2616);const s={message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`};const o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:s,code(e){const{parentSchema:t,it:r}=e;const{items:n}=t;if(!Array.isArray(n)){(0,a.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(e,n)}};function validateAdditionalItems(e,t){const{gen:r,schema:s,data:o,keyword:i,it:c}=e;c.items=true;const u=r.const("len",(0,n._)`${o}.length`);if(s===false){e.setParams({len:t.length});e.pass((0,n._)`${u} <= ${t.length}`)}else if(typeof s=="object"&&!(0,a.alwaysValidSchema)(c,s)){const a=r.var("valid",(0,n._)`${u} <= ${t.length}`);r.if((0,n.not)(a),(()=>validateItems(a)));e.ok(a)}function validateItems(s){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:a.Type.Num},s);if(!c.allErrors)r.if((0,n.not)(s),(()=>r.break()))}))}}t.validateAdditionalItems=validateAdditionalItems;t["default"]=o},3884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5259);const a=r(8135);const s=r(5580);const o=r(2616);const i={message:"must NOT have additional properties",params:({params:e})=>(0,a._)`{additionalProperty: ${e.additionalProperty}}`};const c={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:i,code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:u,it:d}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:l,opts:f}=d;d.props=true;if(f.removeAdditional!=="all"&&(0,o.alwaysValidSchema)(d,r))return;const p=(0,n.allSchemaProperties)(i.properties);const m=(0,n.allSchemaProperties)(i.patternProperties);checkAdditionalProperties();e.ok((0,a._)`${u} === ${s.default.errors}`);function checkAdditionalProperties(){t.forIn("key",c,(e=>{if(!p.length&&!m.length)additionalPropertyCode(e);else t.if(isAdditional(e),(()=>additionalPropertyCode(e)))}))}function isAdditional(r){let s;if(p.length>8){const e=(0,o.schemaRefOrVal)(d,i.properties,"properties");s=(0,n.isOwnProperty)(t,e,r)}else if(p.length){s=(0,a.or)(...p.map((e=>(0,a._)`${r} === ${e}`)))}else{s=a.nil}if(m.length){s=(0,a.or)(s,...m.map((t=>(0,a._)`${(0,n.usePattern)(e,t)}.test(${r})`)))}return(0,a.not)(s)}function deleteAdditional(e){t.code((0,a._)`delete ${c}[${e}]`)}function additionalPropertyCode(n){if(f.removeAdditional==="all"||f.removeAdditional&&r===false){deleteAdditional(n);return}if(r===false){e.setParams({additionalProperty:n});e.error();if(!l)t.break();return}if(typeof r=="object"&&!(0,o.alwaysValidSchema)(d,r)){const r=t.name("valid");if(f.removeAdditional==="failing"){applyAdditionalSchema(n,r,false);t.if((0,a.not)(r),(()=>{e.reset();deleteAdditional(n)}))}else{applyAdditionalSchema(n,r);if(!l)t.if((0,a.not)(r),(()=>t.break()))}}}function applyAdditionalSchema(t,r,n){const a={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};if(n===false){Object.assign(a,{compositeRule:true,createErrors:false,allErrors:false})}e.subschema(a,r)}}};t["default"]=c},8133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2616);const a={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(a,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s);e.mergeEvaluated(o)}))}};t["default"]=a},9912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5259);const a={keyword:"anyOf",schemaType:"array",trackErrors:true,code:n.validateUnion,error:{message:"must match a schema in anyOf"}};t["default"]=a},5983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s={message:({params:{min:e,max:t}})=>t===undefined?(0,n.str)`must contain at least ${e} valid item(s)`:(0,n.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===undefined?(0,n._)`{minContains: ${e}}`:(0,n._)`{minContains: ${e}, maxContains: ${t}}`};const o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:s,code(e){const{gen:t,schema:r,parentSchema:s,data:o,it:i}=e;let c;let u;const{minContains:d,maxContains:l}=s;if(i.opts.next){c=d===undefined?1:d;u=l}else{c=1}const f=t.const("len",(0,n._)`${o}.length`);e.setParams({min:c,max:u});if(u===undefined&&c===0){(0,a.checkStrictMode)(i,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(u!==undefined&&c>u){(0,a.checkStrictMode)(i,`"minContains" > "maxContains" is always invalid`);e.fail();return}if((0,a.alwaysValidSchema)(i,r)){let t=(0,n._)`${f} >= ${c}`;if(u!==undefined)t=(0,n._)`${t} && ${f} <= ${u}`;e.pass(t);return}i.items=true;const p=t.name("valid");if(u===undefined&&c===1){validateItems(p,(()=>t.if(p,(()=>t.break()))))}else if(c===0){t.let(p,true);if(u!==undefined)t.if((0,n._)`${o}.length > 0`,validateItemsWithCount)}else{t.let(p,false);validateItemsWithCount()}e.result(p,(()=>e.reset()));function validateItemsWithCount(){const e=t.name("_valid");const r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>checkLimits(r)))))}function validateItems(r,n){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:a.Type.Num,compositeRule:true},r);n()}))}function checkLimits(e){t.code((0,n._)`${e}++`);if(u===undefined){t.if((0,n._)`${e} >= ${c}`,(()=>t.assign(p,true).break()))}else{t.if((0,n._)`${e} > ${u}`,(()=>t.assign(p,false).break()));if(c===1)t.assign(p,true);else t.if((0,n._)`${e} >= ${c}`,(()=>t.assign(p,true)))}}}};t["default"]=o},7349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(8135);const a=r(2616);const s=r(5259);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const a=t===1?"property":"properties";return(0,n.str)`must have ${a} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:a}})=>(0,n._)`{property: ${e},
|
|
5
|
+
missingProperty: ${a},
|
|
6
|
+
depsCount: ${t},
|
|
7
|
+
deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=splitDependencies(e);validatePropertyDeps(e,t);validateSchemaDeps(e,r)}};function splitDependencies({schema:e}){const t={};const r={};for(const n in e){if(n==="__proto__")continue;const a=Array.isArray(e[n])?t:r;a[n]=e[n]}return[t,r]}function validatePropertyDeps(e,t=e.schema){const{gen:r,data:a,it:o}=e;if(Object.keys(t).length===0)return;const i=r.let("missing");for(const c in t){const u=t[c];if(u.length===0)continue;const d=(0,s.propertyInData)(r,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")});if(o.allErrors){r.if(d,(()=>{for(const t of u){(0,s.checkReportMissingProp)(e,t)}}))}else{r.if((0,n._)`${d} && (${(0,s.checkMissingProp)(e,u,i)})`);(0,s.reportMissingProp)(e,i);r.else()}}}t.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(e,t=e.schema){const{gen:r,data:n,keyword:o,it:i}=e;const c=r.name("valid");for(const u in t){if((0,a.alwaysValidSchema)(i,t[u]))continue;r.if((0,s.propertyInData)(r,n,u,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,true)));e.ok(c)}}t.validateSchemaDeps=validateSchemaDeps;t["default"]=o},1164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s={message:({params:e})=>(0,n.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,n._)`{failingKeyword: ${e.ifClause}}`};const o={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:s,code(e){const{gen:t,parentSchema:r,it:s}=e;if(r.then===undefined&&r.else===undefined){(0,a.checkStrictMode)(s,'"if" without "then" and "else" is ignored')}const o=hasSchema(s,"then");const i=hasSchema(s,"else");if(!o&&!i)return;const c=t.let("valid",true);const u=t.name("_valid");validateIf();e.reset();if(o&&i){const r=t.let("ifClause");e.setParams({ifClause:r});t.if(u,validateClause("then",r),validateClause("else",r))}else if(o){t.if(u,validateClause("then"))}else{t.if((0,n.not)(u),validateClause("else"))}e.pass(c,(()=>e.error(true)));function validateIf(){const t=e.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},u);e.mergeEvaluated(t)}function validateClause(r,a){return()=>{const s=e.subschema({keyword:r},u);t.assign(c,u);e.mergeValidEvaluated(s,c);if(a)t.assign(a,(0,n._)`${r}`);else e.setParams({ifClause:r})}}}};function hasSchema(e,t){const r=e.schema[t];return r!==undefined&&!(0,a.alwaysValidSchema)(e,r)}t["default"]=o},4709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(1739);const a=r(4773);const s=r(9416);const o=r(4014);const i=r(5983);const c=r(7349);const u=r(3541);const d=r(3884);const l=r(7377);const f=r(1707);const p=r(7375);const m=r(9912);const h=r(7161);const y=r(8133);const g=r(1164);const v=r(3281);function getApplicator(e=false){const t=[p.default,m.default,h.default,y.default,g.default,v.default,u.default,d.default,c.default,l.default,f.default];if(e)t.push(a.default,o.default);else t.push(n.default,s.default);t.push(i.default);return t}t["default"]=getApplicator},9416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateTuple=void 0;const n=r(8135);const a=r(2616);const s=r(5259);const o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=true;if((0,a.alwaysValidSchema)(r,t))return;e.ok((0,s.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:s,parentSchema:o,data:i,keyword:c,it:u}=e;checkStrictTuple(o);if(u.opts.unevaluated&&r.length&&u.items!==true){u.items=a.mergeEvaluated.items(s,r.length,u.items)}const d=s.name("valid");const l=s.const("len",(0,n._)`${i}.length`);r.forEach(((t,r)=>{if((0,a.alwaysValidSchema)(u,t))return;s.if((0,n._)`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},d)));e.ok(d)}));function checkStrictTuple(e){const{opts:n,errSchemaPath:s}=u;const o=r.length;const i=o===e.minItems&&(o===e.maxItems||e[t]===false);if(n.strictTuples&&!i){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,a.checkStrictMode)(u,e,n.strictTuples)}}}t.validateTuple=validateTuple;t["default"]=o},4014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s=r(5259);const o=r(1739);const i={message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`};const c={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:i,code(e){const{schema:t,parentSchema:r,it:n}=e;const{prefixItems:i}=r;n.items=true;if((0,a.alwaysValidSchema)(n,t))return;if(i)(0,o.validateAdditionalItems)(e,i);else e.ok((0,s.validateArray)(e))}};t["default"]=c},7375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2616);const a={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(e){const{gen:t,schema:r,it:a}=e;if((0,n.alwaysValidSchema)(a,r)){e.fail();return}const s=t.name("valid");e.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},s);e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t["default"]=a},7161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,n._)`{passingSchemas: ${e.passing}}`};const o={keyword:"oneOf",schemaType:"array",trackErrors:true,error:s,code(e){const{gen:t,schema:r,parentSchema:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const i=r;const c=t.let("valid",false);const u=t.let("passing",null);const d=t.name("_valid");e.setParams({passing:u});t.block(validateOneOf);e.result(c,(()=>e.reset()),(()=>e.error(true)));function validateOneOf(){i.forEach(((r,s)=>{let i;if((0,a.alwaysValidSchema)(o,r)){t.var(d,true)}else{i=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:true},d)}if(s>0){t.if((0,n._)`${d} && ${c}`).assign(c,false).assign(u,(0,n._)`[${u}, ${s}]`).else()}t.if(d,(()=>{t.assign(c,true);t.assign(u,s);if(i)e.mergeEvaluated(i,n.Name)}))}))}}};t["default"]=o},1707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5259);const a=r(8135);const s=r(2616);const o=r(2616);const i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:u}=e;const{opts:d}=u;const l=(0,n.allSchemaProperties)(r);const f=l.filter((e=>(0,s.alwaysValidSchema)(u,r[e])));if(l.length===0||f.length===l.length&&(!u.opts.unevaluated||u.props===true)){return}const p=d.strictSchema&&!d.allowMatchingProperties&&c.properties;const m=t.name("valid");if(u.props!==true&&!(u.props instanceof a.Name)){u.props=(0,o.evaluatedPropsToName)(t,u.props)}const{props:h}=u;validatePatternProperties();function validatePatternProperties(){for(const e of l){if(p)checkMatchingProperties(e);if(u.allErrors){validateProperties(e)}else{t.var(m,true);validateProperties(e);t.if(m)}}}function checkMatchingProperties(e){for(const t in p){if(new RegExp(e).test(t)){(0,s.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}}}function validateProperties(r){t.forIn("key",i,(s=>{t.if((0,a._)`${(0,n.usePattern)(e,r)}.test(${s})`,(()=>{const n=f.includes(r);if(!n){e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:o.Type.Str},m)}if(u.opts.unevaluated&&h!==true){t.assign((0,a._)`${h}[${s}]`,true)}else if(!n&&!u.allErrors){t.if((0,a.not)(m),(()=>t.break()))}}))}))}}};t["default"]=i},4773:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(9416);const a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t["default"]=a},7377:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(9158);const a=r(5259);const s=r(2616);const o=r(3884);const i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:u}=e;if(u.opts.removeAdditional==="all"&&i.additionalProperties===undefined){o.default.code(new n.KeywordCxt(u,o.default,"additionalProperties"))}const d=(0,a.allSchemaProperties)(r);for(const e of d){u.definedProperties.add(e)}if(u.opts.unevaluated&&d.length&&u.props!==true){u.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),u.props)}const l=d.filter((e=>!(0,s.alwaysValidSchema)(u,r[e])));if(l.length===0)return;const f=t.name("valid");for(const r of l){if(hasDefault(r)){applyPropertySchema(r)}else{t.if((0,a.propertyInData)(t,c,r,u.opts.ownProperties));applyPropertySchema(r);if(!u.allErrors)t.else().var(f,true);t.endIf()}e.it.definedProperties.add(r);e.ok(f)}function hasDefault(e){return u.opts.useDefaults&&!u.compositeRule&&r[e].default!==undefined}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t["default"]=i},3541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s={message:"property name must be valid",params:({params:e})=>(0,n._)`{propertyName: ${e.propertyName}}`};const o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:s,code(e){const{gen:t,schema:r,data:s,it:o}=e;if((0,a.alwaysValidSchema)(o,r))return;const i=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r});e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:true},i);t.if((0,n.not)(i),(()=>{e.error(true);if(!o.allErrors)t.break()}))}));e.ok(i)}};t["default"]=o},3281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2616);const a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===undefined)(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t["default"]=a},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(8135);const a=r(2616);const s=r(5580);const o=r(2616);function checkReportMissingProp(e,t){const{gen:r,data:a,it:s}=e;r.if(noPropertyInData(r,a,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:(0,n._)`${t}`},true);e.error()}))}t.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:e,data:t,it:{opts:r}},a,s){return(0,n.or)(...a.map((a=>(0,n.and)(noPropertyInData(e,t,a,r.ownProperties),(0,n._)`${s} = ${a}`))))}t.checkMissingProp=checkMissingProp;function reportMissingProp(e,t){e.setParams({missingProperty:t},true);e.error()}t.reportMissingProp=reportMissingProp;function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,n._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=hasPropFunc;function isOwnProperty(e,t,r){return(0,n._)`${hasPropFunc(e)}.call(${t}, ${r})`}t.isOwnProperty=isOwnProperty;function propertyInData(e,t,r,a){const s=(0,n._)`${t}${(0,n.getProperty)(r)} !== undefined`;return a?(0,n._)`${s} && ${isOwnProperty(e,t,r)}`:s}t.propertyInData=propertyInData;function noPropertyInData(e,t,r,a){const s=(0,n._)`${t}${(0,n.getProperty)(r)} === undefined`;return a?(0,n.or)(s,(0,n.not)(isOwnProperty(e,t,r))):s}t.noPropertyInData=noPropertyInData;function allSchemaProperties(e){return e?Object.keys(e).filter((e=>e!=="__proto__")):[]}t.allSchemaProperties=allSchemaProperties;function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,a.alwaysValidSchema)(e,t[r])))}t.schemaProperties=schemaProperties;function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:a,schemaPath:o,errorPath:i},it:c},u,d,l){const f=l?(0,n._)`${e}, ${t}, ${a}${o}`:t;const p=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];if(c.opts.dynamicRef)p.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=(0,n._)`${f}, ${r.object(...p)}`;return d!==n.nil?(0,n._)`${u}.call(${d}, ${m})`:(0,n._)`${u}(${m})`}t.callValidateCode=callValidateCode;const i=(0,n._)`new RegExp`;function usePattern({gen:e,it:{opts:t}},r){const a=t.unicodeRegExp?"u":"";const{regExp:s}=t.code;const c=s(r,a);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:(0,n._)`${s.code==="new RegExp"?i:(0,o.useFunc)(e,s)}(${r}, ${a})`})}t.usePattern=usePattern;function validateArray(e){const{gen:t,data:r,keyword:s,it:o}=e;const i=t.name("valid");if(o.allErrors){const e=t.let("valid",true);validateItems((()=>t.assign(e,false)));return e}t.var(i,true);validateItems((()=>t.break()));return i;function validateItems(o){const c=t.const("len",(0,n._)`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:a.Type.Num},i);t.if((0,n.not)(i),o)}))}}t.validateArray=validateArray;function validateUnion(e){const{gen:t,schema:r,keyword:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=r.some((e=>(0,a.alwaysValidSchema)(o,e)));if(i&&!o.opts.unevaluated)return;const c=t.let("valid",false);const u=t.name("_valid");t.block((()=>r.forEach(((r,a)=>{const o=e.subschema({keyword:s,schemaProp:a,compositeRule:true},u);t.assign(c,(0,n._)`${c} || ${u}`);const i=e.mergeValidEvaluated(o,u);if(!i)t.if((0,n.not)(c))}))));e.result(c,(()=>e.reset()),(()=>e.error(true)))}t.validateUnion=validateUnion},9913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t["default"]=r},5541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(9913);const a=r(2203);const s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,a.default];t["default"]=s},2203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.callRef=t.getValidate=void 0;const n=r(3891);const a=r(5259);const s=r(8135);const o=r(5580);const i=r(3067);const c=r(2616);const u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:a}=e;const{baseId:o,schemaEnv:c,validateName:u,opts:d,self:l}=a;const{root:f}=c;if((r==="#"||r==="#/")&&o===f.baseId)return callRootRef();const p=i.resolveRef.call(l,f,o,r);if(p===undefined)throw new n.default(a.opts.uriResolver,o,r);if(p instanceof i.SchemaEnv)return callValidate(p);return inlineRefSchema(p);function callRootRef(){if(c===f)return callRef(e,u,c,c.$async);const r=t.scopeValue("root",{ref:f});return callRef(e,(0,s._)`${r}.validate`,f,f.$async)}function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}function inlineRefSchema(n){const a=t.scopeValue("schema",d.code.source===true?{ref:n,code:(0,s.stringify)(n)}:{ref:n});const o=t.name("valid");const i=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:a,errSchemaPath:r},o);e.mergeEvaluated(i);e.ok(o)}}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,s._)`${r.scopeValue("wrapper",{ref:t})}.validate`}t.getValidate=getValidate;function callRef(e,t,r,n){const{gen:i,it:u}=e;const{allErrors:d,schemaEnv:l,opts:f}=u;const p=f.passContext?o.default.this:s.nil;if(n)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code((0,s._)`await ${(0,a.callValidateCode)(e,t,p)}`);addEvaluatedFrom(t);if(!d)i.assign(r,true)}),(e=>{i.if((0,s._)`!(${e} instanceof ${u.ValidationError})`,(()=>i.throw(e)));addErrorsFrom(e);if(!d)i.assign(r,false)}));e.ok(r)}function callSyncRef(){e.result((0,a.callValidateCode)(e,t,p),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}function addErrorsFrom(e){const t=(0,s._)`${e}.errors`;i.assign(o.default.vErrors,(0,s._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`);i.assign(o.default.errors,(0,s._)`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!u.opts.unevaluated)return;const n=(t=r===null||r===void 0?void 0:r.validate)===null||t===void 0?void 0:t.evaluated;if(u.props!==true){if(n&&!n.dynamicProps){if(n.props!==undefined){u.props=c.mergeEvaluated.props(i,n.props,u.props)}}else{const t=i.var("props",(0,s._)`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(i,t,u.props,s.Name)}}if(u.items!==true){if(n&&!n.dynamicItems){if(n.items!==undefined){u.items=c.mergeEvaluated.items(i,n.items,u.items)}}else{const t=i.var("items",(0,s._)`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(i,t,u.items,s.Name)}}}}t.callRef=callRef;t["default"]=u},7960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(1022);const s=r(3067);const o=r(2616);const i={message:({params:{discrError:e,tagName:t}})=>e===a.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,n._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`};const c={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(e){const{gen:t,data:r,schema:i,parentSchema:c,it:u}=e;const{oneOf:d}=c;if(!u.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const l=i.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",false);const p=t.const("tag",(0,n._)`${r}${(0,n.getProperty)(l)}`);t.if((0,n._)`typeof ${p} == "string"`,(()=>validateMapping()),(()=>e.error(false,{discrError:a.DiscrError.Tag,tag:p,tagName:l})));e.ok(f);function validateMapping(){const r=getMapping();t.if(false);for(const e in r){t.elseIf((0,n._)`${p} === ${e}`);t.assign(f,applyTagSchema(r[e]))}t.else();e.error(false,{discrError:a.DiscrError.Mapping,tag:p,tagName:l});t.endIf()}function applyTagSchema(r){const a=t.name("valid");const s=e.subschema({keyword:"oneOf",schemaProp:r},a);e.mergeEvaluated(s,n.Name);return a}function getMapping(){var e;const t={};const r=hasRequired(c);let n=true;for(let t=0;t<d.length;t++){let a=d[t];if((a===null||a===void 0?void 0:a.$ref)&&!(0,o.schemaHasRulesButRef)(a,u.self.RULES)){a=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,a===null||a===void 0?void 0:a.$ref);if(a instanceof s.SchemaEnv)a=a.schema}const i=(e=a===null||a===void 0?void 0:a.properties)===null||e===void 0?void 0:e[l];if(typeof i!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`)}n=n&&(r||hasRequired(a));addMappings(i,t)}if(!n)throw new Error(`discriminator: "${l}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(l)}function addMappings(e,t){if(e.const){addMapping(e.const,t)}else if(e.enum){for(const r of e.enum){addMapping(r,t)}}else{throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}}function addMapping(e,r){if(typeof e!="string"||e in t){throw new Error(`discriminator: "${l}" values must be unique strings`)}t[e]=r}}}};t["default"]=c},1022:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiscrError=void 0;var r;(function(e){e["Tag"]="tag";e["Mapping"]="mapping"})(r=t.DiscrError||(t.DiscrError={}))},8492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5541);const a=r(1733);const s=r(4709);const o=r(1807);const i=r(7194);const c=[n.default,a.default,(0,s.default)(),o.default,i.metadataVocabulary,i.contentVocabulary];t["default"]=c},9195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={message:({schemaCode:e})=>(0,n.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,n._)`{format: ${e}}`};const s={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:a,code(e,t){const{gen:r,data:a,$data:s,schema:o,schemaCode:i,it:c}=e;const{opts:u,errSchemaPath:d,schemaEnv:l,self:f}=c;if(!u.validateFormats)return;if(s)validate$DataFormat();else validateFormat();function validate$DataFormat(){const s=r.scopeValue("formats",{ref:f.formats,code:u.code.formats});const o=r.const("fDef",(0,n._)`${s}[${i}]`);const c=r.let("fType");const d=r.let("format");r.if((0,n._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,(0,n._)`${o}.type || "string"`).assign(d,(0,n._)`${o}.validate`)),(()=>r.assign(c,(0,n._)`"string"`).assign(d,o)));e.fail$data((0,n.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(u.strictSchema===false)return n.nil;return(0,n._)`${i} && !${d}`}function invalidFmt(){const e=l.$async?(0,n._)`(${o}.async ? await ${d}(${a}) : ${d}(${a}))`:(0,n._)`${d}(${a})`;const r=(0,n._)`(typeof ${d} == "function" ? ${e} : ${d}.test(${a}))`;return(0,n._)`${d} && ${d} !== true && ${c} === ${t} && !${r}`}}function validateFormat(){const s=f.formats[o];if(!s){unknownFormat();return}if(s===true)return;const[i,c,p]=getFormat(s);if(i===t)e.pass(validCondition());function unknownFormat(){if(u.strictSchema===false){f.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${d}"`}}function getFormat(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):u.code.formats?(0,n._)`${u.code.formats}${(0,n.getProperty)(o)}`:undefined;const a=r.scopeValue("formats",{key:o,ref:e,code:t});if(typeof e=="object"&&!(e instanceof RegExp)){return[e.type||"string",e.validate,(0,n._)`${a}.validate`]}return["string",e,a]}function validCondition(){if(typeof s=="object"&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return(0,n._)`await ${p}(${a})`}return typeof c=="function"?(0,n._)`${p}(${a})`:(0,n._)`${p}.test(${a})`}}}};t["default"]=s},1807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(9195);const a=[n.default];t["default"]=a},7194:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.contentVocabulary=t.metadataVocabulary=void 0;t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s=r(1668);const o={message:"must be equal to constant",params:({schemaCode:e})=>(0,n._)`{allowedValue: ${e}}`};const i={keyword:"const",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schemaCode:i,schema:c}=e;if(o||c&&typeof c=="object"){e.fail$data((0,n._)`!${(0,a.useFunc)(t,s.default)}(${r}, ${i})`)}else{e.fail((0,n._)`${c} !== ${r}`)}}};t["default"]=i},5434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s=r(1668);const o={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,n._)`{allowedValues: ${e}}`};const i={keyword:"enum",schemaType:"array",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schema:i,schemaCode:c,it:u}=e;if(!o&&i.length===0)throw new Error("enum must have non-empty array");const d=i.length>=u.opts.loopEnum;let l;const getEql=()=>l!==null&&l!==void 0?l:l=(0,a.useFunc)(t,s.default);let f;if(d||o){f=t.let("valid");e.block$data(f,loopEnum)}else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,n.or)(...i.map(((t,r)=>equalCode(e,r))))}e.pass(f);function loopEnum(){t.assign(f,false);t.forOf("v",c,(e=>t.if((0,n._)`${getEql()}(${r}, ${e})`,(()=>t.assign(f,true).break()))))}function equalCode(e,t){const a=i[t];return typeof a==="object"&&a!==null?(0,n._)`${getEql()}(${r}, ${e}[${t}])`:(0,n._)`${r} === ${a}`}}};t["default"]=i},1733:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2126);const a=r(8393);const s=r(5210);const o=r(3898);const i=r(1452);const c=r(7924);const u=r(7278);const d=r(6062);const l=r(7877);const f=r(5434);const p=[n.default,a.default,s.default,o.default,i.default,c.default,u.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,f.default];t["default"]=p},7278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,n.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`};const s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:a,code(e){const{keyword:t,data:r,schemaCode:a}=e;const s=t==="maxItems"?n.operators.GT:n.operators.LT;e.fail$data((0,n._)`${r}.length ${s} ${a}`)}};t["default"]=s},5210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=r(2616);const s=r(7923);const o={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,n.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`};const i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:o,it:i}=e;const c=t==="maxLength"?n.operators.GT:n.operators.LT;const u=i.opts.unicode===false?(0,n._)`${r}.length`:(0,n._)`${(0,a.useFunc)(e.gen,s.default)}(${r})`;e.fail$data((0,n._)`${u} ${c} ${o}`)}};t["default"]=i},2126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a=n.operators;const s={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}};const o={message:({keyword:e,schemaCode:t})=>(0,n.str)`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${s[e].okStr}, limit: ${t}}`};const i={keyword:Object.keys(s),type:"number",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:a}=e;e.fail$data((0,n._)`${r} ${s[t].fail} ${a} || isNaN(${r})`)}};t["default"]=i},1452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,n.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`};const s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:a,code(e){const{keyword:t,data:r,schemaCode:a}=e;const s=t==="maxProperties"?n.operators.GT:n.operators.LT;e.fail$data((0,n._)`Object.keys(${r}).length ${s} ${a}`)}};t["default"]=s},8393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8135);const a={message:({schemaCode:e})=>(0,n.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,n._)`{multipleOf: ${e}}`};const s={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:a,code(e){const{gen:t,data:r,schemaCode:a,it:s}=e;const o=s.opts.multipleOfPrecision;const i=t.let("res");const c=o?(0,n._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:(0,n._)`${i} !== parseInt(${i})`;e.fail$data((0,n._)`(${a} === 0 || (${i} = ${r}/${a}, ${c}))`)}};t["default"]=s},3898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5259);const a=r(8135);const s={message:({schemaCode:e})=>(0,a.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,a._)`{pattern: ${e}}`};const o={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:s,code(e){const{data:t,$data:r,schema:s,schemaCode:o,it:i}=e;const c=i.opts.unicodeRegExp?"u":"";const u=r?(0,a._)`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data((0,a._)`!${u}.test(${t})`)}};t["default"]=o},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5259);const a=r(8135);const s=r(2616);const o={message:({params:{missingProperty:e}})=>(0,a.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,a._)`{missingProperty: ${e}}`};const i={keyword:"required",type:"object",schemaType:"array",$data:true,error:o,code(e){const{gen:t,schema:r,schemaCode:o,data:i,$data:c,it:u}=e;const{opts:d}=u;if(!c&&r.length===0)return;const l=r.length>=d.loopRequired;if(u.allErrors)allErrorsMode();else exitOnErrorMode();if(d.strictRequired){const t=e.parentSchema.properties;const{definedProperties:n}=e.it;for(const e of r){if((t===null||t===void 0?void 0:t[e])===undefined&&!n.has(e)){const t=u.schemaEnv.baseId+u.errSchemaPath;const r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,s.checkStrictMode)(u,r,u.opts.strictRequired)}}}function allErrorsMode(){if(l||c){e.block$data(a.nil,loopAllRequired)}else{for(const t of r){(0,n.checkReportMissingProp)(e,t)}}}function exitOnErrorMode(){const a=t.let("missing");if(l||c){const r=t.let("valid",true);e.block$data(r,(()=>loopUntilMissing(a,r)));e.ok(r)}else{t.if((0,n.checkMissingProp)(e,r,a));(0,n.reportMissingProp)(e,a);t.else()}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r});t.if((0,n.noPropertyInData)(t,i,r,d.ownProperties),(()=>e.error()))}))}function loopUntilMissing(r,s){e.setParams({missingProperty:r});t.forOf(r,o,(()=>{t.assign(s,(0,n.propertyInData)(t,i,r,d.ownProperties));t.if((0,a.not)(s),(()=>{e.error();t.break()}))}),a.nil)}}};t["default"]=i},6062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4608);const a=r(8135);const s=r(2616);const o=r(1668);const i={message:({params:{i:e,j:t}})=>(0,a.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,a._)`{i: ${e}, j: ${t}}`};const c={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:i,code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:u,schemaCode:d,it:l}=e;if(!i&&!c)return;const f=t.let("valid");const p=u.items?(0,n.getSchemaTypes)(u.items):[];e.block$data(f,validateUniqueItems,(0,a._)`${d} === false`);e.ok(f);function validateUniqueItems(){const n=t.let("i",(0,a._)`${r}.length`);const s=t.let("j");e.setParams({i:n,j:s});t.assign(f,true);t.if((0,a._)`${n} > 1`,(()=>(canOptimize()?loopN:loopN2)(n,s)))}function canOptimize(){return p.length>0&&!p.some((e=>e==="object"||e==="array"))}function loopN(s,o){const i=t.name("item");const c=(0,n.checkDataTypes)(p,i,l.opts.strictNumbers,n.DataType.Wrong);const u=t.const("indices",(0,a._)`{}`);t.for((0,a._)`;${s}--;`,(()=>{t.let(i,(0,a._)`${r}[${s}]`);t.if(c,(0,a._)`continue`);if(p.length>1)t.if((0,a._)`typeof ${i} == "string"`,(0,a._)`${i} += "_"`);t.if((0,a._)`typeof ${u}[${i}] == "number"`,(()=>{t.assign(o,(0,a._)`${u}[${i}]`);e.error();t.assign(f,false).break()})).code((0,a._)`${u}[${i}] = ${s}`)}))}function loopN2(n,i){const c=(0,s.useFunc)(t,o.default);const u=t.name("outer");t.label(u).for((0,a._)`;${n}--;`,(()=>t.for((0,a._)`${i} = ${n}; ${i}--;`,(()=>t.if((0,a._)`${c}(${r}[${n}], ${r}[${i}])`,(()=>{e.error();t.assign(f,false).break(u)}))))))}}};t["default"]=c},7805:e=>{const t=/^[^:]+: /;const format=e=>{if(e instanceof SyntaxError){e.name="SyntaxError";e.message=e.message.replace(t,"");e.hideStack=true}else if(e instanceof TypeError){e.name=null;e.message=e.message.replace(t,"");e.hideStack=true}return e};class LoaderError extends Error{constructor(e){super();const{name:t,message:r,codeFrame:n,hideStack:a}=format(e);this.name="BabelLoaderError";this.message=`${t?`${t}: `:""}${r}\n\n${n}\n`;this.hideStack=a;Error.captureStackTrace(this,this.constructor)}}e.exports=LoaderError},1399:(e,t,r)=>{const n=r(2037);const a=r(1017);const s=r(9796);const o=r(6113);const{promisify:i}=r(3837);const{readFile:c,writeFile:u,mkdir:d}=r(3292);const l=r.e(583).then(r.bind(r,9583));const f=r(7136);let p=null;let m="sha256";try{o.createHash(m)}catch(e){m="md5"}const h=i(s.gunzip);const y=i(s.gzip);const read=async function(e,t){const r=await c(e+(t?".gz":""));const n=t?await h(r):r;return JSON.parse(n.toString())};const write=async function(e,t,r){const n=JSON.stringify(r);const a=t?await y(n):n;return await u(e+(t?".gz":""),a)};const filename=function(e,t,r){const n=o.createHash(m);const a=JSON.stringify({source:e,options:r,identifier:t});n.update(a);return n.digest("hex")+".json"};const handleCache=async function(e,t){const{source:r,options:s={},cacheIdentifier:o,cacheDirectory:i,cacheCompression:c}=t;const u=a.join(e,filename(r,o,s));try{return await read(u,c)}catch(e){}const l=typeof i!=="string"&&e!==n.tmpdir();try{await d(e,{recursive:true})}catch(e){if(l){return handleCache(n.tmpdir(),t)}throw e}const p=await f(r,s);if(!p.externalDependencies.length){try{await write(u,c,p)}catch(e){if(l){return handleCache(n.tmpdir(),t)}throw e}}return p};e.exports=async function(e){let t;if(typeof e.cacheDirectory==="string"){t=e.cacheDirectory}else{if(p===null){const{default:e}=await l;p=e({name:"babel-loader"})||n.tmpdir()}t=p}return await handleCache(t,e)}},2903:(e,t,r)=>{let n;try{n=r(7718)}catch(e){if(e.code==="MODULE_NOT_FOUND"){e.message+="\n babel-loader@9 requires Babel 7.12+ (the package '@babel/core'). "+"If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'."}throw e}if(/^6\./.test(n.version)){throw new Error("\n babel-loader@9 will not work with the '@babel/core@6' bridge package. "+"If you want to use Babel 6.x, install 'babel-loader@7'.")}const{version:a}=r(3684);const s=r(1399);const o=r(7136);const i=r(9103);const c=r(2427);const{isAbsolute:u}=r(1017);const d=r(2840).validate;function subscribe(e,t,r){if(r[e]){r[e](t)}}e.exports=makeLoader();e.exports.custom=makeLoader;function makeLoader(e){const t=e?e(n):undefined;return function(e,r){const n=this.async();loader.call(this,e,r,t).then((e=>n(null,...e)),(e=>n(e)))}}async function loader(e,t,r){const l=this.resourcePath;let f=this.getOptions();d(c,f,{name:"Babel loader"});if(f.customize!=null){if(typeof f.customize!=="string"){throw new Error("Customized loaders must be implemented as standalone modules.")}if(!u(f.customize)){throw new Error("Customized loaders must be passed as absolute paths, since "+"babel-loader has no way to know what they would be relative to.")}if(r){throw new Error("babel-loader's 'customize' option is not available when already "+"using a customized babel-loader wrapper.")}let e=require(f.customize);if(e.__esModule)e=e.default;if(typeof e!=="function"){throw new Error("Custom overrides must be functions.")}r=e(n)}let p;if(r&&r.customOptions){const n=await r.customOptions.call(this,f,{source:e,map:t});p=n.custom;f=n.loader}if("forceEnv"in f){console.warn("The option `forceEnv` has been removed in favor of `envName` in Babel 7.")}if(typeof f.babelrc==="string"){console.warn("The option `babelrc` should not be set to a string anymore in the babel-loader config. "+"Please update your configuration and set `babelrc` to true or false.\n"+"If you want to specify a specific babel config file to inherit config from "+"please use the `extends` option.\nFor more information about this options see "+"https://babeljs.io/docs/core-packages/#options")}if(Object.prototype.hasOwnProperty.call(f,"sourceMap")&&!Object.prototype.hasOwnProperty.call(f,"sourceMaps")){f=Object.assign({},f,{sourceMaps:f.sourceMap});delete f.sourceMap}const m=Object.assign({},f,{filename:l,inputSourceMap:t||f.inputSourceMap,sourceMaps:f.sourceMaps===undefined?this.sourceMap:f.sourceMaps,sourceFileName:l});delete m.customize;delete m.cacheDirectory;delete m.cacheIdentifier;delete m.cacheCompression;delete m.metadataSubscribers;const h=await n.loadPartialConfigAsync(i(m,this.target));if(h){let n=h.options;if(r&&r.config){n=await r.config.call(this,h,{source:e,map:t,customOptions:p})}if(n.sourceMaps==="inline"){n.sourceMaps=true}const{cacheDirectory:i=null,cacheIdentifier:c=JSON.stringify({options:n,"@babel/core":o.version,"@babel/loader":a}),cacheCompression:u=true,metadataSubscribers:d=[]}=f;let l;if(i){l=await s({source:e,options:n,transform:o,cacheDirectory:i,cacheIdentifier:c,cacheCompression:u})}else{l=await o(e,n)}h.files.forEach((e=>this.addDependency(e)));if(l){if(r&&r.result){l=await r.result.call(this,l,{source:e,map:t,customOptions:p,config:h,options:n})}const{code:a,map:s,metadata:o,externalDependencies:i}=l;i==null?void 0:i.forEach((e=>this.addDependency(e)));d.forEach((e=>{subscribe(e,o,this)}));return[a,s]}}return[e,t]}},9103:(e,t,r)=>{const n=r(7718);e.exports=function injectCaller(e,t){if(!supportsCallerOption())return e;return Object.assign({},e,{caller:Object.assign({name:"babel-loader",target:t,supportsStaticESM:true,supportsDynamicImport:true,supportsTopLevelAwait:true},e.caller)})};let a=undefined;function supportsCallerOption(){if(a===undefined){try{n.loadPartialConfig({caller:undefined,babelrc:false,configFile:false});a=true}catch(e){a=false}}return a}},7136:(e,t,r)=>{const n=r(7718);const{promisify:a}=r(3837);const s=r(7805);const o=a(n.transform);e.exports=async function(e,t){let r;try{r=await o(e,t)}catch(e){throw e.message&&e.codeFrame?new s(e):e}if(!r)return null;const{ast:n,code:a,map:i,metadata:c,sourceType:u,externalDependencies:d}=r;if(i&&(!i.sourcesContent||!i.sourcesContent.length)){i.sourcesContent=[e]}return{ast:n,code:a,map:i,metadata:c,sourceType:u,externalDependencies:Array.from(d||[])}};e.exports.version=n.version},7447:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var r,n,a;if(Array.isArray(e)){r=e.length;if(r!=t.length)return false;for(n=r;n--!==0;)if(!equal(e[n],t[n]))return false;return true}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();a=Object.keys(e);r=a.length;if(r!==Object.keys(t).length)return false;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return false;for(n=r;n--!==0;){var s=a[n];if(!equal(e[s],t[s]))return false}return true}return e!==e&&t!==t}},7243:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){};var a=r.post||function(){};_traverse(t,n,a,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,n,a,s,o,i,c,u,d){if(a&&typeof a=="object"&&!Array.isArray(a)){r(a,s,o,i,c,u,d);for(var l in a){var f=a[l];if(Array.isArray(f)){if(l in t.arrayKeywords){for(var p=0;p<f.length;p++)_traverse(e,r,n,f[p],s+"/"+l+"/"+p,o,s,l,a,p)}}else if(l in t.propsKeywords){if(f&&typeof f=="object"){for(var m in f)_traverse(e,r,n,f[m],s+"/"+l+"/"+escapeJsonPtr(m),o,s,l,a,m)}}else if(l in t.keywords||e.allKeys&&!(l in t.skipKeywords)){_traverse(e,r,n,f,s+"/"+l,o,s,l,a)}}n(a,s,o,i,c,u,d)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}},7851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(1865));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function isNumeric(e){return/^-?\d+$/.test(e)}function filterMax(e,t){const r=e.reduce(((e,r)=>Math.max(e,t(r))),0);return e.filter((e=>t(e)===r))}function filterChildren(e){let t=e;t=filterMax(t,(e=>e.instancePath?e.instancePath.length:0));t=filterMax(t,(e=>a[e.keyword]||2));return t}function findAllChildren(e,t){let r=e.length-1;const predicate=t=>e[r].schemaPath.indexOf(t)!==0;while(r>-1&&!t.every(predicate)){if(e[r].keyword==="anyOf"||e[r].keyword==="oneOf"){const t=extractRefs(e[r]);const n=findAllChildren(e.slice(0,r),t.concat(e[r].schemaPath));r=n-1}else{r-=1}}return r+1}function extractRefs(e){const{schema:t}=e;if(!Array.isArray(t)){return[]}return t.map((({$ref:e})=>e)).filter((e=>e))}function groupChildrenByFirstChild(e){const t=[];let r=e.length-1;while(r>0){const n=e[r];if(n.keyword==="anyOf"||n.keyword==="oneOf"){const a=extractRefs(n);const s=findAllChildren(e.slice(0,r),a.concat(n.schemaPath));if(s!==r){t.push(Object.assign({},n,{children:e.slice(s,r)}));r=s}else{t.push(n)}}else{t.push(n)}r-=1}if(r===0){t.push(e[r])}return t.reverse()}function indent(e,t){return e.replace(/\n(?!$)/g,`\n${t}`)}function hasNotInSchema(e){return!!e.not}function findFirstTypedSchema(e){if(hasNotInSchema(e)){return findFirstTypedSchema(e.not)}return e}function canApplyNot(e){const t=findFirstTypedSchema(e);return likeNumber(t)||likeInteger(t)||likeString(t)||likeNull(t)||likeBoolean(t)}function isObject(e){return typeof e==="object"&&e!==null}function likeNumber(e){return e.type==="number"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeInteger(e){return e.type==="integer"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeString(e){return e.type==="string"||typeof e.minLength!=="undefined"||typeof e.maxLength!=="undefined"||typeof e.pattern!=="undefined"||typeof e.format!=="undefined"||typeof e.formatMinimum!=="undefined"||typeof e.formatMaximum!=="undefined"}function likeBoolean(e){return e.type==="boolean"}function likeArray(e){return e.type==="array"||typeof e.minItems==="number"||typeof e.maxItems==="number"||typeof e.uniqueItems!=="undefined"||typeof e.items!=="undefined"||typeof e.additionalItems!=="undefined"||typeof e.contains!=="undefined"}function likeObject(e){return e.type==="object"||typeof e.minProperties!=="undefined"||typeof e.maxProperties!=="undefined"||typeof e.required!=="undefined"||typeof e.properties!=="undefined"||typeof e.patternProperties!=="undefined"||typeof e.additionalProperties!=="undefined"||typeof e.dependencies!=="undefined"||typeof e.propertyNames!=="undefined"||typeof e.patternRequired!=="undefined"}function likeNull(e){return e.type==="null"}function getArticle(e){if(/^[aeiou]/i.test(e)){return"an"}return"a"}function getSchemaNonTypes(e){if(!e){return""}if(!e.type){if(likeNumber(e)||likeInteger(e)){return" | should be any non-number"}if(likeString(e)){return" | should be any non-string"}if(likeArray(e)){return" | should be any non-array"}if(likeObject(e)){return" | should be any non-object"}}return""}function formatHints(e){return e.length>0?`(${e.join(", ")})`:""}const s=(0,n.default)((()=>r(4511)));function getHints(e,t){if(likeNumber(e)||likeInteger(e)){const r=s();return r.numberHints(e,t)}else if(likeString(e)){const r=s();return r.stringHints(e,t)}return[]}class ValidationError extends Error{constructor(e,t,r={}){super();this.name="ValidationError";this.errors=e;this.schema=t;let n;let a;if(t.title&&(!r.name||!r.baseDataPath)){const e=t.title.match(/^(.+) (.+)$/);if(e){if(!r.name){[,n]=e}if(!r.baseDataPath){[,,a]=e}}}this.headerName=r.name||n||"Object";this.baseDataPath=r.baseDataPath||a||"configuration";this.postFormatter=r.postFormatter||null;const s=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${s}${this.formatValidationErrors(e)}`;Error.captureStackTrace(this,this.constructor)}getSchemaPart(e){const t=e.split("/");let r=this.schema;for(let e=1;e<t.length;e++){const n=r[t[e]];if(!n){break}r=n}return r}formatSchema(e,t=true,r=[]){let n=t;const formatInnerSchema=(t,a)=>{if(!a){return this.formatSchema(t,n,r)}if(r.includes(t)){return"(recursive)"}return this.formatSchema(t,n,r.concat(e))};if(hasNotInSchema(e)&&!likeObject(e)){if(canApplyNot(e.not)){n=!t;return formatInnerSchema(e.not)}const r=!e.not.not;const a=t?"":"non ";n=!t;return r?a+formatInnerSchema(e.not):formatInnerSchema(e.not)}if(e.instanceof){const{instanceof:t}=e;const r=!Array.isArray(t)?[t]:t;return r.map((e=>e==="Function"?"function":e)).join(" | ")}if(e.enum){const t=e.enum.map((t=>{if(t===null&&e.undefinedAsNull){return`${JSON.stringify(t)} | undefined`}return JSON.stringify(t)})).join(" | ");return`${t}`}if(typeof e.const!=="undefined"){return JSON.stringify(e.const)}if(e.oneOf){return e.oneOf.map((e=>formatInnerSchema(e,true))).join(" | ")}if(e.anyOf){return e.anyOf.map((e=>formatInnerSchema(e,true))).join(" | ")}if(e.allOf){return e.allOf.map((e=>formatInnerSchema(e,true))).join(" & ")}if(e.if){const{if:t,then:r,else:n}=e;return`${t?`if ${formatInnerSchema(t)}`:""}${r?` then ${formatInnerSchema(r)}`:""}${n?` else ${formatInnerSchema(n)}`:""}`}if(e.$ref){return formatInnerSchema(this.getSchemaPart(e.$ref),true)}if(likeNumber(e)||likeInteger(e)){const[r,...n]=getHints(e,t);const a=`${r}${n.length>0?` ${formatHints(n)}`:""}`;return t?a:n.length>0?`non-${r} | ${a}`:`non-${r}`}if(likeString(e)){const[r,...n]=getHints(e,t);const a=`${r}${n.length>0?` ${formatHints(n)}`:""}`;return t?a:a==="string"?"non-string":`non-string | ${a}`}if(likeBoolean(e)){return`${t?"":"non-"}boolean`}if(likeArray(e)){n=true;const t=[];if(typeof e.minItems==="number"){t.push(`should not have fewer than ${e.minItems} item${e.minItems>1?"s":""}`)}if(typeof e.maxItems==="number"){t.push(`should not have more than ${e.maxItems} item${e.maxItems>1?"s":""}`)}if(e.uniqueItems){t.push("should not have duplicate items")}const r=typeof e.additionalItems==="undefined"||Boolean(e.additionalItems);let a="";if(e.items){if(Array.isArray(e.items)&&e.items.length>0){a=`${e.items.map((e=>formatInnerSchema(e))).join(", ")}`;if(r){if(e.additionalItems&&isObject(e.additionalItems)&&Object.keys(e.additionalItems).length>0){t.push(`additional items should be ${formatInnerSchema(e.additionalItems)}`)}}}else if(e.items&&Object.keys(e.items).length>0){a=`${formatInnerSchema(e.items)}`}else{a="any"}}else{a="any"}if(e.contains&&Object.keys(e.contains).length>0){t.push(`should contains at least one ${this.formatSchema(e.contains)} item`)}return`[${a}${r?", ...":""}]${t.length>0?` (${t.join(", ")})`:""}`}if(likeObject(e)){n=true;const t=[];if(typeof e.minProperties==="number"){t.push(`should not have fewer than ${e.minProperties} ${e.minProperties>1?"properties":"property"}`)}if(typeof e.maxProperties==="number"){t.push(`should not have more than ${e.maxProperties} ${e.minProperties&&e.minProperties>1?"properties":"property"}`)}if(e.patternProperties&&Object.keys(e.patternProperties).length>0){const r=Object.keys(e.patternProperties);t.push(`additional property names should match pattern${r.length>1?"s":""} ${r.map((e=>JSON.stringify(e))).join(" | ")}`)}const r=e.properties?Object.keys(e.properties):[];const a=e.required?e.required:[];const s=[...new Set([].concat(a).concat(r))];const o=s.map((e=>{const t=a.includes(e);return`${e}${t?"":"?"}`})).concat(typeof e.additionalProperties==="undefined"||Boolean(e.additionalProperties)?e.additionalProperties&&isObject(e.additionalProperties)?[`<key>: ${formatInnerSchema(e.additionalProperties)}`]:["…"]:[]).join(", ");const{dependencies:i,propertyNames:c,patternRequired:u}=e;if(i){Object.keys(i).forEach((e=>{const r=i[e];if(Array.isArray(r)){t.push(`should have ${r.length>1?"properties":"property"} ${r.map((e=>`'${e}'`)).join(", ")} when property '${e}' is present`)}else{t.push(`should be valid according to the schema ${formatInnerSchema(r)} when property '${e}' is present`)}}))}if(c&&Object.keys(c).length>0){t.push(`each property name should match format ${JSON.stringify(e.propertyNames.format)}`)}if(u&&u.length>0){t.push(`should have property matching pattern ${u.map((e=>JSON.stringify(e)))}`)}return`object {${o?` ${o} `:""}}${t.length>0?` (${t.join(", ")})`:""}`}if(likeNull(e)){return`${t?"":"non-"}null`}if(Array.isArray(e.type)){return`${e.type.join(" | ")}`}return JSON.stringify(e,null,2)}getSchemaPartText(e,t,r=false,n=true){if(!e){return""}if(Array.isArray(t)){for(let r=0;r<t.length;r++){const n=e[t[r]];if(n){e=n}else{break}}}while(e.$ref){e=this.getSchemaPart(e.$ref)}let a=`${this.formatSchema(e,n)}${r?".":""}`;if(e.description){a+=`\n-> ${e.description}`}if(e.link){a+=`\n-> Read more at ${e.link}`}return a}getSchemaPartDescription(e){if(!e){return""}while(e.$ref){e=this.getSchemaPart(e.$ref)}let t="";if(e.description){t+=`\n-> ${e.description}`}if(e.link){t+=`\n-> Read more at ${e.link}`}return t}formatValidationError(e){const{keyword:t,instancePath:r}=e;const n=r.split("/");const a=[];const s=n.reduce(((e,t)=>{if(t.length>0){if(isNumeric(t)){e.push(`[${t}]`)}else if(/^\[/.test(t)){e.push(t)}else{e.push(`.${t}`)}}return e}),a).join("");const o=`${this.baseDataPath}${s}`;switch(t){case"type":{const{parentSchema:t,params:r}=e;switch(r.type){case"number":return`${o} should be a ${this.getSchemaPartText(t,false,true)}`;case"integer":return`${o} should be an ${this.getSchemaPartText(t,false,true)}`;case"string":return`${o} should be a ${this.getSchemaPartText(t,false,true)}`;case"boolean":return`${o} should be a ${this.getSchemaPartText(t,false,true)}`;case"array":return`${o} should be an array:\n${this.getSchemaPartText(t)}`;case"object":return`${o} should be an object:\n${this.getSchemaPartText(t)}`;case"null":return`${o} should be a ${this.getSchemaPartText(t,false,true)}`;default:return`${o} should be:\n${this.getSchemaPartText(t)}`}}case"instanceof":{const{parentSchema:t}=e;return`${o} should be an instance of ${this.getSchemaPartText(t,false,true)}`}case"pattern":{const{params:t,parentSchema:r}=e;const{pattern:n}=t;return`${o} should match pattern ${JSON.stringify(n)}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"format":{const{params:t,parentSchema:r}=e;const{format:n}=t;return`${o} should match format ${JSON.stringify(n)}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"formatMinimum":case"formatExclusiveMinimum":case"formatMaximum":case"formatExclusiveMaximum":{const{params:t,parentSchema:r}=e;const{comparison:n,limit:a}=t;return`${o} should be ${n} ${JSON.stringify(a)}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:t,params:r}=e;const{comparison:n,limit:a}=r;const[,...s]=getHints(t,true);if(s.length===0){s.push(`should be ${n} ${a}`)}return`${o} ${s.join(" ")}${getSchemaNonTypes(t)}.${this.getSchemaPartDescription(t)}`}case"multipleOf":{const{params:t,parentSchema:r}=e;const{multipleOf:n}=t;return`${o} should be multiple of ${n}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"patternRequired":{const{params:t,parentSchema:r}=e;const{missingPattern:n}=t;return`${o} should have property matching pattern ${JSON.stringify(n)}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"minLength":{const{params:t,parentSchema:r}=e;const{limit:n}=t;if(n===1){return`${o} should be a non-empty string${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}const a=n-1;return`${o} should be longer than ${a} character${a>1?"s":""}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"minItems":{const{params:t,parentSchema:r}=e;const{limit:n}=t;if(n===1){return`${o} should be a non-empty array${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}return`${o} should not have fewer than ${n} items${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"minProperties":{const{params:t,parentSchema:r}=e;const{limit:n}=t;if(n===1){return`${o} should be a non-empty object${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}return`${o} should not have fewer than ${n} properties${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"maxLength":{const{params:t,parentSchema:r}=e;const{limit:n}=t;const a=n+1;return`${o} should be shorter than ${a} character${a>1?"s":""}${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"maxItems":{const{params:t,parentSchema:r}=e;const{limit:n}=t;return`${o} should not have more than ${n} items${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"maxProperties":{const{params:t,parentSchema:r}=e;const{limit:n}=t;return`${o} should not have more than ${n} properties${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"uniqueItems":{const{params:t,parentSchema:r}=e;const{i:n}=t;return`${o} should not contain the item '${e.data[n]}' twice${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"additionalItems":{const{params:t,parentSchema:r}=e;const{limit:n}=t;return`${o} should not have more than ${n} items${getSchemaNonTypes(r)}. These items are valid:\n${this.getSchemaPartText(r)}`}case"contains":{const{parentSchema:t}=e;return`${o} should contains at least one ${this.getSchemaPartText(t,["contains"])} item${getSchemaNonTypes(t)}.`}case"required":{const{parentSchema:t,params:r}=e;const n=r.missingProperty.replace(/^\./,"");const a=t&&Boolean(t.properties&&t.properties[n]);return`${o} misses the property '${n}'${getSchemaNonTypes(t)}.${a?` Should be:\n${this.getSchemaPartText(t,["properties",n])}`:this.getSchemaPartDescription(t)}`}case"additionalProperties":{const{params:t,parentSchema:r}=e;const{additionalProperty:n}=t;return`${o} has an unknown property '${n}'${getSchemaNonTypes(r)}. These properties are valid:\n${this.getSchemaPartText(r)}`}case"dependencies":{const{params:t,parentSchema:r}=e;const{property:n,deps:a}=t;const s=a.split(",").map((e=>`'${e.trim()}'`)).join(", ");return`${o} should have properties ${s} when property '${n}' is present${getSchemaNonTypes(r)}.${this.getSchemaPartDescription(r)}`}case"propertyNames":{const{params:t,parentSchema:r,schema:n}=e;const{propertyName:a}=t;return`${o} property name '${a}' is invalid${getSchemaNonTypes(r)}. Property names should be match format ${JSON.stringify(n.format)}.${this.getSchemaPartDescription(r)}`}case"enum":{const{parentSchema:t}=e;if(t&&t.enum&&t.enum.length===1){return`${o} should be ${this.getSchemaPartText(t,false,true)}`}return`${o} should be one of these:\n${this.getSchemaPartText(t)}`}case"const":{const{parentSchema:t}=e;return`${o} should be equal to constant ${this.getSchemaPartText(t,false,true)}`}case"not":{const t=likeObject(e.parentSchema)?`\n${this.getSchemaPartText(e.parentSchema)}`:"";const r=this.getSchemaPartText(e.schema,false,false,false);if(canApplyNot(e.schema)){return`${o} should be any ${r}${t}.`}const{schema:n,parentSchema:a}=e;return`${o} should not be ${this.getSchemaPartText(n,false,true)}${a&&likeObject(a)?`\n${this.getSchemaPartText(a)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:t,children:r}=e;if(r&&r.length>0){if(e.schema.length===1){const e=r[r.length-1];const n=r.slice(0,r.length-1);return this.formatValidationError(Object.assign({},e,{children:n,parentSchema:Object.assign({},t,e.parentSchema)}))}let n=filterChildren(r);if(n.length===1){return this.formatValidationError(n[0])}n=groupChildrenByFirstChild(n);return`${o} should be one of these:\n${this.getSchemaPartText(t)}\nDetails:\n${n.map((e=>` * ${indent(this.formatValidationError(e)," ")}`)).join("\n")}`}return`${o} should be one of these:\n${this.getSchemaPartText(t)}`}case"if":{const{params:t,parentSchema:r}=e;const{failingKeyword:n}=t;return`${o} should match "${n}" schema:\n${this.getSchemaPartText(r,[n])}`}case"absolutePath":{const{message:t,parentSchema:r}=e;return`${o}: ${t}${this.getSchemaPartDescription(r)}`}default:{const{message:t,parentSchema:r}=e;const n=JSON.stringify(e,null,2);return`${o} ${t} (${n}).\n${this.getSchemaPartText(r,false)}`}}}formatValidationErrors(e){return e.map((e=>{let t=this.formatValidationError(e);if(this.postFormatter){t=this.postFormatter(t,e)}return` - ${indent(t," ")}`})).join("\n")}}var o=ValidationError;t["default"]=o},2840:(e,t,r)=>{"use strict";const{validate:n,ValidationError:a,enableValidation:s,disableValidation:o,needValidate:i}=r(3388);e.exports={validate:n,ValidationError:a,enableValidation:s,disableValidation:o,needValidate:i}},6776:(e,t)=>{"use strict";var r;r={value:true};t.Z=void 0;function errorMessage(e,t,r){return{dataPath:undefined,schemaPath:undefined,keyword:"absolutePath",params:{absolutePath:r},message:e,parentSchema:t}}function getErrorFor(e,t,r){const n=e?`The provided value ${JSON.stringify(r)} is not an absolute path!`:`A relative path is expected. However, the provided value ${JSON.stringify(r)} is an absolute path!`;return errorMessage(n,t,r)}function addAbsolutePathKeyword(e){e.addKeyword({keyword:"absolutePath",type:"string",errors:true,compile(e,t){const callback=r=>{let n=true;const a=r.includes("!");if(a){callback.errors=[errorMessage(`The provided value ${JSON.stringify(r)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`,t,r)];n=false}const s=e===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(r);if(!s){callback.errors=[getErrorFor(e,t,r)];n=false}return n};callback.errors=[];return callback}});return e}var n=addAbsolutePathKeyword;t.Z=n},840:(e,t)=>{"use strict";var r;r={value:true};t.Z=void 0;function addUndefinedAsNullKeyword(e){e.addKeyword({keyword:"undefinedAsNull",before:"enum",modifying:true,validate(e,t,r,n){if(e&&n&&r&&typeof r.enum!=="undefined"){const e=n.parentDataProperty;if(typeof n.parentData[e]==="undefined"){n.parentData[n.parentDataProperty]=null}}return true}});return e}var n=addUndefinedAsNullKeyword;t.Z=n},4826:e=>{"use strict";class Range{static getOperator(e,t){if(e==="left"){return t?">":">="}return t?"<":"<="}static formatRight(e,t,r){if(t===false){return Range.formatLeft(e,!t,!r)}return`should be ${Range.getOperator("right",r)} ${e}`}static formatLeft(e,t,r){if(t===false){return Range.formatRight(e,!t,!r)}return`should be ${Range.getOperator("left",r)} ${e}`}static formatRange(e,t,r,n,a){let s="should be";s+=` ${Range.getOperator(a?"left":"right",a?r:!r)} ${e} `;s+=a?"and":"or";s+=` ${Range.getOperator(a?"right":"left",a?n:!n)} ${t}`;return s}static getRangeValue(e,t){let r=t?Infinity:-Infinity;let n=-1;const a=t?([e])=>e<=r:([e])=>e>=r;for(let t=0;t<e.length;t++){if(a(e[t])){[r]=e[t];n=t}}if(n>-1){return e[n]}return[Infinity,true]}constructor(){this._left=[];this._right=[]}left(e,t=false){this._left.push([e,t])}right(e,t=false){this._right.push([e,t])}format(e=true){const[t,r]=Range.getRangeValue(this._left,e);const[n,a]=Range.getRangeValue(this._right,!e);if(!Number.isFinite(t)&&!Number.isFinite(n)){return""}const s=r?t+1:t;const o=a?n-1:n;if(s===o){return`should be ${e?"":"!"}= ${s}`}if(Number.isFinite(t)&&!Number.isFinite(n)){return Range.formatLeft(t,e,r)}if(!Number.isFinite(t)&&Number.isFinite(n)){return Range.formatRight(n,e,a)}return Range.formatRange(t,n,r,a,e)}}e.exports=Range},4511:(e,t,r)=>{"use strict";const n=r(4826);e.exports.stringHints=function stringHints(e,t){const r=[];let n="string";const a={...e};if(!t){const e=a.minLength;const t=a.formatMinimum;a.minLength=a.maxLength;a.maxLength=e;a.formatMinimum=a.formatMaximum;a.formatMaximum=t}if(typeof a.minLength==="number"){if(a.minLength===1){n="non-empty string"}else{const e=Math.max(a.minLength-1,0);r.push(`should be longer than ${e} character${e>1?"s":""}`)}}if(typeof a.maxLength==="number"){if(a.maxLength===0){n="empty string"}else{const e=a.maxLength+1;r.push(`should be shorter than ${e} character${e>1?"s":""}`)}}if(a.pattern){r.push(`should${t?"":" not"} match pattern ${JSON.stringify(a.pattern)}`)}if(a.format){r.push(`should${t?"":" not"} match format ${JSON.stringify(a.format)}`)}if(a.formatMinimum){r.push(`should be ${a.formatExclusiveMinimum?">":">="} ${JSON.stringify(a.formatMinimum)}`)}if(a.formatMaximum){r.push(`should be ${a.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(a.formatMaximum)}`)}return[n].concat(r)};e.exports.numberHints=function numberHints(e,t){const r=[e.type==="integer"?"integer":"number"];const a=new n;if(typeof e.minimum==="number"){a.left(e.minimum)}if(typeof e.exclusiveMinimum==="number"){a.left(e.exclusiveMinimum,true)}if(typeof e.maximum==="number"){a.right(e.maximum)}if(typeof e.exclusiveMaximum==="number"){a.right(e.exclusiveMaximum,true)}const s=a.format(t);if(s){r.push(s)}if(typeof e.multipleOf==="number"){r.push(`should${t?"":" not"} be multiple of ${e.multipleOf}`)}return r}},1865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;const memoize=e=>{let t=false;let r;return()=>{if(t){return r}r=e();t=true;e=undefined;return r}};var r=memoize;t["default"]=r},3388:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"ValidationError",{enumerable:true,get:function(){return n.default}});t.disableValidation=disableValidation;t.enableValidation=enableValidation;t.needValidate=needValidate;t.validate=validate;var n=_interopRequireDefault(r(7851));var a=_interopRequireDefault(r(1865));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,a.default)((()=>{const e=r(7193)["default"];const t=r(7903)["default"];const n=r(8506)["default"];const a=new e({strict:false,allErrors:true,verbose:true,$data:true});t(a,["instanceof","patternRequired"]);n(a,{keywords:true});const s=r(6776).Z;s(a);const o=r(840).Z;o(a);return a}));function applyPrefix(e,t){e.instancePath=`[${t}]${e.instancePath}`;if(e.children){e.children.forEach((e=>applyPrefix(e,t)))}return e}let o=false;function enableValidation(){o=false;if(process&&process.env){process.env.SKIP_VALIDATION="n"}}function disableValidation(){o=true;if(process&&process.env){process.env.SKIP_VALIDATION="y"}}function needValidate(){if(o){return false}if(process&&process.env&&process.env.SKIP_VALIDATION){const e=process.env.SKIP_VALIDATION.trim();if(/^(?:y|yes|true|1|on)$/i.test(e)){return false}if(/^(?:n|no|false|0|off)$/i.test(e)){return true}}return true}function validate(e,t,r){if(!needValidate()){return}let a=[];if(Array.isArray(t)){for(let r=0;r<=t.length-1;r++){a.push(...validateObject(e,t[r]).map((e=>applyPrefix(e,r))))}}else{a=validateObject(e,t)}if(a.length>0){throw new n.default(a,e,r)}}function validateObject(e,t){const r=s().compile(e);const n=r(t);if(n)return[];return r.errors?filterErrors(r.errors):[]}function filterErrors(e){let t=[];for(const r of e){const{instancePath:e}=r;let n=[];t=t.filter((t=>{if(t.instancePath.includes(e)){if(t.children){n=n.concat(t.children.slice(0))}t.children=undefined;n.push(t);return false}return true}));if(n.length){r.children=n}t.push(r)}return t}},199:function(e,t){
|
|
8
|
+
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
9
|
+
(function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length>1){t[0]=t[0].slice(0,-1);var n=t.length-1;for(var a=1;a<n;++a){t[a]=t[a].slice(1,-1)}t[n]=t[n].slice(1);return t.join("")}else{return t[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t){for(var n in t){r[n]=t[n]}}return r}function buildExps(e){var t="[A-Za-z]",r="[\\x0D]",n="[0-9]",a="[\\x22]",s=merge(n,"[A-Fa-f]"),o="[\\x0A]",i="[\\x20]",c=subexp(subexp("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+subexp("%[89A-Fa-f]"+s+"%"+s+s)+"|"+subexp("%"+s+s)),u="[\\:\\/\\?\\#\\[\\]\\@]",d="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=merge(u,d),f=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=e?"[\\uE000-\\uF8FF]":"[]",m=merge(t,n,"[\\-\\.\\_\\~]",f),h=subexp(t+merge(t,n,"[\\+\\-\\.]")+"*"),y=subexp(subexp(c+"|"+merge(m,d,"[\\:]"))+"*"),g=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+n)+"|"+subexp("1"+n+n)+"|"+subexp("[1-9]"+n)+"|"+n),v=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+n)+"|"+subexp("1"+n+n)+"|"+subexp("0?[1-9]"+n)+"|0?0?"+n),$=subexp(v+"\\."+v+"\\."+v+"\\."+v),b=subexp(s+"{1,4}"),w=subexp(subexp(b+"\\:"+b)+"|"+$),S=subexp(subexp(b+"\\:")+"{6}"+w),P=subexp("\\:\\:"+subexp(b+"\\:")+"{5}"+w),E=subexp(subexp(b)+"?\\:\\:"+subexp(b+"\\:")+"{4}"+w),x=subexp(subexp(subexp(b+"\\:")+"{0,1}"+b)+"?\\:\\:"+subexp(b+"\\:")+"{3}"+w),k=subexp(subexp(subexp(b+"\\:")+"{0,2}"+b)+"?\\:\\:"+subexp(b+"\\:")+"{2}"+w),O=subexp(subexp(subexp(b+"\\:")+"{0,3}"+b)+"?\\:\\:"+b+"\\:"+w),N=subexp(subexp(subexp(b+"\\:")+"{0,4}"+b)+"?\\:\\:"+w),C=subexp(subexp(subexp(b+"\\:")+"{0,5}"+b)+"?\\:\\:"+b),j=subexp(subexp(subexp(b+"\\:")+"{0,6}"+b)+"?\\:\\:"),D=subexp([S,P,E,x,k,O,N,C,j].join("|")),T=subexp(subexp(m+"|"+c)+"+"),R=subexp(D+"\\%25"+T),I=subexp(D+subexp("\\%25|\\%(?!"+s+"{2})")+T),M=subexp("[vV]"+s+"+\\."+merge(m,d,"[\\:]")+"+"),A=subexp("\\["+subexp(I+"|"+D+"|"+M)+"\\]"),F=subexp(subexp(c+"|"+merge(m,d))+"*"),z=subexp(A+"|"+$+"(?!"+F+")"+"|"+F),V=subexp(n+"*"),q=subexp(subexp(y+"@")+"?"+z+subexp("\\:"+V)+"?"),K=subexp(c+"|"+merge(m,d,"[\\:\\@]")),U=subexp(K+"*"),L=subexp(K+"+"),J=subexp(subexp(c+"|"+merge(m,d,"[\\@]"))+"+"),H=subexp(subexp("\\/"+U)+"*"),B=subexp("\\/"+subexp(L+H)+"?"),G=subexp(J+H),Z=subexp(L+H),W="(?!"+K+")",Q=subexp(H+"|"+B+"|"+G+"|"+Z+"|"+W),Y=subexp(subexp(K+"|"+merge("[\\/\\?]",p))+"*"),X=subexp(subexp(K+"|[\\/\\?]")+"*"),ee=subexp(subexp("\\/\\/"+q+H)+"|"+B+"|"+Z+"|"+W),te=subexp(h+"\\:"+ee+subexp("\\?"+Y)+"?"+subexp("\\#"+X)+"?"),re=subexp(subexp("\\/\\/"+q+H)+"|"+B+"|"+G+"|"+W),ne=subexp(re+subexp("\\?"+Y)+"?"+subexp("\\#"+X)+"?"),ae=subexp(te+"|"+ne),se=subexp(h+"\\:"+ee+subexp("\\?"+Y)+"?"),oe="^("+h+")\\:"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+z+")"+subexp("\\:("+V+")")+"?)")+"?("+H+"|"+B+"|"+Z+"|"+W+")")+subexp("\\?("+Y+")")+"?"+subexp("\\#("+X+")")+"?$",ie="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+z+")"+subexp("\\:("+V+")")+"?)")+"?("+H+"|"+B+"|"+G+"|"+W+")")+subexp("\\?("+Y+")")+"?"+subexp("\\#("+X+")")+"?$",ce="^("+h+")\\:"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+z+")"+subexp("\\:("+V+")")+"?)")+"?("+H+"|"+B+"|"+Z+"|"+W+")")+subexp("\\?("+Y+")")+"?$",ue="^"+subexp("\\#("+X+")")+"?$",de="^"+subexp("("+y+")@")+"?("+z+")"+subexp("\\:("+V+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",t,n,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",m,d),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",m,d),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",m,d),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",m,d),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",m,d,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",m,d,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",m,d),"g"),UNRESERVED:new RegExp(m,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",m,l),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+$+")$"),IPV6ADDRESS:new RegExp("^\\[?("+D+")"+subexp(subexp("\\%25|\\%(?!"+s+"{2})")+"("+T+")")+"?\\]?$")}}var t=buildExps(false);var r=buildExps(true);var n=function(){function sliceIterator(e,t){var r=[];var n=true;var a=false;var s=undefined;try{for(var o=e[Symbol.iterator](),i;!(n=(i=o.next()).done);n=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){a=true;s=e}finally{try{if(!n&&o["return"])o["return"]()}finally{if(a)throw s}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var a=2147483647;var s=36;var o=1;var i=26;var c=38;var u=700;var d=72;var l=128;var f="-";var p=/^xn--/;var m=/[^\0-\x7E]/;var h=/[\x2E\u3002\uFF0E\uFF61]/g;var y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var g=s-o;var v=Math.floor;var $=String.fromCharCode;function error$1(e){throw new RangeError(y[e])}function map(e,t){var r=[];var n=e.length;while(n--){r[n]=t(e[n])}return r}function mapDomain(e,t){var r=e.split("@");var n="";if(r.length>1){n=r[0]+"@";e=r[1]}e=e.replace(h,".");var a=e.split(".");var s=map(a,t).join(".");return n+s}function ucs2decode(e){var t=[];var r=0;var n=e.length;while(r<n){var a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<n){var s=e.charCodeAt(r++);if((s&64512)==56320){t.push(((a&1023)<<10)+(s&1023)+65536)}else{t.push(a);r--}}else{t.push(a)}}return t}var b=function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))};var w=function basicToDigit(e){if(e-48<10){return e-22}if(e-65<26){return e-65}if(e-97<26){return e-97}return s};var S=function digitToBasic(e,t){return e+22+75*(e<26)-((t!=0)<<5)};var P=function adapt(e,t,r){var n=0;e=r?v(e/u):e>>1;e+=v(e/t);for(;e>g*i>>1;n+=s){e=v(e/g)}return v(n+(g+1)*e/(e+c))};var E=function decode(e){var t=[];var r=e.length;var n=0;var c=l;var u=d;var p=e.lastIndexOf(f);if(p<0){p=0}for(var m=0;m<p;++m){if(e.charCodeAt(m)>=128){error$1("not-basic")}t.push(e.charCodeAt(m))}for(var h=p>0?p+1:0;h<r;){var y=n;for(var g=1,$=s;;$+=s){if(h>=r){error$1("invalid-input")}var b=w(e.charCodeAt(h++));if(b>=s||b>v((a-n)/g)){error$1("overflow")}n+=b*g;var S=$<=u?o:$>=u+i?i:$-u;if(b<S){break}var E=s-S;if(g>v(a/E)){error$1("overflow")}g*=E}var x=t.length+1;u=P(n-y,x,y==0);if(v(n/x)>a-c){error$1("overflow")}c+=v(n/x);n%=x;t.splice(n++,0,c)}return String.fromCodePoint.apply(String,t)};var x=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var n=l;var c=0;var u=d;var p=true;var m=false;var h=undefined;try{for(var y=e[Symbol.iterator](),g;!(p=(g=y.next()).done);p=true){var b=g.value;if(b<128){t.push($(b))}}}catch(e){m=true;h=e}finally{try{if(!p&&y.return){y.return()}}finally{if(m){throw h}}}var w=t.length;var E=w;if(w){t.push(f)}while(E<r){var x=a;var k=true;var O=false;var N=undefined;try{for(var C=e[Symbol.iterator](),j;!(k=(j=C.next()).done);k=true){var D=j.value;if(D>=n&&D<x){x=D}}}catch(e){O=true;N=e}finally{try{if(!k&&C.return){C.return()}}finally{if(O){throw N}}}var T=E+1;if(x-n>v((a-c)/T)){error$1("overflow")}c+=(x-n)*T;n=x;var R=true;var I=false;var M=undefined;try{for(var A=e[Symbol.iterator](),F;!(R=(F=A.next()).done);R=true){var z=F.value;if(z<n&&++c>a){error$1("overflow")}if(z==n){var V=c;for(var q=s;;q+=s){var K=q<=u?o:q>=u+i?i:q-u;if(V<K){break}var U=V-K;var L=s-K;t.push($(S(K+U%L,0)));V=v(U/L)}t.push($(S(V,0)));u=P(c,T,E==w);c=0;++E}}}catch(e){I=true;M=e}finally{try{if(!R&&A.return){A.return()}}finally{if(I){throw M}}}++c;++n}return t.join("")};var k=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?E(e.slice(4).toLowerCase()):e}))};var O=function toASCII(e){return mapDomain(e,(function(e){return m.test(e)?"xn--"+x(e):e}))};var N={version:"2.1.0",ucs2:{decode:ucs2decode,encode:b},decode:E,encode:x,toASCII:O,toUnicode:k};var C={};function pctEncChar(e){var t=e.charCodeAt(0);var r=void 0;if(t<16)r="%0"+t.toString(16).toUpperCase();else if(t<128)r="%"+t.toString(16).toUpperCase();else if(t<2048)r="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var n=e.length;while(r<n){var a=parseInt(e.substr(r+1,2),16);if(a<128){t+=String.fromCharCode(a);r+=3}else if(a>=194&&a<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((a&31)<<6|s&63)}else{t+=e.substr(r,6)}r+=6}else if(a>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16);var i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((a&15)<<12|(o&63)<<6|i&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var a=n(r,2),s=a[1];if(s){return s.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var a=n(r,3),s=a[1],o=a[2];if(s){var i=s.toLowerCase().split("::").reverse(),c=n(i,2),u=c[0],d=c[1];var l=d?d.split(":").map(_stripLeadingZeros):[];var f=u.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(f[f.length-1]);var m=p?7:8;var h=f.length-m;var y=Array(m);for(var g=0;g<m;++g){y[g]=l[g]||f[h+g]||""}if(p){y[m-1]=_normalizeIPv4(y[m-1],t)}var v=y.reduce((function(e,t,r){if(!t||t==="0"){var n=e[e.length-1];if(n&&n.index+n.length===r){n.length++}else{e.push({index:r,length:1})}}return e}),[]);var $=v.sort((function(e,t){return t.length-e.length}))[0];var b=void 0;if($&&$.length>1){var w=y.slice(0,$.index);var S=y.slice($.index+$.length);b=w.join(":")+"::"+S.join(":")}else{b=y.join(":")}if(o){b+="%"+o}return b}else{return e}}var j=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var D="".match(/(){0}/)[1]===undefined;function parse(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a={};var s=n.iri!==false?r:t;if(n.reference==="suffix")e=(n.scheme?n.scheme+":":"")+"//"+e;var o=e.match(j);if(o){if(D){a.scheme=o[1];a.userinfo=o[3];a.host=o[4];a.port=parseInt(o[5],10);a.path=o[6]||"";a.query=o[7];a.fragment=o[8];if(isNaN(a.port)){a.port=o[5]}}else{a.scheme=o[1]||undefined;a.userinfo=e.indexOf("@")!==-1?o[3]:undefined;a.host=e.indexOf("//")!==-1?o[4]:undefined;a.port=parseInt(o[5],10);a.path=o[6]||"";a.query=e.indexOf("?")!==-1?o[7]:undefined;a.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(a.port)){a.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(a.host){a.host=_normalizeIPv6(_normalizeIPv4(a.host,s),s)}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&!a.path&&a.query===undefined){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(n.reference&&n.reference!=="suffix"&&n.reference!==a.reference){a.error=a.error||"URI is not a "+n.reference+" reference."}var i=C[(n.scheme||a.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)){if(a.host&&(n.domainHost||i&&i.domainHost)){try{a.host=N.toASCII(a.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(a,t)}else{_normalizeComponentEncoding(a,s)}if(i&&i.parse){i.parse(a,n)}}else{a.error=a.error||"URI can not be parsed."}return a}function _recomposeAuthority(e,n){var a=n.iri!==false?r:t;var s=[];if(e.userinfo!==undefined){s.push(e.userinfo);s.push("@")}if(e.host!==undefined){s.push(_normalizeIPv6(_normalizeIPv4(String(e.host),a),a).replace(a.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){s.push(":");s.push(String(e.port))}return s.length?s.join(""):undefined}var T=/^\.\.?\//;var R=/^\/\.(\/|$)/;var I=/^\/\.\.(\/|$)/;var M=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(T)){e=e.replace(T,"")}else if(e.match(R)){e=e.replace(R,"/")}else if(e.match(I)){e=e.replace(I,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(M);if(r){var n=r[0];e=e.slice(n.length);t.push(n)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=n.iri?r:t;var s=[];var o=C[(n.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,n);if(e.host){if(a.IPV6ADDRESS.test(e.host)){}else if(n.domainHost||o&&o.domainHost){try{e.host=!n.iri?N.toASCII(e.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase()):N.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!n.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,a);if(n.reference!=="suffix"&&e.scheme){s.push(e.scheme);s.push(":")}var i=_recomposeAuthority(e,n);if(i!==undefined){if(n.reference!=="suffix"){s.push("//")}s.push(i);if(e.path&&e.path.charAt(0)!=="/"){s.push("/")}}if(e.path!==undefined){var c=e.path;if(!n.absolutePath&&(!o||!o.absolutePath)){c=removeDotSegments(c)}if(i===undefined){c=c.replace(/^\/\//,"/%2F")}s.push(c)}if(e.query!==undefined){s.push("?");s.push(e.query)}if(e.fragment!==undefined){s.push("#");s.push(e.fragment)}return s.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];var a={};if(!n){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){a.scheme=t.scheme;a.userinfo=t.userinfo;a.host=t.host;a.port=t.port;a.path=removeDotSegments(t.path||"");a.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){a.userinfo=t.userinfo;a.host=t.host;a.port=t.port;a.path=removeDotSegments(t.path||"");a.query=t.query}else{if(!t.path){a.path=e.path;if(t.query!==undefined){a.query=t.query}else{a.query=e.query}}else{if(t.path.charAt(0)==="/"){a.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){a.path="/"+t.path}else if(!e.path){a.path=t.path}else{a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}a.path=removeDotSegments(a.path)}a.query=t.query}a.userinfo=e.userinfo;a.host=e.host;a.port=e.port}a.scheme=e.scheme}a.fragment=t.fragment;return a}function resolve(e,t,r){var n=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,n),parse(t,n),n,true),n)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var A={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var F={scheme:"https",domainHost:A.domainHost,parse:A.parse,serialize:A.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var z={scheme:"ws",domainHost:true,parse:function parse(e,t){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,t){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),a=n(r,2),s=a[0],o=a[1];e.path=s&&s!=="/"?s:undefined;e.query=o;e.resourceName=undefined}e.fragment=undefined;return e}};var V={scheme:"wss",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};var q={};var K=true;var U="[A-Za-z0-9\\-\\.\\_\\~"+(K?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var L="[0-9A-Fa-f]";var J=subexp(subexp("%[EFef]"+L+"%"+L+L+"%"+L+L)+"|"+subexp("%[89A-Fa-f]"+L+"%"+L+L)+"|"+subexp("%"+L+L));var H="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var B="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var G=merge(B,'[\\"\\\\]');var Z="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var W=new RegExp(U,"g");var Q=new RegExp(J,"g");var Y=new RegExp(merge("[^]",H,"[\\.]",'[\\"]',G),"g");var X=new RegExp(merge("[^]",U,Z),"g");var ee=X;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(W)?e:t}var te={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var n=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var a=false;var s={};var o=r.query.split("&");for(var i=0,c=o.length;i<c;++i){var u=o[i].split("=");switch(u[0]){case"to":var d=u[1].split(",");for(var l=0,f=d.length;l<f;++l){n.push(d[l])}break;case"subject":r.subject=unescapeComponent(u[1],t);break;case"body":r.body=unescapeComponent(u[1],t);break;default:a=true;s[unescapeComponent(u[0],t)]=unescapeComponent(u[1],t);break}}if(a)r.headers=s}r.query=undefined;for(var p=0,m=n.length;p<m;++p){var h=n[p].split("@");h[0]=unescapeComponent(h[0]);if(!t.unicodeSupport){try{h[1]=N.toASCII(unescapeComponent(h[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{h[1]=unescapeComponent(h[1],t).toLowerCase()}n[p]=h.join("@")}return r},serialize:function serialize$$1(e,t){var r=e;var n=toArray(e.to);if(n){for(var a=0,s=n.length;a<s;++a){var o=String(n[a]);var i=o.lastIndexOf("@");var c=o.slice(0,i).replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(Y,pctEncChar);var u=o.slice(i+1);try{u=!t.iri?N.toASCII(unescapeComponent(u,t).toLowerCase()):N.toUnicode(u)}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(!t.iri?"ASCII":"Unicode")+" via punycode: "+e}n[a]=c+"@"+u}r.path=n.join(",")}var d=e.headers=e.headers||{};if(e.subject)d["subject"]=e.subject;if(e.body)d["body"]=e.body;var l=[];for(var f in d){if(d[f]!==q[f]){l.push(f.replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(X,pctEncChar)+"="+d[f].replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(ee,pctEncChar))}}if(l.length){r.query=l.join("&")}return r}};var re=/^([^\:]+)\:(.*)/;var ne={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(re);var n=e;if(r){var a=t.scheme||n.scheme||"urn";var s=r[1].toLowerCase();var o=r[2];var i=a+":"+(t.nid||s);var c=C[i];n.nid=s;n.nss=o;n.path=undefined;if(c){n=c.parse(n,t)}}else{n.error=n.error||"URN can not be parsed."}return n},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn";var n=e.nid;var a=r+":"+(t.nid||n);var s=C[a];if(s){e=s.serialize(e,t)}var o=e;var i=e.nss;o.path=(n||t.nid)+":"+i;return o}};var ae=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var se={scheme:"urn:uuid",parse:function parse(e,t){var r=e;r.uuid=r.nss;r.nss=undefined;if(!t.tolerant&&(!r.uuid||!r.uuid.match(ae))){r.error=r.error||"UUID is not valid."}return r},serialize:function serialize(e,t){var r=e;r.nss=(e.uuid||"").toLowerCase();return r}};C[A.scheme]=A;C[F.scheme]=F;C[z.scheme]=z;C[V.scheme]=V;C[te.scheme]=te;C[ne.scheme]=ne;C[se.scheme]=se;e.SCHEMES=C;e.pctEncChar=pctEncChar;e.pctDecChars=pctDecChars;e.parse=parse;e.removeDotSegments=removeDotSegments;e.serialize=serialize;e.resolveComponents=resolveComponents;e.resolve=resolve;e.normalize=normalize;e.equal=equal;e.escapeComponent=escapeComponent;e.unescapeComponent=unescapeComponent;Object.defineProperty(e,"__esModule",{value:true})}))},3684:e=>{"use strict";e.exports=require("./package.json")},7718:e=>{"use strict";e.exports=require("@babel/core")},6113:e=>{"use strict";e.exports=require("crypto")},3292:e=>{"use strict";e.exports=require("fs/promises")},7561:e=>{"use strict";e.exports=require("node:fs")},9411:e=>{"use strict";e.exports=require("node:path")},7742:e=>{"use strict";e.exports=require("node:process")},1041:e=>{"use strict";e.exports=require("node:url")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},5496:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},543:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2427:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"cacheDirectory":{"oneOf":[{"type":"boolean"},{"type":"string"}],"default":false},"cacheIdentifier":{"type":"string"},"cacheCompression":{"type":"boolean","default":true},"customize":{"type":"string","default":null}},"additionalProperties":true}')}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var s=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return a.exports}__nccwpck_require__.m=e;(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={179:1};var installChunk=t=>{var r=t.modules,n=t.ids,a=t.runtime;for(var s in r){if(__nccwpck_require__.o(r,s)){__nccwpck_require__.m[s]=r[s]}}if(a)a(__nccwpck_require__);for(var o=0;o<n.length;o++)e[n[o]]=1};__nccwpck_require__.f.require=(t,r)=>{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var r=__nccwpck_require__(2903);module.exports=r})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2014-2019 Luís Couto <hello@luiscouto.pt>
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"babel-loader","author":"Luis Couto <hello@luiscouto.pt>","version":"9.1.3","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/index.d.ts
CHANGED
|
@@ -44,12 +44,20 @@ type PresetReactOptions = AutomaticRuntimePresetReactOptions | ClassicRuntimePre
|
|
|
44
44
|
type BabelConfigUtils = {
|
|
45
45
|
addPlugins: (plugins: PluginItem[]) => void;
|
|
46
46
|
addPresets: (presets: PluginItem[]) => void;
|
|
47
|
-
addIncludes: (includes: string | RegExp | (string | RegExp)[]) => void;
|
|
48
|
-
addExcludes: (excludes: string | RegExp | (string | RegExp)[]) => void;
|
|
49
47
|
removePlugins: (plugins: string | string[]) => void;
|
|
50
48
|
removePresets: (presets: string | string[]) => void;
|
|
51
49
|
modifyPresetEnvOptions: (options: PresetEnvOptions) => void;
|
|
52
50
|
modifyPresetReactOptions: (options: PresetReactOptions) => void;
|
|
51
|
+
/**
|
|
52
|
+
* use `source.include` instead
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
55
|
+
addIncludes: (includes: string | RegExp | (string | RegExp)[]) => void;
|
|
56
|
+
/**
|
|
57
|
+
* use `source.exclude` instead
|
|
58
|
+
* @deprecated
|
|
59
|
+
*/
|
|
60
|
+
addExcludes: (excludes: string | RegExp | (string | RegExp)[]) => void;
|
|
53
61
|
};
|
|
54
62
|
type PluginBabelOptions = ChainedConfigWithUtils<TransformOptions, BabelConfigUtils>;
|
|
55
63
|
|
package/dist/index.js
CHANGED
|
@@ -221,7 +221,7 @@ var pluginBabel = (options = {}) => ({
|
|
|
221
221
|
excludes.forEach((condition) => {
|
|
222
222
|
rule.exclude.add(condition);
|
|
223
223
|
});
|
|
224
|
-
rule.test(import_shared2.SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(require.resolve("babel-loader")).options(babelOptions);
|
|
224
|
+
rule.test(import_shared2.SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(require.resolve("../compiled/babel-loader")).options(babelOptions);
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -202,7 +202,7 @@ var pluginBabel = (options = {}) => ({
|
|
|
202
202
|
excludes.forEach((condition) => {
|
|
203
203
|
rule.exclude.add(condition);
|
|
204
204
|
});
|
|
205
|
-
rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(__require.resolve("babel-loader")).options(babelOptions);
|
|
205
|
+
rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(__require.resolve("../compiled/babel-loader")).options(babelOptions);
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-babel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Babel plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"directory": "packages/plugin-babel"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
|
+
"type": "commonjs",
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
13
14
|
"types": "./dist/index.d.ts",
|
|
@@ -18,21 +19,21 @@
|
|
|
18
19
|
"main": "./dist/index.js",
|
|
19
20
|
"types": "./dist/index.d.ts",
|
|
20
21
|
"files": [
|
|
21
|
-
"dist"
|
|
22
|
+
"dist",
|
|
23
|
+
"compiled"
|
|
22
24
|
],
|
|
23
25
|
"dependencies": {
|
|
24
26
|
"@babel/core": "^7.23.2",
|
|
25
27
|
"@babel/preset-typescript": "^7.23.2",
|
|
26
28
|
"@types/babel__core": "^7.20.3",
|
|
27
|
-
"babel-loader": "9.1.3",
|
|
28
29
|
"upath": "2.0.1",
|
|
29
|
-
"@rsbuild/shared": "0.1.
|
|
30
|
+
"@rsbuild/shared": "0.1.9"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@types/node": "^16",
|
|
33
34
|
"typescript": "^5.3.0",
|
|
34
|
-
"@rsbuild/test-helper": "0.1.
|
|
35
|
-
"@rsbuild/core": "0.1.
|
|
35
|
+
"@rsbuild/test-helper": "0.1.9",
|
|
36
|
+
"@rsbuild/core": "0.1.9"
|
|
36
37
|
},
|
|
37
38
|
"publishConfig": {
|
|
38
39
|
"access": "public",
|