@bonsae/nrg 0.18.4 → 0.18.5

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.
@@ -29,8 +29,8 @@ function Cs() {
29
29
  if (b = n(g[v++]), u = E > v, typeof m[b] > "u" && (Array.isArray(m) && b === "-" && (b = m.length), u && (g[v] !== "" && g[v] < 1 / 0 || g[v] === "-" ? m[b] = [] : m[b] = {})), !u) break;
30
30
  m = m[b];
31
31
  }
32
- var f = m[b];
33
- return N === void 0 ? delete m[b] : m[b] = N, f;
32
+ var l = m[b];
33
+ return N === void 0 ? delete m[b] : m[b] = N, l;
34
34
  }
35
35
  function a(m) {
36
36
  if (typeof m == "string") {
@@ -191,10 +191,10 @@ function Je() {
191
191
  throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`);
192
192
  }
193
193
  e.getEsmExportName = E;
194
- function f(y) {
194
+ function l(y) {
195
195
  return new n(y.toString());
196
196
  }
197
- e.regexpCode = f;
197
+ e.regexpCode = l;
198
198
  })(Zt)), Zt;
199
199
  }
200
200
  var Qt = {}, Er;
@@ -270,8 +270,8 @@ function Sr() {
270
270
  } else
271
271
  E = this._values[u] = /* @__PURE__ */ new Map();
272
272
  E.set(v, b);
273
- const f = this._scope[u] || (this._scope[u] = []), y = f.length;
274
- return f[y] = g.ref, b.setValue(g, { property: u, itemIndex: y }), b;
273
+ const l = this._scope[u] || (this._scope[u] = []), y = l.length;
274
+ return l[y] = g.ref, b.setValue(g, { property: u, itemIndex: y }), b;
275
275
  }
276
276
  getValue(m, g) {
277
277
  const N = this._values[m];
@@ -298,11 +298,11 @@ function Sr() {
298
298
  const E = m[v];
299
299
  if (!E)
300
300
  continue;
301
- const f = N[v] = N[v] || /* @__PURE__ */ new Map();
301
+ const l = N[v] = N[v] || /* @__PURE__ */ new Map();
302
302
  E.forEach((y) => {
303
- if (f.has(y))
303
+ if (l.has(y))
304
304
  return;
305
- f.set(y, n.Started);
305
+ l.set(y, n.Started);
306
306
  let s = g(y);
307
307
  if (s) {
308
308
  const p = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
@@ -311,7 +311,7 @@ function Sr() {
311
311
  u = (0, t._)`${u}${s}${this.opts._n}`;
312
312
  else
313
313
  throw new r(y);
314
- f.set(y, n.Completed);
314
+ l.set(y, n.Completed);
315
315
  });
316
316
  }
317
317
  return u;
@@ -368,164 +368,164 @@ function Y() {
368
368
  optimizeNodes() {
369
369
  return this;
370
370
  }
371
- optimizeNames(l, S) {
371
+ optimizeNames(f, S) {
372
372
  return this;
373
373
  }
374
374
  }
375
375
  class o extends a {
376
- constructor(l, S, q) {
377
- super(), this.varKind = l, this.name = S, this.rhs = q;
376
+ constructor(f, S, q) {
377
+ super(), this.varKind = f, this.name = S, this.rhs = q;
378
378
  }
379
- render({ es5: l, _n: S }) {
380
- const q = l ? r.varKinds.var : this.varKind, F = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
379
+ render({ es5: f, _n: S }) {
380
+ const q = f ? r.varKinds.var : this.varKind, F = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
381
381
  return `${q} ${this.name}${F};` + S;
382
382
  }
383
- optimizeNames(l, S) {
384
- if (l[this.name.str])
385
- return this.rhs && (this.rhs = B(this.rhs, l, S)), this;
383
+ optimizeNames(f, S) {
384
+ if (f[this.name.str])
385
+ return this.rhs && (this.rhs = B(this.rhs, f, S)), this;
386
386
  }
387
387
  get names() {
388
388
  return this.rhs instanceof t._CodeOrName ? this.rhs.names : {};
389
389
  }
390
390
  }
391
391
  class i extends a {
392
- constructor(l, S, q) {
393
- super(), this.lhs = l, this.rhs = S, this.sideEffects = q;
392
+ constructor(f, S, q) {
393
+ super(), this.lhs = f, this.rhs = S, this.sideEffects = q;
394
394
  }
395
- render({ _n: l }) {
396
- return `${this.lhs} = ${this.rhs};` + l;
395
+ render({ _n: f }) {
396
+ return `${this.lhs} = ${this.rhs};` + f;
397
397
  }
398
- optimizeNames(l, S) {
399
- if (!(this.lhs instanceof t.Name && !l[this.lhs.str] && !this.sideEffects))
400
- return this.rhs = B(this.rhs, l, S), this;
398
+ optimizeNames(f, S) {
399
+ if (!(this.lhs instanceof t.Name && !f[this.lhs.str] && !this.sideEffects))
400
+ return this.rhs = B(this.rhs, f, S), this;
401
401
  }
402
402
  get names() {
403
- const l = this.lhs instanceof t.Name ? {} : { ...this.lhs.names };
404
- return K(l, this.rhs);
403
+ const f = this.lhs instanceof t.Name ? {} : { ...this.lhs.names };
404
+ return K(f, this.rhs);
405
405
  }
406
406
  }
407
407
  class h extends i {
408
- constructor(l, S, q, F) {
409
- super(l, q, F), this.op = S;
408
+ constructor(f, S, q, F) {
409
+ super(f, q, F), this.op = S;
410
410
  }
411
- render({ _n: l }) {
412
- return `${this.lhs} ${this.op}= ${this.rhs};` + l;
411
+ render({ _n: f }) {
412
+ return `${this.lhs} ${this.op}= ${this.rhs};` + f;
413
413
  }
414
414
  }
415
415
  class m extends a {
416
- constructor(l) {
417
- super(), this.label = l, this.names = {};
416
+ constructor(f) {
417
+ super(), this.label = f, this.names = {};
418
418
  }
419
- render({ _n: l }) {
420
- return `${this.label}:` + l;
419
+ render({ _n: f }) {
420
+ return `${this.label}:` + f;
421
421
  }
422
422
  }
423
423
  class g extends a {
424
- constructor(l) {
425
- super(), this.label = l, this.names = {};
424
+ constructor(f) {
425
+ super(), this.label = f, this.names = {};
426
426
  }
427
- render({ _n: l }) {
428
- return `break${this.label ? ` ${this.label}` : ""};` + l;
427
+ render({ _n: f }) {
428
+ return `break${this.label ? ` ${this.label}` : ""};` + f;
429
429
  }
430
430
  }
431
431
  class N extends a {
432
- constructor(l) {
433
- super(), this.error = l;
432
+ constructor(f) {
433
+ super(), this.error = f;
434
434
  }
435
- render({ _n: l }) {
436
- return `throw ${this.error};` + l;
435
+ render({ _n: f }) {
436
+ return `throw ${this.error};` + f;
437
437
  }
438
438
  get names() {
439
439
  return this.error.names;
440
440
  }
441
441
  }
442
442
  class b extends a {
443
- constructor(l) {
444
- super(), this.code = l;
443
+ constructor(f) {
444
+ super(), this.code = f;
445
445
  }
446
- render({ _n: l }) {
447
- return `${this.code};` + l;
446
+ render({ _n: f }) {
447
+ return `${this.code};` + f;
448
448
  }
449
449
  optimizeNodes() {
450
450
  return `${this.code}` ? this : void 0;
451
451
  }
452
- optimizeNames(l, S) {
453
- return this.code = B(this.code, l, S), this;
452
+ optimizeNames(f, S) {
453
+ return this.code = B(this.code, f, S), this;
454
454
  }
455
455
  get names() {
456
456
  return this.code instanceof t._CodeOrName ? this.code.names : {};
457
457
  }
458
458
  }
459
459
  class u extends a {
460
- constructor(l = []) {
461
- super(), this.nodes = l;
460
+ constructor(f = []) {
461
+ super(), this.nodes = f;
462
462
  }
463
- render(l) {
464
- return this.nodes.reduce((S, q) => S + q.render(l), "");
463
+ render(f) {
464
+ return this.nodes.reduce((S, q) => S + q.render(f), "");
465
465
  }
466
466
  optimizeNodes() {
467
- const { nodes: l } = this;
468
- let S = l.length;
467
+ const { nodes: f } = this;
468
+ let S = f.length;
469
469
  for (; S--; ) {
470
- const q = l[S].optimizeNodes();
471
- Array.isArray(q) ? l.splice(S, 1, ...q) : q ? l[S] = q : l.splice(S, 1);
470
+ const q = f[S].optimizeNodes();
471
+ Array.isArray(q) ? f.splice(S, 1, ...q) : q ? f[S] = q : f.splice(S, 1);
472
472
  }
473
- return l.length > 0 ? this : void 0;
473
+ return f.length > 0 ? this : void 0;
474
474
  }
475
- optimizeNames(l, S) {
475
+ optimizeNames(f, S) {
476
476
  const { nodes: q } = this;
477
477
  let F = q.length;
478
478
  for (; F--; ) {
479
479
  const z = q[F];
480
- z.optimizeNames(l, S) || (x(l, z.names), q.splice(F, 1));
480
+ z.optimizeNames(f, S) || (x(f, z.names), q.splice(F, 1));
481
481
  }
482
482
  return q.length > 0 ? this : void 0;
483
483
  }
484
484
  get names() {
485
- return this.nodes.reduce((l, S) => L(l, S.names), {});
485
+ return this.nodes.reduce((f, S) => L(f, S.names), {});
486
486
  }
487
487
  }
488
488
  class v extends u {
489
- render(l) {
490
- return "{" + l._n + super.render(l) + "}" + l._n;
489
+ render(f) {
490
+ return "{" + f._n + super.render(f) + "}" + f._n;
491
491
  }
492
492
  }
493
493
  class E extends u {
494
494
  }
495
- class f extends v {
495
+ class l extends v {
496
496
  }
497
- f.kind = "else";
497
+ l.kind = "else";
498
498
  class y extends v {
499
- constructor(l, S) {
500
- super(S), this.condition = l;
499
+ constructor(f, S) {
500
+ super(S), this.condition = f;
501
501
  }
502
- render(l) {
503
- let S = `if(${this.condition})` + super.render(l);
504
- return this.else && (S += "else " + this.else.render(l)), S;
502
+ render(f) {
503
+ let S = `if(${this.condition})` + super.render(f);
504
+ return this.else && (S += "else " + this.else.render(f)), S;
505
505
  }
506
506
  optimizeNodes() {
507
507
  super.optimizeNodes();
508
- const l = this.condition;
509
- if (l === !0)
508
+ const f = this.condition;
509
+ if (f === !0)
510
510
  return this.nodes;
511
511
  let S = this.else;
512
512
  if (S) {
513
513
  const q = S.optimizeNodes();
514
- S = this.else = Array.isArray(q) ? new f(q) : q;
514
+ S = this.else = Array.isArray(q) ? new l(q) : q;
515
515
  }
516
516
  if (S)
517
- return l === !1 ? S instanceof y ? S : S.nodes : this.nodes.length ? this : new y(se(l), S instanceof y ? [S] : S.nodes);
518
- if (!(l === !1 || !this.nodes.length))
517
+ return f === !1 ? S instanceof y ? S : S.nodes : this.nodes.length ? this : new y(se(f), S instanceof y ? [S] : S.nodes);
518
+ if (!(f === !1 || !this.nodes.length))
519
519
  return this;
520
520
  }
521
- optimizeNames(l, S) {
521
+ optimizeNames(f, S) {
522
522
  var q;
523
- if (this.else = (q = this.else) === null || q === void 0 ? void 0 : q.optimizeNames(l, S), !!(super.optimizeNames(l, S) || this.else))
524
- return this.condition = B(this.condition, l, S), this;
523
+ if (this.else = (q = this.else) === null || q === void 0 ? void 0 : q.optimizeNames(f, S), !!(super.optimizeNames(f, S) || this.else))
524
+ return this.condition = B(this.condition, f, S), this;
525
525
  }
526
526
  get names() {
527
- const l = super.names;
528
- return K(l, this.condition), this.else && L(l, this.else.names), l;
527
+ const f = super.names;
528
+ return K(f, this.condition), this.else && L(f, this.else.names), f;
529
529
  }
530
530
  }
531
531
  y.kind = "if";
@@ -533,166 +533,166 @@ function Y() {
533
533
  }
534
534
  s.kind = "for";
535
535
  class p extends s {
536
- constructor(l) {
537
- super(), this.iteration = l;
536
+ constructor(f) {
537
+ super(), this.iteration = f;
538
538
  }
539
- render(l) {
540
- return `for(${this.iteration})` + super.render(l);
539
+ render(f) {
540
+ return `for(${this.iteration})` + super.render(f);
541
541
  }
542
- optimizeNames(l, S) {
543
- if (super.optimizeNames(l, S))
544
- return this.iteration = B(this.iteration, l, S), this;
542
+ optimizeNames(f, S) {
543
+ if (super.optimizeNames(f, S))
544
+ return this.iteration = B(this.iteration, f, S), this;
545
545
  }
546
546
  get names() {
547
547
  return L(super.names, this.iteration.names);
548
548
  }
549
549
  }
550
550
  class w extends s {
551
- constructor(l, S, q, F) {
552
- super(), this.varKind = l, this.name = S, this.from = q, this.to = F;
551
+ constructor(f, S, q, F) {
552
+ super(), this.varKind = f, this.name = S, this.from = q, this.to = F;
553
553
  }
554
- render(l) {
555
- const S = l.es5 ? r.varKinds.var : this.varKind, { name: q, from: F, to: z } = this;
556
- return `for(${S} ${q}=${F}; ${q}<${z}; ${q}++)` + super.render(l);
554
+ render(f) {
555
+ const S = f.es5 ? r.varKinds.var : this.varKind, { name: q, from: F, to: z } = this;
556
+ return `for(${S} ${q}=${F}; ${q}<${z}; ${q}++)` + super.render(f);
557
557
  }
558
558
  get names() {
559
- const l = K(super.names, this.from);
560
- return K(l, this.to);
559
+ const f = K(super.names, this.from);
560
+ return K(f, this.to);
561
561
  }
562
562
  }
563
563
  class d extends s {
564
- constructor(l, S, q, F) {
565
- super(), this.loop = l, this.varKind = S, this.name = q, this.iterable = F;
564
+ constructor(f, S, q, F) {
565
+ super(), this.loop = f, this.varKind = S, this.name = q, this.iterable = F;
566
566
  }
567
- render(l) {
568
- return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(l);
567
+ render(f) {
568
+ return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(f);
569
569
  }
570
- optimizeNames(l, S) {
571
- if (super.optimizeNames(l, S))
572
- return this.iterable = B(this.iterable, l, S), this;
570
+ optimizeNames(f, S) {
571
+ if (super.optimizeNames(f, S))
572
+ return this.iterable = B(this.iterable, f, S), this;
573
573
  }
574
574
  get names() {
575
575
  return L(super.names, this.iterable.names);
576
576
  }
577
577
  }
578
578
  class _ extends v {
579
- constructor(l, S, q) {
580
- super(), this.name = l, this.args = S, this.async = q;
579
+ constructor(f, S, q) {
580
+ super(), this.name = f, this.args = S, this.async = q;
581
581
  }
582
- render(l) {
583
- return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(l);
582
+ render(f) {
583
+ return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(f);
584
584
  }
585
585
  }
586
586
  _.kind = "func";
587
587
  class P extends u {
588
- render(l) {
589
- return "return " + super.render(l);
588
+ render(f) {
589
+ return "return " + super.render(f);
590
590
  }
591
591
  }
592
592
  P.kind = "return";
593
593
  class T extends v {
594
- render(l) {
595
- let S = "try" + super.render(l);
596
- return this.catch && (S += this.catch.render(l)), this.finally && (S += this.finally.render(l)), S;
594
+ render(f) {
595
+ let S = "try" + super.render(f);
596
+ return this.catch && (S += this.catch.render(f)), this.finally && (S += this.finally.render(f)), S;
597
597
  }
598
598
  optimizeNodes() {
599
- var l, S;
600
- return super.optimizeNodes(), (l = this.catch) === null || l === void 0 || l.optimizeNodes(), (S = this.finally) === null || S === void 0 || S.optimizeNodes(), this;
599
+ var f, S;
600
+ return super.optimizeNodes(), (f = this.catch) === null || f === void 0 || f.optimizeNodes(), (S = this.finally) === null || S === void 0 || S.optimizeNodes(), this;
601
601
  }
602
- optimizeNames(l, S) {
602
+ optimizeNames(f, S) {
603
603
  var q, F;
604
- return super.optimizeNames(l, S), (q = this.catch) === null || q === void 0 || q.optimizeNames(l, S), (F = this.finally) === null || F === void 0 || F.optimizeNames(l, S), this;
604
+ return super.optimizeNames(f, S), (q = this.catch) === null || q === void 0 || q.optimizeNames(f, S), (F = this.finally) === null || F === void 0 || F.optimizeNames(f, S), this;
605
605
  }
606
606
  get names() {
607
- const l = super.names;
608
- return this.catch && L(l, this.catch.names), this.finally && L(l, this.finally.names), l;
607
+ const f = super.names;
608
+ return this.catch && L(f, this.catch.names), this.finally && L(f, this.finally.names), f;
609
609
  }
610
610
  }
611
611
  class D extends v {
612
- constructor(l) {
613
- super(), this.error = l;
612
+ constructor(f) {
613
+ super(), this.error = f;
614
614
  }
615
- render(l) {
616
- return `catch(${this.error})` + super.render(l);
615
+ render(f) {
616
+ return `catch(${this.error})` + super.render(f);
617
617
  }
618
618
  }
619
619
  D.kind = "catch";
620
620
  class U extends v {
621
- render(l) {
622
- return "finally" + super.render(l);
621
+ render(f) {
622
+ return "finally" + super.render(f);
623
623
  }
624
624
  }
625
625
  U.kind = "finally";
626
626
  class A {
627
- constructor(l, S = {}) {
627
+ constructor(f, S = {}) {
628
628
  this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...S, _n: S.lines ? `
629
- ` : "" }, this._extScope = l, this._scope = new r.Scope({ parent: l }), this._nodes = [new E()];
629
+ ` : "" }, this._extScope = f, this._scope = new r.Scope({ parent: f }), this._nodes = [new E()];
630
630
  }
631
631
  toString() {
632
632
  return this._root.render(this.opts);
633
633
  }
634
634
  // returns unique name in the internal scope
635
- name(l) {
636
- return this._scope.name(l);
635
+ name(f) {
636
+ return this._scope.name(f);
637
637
  }
638
638
  // reserves unique name in the external scope
639
- scopeName(l) {
640
- return this._extScope.name(l);
639
+ scopeName(f) {
640
+ return this._extScope.name(f);
641
641
  }
642
642
  // reserves unique name in the external scope and assigns value to it
643
- scopeValue(l, S) {
644
- const q = this._extScope.value(l, S);
643
+ scopeValue(f, S) {
644
+ const q = this._extScope.value(f, S);
645
645
  return (this._values[q.prefix] || (this._values[q.prefix] = /* @__PURE__ */ new Set())).add(q), q;
646
646
  }
647
- getScopeValue(l, S) {
648
- return this._extScope.getValue(l, S);
647
+ getScopeValue(f, S) {
648
+ return this._extScope.getValue(f, S);
649
649
  }
650
650
  // return code that assigns values in the external scope to the names that are used internally
651
651
  // (same names that were returned by gen.scopeName or gen.scopeValue)
652
- scopeRefs(l) {
653
- return this._extScope.scopeRefs(l, this._values);
652
+ scopeRefs(f) {
653
+ return this._extScope.scopeRefs(f, this._values);
654
654
  }
655
655
  scopeCode() {
656
656
  return this._extScope.scopeCode(this._values);
657
657
  }
658
- _def(l, S, q, F) {
658
+ _def(f, S, q, F) {
659
659
  const z = this._scope.toName(S);
660
- return q !== void 0 && F && (this._constants[z.str] = q), this._leafNode(new o(l, z, q)), z;
660
+ return q !== void 0 && F && (this._constants[z.str] = q), this._leafNode(new o(f, z, q)), z;
661
661
  }
662
662
  // `const` declaration (`var` in es5 mode)
663
- const(l, S, q) {
664
- return this._def(r.varKinds.const, l, S, q);
663
+ const(f, S, q) {
664
+ return this._def(r.varKinds.const, f, S, q);
665
665
  }
666
666
  // `let` declaration with optional assignment (`var` in es5 mode)
667
- let(l, S, q) {
668
- return this._def(r.varKinds.let, l, S, q);
667
+ let(f, S, q) {
668
+ return this._def(r.varKinds.let, f, S, q);
669
669
  }
670
670
  // `var` declaration with optional assignment
671
- var(l, S, q) {
672
- return this._def(r.varKinds.var, l, S, q);
671
+ var(f, S, q) {
672
+ return this._def(r.varKinds.var, f, S, q);
673
673
  }
674
674
  // assignment code
675
- assign(l, S, q) {
676
- return this._leafNode(new i(l, S, q));
675
+ assign(f, S, q) {
676
+ return this._leafNode(new i(f, S, q));
677
677
  }
678
678
  // `+=` code
679
- add(l, S) {
680
- return this._leafNode(new h(l, e.operators.ADD, S));
679
+ add(f, S) {
680
+ return this._leafNode(new h(f, e.operators.ADD, S));
681
681
  }
682
682
  // appends passed SafeExpr to code or executes Block
683
- code(l) {
684
- return typeof l == "function" ? l() : l !== t.nil && this._leafNode(new b(l)), this;
683
+ code(f) {
684
+ return typeof f == "function" ? f() : f !== t.nil && this._leafNode(new b(f)), this;
685
685
  }
686
686
  // returns code for object literal for the passed argument list of key-value pairs
687
- object(...l) {
687
+ object(...f) {
688
688
  const S = ["{"];
689
- for (const [q, F] of l)
689
+ for (const [q, F] of f)
690
690
  S.length > 1 && S.push(","), S.push(q), (q !== F || this.opts.es5) && (S.push(":"), (0, t.addCodeArg)(S, F));
691
691
  return S.push("}"), new t._Code(S);
692
692
  }
693
693
  // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
694
- if(l, S, q) {
695
- if (this._blockNode(new y(l)), S && q)
694
+ if(f, S, q) {
695
+ if (this._blockNode(new y(f)), S && q)
696
696
  this.code(S).else().code(q).endIf();
697
697
  else if (S)
698
698
  this.code(S).endIf();
@@ -701,32 +701,32 @@ function Y() {
701
701
  return this;
702
702
  }
703
703
  // `else if` clause - invalid without `if` or after `else` clauses
704
- elseIf(l) {
705
- return this._elseNode(new y(l));
704
+ elseIf(f) {
705
+ return this._elseNode(new y(f));
706
706
  }
707
707
  // `else` clause - only valid after `if` or `else if` clauses
708
708
  else() {
709
- return this._elseNode(new f());
709
+ return this._elseNode(new l());
710
710
  }
711
711
  // end `if` statement (needed if gen.if was used only with condition)
712
712
  endIf() {
713
- return this._endBlockNode(y, f);
713
+ return this._endBlockNode(y, l);
714
714
  }
715
- _for(l, S) {
716
- return this._blockNode(l), S && this.code(S).endFor(), this;
715
+ _for(f, S) {
716
+ return this._blockNode(f), S && this.code(S).endFor(), this;
717
717
  }
718
718
  // a generic `for` clause (or statement if `forBody` is passed)
719
- for(l, S) {
720
- return this._for(new p(l), S);
719
+ for(f, S) {
720
+ return this._for(new p(f), S);
721
721
  }
722
722
  // `for` statement for a range of values
723
- forRange(l, S, q, F, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
724
- const H = this._scope.toName(l);
723
+ forRange(f, S, q, F, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
724
+ const H = this._scope.toName(f);
725
725
  return this._for(new w(z, H, S, q), () => F(H));
726
726
  }
727
727
  // `for-of` statement (in es5 mode replace with a normal for loop)
728
- forOf(l, S, q, F = r.varKinds.const) {
729
- const z = this._scope.toName(l);
728
+ forOf(f, S, q, F = r.varKinds.const) {
729
+ const z = this._scope.toName(f);
730
730
  if (this.opts.es5) {
731
731
  const H = S instanceof t.Name ? S : this.var("_arr", S);
732
732
  return this.forRange("_i", 0, (0, t._)`${H}.length`, (G) => {
@@ -737,10 +737,10 @@ function Y() {
737
737
  }
738
738
  // `for-in` statement.
739
739
  // With option `ownProperties` replaced with a `for-of` loop for object keys
740
- forIn(l, S, q, F = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
740
+ forIn(f, S, q, F = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
741
741
  if (this.opts.ownProperties)
742
- return this.forOf(l, (0, t._)`Object.keys(${S})`, q);
743
- const z = this._scope.toName(l);
742
+ return this.forOf(f, (0, t._)`Object.keys(${S})`, q);
743
+ const z = this._scope.toName(f);
744
744
  return this._for(new d("in", F, z, S), () => q(z));
745
745
  }
746
746
  // end `for` loop
@@ -748,101 +748,101 @@ function Y() {
748
748
  return this._endBlockNode(s);
749
749
  }
750
750
  // `label` statement
751
- label(l) {
752
- return this._leafNode(new m(l));
751
+ label(f) {
752
+ return this._leafNode(new m(f));
753
753
  }
754
754
  // `break` statement
755
- break(l) {
756
- return this._leafNode(new g(l));
755
+ break(f) {
756
+ return this._leafNode(new g(f));
757
757
  }
758
758
  // `return` statement
759
- return(l) {
759
+ return(f) {
760
760
  const S = new P();
761
- if (this._blockNode(S), this.code(l), S.nodes.length !== 1)
761
+ if (this._blockNode(S), this.code(f), S.nodes.length !== 1)
762
762
  throw new Error('CodeGen: "return" should have one node');
763
763
  return this._endBlockNode(P);
764
764
  }
765
765
  // `try` statement
766
- try(l, S, q) {
766
+ try(f, S, q) {
767
767
  if (!S && !q)
768
768
  throw new Error('CodeGen: "try" without "catch" and "finally"');
769
769
  const F = new T();
770
- if (this._blockNode(F), this.code(l), S) {
770
+ if (this._blockNode(F), this.code(f), S) {
771
771
  const z = this.name("e");
772
772
  this._currNode = F.catch = new D(z), S(z);
773
773
  }
774
774
  return q && (this._currNode = F.finally = new U(), this.code(q)), this._endBlockNode(D, U);
775
775
  }
776
776
  // `throw` statement
777
- throw(l) {
778
- return this._leafNode(new N(l));
777
+ throw(f) {
778
+ return this._leafNode(new N(f));
779
779
  }
780
780
  // start self-balancing block
781
- block(l, S) {
782
- return this._blockStarts.push(this._nodes.length), l && this.code(l).endBlock(S), this;
781
+ block(f, S) {
782
+ return this._blockStarts.push(this._nodes.length), f && this.code(f).endBlock(S), this;
783
783
  }
784
784
  // end the current self-balancing block
785
- endBlock(l) {
785
+ endBlock(f) {
786
786
  const S = this._blockStarts.pop();
787
787
  if (S === void 0)
788
788
  throw new Error("CodeGen: not in self-balancing block");
789
789
  const q = this._nodes.length - S;
790
- if (q < 0 || l !== void 0 && q !== l)
791
- throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${l} expected`);
790
+ if (q < 0 || f !== void 0 && q !== f)
791
+ throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${f} expected`);
792
792
  return this._nodes.length = S, this;
793
793
  }
794
794
  // `function` heading (or definition if funcBody is passed)
795
- func(l, S = t.nil, q, F) {
796
- return this._blockNode(new _(l, S, q)), F && this.code(F).endFunc(), this;
795
+ func(f, S = t.nil, q, F) {
796
+ return this._blockNode(new _(f, S, q)), F && this.code(F).endFunc(), this;
797
797
  }
798
798
  // end function definition
799
799
  endFunc() {
800
800
  return this._endBlockNode(_);
801
801
  }
802
- optimize(l = 1) {
803
- for (; l-- > 0; )
802
+ optimize(f = 1) {
803
+ for (; f-- > 0; )
804
804
  this._root.optimizeNodes(), this._root.optimizeNames(this._root.names, this._constants);
805
805
  }
806
- _leafNode(l) {
807
- return this._currNode.nodes.push(l), this;
806
+ _leafNode(f) {
807
+ return this._currNode.nodes.push(f), this;
808
808
  }
809
- _blockNode(l) {
810
- this._currNode.nodes.push(l), this._nodes.push(l);
809
+ _blockNode(f) {
810
+ this._currNode.nodes.push(f), this._nodes.push(f);
811
811
  }
812
- _endBlockNode(l, S) {
812
+ _endBlockNode(f, S) {
813
813
  const q = this._currNode;
814
- if (q instanceof l || S && q instanceof S)
814
+ if (q instanceof f || S && q instanceof S)
815
815
  return this._nodes.pop(), this;
816
- throw new Error(`CodeGen: not in block "${S ? `${l.kind}/${S.kind}` : l.kind}"`);
816
+ throw new Error(`CodeGen: not in block "${S ? `${f.kind}/${S.kind}` : f.kind}"`);
817
817
  }
818
- _elseNode(l) {
818
+ _elseNode(f) {
819
819
  const S = this._currNode;
820
820
  if (!(S instanceof y))
821
821
  throw new Error('CodeGen: "else" without "if"');
822
- return this._currNode = S.else = l, this;
822
+ return this._currNode = S.else = f, this;
823
823
  }
824
824
  get _root() {
825
825
  return this._nodes[0];
826
826
  }
827
827
  get _currNode() {
828
- const l = this._nodes;
829
- return l[l.length - 1];
828
+ const f = this._nodes;
829
+ return f[f.length - 1];
830
830
  }
831
- set _currNode(l) {
831
+ set _currNode(f) {
832
832
  const S = this._nodes;
833
- S[S.length - 1] = l;
833
+ S[S.length - 1] = f;
834
834
  }
835
835
  }
836
836
  e.CodeGen = A;
837
- function L(O, l) {
838
- for (const S in l)
839
- O[S] = (O[S] || 0) + (l[S] || 0);
837
+ function L(O, f) {
838
+ for (const S in f)
839
+ O[S] = (O[S] || 0) + (f[S] || 0);
840
840
  return O;
841
841
  }
842
- function K(O, l) {
843
- return l instanceof t._CodeOrName ? L(O, l.names) : O;
842
+ function K(O, f) {
843
+ return f instanceof t._CodeOrName ? L(O, f.names) : O;
844
844
  }
845
- function B(O, l, S) {
845
+ function B(O, f, S) {
846
846
  if (O instanceof t.Name)
847
847
  return q(O);
848
848
  if (!F(O))
@@ -850,15 +850,15 @@ function Y() {
850
850
  return new t._Code(O._items.reduce((z, H) => (H instanceof t.Name && (H = q(H)), H instanceof t._Code ? z.push(...H._items) : z.push(H), z), []));
851
851
  function q(z) {
852
852
  const H = S[z.str];
853
- return H === void 0 || l[z.str] !== 1 ? z : (delete l[z.str], H);
853
+ return H === void 0 || f[z.str] !== 1 ? z : (delete f[z.str], H);
854
854
  }
855
855
  function F(z) {
856
- return z instanceof t._Code && z._items.some((H) => H instanceof t.Name && l[H.str] === 1 && S[H.str] !== void 0);
856
+ return z instanceof t._Code && z._items.some((H) => H instanceof t.Name && f[H.str] === 1 && S[H.str] !== void 0);
857
857
  }
858
858
  }
859
- function x(O, l) {
860
- for (const S in l)
861
- O[S] = (O[S] || 0) - (l[S] || 0);
859
+ function x(O, f) {
860
+ for (const S in f)
861
+ O[S] = (O[S] || 0) - (f[S] || 0);
862
862
  }
863
863
  function se(O) {
864
864
  return typeof O == "boolean" || typeof O == "number" || O === null ? !O : (0, t._)`!${k(O)}`;
@@ -875,7 +875,7 @@ function Y() {
875
875
  }
876
876
  e.or = M;
877
877
  function j(O) {
878
- return (l, S) => l === t.nil ? S : S === t.nil ? l : (0, t._)`${k(l)} ${O} ${k(S)}`;
878
+ return (f, S) => f === t.nil ? S : S === t.nil ? f : (0, t._)`${k(f)} ${O} ${k(S)}`;
879
879
  }
880
880
  function k(O) {
881
881
  return O instanceof t.Name ? O : (0, t._)`(${O})`;
@@ -994,11 +994,11 @@ function X() {
994
994
  Object.keys(P).forEach((T) => d.assign((0, e._)`${_}${(0, e.getProperty)(T)}`, !0));
995
995
  }
996
996
  Z.setEvaluated = E;
997
- const f = {};
997
+ const l = {};
998
998
  function y(d, _) {
999
999
  return d.scopeValue("func", {
1000
1000
  ref: _,
1001
- code: f[_.code] || (f[_.code] = new t._Code(_.code))
1001
+ code: l[_.code] || (l[_.code] = new t._Code(_.code))
1002
1002
  });
1003
1003
  }
1004
1004
  Z.useFunc = y;
@@ -1064,40 +1064,40 @@ function Ye() {
1064
1064
  Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
1065
1065
  const t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ X(), n = /* @__PURE__ */ Ne();
1066
1066
  e.keywordError = {
1067
- message: ({ keyword: f }) => (0, t.str)`must pass "${f}" keyword validation`
1067
+ message: ({ keyword: l }) => (0, t.str)`must pass "${l}" keyword validation`
1068
1068
  }, e.keyword$DataError = {
1069
- message: ({ keyword: f, schemaType: y }) => y ? (0, t.str)`"${f}" keyword must be ${y} ($data)` : (0, t.str)`"${f}" keyword is invalid ($data)`
1069
+ message: ({ keyword: l, schemaType: y }) => y ? (0, t.str)`"${l}" keyword must be ${y} ($data)` : (0, t.str)`"${l}" keyword is invalid ($data)`
1070
1070
  };
1071
- function c(f, y = e.keywordError, s, p) {
1072
- const { it: w } = f, { gen: d, compositeRule: _, allErrors: P } = w, T = N(f, y, s);
1071
+ function c(l, y = e.keywordError, s, p) {
1072
+ const { it: w } = l, { gen: d, compositeRule: _, allErrors: P } = w, T = N(l, y, s);
1073
1073
  p ?? (_ || P) ? h(d, T) : m(w, (0, t._)`[${T}]`);
1074
1074
  }
1075
1075
  e.reportError = c;
1076
- function a(f, y = e.keywordError, s) {
1077
- const { it: p } = f, { gen: w, compositeRule: d, allErrors: _ } = p, P = N(f, y, s);
1076
+ function a(l, y = e.keywordError, s) {
1077
+ const { it: p } = l, { gen: w, compositeRule: d, allErrors: _ } = p, P = N(l, y, s);
1078
1078
  h(w, P), d || _ || m(p, n.default.vErrors);
1079
1079
  }
1080
1080
  e.reportExtraError = a;
1081
- function o(f, y) {
1082
- f.assign(n.default.errors, y), f.if((0, t._)`${n.default.vErrors} !== null`, () => f.if(y, () => f.assign((0, t._)`${n.default.vErrors}.length`, y), () => f.assign(n.default.vErrors, null)));
1081
+ function o(l, y) {
1082
+ l.assign(n.default.errors, y), l.if((0, t._)`${n.default.vErrors} !== null`, () => l.if(y, () => l.assign((0, t._)`${n.default.vErrors}.length`, y), () => l.assign(n.default.vErrors, null)));
1083
1083
  }
1084
1084
  e.resetErrorsCount = o;
1085
- function i({ gen: f, keyword: y, schemaValue: s, data: p, errsCount: w, it: d }) {
1085
+ function i({ gen: l, keyword: y, schemaValue: s, data: p, errsCount: w, it: d }) {
1086
1086
  if (w === void 0)
1087
1087
  throw new Error("ajv implementation error");
1088
- const _ = f.name("err");
1089
- f.forRange("i", w, n.default.errors, (P) => {
1090
- f.const(_, (0, t._)`${n.default.vErrors}[${P}]`), f.if((0, t._)`${_}.instancePath === undefined`, () => f.assign((0, t._)`${_}.instancePath`, (0, t.strConcat)(n.default.instancePath, d.errorPath))), f.assign((0, t._)`${_}.schemaPath`, (0, t.str)`${d.errSchemaPath}/${y}`), d.opts.verbose && (f.assign((0, t._)`${_}.schema`, s), f.assign((0, t._)`${_}.data`, p));
1088
+ const _ = l.name("err");
1089
+ l.forRange("i", w, n.default.errors, (P) => {
1090
+ l.const(_, (0, t._)`${n.default.vErrors}[${P}]`), l.if((0, t._)`${_}.instancePath === undefined`, () => l.assign((0, t._)`${_}.instancePath`, (0, t.strConcat)(n.default.instancePath, d.errorPath))), l.assign((0, t._)`${_}.schemaPath`, (0, t.str)`${d.errSchemaPath}/${y}`), d.opts.verbose && (l.assign((0, t._)`${_}.schema`, s), l.assign((0, t._)`${_}.data`, p));
1091
1091
  });
1092
1092
  }
1093
1093
  e.extendErrors = i;
1094
- function h(f, y) {
1095
- const s = f.const("err", y);
1096
- f.if((0, t._)`${n.default.vErrors} === null`, () => f.assign(n.default.vErrors, (0, t._)`[${s}]`), (0, t._)`${n.default.vErrors}.push(${s})`), f.code((0, t._)`${n.default.errors}++`);
1094
+ function h(l, y) {
1095
+ const s = l.const("err", y);
1096
+ l.if((0, t._)`${n.default.vErrors} === null`, () => l.assign(n.default.vErrors, (0, t._)`[${s}]`), (0, t._)`${n.default.vErrors}.push(${s})`), l.code((0, t._)`${n.default.errors}++`);
1097
1097
  }
1098
- function m(f, y) {
1099
- const { gen: s, validateName: p, schemaEnv: w } = f;
1100
- w.$async ? s.throw((0, t._)`new ${f.ValidationError}(${y})`) : (s.assign((0, t._)`${p}.errors`, y), s.return(!1));
1098
+ function m(l, y) {
1099
+ const { gen: s, validateName: p, schemaEnv: w } = l;
1100
+ w.$async ? s.throw((0, t._)`new ${l.ValidationError}(${y})`) : (s.assign((0, t._)`${p}.errors`, y), s.return(!1));
1101
1101
  }
1102
1102
  const g = {
1103
1103
  keyword: new t.Name("keyword"),
@@ -1109,28 +1109,28 @@ function Ye() {
1109
1109
  schema: new t.Name("schema"),
1110
1110
  parentSchema: new t.Name("parentSchema")
1111
1111
  };
1112
- function N(f, y, s) {
1113
- const { createErrors: p } = f.it;
1114
- return p === !1 ? (0, t._)`{}` : b(f, y, s);
1112
+ function N(l, y, s) {
1113
+ const { createErrors: p } = l.it;
1114
+ return p === !1 ? (0, t._)`{}` : b(l, y, s);
1115
1115
  }
1116
- function b(f, y, s = {}) {
1117
- const { gen: p, it: w } = f, d = [
1116
+ function b(l, y, s = {}) {
1117
+ const { gen: p, it: w } = l, d = [
1118
1118
  u(w, s),
1119
- v(f, s)
1119
+ v(l, s)
1120
1120
  ];
1121
- return E(f, y, d), p.object(...d);
1121
+ return E(l, y, d), p.object(...d);
1122
1122
  }
1123
- function u({ errorPath: f }, { instancePath: y }) {
1124
- const s = y ? (0, t.str)`${f}${(0, r.getErrorPath)(y, r.Type.Str)}` : f;
1123
+ function u({ errorPath: l }, { instancePath: y }) {
1124
+ const s = y ? (0, t.str)`${l}${(0, r.getErrorPath)(y, r.Type.Str)}` : l;
1125
1125
  return [n.default.instancePath, (0, t.strConcat)(n.default.instancePath, s)];
1126
1126
  }
1127
- function v({ keyword: f, it: { errSchemaPath: y } }, { schemaPath: s, parentSchema: p }) {
1128
- let w = p ? y : (0, t.str)`${y}/${f}`;
1127
+ function v({ keyword: l, it: { errSchemaPath: y } }, { schemaPath: s, parentSchema: p }) {
1128
+ let w = p ? y : (0, t.str)`${y}/${l}`;
1129
1129
  return s && (w = (0, t.str)`${w}${(0, r.getErrorPath)(s, r.Type.Str)}`), [g.schemaPath, w];
1130
1130
  }
1131
- function E(f, { params: y, message: s }, p) {
1132
- const { keyword: w, data: d, schemaValue: _, it: P } = f, { opts: T, propertyName: D, topSchemaRef: U, schemaPath: A } = P;
1133
- p.push([g.keyword, w], [g.params, typeof y == "function" ? y(f) : y || (0, t._)`{}`]), T.messages && p.push([g.message, typeof s == "function" ? s(f) : s]), T.verbose && p.push([g.schema, _], [g.parentSchema, (0, t._)`${U}${A}`], [n.default.data, d]), D && p.push([g.propertyName, D]);
1131
+ function E(l, { params: y, message: s }, p) {
1132
+ const { keyword: w, data: d, schemaValue: _, it: P } = l, { opts: T, propertyName: D, topSchemaRef: U, schemaPath: A } = P;
1133
+ p.push([g.keyword, w], [g.params, typeof y == "function" ? y(l) : y || (0, t._)`{}`]), T.messages && p.push([g.message, typeof s == "function" ? s(l) : s]), T.verbose && p.push([g.schema, _], [g.parentSchema, (0, t._)`${U}${A}`], [n.default.data, d]), D && p.push([g.propertyName, D]);
1134
1134
  }
1135
1135
  })(Jt)), Jt;
1136
1136
  }
@@ -1245,7 +1245,7 @@ function zt() {
1245
1245
  if (T) {
1246
1246
  const D = v(p, d, _.strictNumbers, a.Wrong);
1247
1247
  w.if(D, () => {
1248
- P.length ? N(s, p, P) : f(s);
1248
+ P.length ? N(s, p, P) : l(s);
1249
1249
  });
1250
1250
  }
1251
1251
  return T;
@@ -1260,7 +1260,7 @@ function zt() {
1260
1260
  P.coerceTypes === "array" && d.if((0, n._)`${T} == 'object' && Array.isArray(${_}) && ${_}.length == 1`, () => d.assign(_, (0, n._)`${_}[0]`).assign(T, (0, n._)`typeof ${_}`).if(v(p, _, P.strictNumbers), () => d.assign(D, _))), d.if((0, n._)`${D} !== undefined`);
1261
1261
  for (const A of w)
1262
1262
  (m.has(A) || A === "array" && P.coerceTypes === "array") && U(A);
1263
- d.else(), f(s), d.endIf(), d.if((0, n._)`${D} !== undefined`, () => {
1263
+ d.else(), l(s), d.endIf(), d.if((0, n._)`${D} !== undefined`, () => {
1264
1264
  d.assign(_, D), b(s, D);
1265
1265
  });
1266
1266
  function U(A) {
@@ -1338,11 +1338,11 @@ function zt() {
1338
1338
  message: ({ schema: s }) => `must be ${s}`,
1339
1339
  params: ({ schema: s, schemaValue: p }) => typeof s == "string" ? (0, n._)`{type: ${s}}` : (0, n._)`{type: ${p}}`
1340
1340
  };
1341
- function f(s) {
1341
+ function l(s) {
1342
1342
  const p = y(s);
1343
1343
  (0, r.reportError)(p, E);
1344
1344
  }
1345
- ue.reportTypeError = f;
1345
+ ue.reportTypeError = l;
1346
1346
  function y(s) {
1347
1347
  const { gen: p, data: w, schema: d } = s, _ = (0, c.schemaRefOrVal)(s, d, "type");
1348
1348
  return {
@@ -1458,7 +1458,7 @@ function $e() {
1458
1458
  });
1459
1459
  }
1460
1460
  re.usePattern = E;
1461
- function f(s) {
1461
+ function l(s) {
1462
1462
  const { gen: p, data: w, keyword: d, it: _ } = s, P = p.name("valid");
1463
1463
  if (_.allErrors) {
1464
1464
  const D = p.let("valid", !0);
@@ -1476,7 +1476,7 @@ function $e() {
1476
1476
  });
1477
1477
  }
1478
1478
  }
1479
- re.validateArray = f;
1479
+ re.validateArray = l;
1480
1480
  function y(s) {
1481
1481
  const { gen: p, schema: w, keyword: d, it: _ } = s;
1482
1482
  if (!Array.isArray(w))
@@ -1501,7 +1501,7 @@ function Ks() {
1501
1501
  Vr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.validateKeywordUsage = ve.validSchemaType = ve.funcKeywordCode = ve.macroKeywordCode = void 0;
1502
1502
  const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ Ne(), r = /* @__PURE__ */ $e(), n = /* @__PURE__ */ Ye();
1503
1503
  function c(b, u) {
1504
- const { gen: v, keyword: E, schema: f, parentSchema: y, it: s } = b, p = u.macro.call(s.self, f, y, s), w = m(v, E, p);
1504
+ const { gen: v, keyword: E, schema: l, parentSchema: y, it: s } = b, p = u.macro.call(s.self, l, y, s), w = m(v, E, p);
1505
1505
  s.opts.validateSchema !== !1 && s.self.validateSchema(p, !0);
1506
1506
  const d = v.name("valid");
1507
1507
  b.subschema({
@@ -1515,9 +1515,9 @@ function Ks() {
1515
1515
  ve.macroKeywordCode = c;
1516
1516
  function a(b, u) {
1517
1517
  var v;
1518
- const { gen: E, keyword: f, schema: y, parentSchema: s, $data: p, it: w } = b;
1518
+ const { gen: E, keyword: l, schema: y, parentSchema: s, $data: p, it: w } = b;
1519
1519
  h(w, u);
1520
- const d = !p && u.compile ? u.compile.call(w.self, y, s, w) : u.validate, _ = m(E, f, d), P = E.let("valid");
1520
+ const d = !p && u.compile ? u.compile.call(w.self, y, s, w) : u.validate, _ = m(E, l, d), P = E.let("valid");
1521
1521
  b.block$data(P, T), b.ok((v = u.valid) !== null && v !== void 0 ? v : P);
1522
1522
  function T() {
1523
1523
  if (u.errors === !1)
@@ -1568,14 +1568,14 @@ function Ks() {
1568
1568
  return !u.length || u.some((E) => E === "array" ? Array.isArray(b) : E === "object" ? b && typeof b == "object" && !Array.isArray(b) : typeof b == E || v && typeof b > "u");
1569
1569
  }
1570
1570
  ve.validSchemaType = g;
1571
- function N({ schema: b, opts: u, self: v, errSchemaPath: E }, f, y) {
1572
- if (Array.isArray(f.keyword) ? !f.keyword.includes(y) : f.keyword !== y)
1571
+ function N({ schema: b, opts: u, self: v, errSchemaPath: E }, l, y) {
1572
+ if (Array.isArray(l.keyword) ? !l.keyword.includes(y) : l.keyword !== y)
1573
1573
  throw new Error("ajv implementation error");
1574
- const s = f.dependencies;
1574
+ const s = l.dependencies;
1575
1575
  if (s != null && s.some((p) => !Object.prototype.hasOwnProperty.call(b, p)))
1576
1576
  throw new Error(`parent schema must have dependencies of ${y}: ${s.join(",")}`);
1577
- if (f.validateSchema && !f.validateSchema(b[y])) {
1578
- const w = `keyword "${y}" value is invalid at path "${E}": ` + v.errorsText(f.validateSchema.errors);
1577
+ if (l.validateSchema && !l.validateSchema(b[y])) {
1578
+ const w = `keyword "${y}" value is invalid at path "${E}": ` + v.errorsText(l.validateSchema.errors);
1579
1579
  if (u.validateSchema === "log")
1580
1580
  v.logger.error(w);
1581
1581
  else
@@ -1622,8 +1622,8 @@ function Bs() {
1622
1622
  throw new Error('both "data" and "dataProp" passed, only one allowed');
1623
1623
  const { gen: b } = o;
1624
1624
  if (i !== void 0) {
1625
- const { errorPath: v, dataPathArr: E, opts: f } = o, y = b.let("data", (0, e._)`${o.data}${(0, e.getProperty)(i)}`, !0);
1626
- u(y), a.errorPath = (0, e.str)`${v}${(0, t.getErrorPath)(i, h, f.jsPropertySyntax)}`, a.parentDataProperty = (0, e._)`${i}`, a.dataPathArr = [...E, a.parentDataProperty];
1625
+ const { errorPath: v, dataPathArr: E, opts: l } = o, y = b.let("data", (0, e._)`${o.data}${(0, e.getProperty)(i)}`, !0);
1626
+ u(y), a.errorPath = (0, e.str)`${v}${(0, t.getErrorPath)(i, h, l.jsPropertySyntax)}`, a.parentDataProperty = (0, e._)`${i}`, a.dataPathArr = [...E, a.parentDataProperty];
1627
1627
  }
1628
1628
  if (m !== void 0) {
1629
1629
  const v = m instanceof e.Name ? m : b.let("data", m, !0);
@@ -1731,8 +1731,8 @@ function Hs() {
1731
1731
  t(n, c, a, v[E], i + "/" + u + "/" + E, h, i, u, o, E);
1732
1732
  } else if (u in e.propsKeywords) {
1733
1733
  if (v && typeof v == "object")
1734
- for (var f in v)
1735
- t(n, c, a, v[f], i + "/" + u + "/" + r(f), h, i, u, o, f);
1734
+ for (var l in v)
1735
+ t(n, c, a, v[l], i + "/" + u + "/" + r(l), h, i, u, o, l);
1736
1736
  } else (u in e.keywords || n.allKeys && !(u in e.skipKeywords)) && t(n, c, a, v, i + "/" + u, h, i, u, o);
1737
1737
  }
1738
1738
  a(o, i, h, m, g, N, b);
@@ -1765,8 +1765,8 @@ function Ft() {
1765
1765
  "enum",
1766
1766
  "const"
1767
1767
  ]);
1768
- function c(E, f = !0) {
1769
- return typeof E == "boolean" ? !0 : f === !0 ? !o(E) : f ? i(E) <= f : !1;
1768
+ function c(E, l = !0) {
1769
+ return typeof E == "boolean" ? !0 : l === !0 ? !o(E) : l ? i(E) <= l : !1;
1770
1770
  }
1771
1771
  le.inlineRef = c;
1772
1772
  const a = /* @__PURE__ */ new Set([
@@ -1777,33 +1777,33 @@ function Ft() {
1777
1777
  "$dynamicAnchor"
1778
1778
  ]);
1779
1779
  function o(E) {
1780
- for (const f in E) {
1781
- if (a.has(f))
1780
+ for (const l in E) {
1781
+ if (a.has(l))
1782
1782
  return !0;
1783
- const y = E[f];
1783
+ const y = E[l];
1784
1784
  if (Array.isArray(y) && y.some(o) || typeof y == "object" && o(y))
1785
1785
  return !0;
1786
1786
  }
1787
1787
  return !1;
1788
1788
  }
1789
1789
  function i(E) {
1790
- let f = 0;
1790
+ let l = 0;
1791
1791
  for (const y in E) {
1792
1792
  if (y === "$ref")
1793
1793
  return 1 / 0;
1794
- if (f++, !n.has(y) && (typeof E[y] == "object" && (0, e.eachItem)(E[y], (s) => f += i(s)), f === 1 / 0))
1794
+ if (l++, !n.has(y) && (typeof E[y] == "object" && (0, e.eachItem)(E[y], (s) => l += i(s)), l === 1 / 0))
1795
1795
  return 1 / 0;
1796
1796
  }
1797
- return f;
1797
+ return l;
1798
1798
  }
1799
- function h(E, f = "", y) {
1800
- y !== !1 && (f = N(f));
1801
- const s = E.parse(f);
1799
+ function h(E, l = "", y) {
1800
+ y !== !1 && (l = N(l));
1801
+ const s = E.parse(l);
1802
1802
  return m(E, s);
1803
1803
  }
1804
1804
  le.getFullPath = h;
1805
- function m(E, f) {
1806
- return E.serialize(f).split("#")[0] + "#";
1805
+ function m(E, l) {
1806
+ return E.serialize(l).split("#")[0] + "#";
1807
1807
  }
1808
1808
  le._getFullPath = m;
1809
1809
  const g = /#\/?$/;
@@ -1811,15 +1811,15 @@ function Ft() {
1811
1811
  return E ? E.replace(g, "") : "";
1812
1812
  }
1813
1813
  le.normalizeId = N;
1814
- function b(E, f, y) {
1815
- return y = N(y), E.resolve(f, y);
1814
+ function b(E, l, y) {
1815
+ return y = N(y), E.resolve(l, y);
1816
1816
  }
1817
1817
  le.resolveUrl = b;
1818
1818
  const u = /^[a-z_][-a-z0-9._]*$/i;
1819
- function v(E, f) {
1819
+ function v(E, l) {
1820
1820
  if (typeof E == "boolean")
1821
1821
  return {};
1822
- const { schemaId: y, uriResolver: s } = this.opts, p = N(E[y] || f), w = { "": p }, d = h(s, p, !1), _ = {}, P = /* @__PURE__ */ new Set();
1822
+ const { schemaId: y, uriResolver: s } = this.opts, p = N(E[y] || l), w = { "": p }, d = h(s, p, !1), _ = {}, P = /* @__PURE__ */ new Set();
1823
1823
  return r(E, { allKeys: !0 }, (U, A, L, K) => {
1824
1824
  if (K === void 0)
1825
1825
  return;
@@ -1859,7 +1859,7 @@ function Ze() {
1859
1859
  const e = /* @__PURE__ */ Ls(), t = /* @__PURE__ */ zt(), r = /* @__PURE__ */ Jn(), n = /* @__PURE__ */ zt(), c = /* @__PURE__ */ Us(), a = /* @__PURE__ */ Ks(), o = /* @__PURE__ */ Bs(), i = /* @__PURE__ */ Y(), h = /* @__PURE__ */ Ne(), m = /* @__PURE__ */ Ft(), g = /* @__PURE__ */ X(), N = /* @__PURE__ */ Ye();
1860
1860
  function b(R) {
1861
1861
  if (d(R) && (P(R), w(R))) {
1862
- f(R);
1862
+ l(R);
1863
1863
  return;
1864
1864
  }
1865
1865
  u(R, () => (0, e.topBoolOrEmptySchema)(R));
@@ -1880,7 +1880,7 @@ function Ze() {
1880
1880
  R.var(h.default.instancePath, (0, i._)`""`), R.var(h.default.parentData, (0, i._)`undefined`), R.var(h.default.parentDataProperty, (0, i._)`undefined`), R.var(h.default.rootData, h.default.data), I.dynamicRef && R.var(h.default.dynamicAnchors, (0, i._)`{}`);
1881
1881
  });
1882
1882
  }
1883
- function f(R) {
1883
+ function l(R) {
1884
1884
  const { schema: I, opts: V, gen: C } = R;
1885
1885
  u(R, () => {
1886
1886
  V.$comment && I.$comment && K(R), U(R), C.let(h.default.vErrors, null), C.let(h.default.errors, 0), V.unevaluated && y(R), T(R), B(R);
@@ -1992,7 +1992,7 @@ function Ze() {
1992
1992
  }
1993
1993
  I.forEach((V) => {
1994
1994
  O(R.dataTypes, V) || S(R, `type "${V}" not allowed by context "${R.dataTypes.join(",")}"`);
1995
- }), l(R, I);
1995
+ }), f(R, I);
1996
1996
  }
1997
1997
  }
1998
1998
  function M(R, I) {
@@ -2014,7 +2014,7 @@ function Ze() {
2014
2014
  function O(R, I) {
2015
2015
  return R.includes(I) || I === "integer" && R.includes("number");
2016
2016
  }
2017
- function l(R, I) {
2017
+ function f(R, I) {
2018
2018
  const V = [];
2019
2019
  for (const C of R.dataTypes)
2020
2020
  O(I, C) ? V.push(C) : I.includes("integer") && C === "number" && V.push("integer");
@@ -2202,18 +2202,18 @@ function pr() {
2202
2202
  }
2203
2203
  }
2204
2204
  me.SchemaEnv = o;
2205
- function i(f) {
2206
- const y = g.call(this, f);
2205
+ function i(l) {
2206
+ const y = g.call(this, l);
2207
2207
  if (y)
2208
2208
  return y;
2209
- const s = (0, n.getFullPath)(this.opts.uriResolver, f.root.baseId), { es5: p, lines: w } = this.opts.code, { ownProperties: d } = this.opts, _ = new e.CodeGen(this.scope, { es5: p, lines: w, ownProperties: d });
2209
+ const s = (0, n.getFullPath)(this.opts.uriResolver, l.root.baseId), { es5: p, lines: w } = this.opts.code, { ownProperties: d } = this.opts, _ = new e.CodeGen(this.scope, { es5: p, lines: w, ownProperties: d });
2210
2210
  let P;
2211
- f.$async && (P = _.scopeValue("Error", {
2211
+ l.$async && (P = _.scopeValue("Error", {
2212
2212
  ref: t.default,
2213
2213
  code: (0, e._)`require("ajv/dist/runtime/validation_error").default`
2214
2214
  }));
2215
2215
  const T = _.scopeName("validate");
2216
- f.validateName = T;
2216
+ l.validateName = T;
2217
2217
  const D = {
2218
2218
  gen: _,
2219
2219
  allErrors: this.opts.allErrors,
@@ -2226,26 +2226,26 @@ function pr() {
2226
2226
  dataLevel: 0,
2227
2227
  dataTypes: [],
2228
2228
  definedProperties: /* @__PURE__ */ new Set(),
2229
- topSchemaRef: _.scopeValue("schema", this.opts.code.source === !0 ? { ref: f.schema, code: (0, e.stringify)(f.schema) } : { ref: f.schema }),
2229
+ topSchemaRef: _.scopeValue("schema", this.opts.code.source === !0 ? { ref: l.schema, code: (0, e.stringify)(l.schema) } : { ref: l.schema }),
2230
2230
  validateName: T,
2231
2231
  ValidationError: P,
2232
- schema: f.schema,
2233
- schemaEnv: f,
2232
+ schema: l.schema,
2233
+ schemaEnv: l,
2234
2234
  rootId: s,
2235
- baseId: f.baseId || s,
2235
+ baseId: l.baseId || s,
2236
2236
  schemaPath: e.nil,
2237
- errSchemaPath: f.schemaPath || (this.opts.jtd ? "" : "#"),
2237
+ errSchemaPath: l.schemaPath || (this.opts.jtd ? "" : "#"),
2238
2238
  errorPath: (0, e._)`""`,
2239
2239
  opts: this.opts,
2240
2240
  self: this
2241
2241
  };
2242
2242
  let U;
2243
2243
  try {
2244
- this._compilations.add(f), (0, a.validateFunctionCode)(D), _.optimize(this.opts.code.optimize);
2244
+ this._compilations.add(l), (0, a.validateFunctionCode)(D), _.optimize(this.opts.code.optimize);
2245
2245
  const A = _.toString();
2246
- U = `${_.scopeRefs(r.default.scope)}return ${A}`, this.opts.code.process && (U = this.opts.code.process(U, f));
2246
+ U = `${_.scopeRefs(r.default.scope)}return ${A}`, this.opts.code.process && (U = this.opts.code.process(U, l));
2247
2247
  const K = new Function(`${r.default.self}`, `${r.default.scope}`, U)(this, this.scope.get());
2248
- if (this.scope.value(T, { ref: K }), K.errors = null, K.schema = f.schema, K.schemaEnv = f, f.$async && (K.$async = !0), this.opts.code.source === !0 && (K.source = { validateName: T, validateCode: A, scopeValues: _._values }), this.opts.unevaluated) {
2248
+ if (this.scope.value(T, { ref: K }), K.errors = null, K.schema = l.schema, K.schemaEnv = l, l.$async && (K.$async = !0), this.opts.code.source === !0 && (K.source = { validateName: T, validateCode: A, scopeValues: _._values }), this.opts.unevaluated) {
2249
2249
  const { props: B, items: x } = D;
2250
2250
  K.evaluated = {
2251
2251
  props: B instanceof e.Name ? void 0 : B,
@@ -2254,61 +2254,61 @@ function pr() {
2254
2254
  dynamicItems: x instanceof e.Name
2255
2255
  }, K.source && (K.source.evaluated = (0, e.stringify)(K.evaluated));
2256
2256
  }
2257
- return f.validate = K, f;
2257
+ return l.validate = K, l;
2258
2258
  } catch (A) {
2259
- throw delete f.validate, delete f.validateName, U && this.logger.error("Error compiling schema, function code:", U), A;
2259
+ throw delete l.validate, delete l.validateName, U && this.logger.error("Error compiling schema, function code:", U), A;
2260
2260
  } finally {
2261
- this._compilations.delete(f);
2261
+ this._compilations.delete(l);
2262
2262
  }
2263
2263
  }
2264
2264
  me.compileSchema = i;
2265
- function h(f, y, s) {
2265
+ function h(l, y, s) {
2266
2266
  var p;
2267
2267
  s = (0, n.resolveUrl)(this.opts.uriResolver, y, s);
2268
- const w = f.refs[s];
2268
+ const w = l.refs[s];
2269
2269
  if (w)
2270
2270
  return w;
2271
- let d = b.call(this, f, s);
2271
+ let d = b.call(this, l, s);
2272
2272
  if (d === void 0) {
2273
- const _ = (p = f.localRefs) === null || p === void 0 ? void 0 : p[s], { schemaId: P } = this.opts;
2274
- _ && (d = new o({ schema: _, schemaId: P, root: f, baseId: y }));
2273
+ const _ = (p = l.localRefs) === null || p === void 0 ? void 0 : p[s], { schemaId: P } = this.opts;
2274
+ _ && (d = new o({ schema: _, schemaId: P, root: l, baseId: y }));
2275
2275
  }
2276
2276
  if (d !== void 0)
2277
- return f.refs[s] = m.call(this, d);
2277
+ return l.refs[s] = m.call(this, d);
2278
2278
  }
2279
2279
  me.resolveRef = h;
2280
- function m(f) {
2281
- return (0, n.inlineRef)(f.schema, this.opts.inlineRefs) ? f.schema : f.validate ? f : i.call(this, f);
2280
+ function m(l) {
2281
+ return (0, n.inlineRef)(l.schema, this.opts.inlineRefs) ? l.schema : l.validate ? l : i.call(this, l);
2282
2282
  }
2283
- function g(f) {
2283
+ function g(l) {
2284
2284
  for (const y of this._compilations)
2285
- if (N(y, f))
2285
+ if (N(y, l))
2286
2286
  return y;
2287
2287
  }
2288
2288
  me.getCompilingSchema = g;
2289
- function N(f, y) {
2290
- return f.schema === y.schema && f.root === y.root && f.baseId === y.baseId;
2289
+ function N(l, y) {
2290
+ return l.schema === y.schema && l.root === y.root && l.baseId === y.baseId;
2291
2291
  }
2292
- function b(f, y) {
2292
+ function b(l, y) {
2293
2293
  let s;
2294
2294
  for (; typeof (s = this.refs[y]) == "string"; )
2295
2295
  y = s;
2296
- return s || this.schemas[y] || u.call(this, f, y);
2296
+ return s || this.schemas[y] || u.call(this, l, y);
2297
2297
  }
2298
- function u(f, y) {
2298
+ function u(l, y) {
2299
2299
  const s = this.opts.uriResolver.parse(y), p = (0, n._getFullPath)(this.opts.uriResolver, s);
2300
- let w = (0, n.getFullPath)(this.opts.uriResolver, f.baseId, void 0);
2301
- if (Object.keys(f.schema).length > 0 && p === w)
2302
- return E.call(this, s, f);
2300
+ let w = (0, n.getFullPath)(this.opts.uriResolver, l.baseId, void 0);
2301
+ if (Object.keys(l.schema).length > 0 && p === w)
2302
+ return E.call(this, s, l);
2303
2303
  const d = (0, n.normalizeId)(p), _ = this.refs[d] || this.schemas[d];
2304
2304
  if (typeof _ == "string") {
2305
- const P = u.call(this, f, _);
2305
+ const P = u.call(this, l, _);
2306
2306
  return typeof (P == null ? void 0 : P.schema) != "object" ? void 0 : E.call(this, s, P);
2307
2307
  }
2308
2308
  if (typeof (_ == null ? void 0 : _.schema) == "object") {
2309
2309
  if (_.validate || i.call(this, _), d === (0, n.normalizeId)(y)) {
2310
2310
  const { schema: P } = _, { schemaId: T } = this.opts, D = P[T];
2311
- return D && (w = (0, n.resolveUrl)(this.opts.uriResolver, w, D)), new o({ schema: P, schemaId: T, root: f, baseId: w });
2311
+ return D && (w = (0, n.resolveUrl)(this.opts.uriResolver, w, D)), new o({ schema: P, schemaId: T, root: l, baseId: w });
2312
2312
  }
2313
2313
  return E.call(this, s, _);
2314
2314
  }
@@ -2321,11 +2321,11 @@ function pr() {
2321
2321
  "dependencies",
2322
2322
  "definitions"
2323
2323
  ]);
2324
- function E(f, { baseId: y, schema: s, root: p }) {
2324
+ function E(l, { baseId: y, schema: s, root: p }) {
2325
2325
  var w;
2326
- if (((w = f.fragment) === null || w === void 0 ? void 0 : w[0]) !== "/")
2326
+ if (((w = l.fragment) === null || w === void 0 ? void 0 : w[0]) !== "/")
2327
2327
  return;
2328
- for (const P of f.fragment.slice(1).split("/")) {
2328
+ for (const P of l.fragment.slice(1).split("/")) {
2329
2329
  if (typeof s == "boolean")
2330
2330
  return;
2331
2331
  const T = s[(0, c.unescapeFragment)(P)];
@@ -2392,13 +2392,13 @@ function Zn() {
2392
2392
  }
2393
2393
  function o(b) {
2394
2394
  let u = 0;
2395
- const v = { error: !1, address: "", zone: "" }, E = [], f = [];
2395
+ const v = { error: !1, address: "", zone: "" }, E = [], l = [];
2396
2396
  let y = !1, s = !1, p = a;
2397
2397
  for (let w = 0; w < b.length; w++) {
2398
2398
  const d = b[w];
2399
2399
  if (!(d === "[" || d === "]"))
2400
2400
  if (d === ":") {
2401
- if (y === !0 && (s = !0), !p(f, E, v))
2401
+ if (y === !0 && (s = !0), !p(l, E, v))
2402
2402
  break;
2403
2403
  if (++u > 7) {
2404
2404
  v.error = !0;
@@ -2407,15 +2407,15 @@ function Zn() {
2407
2407
  w > 0 && b[w - 1] === ":" && (y = !0), E.push(":");
2408
2408
  continue;
2409
2409
  } else if (d === "%") {
2410
- if (!p(f, E, v))
2410
+ if (!p(l, E, v))
2411
2411
  break;
2412
2412
  p = c;
2413
2413
  } else {
2414
- f.push(d);
2414
+ l.push(d);
2415
2415
  continue;
2416
2416
  }
2417
2417
  }
2418
- return f.length && (p === c ? v.zone = f.join("") : s ? E.push(f.join("")) : E.push(r(f))), v.address = E.join(""), v;
2418
+ return l.length && (p === c ? v.zone = l.join("") : s ? E.push(l.join("")) : E.push(r(l))), v.address = E.join(""), v;
2419
2419
  }
2420
2420
  function i(b) {
2421
2421
  if (h(b, ":") < 2)
@@ -2437,9 +2437,9 @@ function Zn() {
2437
2437
  function m(b) {
2438
2438
  let u = b;
2439
2439
  const v = [];
2440
- let E = -1, f = 0;
2441
- for (; f = u.length; ) {
2442
- if (f === 1) {
2440
+ let E = -1, l = 0;
2441
+ for (; l = u.length; ) {
2442
+ if (l === 1) {
2443
2443
  if (u === ".")
2444
2444
  break;
2445
2445
  if (u === "/") {
@@ -2449,7 +2449,7 @@ function Zn() {
2449
2449
  v.push(u);
2450
2450
  break;
2451
2451
  }
2452
- } else if (f === 2) {
2452
+ } else if (l === 2) {
2453
2453
  if (u[0] === ".") {
2454
2454
  if (u[1] === ".")
2455
2455
  break;
@@ -2461,7 +2461,7 @@ function Zn() {
2461
2461
  v.push("/");
2462
2462
  break;
2463
2463
  }
2464
- } else if (f === 3 && u === "/..") {
2464
+ } else if (l === 3 && u === "/..") {
2465
2465
  v.length !== 0 && v.pop(), v.push("/");
2466
2466
  break;
2467
2467
  }
@@ -2613,7 +2613,7 @@ function xs() {
2613
2613
  parse: i,
2614
2614
  serialize: h
2615
2615
  }
2616
- ), f = (
2616
+ ), l = (
2617
2617
  /** @type {SchemeHandler} */
2618
2618
  {
2619
2619
  scheme: "wss",
@@ -2627,7 +2627,7 @@ function xs() {
2627
2627
  http: u,
2628
2628
  https: v,
2629
2629
  ws: E,
2630
- wss: f,
2630
+ wss: l,
2631
2631
  urn: (
2632
2632
  /** @type {SchemeHandler} */
2633
2633
  {
@@ -2670,37 +2670,37 @@ function eo() {
2670
2670
  if (Wr) return Be.exports;
2671
2671
  Wr = 1;
2672
2672
  const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: n, isIPv4: c, nonSimpleDomain: a } = Zn(), { SCHEMES: o, getSchemeHandler: i } = xs();
2673
- function h(f, y) {
2674
- return typeof f == "string" ? f = /** @type {T} */
2675
- b(v(f, y), y) : typeof f == "object" && (f = /** @type {T} */
2676
- v(b(f, y), y)), f;
2673
+ function h(l, y) {
2674
+ return typeof l == "string" ? l = /** @type {T} */
2675
+ b(v(l, y), y) : typeof l == "object" && (l = /** @type {T} */
2676
+ v(b(l, y), y)), l;
2677
2677
  }
2678
- function m(f, y, s) {
2679
- const p = s ? Object.assign({ scheme: "null" }, s) : { scheme: "null" }, w = g(v(f, p), v(y, p), p, !0);
2678
+ function m(l, y, s) {
2679
+ const p = s ? Object.assign({ scheme: "null" }, s) : { scheme: "null" }, w = g(v(l, p), v(y, p), p, !0);
2680
2680
  return p.skipEscape = !0, b(w, p);
2681
2681
  }
2682
- function g(f, y, s, p) {
2682
+ function g(l, y, s, p) {
2683
2683
  const w = {};
2684
- return p || (f = v(b(f, s), s), y = v(b(y, s), s)), s = s || {}, !s.tolerant && y.scheme ? (w.scheme = y.scheme, w.userinfo = y.userinfo, w.host = y.host, w.port = y.port, w.path = t(y.path || ""), w.query = y.query) : (y.userinfo !== void 0 || y.host !== void 0 || y.port !== void 0 ? (w.userinfo = y.userinfo, w.host = y.host, w.port = y.port, w.path = t(y.path || ""), w.query = y.query) : (y.path ? (y.path[0] === "/" ? w.path = t(y.path) : ((f.userinfo !== void 0 || f.host !== void 0 || f.port !== void 0) && !f.path ? w.path = "/" + y.path : f.path ? w.path = f.path.slice(0, f.path.lastIndexOf("/") + 1) + y.path : w.path = y.path, w.path = t(w.path)), w.query = y.query) : (w.path = f.path, y.query !== void 0 ? w.query = y.query : w.query = f.query), w.userinfo = f.userinfo, w.host = f.host, w.port = f.port), w.scheme = f.scheme), w.fragment = y.fragment, w;
2684
+ return p || (l = v(b(l, s), s), y = v(b(y, s), s)), s = s || {}, !s.tolerant && y.scheme ? (w.scheme = y.scheme, w.userinfo = y.userinfo, w.host = y.host, w.port = y.port, w.path = t(y.path || ""), w.query = y.query) : (y.userinfo !== void 0 || y.host !== void 0 || y.port !== void 0 ? (w.userinfo = y.userinfo, w.host = y.host, w.port = y.port, w.path = t(y.path || ""), w.query = y.query) : (y.path ? (y.path[0] === "/" ? w.path = t(y.path) : ((l.userinfo !== void 0 || l.host !== void 0 || l.port !== void 0) && !l.path ? w.path = "/" + y.path : l.path ? w.path = l.path.slice(0, l.path.lastIndexOf("/") + 1) + y.path : w.path = y.path, w.path = t(w.path)), w.query = y.query) : (w.path = l.path, y.query !== void 0 ? w.query = y.query : w.query = l.query), w.userinfo = l.userinfo, w.host = l.host, w.port = l.port), w.scheme = l.scheme), w.fragment = y.fragment, w;
2685
2685
  }
2686
- function N(f, y, s) {
2687
- return typeof f == "string" ? (f = unescape(f), f = b(n(v(f, s), !0), { ...s, skipEscape: !0 })) : typeof f == "object" && (f = b(n(f, !0), { ...s, skipEscape: !0 })), typeof y == "string" ? (y = unescape(y), y = b(n(v(y, s), !0), { ...s, skipEscape: !0 })) : typeof y == "object" && (y = b(n(y, !0), { ...s, skipEscape: !0 })), f.toLowerCase() === y.toLowerCase();
2686
+ function N(l, y, s) {
2687
+ return typeof l == "string" ? (l = unescape(l), l = b(n(v(l, s), !0), { ...s, skipEscape: !0 })) : typeof l == "object" && (l = b(n(l, !0), { ...s, skipEscape: !0 })), typeof y == "string" ? (y = unescape(y), y = b(n(v(y, s), !0), { ...s, skipEscape: !0 })) : typeof y == "object" && (y = b(n(y, !0), { ...s, skipEscape: !0 })), l.toLowerCase() === y.toLowerCase();
2688
2688
  }
2689
- function b(f, y) {
2689
+ function b(l, y) {
2690
2690
  const s = {
2691
- host: f.host,
2692
- scheme: f.scheme,
2693
- userinfo: f.userinfo,
2694
- port: f.port,
2695
- path: f.path,
2696
- query: f.query,
2697
- nid: f.nid,
2698
- nss: f.nss,
2699
- uuid: f.uuid,
2700
- fragment: f.fragment,
2701
- reference: f.reference,
2702
- resourceName: f.resourceName,
2703
- secure: f.secure,
2691
+ host: l.host,
2692
+ scheme: l.scheme,
2693
+ userinfo: l.userinfo,
2694
+ port: l.port,
2695
+ path: l.path,
2696
+ query: l.query,
2697
+ nid: l.nid,
2698
+ nss: l.nss,
2699
+ uuid: l.uuid,
2700
+ fragment: l.fragment,
2701
+ reference: l.reference,
2702
+ resourceName: l.resourceName,
2703
+ secure: l.secure,
2704
2704
  error: ""
2705
2705
  }, p = Object.assign({}, y), w = [], d = i(p.scheme || s.scheme);
2706
2706
  d && d.serialize && d.serialize(s, p), s.path !== void 0 && (p.skipEscape ? s.path = unescape(s.path) : (s.path = escape(s.path), s.scheme !== void 0 && (s.path = s.path.split("%3A").join(":")))), p.reference !== "suffix" && s.scheme && w.push(s.scheme, ":");
@@ -2712,7 +2712,7 @@ function eo() {
2712
2712
  return s.query !== void 0 && w.push("?", s.query), s.fragment !== void 0 && w.push("#", s.fragment), w.join("");
2713
2713
  }
2714
2714
  const u = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
2715
- function v(f, y) {
2715
+ function v(l, y) {
2716
2716
  const s = Object.assign({}, y), p = {
2717
2717
  scheme: void 0,
2718
2718
  userinfo: void 0,
@@ -2723,8 +2723,8 @@ function eo() {
2723
2723
  fragment: void 0
2724
2724
  };
2725
2725
  let w = !1;
2726
- s.reference === "suffix" && (s.scheme ? f = s.scheme + ":" + f : f = "//" + f);
2727
- const d = f.match(u);
2726
+ s.reference === "suffix" && (s.scheme ? l = s.scheme + ":" + l : l = "//" + l);
2727
+ const d = l.match(u);
2728
2728
  if (d) {
2729
2729
  if (p.scheme = d[1], p.userinfo = d[3], p.host = d[4], p.port = parseInt(d[5], 10), p.path = d[6] || "", p.query = d[7], p.fragment = d[8], isNaN(p.port) && (p.port = d[5]), p.host)
2730
2730
  if (c(p.host) === !1) {
@@ -2740,7 +2740,7 @@ function eo() {
2740
2740
  } catch (P) {
2741
2741
  p.error = p.error || "Host's domain name can not be converted to ASCII: " + P;
2742
2742
  }
2743
- (!_ || _ && !_.skipNormalize) && (f.indexOf("%") !== -1 && (p.scheme !== void 0 && (p.scheme = unescape(p.scheme)), p.host !== void 0 && (p.host = unescape(p.host))), p.path && (p.path = escape(unescape(p.path))), p.fragment && (p.fragment = encodeURI(decodeURIComponent(p.fragment)))), _ && _.parse && _.parse(p, s);
2743
+ (!_ || _ && !_.skipNormalize) && (l.indexOf("%") !== -1 && (p.scheme !== void 0 && (p.scheme = unescape(p.scheme)), p.host !== void 0 && (p.host = unescape(p.host))), p.path && (p.path = escape(unescape(p.path))), p.fragment && (p.fragment = encodeURI(decodeURIComponent(p.fragment)))), _ && _.parse && _.parse(p, s);
2744
2744
  } else
2745
2745
  p.error = p.error || "URI can not be parsed.";
2746
2746
  return p;
@@ -2801,7 +2801,7 @@ function ro() {
2801
2801
  "func",
2802
2802
  "obj",
2803
2803
  "Error"
2804
- ]), f = {
2804
+ ]), l = {
2805
2805
  errorDataPath: "",
2806
2806
  format: "`validateFormats: false` can be used instead.",
2807
2807
  nullable: '"nullable" keyword is supported by default.',
@@ -2823,8 +2823,8 @@ function ro() {
2823
2823
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
2824
2824
  }, s = 200;
2825
2825
  function p(M) {
2826
- var j, k, O, l, S, q, F, z, H, G, R, I, V, C, W, Q, ae, ge, fe, pe, ie, Me, ye, Kt, Bt;
2827
- const Le = M.strict, Ht = (j = M.code) === null || j === void 0 ? void 0 : j.optimize, gr = Ht === !0 || Ht === void 0 ? 1 : Ht || 0, vr = (O = (k = M.code) === null || k === void 0 ? void 0 : k.regExp) !== null && O !== void 0 ? O : u, qs = (l = M.uriResolver) !== null && l !== void 0 ? l : b.default;
2826
+ var j, k, O, f, S, q, F, z, H, G, R, I, V, C, W, Q, ae, ge, fe, pe, ie, Me, ye, Kt, Bt;
2827
+ const Le = M.strict, Ht = (j = M.code) === null || j === void 0 ? void 0 : j.optimize, gr = Ht === !0 || Ht === void 0 ? 1 : Ht || 0, vr = (O = (k = M.code) === null || k === void 0 ? void 0 : k.regExp) !== null && O !== void 0 ? O : u, qs = (f = M.uriResolver) !== null && f !== void 0 ? f : b.default;
2828
2828
  return {
2829
2829
  strictSchema: (q = (S = M.strictSchema) !== null && S !== void 0 ? S : Le) !== null && q !== void 0 ? q : !0,
2830
2830
  strictNumbers: (z = (F = M.strictNumbers) !== null && F !== void 0 ? F : Le) !== null && z !== void 0 ? z : !0,
@@ -2851,16 +2851,16 @@ function ro() {
2851
2851
  this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), j = this.opts = { ...j, ...p(j) };
2852
2852
  const { es5: k, lines: O } = this.opts.code;
2853
2853
  this.scope = new i.ValueScope({ scope: {}, prefixes: E, es5: k, lines: O }), this.logger = L(j.logger);
2854
- const l = j.validateFormats;
2855
- j.validateFormats = !1, this.RULES = (0, a.getRules)(), d.call(this, f, j, "NOT SUPPORTED"), d.call(this, y, j, "DEPRECATED", "warn"), this._metaOpts = U.call(this), j.formats && T.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), j.keywords && D.call(this, j.keywords), typeof j.meta == "object" && this.addMetaSchema(j.meta), P.call(this), j.validateFormats = l;
2854
+ const f = j.validateFormats;
2855
+ j.validateFormats = !1, this.RULES = (0, a.getRules)(), d.call(this, l, j, "NOT SUPPORTED"), d.call(this, y, j, "DEPRECATED", "warn"), this._metaOpts = U.call(this), j.formats && T.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), j.keywords && D.call(this, j.keywords), typeof j.meta == "object" && this.addMetaSchema(j.meta), P.call(this), j.validateFormats = f;
2856
2856
  }
2857
2857
  _addVocabularies() {
2858
2858
  this.addKeyword("$async");
2859
2859
  }
2860
2860
  _addDefaultMetaSchema() {
2861
2861
  const { $data: j, meta: k, schemaId: O } = this.opts;
2862
- let l = N;
2863
- O === "id" && (l = { ...N }, l.id = l.$id, delete l.$id), k && j && this.addMetaSchema(l, l[O], !1);
2862
+ let f = N;
2863
+ O === "id" && (f = { ...N }, f.id = f.$id, delete f.$id), k && j && this.addMetaSchema(f, f[O], !1);
2864
2864
  }
2865
2865
  defaultMeta() {
2866
2866
  const { meta: j, schemaId: k } = this.opts;
@@ -2873,8 +2873,8 @@ function ro() {
2873
2873
  throw new Error(`no schema with key or ref "${j}"`);
2874
2874
  } else
2875
2875
  O = this.compile(j);
2876
- const l = O(k);
2877
- return "$async" in O || (this.errors = O.errors), l;
2876
+ const f = O(k);
2877
+ return "$async" in O || (this.errors = O.errors), f;
2878
2878
  }
2879
2879
  compile(j, k) {
2880
2880
  const O = this._addSchema(j, k);
@@ -2884,14 +2884,14 @@ function ro() {
2884
2884
  if (typeof this.opts.loadSchema != "function")
2885
2885
  throw new Error("options.loadSchema should be a function");
2886
2886
  const { loadSchema: O } = this.opts;
2887
- return l.call(this, j, k);
2888
- async function l(G, R) {
2887
+ return f.call(this, j, k);
2888
+ async function f(G, R) {
2889
2889
  await S.call(this, G.$schema);
2890
2890
  const I = this._addSchema(G, R);
2891
2891
  return I.validate || q.call(this, I);
2892
2892
  }
2893
2893
  async function S(G) {
2894
- G && !this.getSchema(G) && await l.call(this, { $ref: G }, !0);
2894
+ G && !this.getSchema(G) && await f.call(this, { $ref: G }, !0);
2895
2895
  }
2896
2896
  async function q(G) {
2897
2897
  try {
@@ -2922,10 +2922,10 @@ function ro() {
2922
2922
  }
2923
2923
  }
2924
2924
  // Adds schema to the instance
2925
- addSchema(j, k, O, l = this.opts.validateSchema) {
2925
+ addSchema(j, k, O, f = this.opts.validateSchema) {
2926
2926
  if (Array.isArray(j)) {
2927
2927
  for (const q of j)
2928
- this.addSchema(q, void 0, O, l);
2928
+ this.addSchema(q, void 0, O, f);
2929
2929
  return this;
2930
2930
  }
2931
2931
  let S;
@@ -2934,7 +2934,7 @@ function ro() {
2934
2934
  if (S = j[q], S !== void 0 && typeof S != "string")
2935
2935
  throw new Error(`schema ${q} must be string`);
2936
2936
  }
2937
- return k = (0, h.normalizeId)(k || S), this._checkUnique(k), this.schemas[k] = this._addSchema(j, O, k, l, !0), this;
2937
+ return k = (0, h.normalizeId)(k || S), this._checkUnique(k), this.schemas[k] = this._addSchema(j, O, k, f, !0), this;
2938
2938
  }
2939
2939
  // Add schema that will be used to validate other schemas
2940
2940
  // options in META_IGNORE_OPTIONS are alway set to false
@@ -2950,15 +2950,15 @@ function ro() {
2950
2950
  throw new Error("$schema must be a string");
2951
2951
  if (O = O || this.opts.defaultMeta || this.defaultMeta(), !O)
2952
2952
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
2953
- const l = this.validate(O, j);
2954
- if (!l && k) {
2953
+ const f = this.validate(O, j);
2954
+ if (!f && k) {
2955
2955
  const S = "schema is invalid: " + this.errorsText();
2956
2956
  if (this.opts.validateSchema === "log")
2957
2957
  this.logger.error(S);
2958
2958
  else
2959
2959
  throw new Error(S);
2960
2960
  }
2961
- return l;
2961
+ return f;
2962
2962
  }
2963
2963
  // Get compiled schema by `key` or `ref`.
2964
2964
  // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
@@ -2967,8 +2967,8 @@ function ro() {
2967
2967
  for (; typeof (k = _.call(this, j)) == "string"; )
2968
2968
  j = k;
2969
2969
  if (k === void 0) {
2970
- const { schemaId: O } = this.opts, l = new o.SchemaEnv({ schema: {}, schemaId: O });
2971
- if (k = o.resolveSchema.call(this, l, j), !k)
2970
+ const { schemaId: O } = this.opts, f = new o.SchemaEnv({ schema: {}, schemaId: O });
2971
+ if (k = o.resolveSchema.call(this, f, j), !k)
2972
2972
  return;
2973
2973
  this.refs[j] = k;
2974
2974
  }
@@ -3016,12 +3016,12 @@ function ro() {
3016
3016
  if (B.call(this, O, k), !k)
3017
3017
  return (0, g.eachItem)(O, (S) => x.call(this, S)), this;
3018
3018
  oe.call(this, k);
3019
- const l = {
3019
+ const f = {
3020
3020
  ...k,
3021
3021
  type: (0, m.getJSONTypes)(k.type),
3022
3022
  schemaType: (0, m.getJSONTypes)(k.schemaType)
3023
3023
  };
3024
- return (0, g.eachItem)(O, l.type.length === 0 ? (S) => x.call(this, S, l) : (S) => l.type.forEach((q) => x.call(this, S, l, q))), this;
3024
+ return (0, g.eachItem)(O, f.type.length === 0 ? (S) => x.call(this, S, f) : (S) => f.type.forEach((q) => x.call(this, S, f, q))), this;
3025
3025
  }
3026
3026
  getKeyword(j) {
3027
3027
  const k = this.RULES.all[j];
@@ -3032,8 +3032,8 @@ function ro() {
3032
3032
  const { RULES: k } = this;
3033
3033
  delete k.keywords[j], delete k.all[j];
3034
3034
  for (const O of k.rules) {
3035
- const l = O.rules.findIndex((S) => S.keyword === j);
3036
- l >= 0 && O.rules.splice(l, 1);
3035
+ const f = O.rules.findIndex((S) => S.keyword === j);
3036
+ f >= 0 && O.rules.splice(f, 1);
3037
3037
  }
3038
3038
  return this;
3039
3039
  }
@@ -3042,13 +3042,13 @@ function ro() {
3042
3042
  return typeof k == "string" && (k = new RegExp(k)), this.formats[j] = k, this;
3043
3043
  }
3044
3044
  errorsText(j = this.errors, { separator: k = ", ", dataVar: O = "data" } = {}) {
3045
- return !j || j.length === 0 ? "No errors" : j.map((l) => `${O}${l.instancePath} ${l.message}`).reduce((l, S) => l + k + S);
3045
+ return !j || j.length === 0 ? "No errors" : j.map((f) => `${O}${f.instancePath} ${f.message}`).reduce((f, S) => f + k + S);
3046
3046
  }
3047
3047
  $dataMetaSchema(j, k) {
3048
3048
  const O = this.RULES.all;
3049
3049
  j = JSON.parse(JSON.stringify(j));
3050
- for (const l of k) {
3051
- const S = l.split("/").slice(1);
3050
+ for (const f of k) {
3051
+ const S = f.split("/").slice(1);
3052
3052
  let q = j;
3053
3053
  for (const F of S)
3054
3054
  q = q[F];
@@ -3064,11 +3064,11 @@ function ro() {
3064
3064
  }
3065
3065
  _removeAllSchemas(j, k) {
3066
3066
  for (const O in j) {
3067
- const l = j[O];
3068
- (!k || k.test(O)) && (typeof l == "string" ? delete j[O] : l && !l.meta && (this._cache.delete(l.schema), delete j[O]));
3067
+ const f = j[O];
3068
+ (!k || k.test(O)) && (typeof f == "string" ? delete j[O] : f && !f.meta && (this._cache.delete(f.schema), delete j[O]));
3069
3069
  }
3070
3070
  }
3071
- _addSchema(j, k, O, l = this.opts.validateSchema, S = this.opts.addUsedSchema) {
3071
+ _addSchema(j, k, O, f = this.opts.validateSchema, S = this.opts.addUsedSchema) {
3072
3072
  let q;
3073
3073
  const { schemaId: F } = this.opts;
3074
3074
  if (typeof j == "object")
@@ -3084,7 +3084,7 @@ function ro() {
3084
3084
  return z;
3085
3085
  O = (0, h.normalizeId)(q || O);
3086
3086
  const H = h.getSchemaRefs.call(this, j, O);
3087
- return z = new o.SchemaEnv({ schema: j, schemaId: F, meta: k, baseId: O, localRefs: H }), this._cache.set(z.schema, z), S && !O.startsWith("#") && (O && this._checkUnique(O), this.refs[O] = z), l && this.validateSchema(j, !0), z;
3087
+ return z = new o.SchemaEnv({ schema: j, schemaId: F, meta: k, baseId: O, localRefs: H }), this._cache.set(z.schema, z), S && !O.startsWith("#") && (O && this._checkUnique(O), this.refs[O] = z), f && this.validateSchema(j, !0), z;
3088
3088
  }
3089
3089
  _checkUnique(j) {
3090
3090
  if (this.schemas[j] || this.refs[j])
@@ -3107,9 +3107,9 @@ function ro() {
3107
3107
  }
3108
3108
  w.ValidationError = n.default, w.MissingRefError = c.default, e.default = w;
3109
3109
  function d(M, j, k, O = "error") {
3110
- for (const l in M) {
3111
- const S = l;
3112
- S in j && this.logger[O](`${k}: option ${l}. ${M[S]}`);
3110
+ for (const f in M) {
3111
+ const S = f;
3112
+ S in j && this.logger[O](`${k}: option ${f}. ${M[S]}`);
3113
3113
  }
3114
3114
  }
3115
3115
  function _(M) {
@@ -3173,11 +3173,11 @@ function ro() {
3173
3173
  }
3174
3174
  function x(M, j, k) {
3175
3175
  var O;
3176
- const l = j == null ? void 0 : j.post;
3177
- if (k && l)
3176
+ const f = j == null ? void 0 : j.post;
3177
+ if (k && f)
3178
3178
  throw new Error('keyword with "post" flag cannot have "type"');
3179
3179
  const { RULES: S } = this;
3180
- let q = l ? S.post : S.rules.find(({ type: z }) => z === k);
3180
+ let q = f ? S.post : S.rules.find(({ type: z }) => z === k);
3181
3181
  if (q || (q = { type: k, rules: [] }, S.rules.push(q)), S.keywords[M] = !0, !j)
3182
3182
  return;
3183
3183
  const F = {
@@ -3191,7 +3191,7 @@ function ro() {
3191
3191
  j.before ? se.call(this, q, F, j.before) : q.rules.push(F), S.all[M] = F, (O = j.implements) === null || O === void 0 || O.forEach((z) => this.addKeyword(z));
3192
3192
  }
3193
3193
  function se(M, j, k) {
3194
- const O = M.rules.findIndex((l) => l.keyword === k);
3194
+ const O = M.rules.findIndex((f) => f.keyword === k);
3195
3195
  O >= 0 ? M.rules.splice(O, 0, j) : (M.rules.push(j), this.logger.warn(`rule ${k} is not defined`));
3196
3196
  }
3197
3197
  function oe(M) {
@@ -3226,7 +3226,7 @@ function so() {
3226
3226
  keyword: "$ref",
3227
3227
  schemaType: "string",
3228
3228
  code(m) {
3229
- const { gen: g, schema: N, it: b } = m, { baseId: u, schemaEnv: v, validateName: E, opts: f, self: y } = b, { root: s } = v;
3229
+ const { gen: g, schema: N, it: b } = m, { baseId: u, schemaEnv: v, validateName: E, opts: l, self: y } = b, { root: s } = v;
3230
3230
  if ((N === "#" || N === "#/") && u === s.baseId)
3231
3231
  return w();
3232
3232
  const p = c.resolveRef.call(y, s, u, N);
@@ -3246,7 +3246,7 @@ function so() {
3246
3246
  h(m, T, P, P.$async);
3247
3247
  }
3248
3248
  function _(P) {
3249
- const T = g.scopeValue("schema", f.code.source === !0 ? { ref: P, code: (0, r.stringify)(P) } : { ref: P }), D = g.name("valid"), U = m.subschema({
3249
+ const T = g.scopeValue("schema", l.code.source === !0 ? { ref: P, code: (0, r.stringify)(P) } : { ref: P }), D = g.name("valid"), U = m.subschema({
3250
3250
  schema: P,
3251
3251
  dataTypes: [],
3252
3252
  schemaPath: r.nil,
@@ -3263,10 +3263,10 @@ function so() {
3263
3263
  }
3264
3264
  Re.getValidate = i;
3265
3265
  function h(m, g, N, b) {
3266
- const { gen: u, it: v } = m, { allErrors: E, schemaEnv: f, opts: y } = v, s = y.passContext ? n.default.this : r.nil;
3266
+ const { gen: u, it: v } = m, { allErrors: E, schemaEnv: l, opts: y } = v, s = y.passContext ? n.default.this : r.nil;
3267
3267
  b ? p() : w();
3268
3268
  function p() {
3269
- if (!f.$async)
3269
+ if (!l.$async)
3270
3270
  throw new Error("async schema referenced by sync schema");
3271
3271
  const P = u.let("valid");
3272
3272
  u.try(() => {
@@ -3479,7 +3479,7 @@ function po() {
3479
3479
  }
3480
3480
  function v() {
3481
3481
  if (u || g)
3482
- a.block$data(t.nil, f);
3482
+ a.block$data(t.nil, l);
3483
3483
  else
3484
3484
  for (const s of i)
3485
3485
  (0, e.checkReportMissingProp)(a, s);
@@ -3492,7 +3492,7 @@ function po() {
3492
3492
  } else
3493
3493
  o.if((0, e.checkMissingProp)(a, i, s)), (0, e.reportMissingProp)(a, s), o.else();
3494
3494
  }
3495
- function f() {
3495
+ function l() {
3496
3496
  o.forOf("prop", h, (s) => {
3497
3497
  a.setParams({ missingProperty: s }), o.if((0, e.noPropertyInData)(o, m, s, b.ownProperties), () => a.error());
3498
3498
  });
@@ -3556,8 +3556,8 @@ function mo() {
3556
3556
  if (!m && !g)
3557
3557
  return;
3558
3558
  const v = i.let("valid"), E = N.items ? (0, e.getSchemaTypes)(N.items) : [];
3559
- o.block$data(v, f, (0, t._)`${b} === false`), o.ok(v);
3560
- function f() {
3559
+ o.block$data(v, l, (0, t._)`${b} === false`), o.ok(v);
3560
+ function l() {
3561
3561
  const w = i.let("i", (0, t._)`${h}.length`), d = i.let("j");
3562
3562
  o.setParams({ i: w, j: d }), i.assign(v, !0), i.if((0, t._)`${w} > 1`, () => (y() ? s : p)(w, d));
3563
3563
  }
@@ -3621,7 +3621,7 @@ function go() {
3621
3621
  const v = () => u ?? (u = (0, t.useFunc)(o, r.default));
3622
3622
  let E;
3623
3623
  if (b || h)
3624
- E = o.let("valid"), a.block$data(E, f);
3624
+ E = o.let("valid"), a.block$data(E, l);
3625
3625
  else {
3626
3626
  if (!Array.isArray(m))
3627
3627
  throw new Error("ajv implementation error");
@@ -3629,7 +3629,7 @@ function go() {
3629
3629
  E = (0, e.or)(...m.map((p, w) => y(s, w)));
3630
3630
  }
3631
3631
  a.pass(E);
3632
- function f() {
3632
+ function l() {
3633
3633
  o.assign(E, !1), o.forOf("v", g, (s) => o.if((0, e._)`${v()}(${i}, ${s})`, () => o.assign(E, !0).break()));
3634
3634
  }
3635
3635
  function y(s, p) {
@@ -3725,15 +3725,15 @@ function Xn() {
3725
3725
  const { gen: h, parentSchema: m, data: g, keyword: N, it: b } = a;
3726
3726
  E(m), b.opts.unevaluated && i.length && b.items !== !0 && (b.items = t.mergeEvaluated.items(h, i.length, b.items));
3727
3727
  const u = h.name("valid"), v = h.const("len", (0, e._)`${g}.length`);
3728
- i.forEach((f, y) => {
3729
- (0, t.alwaysValidSchema)(b, f) || (h.if((0, e._)`${v} > ${y}`, () => a.subschema({
3728
+ i.forEach((l, y) => {
3729
+ (0, t.alwaysValidSchema)(b, l) || (h.if((0, e._)`${v} > ${y}`, () => a.subschema({
3730
3730
  keyword: N,
3731
3731
  schemaProp: y,
3732
3732
  dataProp: y
3733
3733
  }, u)), a.ok(u));
3734
3734
  });
3735
- function E(f) {
3736
- const { opts: y, errSchemaPath: s } = b, p = i.length, w = p === f.minItems && (p === f.maxItems || f[o] === !1);
3735
+ function E(l) {
3736
+ const { opts: y, errSchemaPath: s } = b, p = i.length, w = p === l.minItems && (p === l.maxItems || l[o] === !1);
3737
3737
  if (y.strictTuples && !w) {
3738
3738
  const d = `"${N}" is ${p}-tuple, but minItems or maxItems/${o} are not specified or different at path "${s}"`;
3739
3739
  (0, t.checkStrictMode)(b, d, y.strictTuples);
@@ -3810,8 +3810,8 @@ function bo() {
3810
3810
  }
3811
3811
  m.items = !0;
3812
3812
  const E = a.name("valid");
3813
- N === void 0 && g === 1 ? y(E, () => a.if(E, () => a.break())) : g === 0 ? (a.let(E, !0), N !== void 0 && a.if((0, e._)`${h}.length > 0`, f)) : (a.let(E, !1), f()), c.result(E, () => c.reset());
3814
- function f() {
3813
+ N === void 0 && g === 1 ? y(E, () => a.if(E, () => a.break())) : g === 0 ? (a.let(E, !0), N !== void 0 && a.if((0, e._)`${h}.length > 0`, l)) : (a.let(E, !1), l()), c.result(E, () => c.reset());
3814
+ function l() {
3815
3815
  const p = a.name("_valid"), w = a.let("count", 0);
3816
3816
  y(p, () => a.if(p, () => s(w)));
3817
3817
  }
@@ -3877,15 +3877,15 @@ function wo() {
3877
3877
  const E = m[v];
3878
3878
  if (E.length === 0)
3879
3879
  continue;
3880
- const f = (0, n.propertyInData)(g, N, v, b.opts.ownProperties);
3880
+ const l = (0, n.propertyInData)(g, N, v, b.opts.ownProperties);
3881
3881
  h.setParams({
3882
3882
  property: v,
3883
3883
  depsCount: E.length,
3884
3884
  deps: E.join(", ")
3885
- }), b.allErrors ? g.if(f, () => {
3885
+ }), b.allErrors ? g.if(l, () => {
3886
3886
  for (const y of E)
3887
3887
  (0, n.checkReportMissingProp)(h, y);
3888
- }) : (g.if((0, t._)`${f} && (${(0, n.checkMissingProp)(h, E, u)})`), (0, n.reportMissingProp)(h, u), g.else());
3888
+ }) : (g.if((0, t._)`${l} && (${(0, n.checkMissingProp)(h, E, u)})`), (0, n.reportMissingProp)(h, u), g.else());
3889
3889
  }
3890
3890
  }
3891
3891
  e.validatePropertyDeps = o;
@@ -3895,8 +3895,8 @@ function wo() {
3895
3895
  (0, r.alwaysValidSchema)(u, m[E]) || (g.if(
3896
3896
  (0, n.propertyInData)(g, N, E, u.opts.ownProperties),
3897
3897
  () => {
3898
- const f = h.subschema({ keyword: b, schemaProp: E }, v);
3899
- h.mergeValidEvaluated(f, v);
3898
+ const l = h.subschema({ keyword: b, schemaProp: E }, v);
3899
+ h.mergeValidEvaluated(l, v);
3900
3900
  },
3901
3901
  () => g.var(v, !0)
3902
3902
  // TODO var
@@ -3958,11 +3958,11 @@ function xn() {
3958
3958
  const { allErrors: u, opts: v } = b;
3959
3959
  if (b.props = !0, v.removeAdditional !== "all" && (0, n.alwaysValidSchema)(b, h))
3960
3960
  return;
3961
- const E = (0, e.allSchemaProperties)(m.properties), f = (0, e.allSchemaProperties)(m.patternProperties);
3961
+ const E = (0, e.allSchemaProperties)(m.properties), l = (0, e.allSchemaProperties)(m.patternProperties);
3962
3962
  y(), o.ok((0, t._)`${N} === ${r.default.errors}`);
3963
3963
  function y() {
3964
3964
  i.forIn("key", g, (_) => {
3965
- !E.length && !f.length ? w(_) : i.if(s(_), () => w(_));
3965
+ !E.length && !l.length ? w(_) : i.if(s(_), () => w(_));
3966
3966
  });
3967
3967
  }
3968
3968
  function s(_) {
@@ -3971,7 +3971,7 @@ function xn() {
3971
3971
  const T = (0, n.schemaRefOrVal)(b, m.properties, "properties");
3972
3972
  P = (0, e.isOwnProperty)(i, T, _);
3973
3973
  } else E.length ? P = (0, t.or)(...E.map((T) => (0, t._)`${_} === ${T}`)) : P = t.nil;
3974
- return f.length && (P = (0, t.or)(P, ...f.map((T) => (0, t._)`${(0, e.usePattern)(o, T)}.test(${_})`))), (0, t.not)(P);
3974
+ return l.length && (P = (0, t.or)(P, ...l.map((T) => (0, t._)`${(0, e.usePattern)(o, T)}.test(${_})`))), (0, t.not)(P);
3975
3975
  }
3976
3976
  function p(_) {
3977
3977
  i.code((0, t._)`delete ${g}[${_}]`);
@@ -4020,23 +4020,23 @@ function So() {
4020
4020
  const { gen: o, schema: i, parentSchema: h, data: m, it: g } = a;
4021
4021
  g.opts.removeAdditional === "all" && h.additionalProperties === void 0 && n.default.code(new e.KeywordCxt(g, n.default, "additionalProperties"));
4022
4022
  const N = (0, t.allSchemaProperties)(i);
4023
- for (const f of N)
4024
- g.definedProperties.add(f);
4023
+ for (const l of N)
4024
+ g.definedProperties.add(l);
4025
4025
  g.opts.unevaluated && N.length && g.props !== !0 && (g.props = r.mergeEvaluated.props(o, (0, r.toHash)(N), g.props));
4026
- const b = N.filter((f) => !(0, r.alwaysValidSchema)(g, i[f]));
4026
+ const b = N.filter((l) => !(0, r.alwaysValidSchema)(g, i[l]));
4027
4027
  if (b.length === 0)
4028
4028
  return;
4029
4029
  const u = o.name("valid");
4030
- for (const f of b)
4031
- v(f) ? E(f) : (o.if((0, t.propertyInData)(o, m, f, g.opts.ownProperties)), E(f), g.allErrors || o.else().var(u, !0), o.endIf()), a.it.definedProperties.add(f), a.ok(u);
4032
- function v(f) {
4033
- return g.opts.useDefaults && !g.compositeRule && i[f].default !== void 0;
4030
+ for (const l of b)
4031
+ v(l) ? E(l) : (o.if((0, t.propertyInData)(o, m, l, g.opts.ownProperties)), E(l), g.allErrors || o.else().var(u, !0), o.endIf()), a.it.definedProperties.add(l), a.ok(u);
4032
+ function v(l) {
4033
+ return g.opts.useDefaults && !g.compositeRule && i[l].default !== void 0;
4034
4034
  }
4035
- function E(f) {
4035
+ function E(l) {
4036
4036
  a.subschema({
4037
4037
  keyword: "properties",
4038
- schemaProp: f,
4039
- dataProp: f
4038
+ schemaProp: l,
4039
+ dataProp: l
4040
4040
  }, u);
4041
4041
  }
4042
4042
  }
@@ -4057,7 +4057,7 @@ function Po() {
4057
4057
  return;
4058
4058
  const v = N.strictSchema && !N.allowMatchingProperties && m.properties, E = o.name("valid");
4059
4059
  g.props !== !0 && !(g.props instanceof t.Name) && (g.props = (0, n.evaluatedPropsToName)(o, g.props));
4060
- const { props: f } = g;
4060
+ const { props: l } = g;
4061
4061
  y();
4062
4062
  function y() {
4063
4063
  for (const w of b)
@@ -4076,7 +4076,7 @@ function Po() {
4076
4076
  schemaProp: w,
4077
4077
  dataProp: d,
4078
4078
  dataPropType: n.Type.Str
4079
- }, E), g.opts.unevaluated && f !== !0 ? o.assign((0, t._)`${f}[${d}]`, !0) : !_ && !g.allErrors && o.if((0, t.not)(E), () => o.break());
4079
+ }, E), g.opts.unevaluated && l !== !0 ? o.assign((0, t._)`${l}[${d}]`, !0) : !_ && !g.allErrors && o.if((0, t.not)(E), () => o.break());
4080
4080
  });
4081
4081
  });
4082
4082
  }
@@ -4145,13 +4145,13 @@ function Ro() {
4145
4145
  c.setParams({ passing: N }), a.block(u), c.result(g, () => c.reset(), () => c.error(!0));
4146
4146
  function u() {
4147
4147
  m.forEach((v, E) => {
4148
- let f;
4149
- (0, t.alwaysValidSchema)(h, v) ? a.var(b, !0) : f = c.subschema({
4148
+ let l;
4149
+ (0, t.alwaysValidSchema)(h, v) ? a.var(b, !0) : l = c.subschema({
4150
4150
  keyword: "oneOf",
4151
4151
  schemaProp: E,
4152
4152
  compositeRule: !0
4153
4153
  }, b), E > 0 && a.if((0, e._)`${b} && ${g}`).assign(g, !1).assign(N, (0, e._)`[${N}, ${E}]`).else(), a.if(b, () => {
4154
- a.assign(g, !0), a.assign(N, E), f && c.mergeEvaluated(f, e.Name);
4154
+ a.assign(g, !0), a.assign(N, E), l && c.mergeEvaluated(l, e.Name);
4155
4155
  });
4156
4156
  });
4157
4157
  }
@@ -4214,10 +4214,10 @@ function jo() {
4214
4214
  }, b);
4215
4215
  a.mergeEvaluated(E);
4216
4216
  }
4217
- function v(E, f) {
4217
+ function v(E, l) {
4218
4218
  return () => {
4219
4219
  const y = a.subschema({ keyword: E }, b);
4220
- o.assign(N, b), a.mergeValidEvaluated(y, N), f ? o.assign(f, (0, e._)`${E}`) : a.setParams({ ifClause: E });
4220
+ o.assign(N, b), a.mergeValidEvaluated(y, N), l ? o.assign(l, (0, e._)`${E}`) : a.setParams({ ifClause: E });
4221
4221
  };
4222
4222
  }
4223
4223
  }
@@ -4246,7 +4246,7 @@ function qo() {
4246
4246
  if (Rn) return vt;
4247
4247
  Rn = 1, Object.defineProperty(vt, "__esModule", { value: !0 });
4248
4248
  const e = /* @__PURE__ */ Qn(), t = /* @__PURE__ */ _o(), r = /* @__PURE__ */ Xn(), n = /* @__PURE__ */ $o(), c = /* @__PURE__ */ bo(), a = /* @__PURE__ */ wo(), o = /* @__PURE__ */ Eo(), i = /* @__PURE__ */ xn(), h = /* @__PURE__ */ So(), m = /* @__PURE__ */ Po(), g = /* @__PURE__ */ No(), N = /* @__PURE__ */ Oo(), b = /* @__PURE__ */ Ro(), u = /* @__PURE__ */ Io(), v = /* @__PURE__ */ jo(), E = /* @__PURE__ */ ko();
4249
- function f(y = !1) {
4249
+ function l(y = !1) {
4250
4250
  const s = [
4251
4251
  // any
4252
4252
  g.default,
@@ -4264,7 +4264,7 @@ function qo() {
4264
4264
  ];
4265
4265
  return y ? s.push(t.default, n.default) : s.push(e.default, r.default), s.push(c.default), s;
4266
4266
  }
4267
- return vt.default = f, vt;
4267
+ return vt.default = l, vt;
4268
4268
  }
4269
4269
  var qt = {}, Tt = {}, In;
4270
4270
  function To() {
@@ -4283,7 +4283,7 @@ function To() {
4283
4283
  const { gen: a, data: o, $data: i, schema: h, schemaCode: m, it: g } = n, { opts: N, errSchemaPath: b, schemaEnv: u, self: v } = g;
4284
4284
  if (!N.validateFormats)
4285
4285
  return;
4286
- i ? E() : f();
4286
+ i ? E() : l();
4287
4287
  function E() {
4288
4288
  const y = a.scopeValue("formats", {
4289
4289
  ref: v.formats,
@@ -4298,7 +4298,7 @@ function To() {
4298
4298
  return (0, e._)`${w} && ${w} !== true && ${p} === ${c} && !${T}`;
4299
4299
  }
4300
4300
  }
4301
- function f() {
4301
+ function l() {
4302
4302
  const y = v.formats[h];
4303
4303
  if (!y) {
4304
4304
  d();
@@ -4404,14 +4404,14 @@ function zo() {
4404
4404
  throw new Error("discriminator: mapping is not supported");
4405
4405
  if (!u)
4406
4406
  throw new Error("discriminator: requires oneOf keyword");
4407
- const E = h.let("valid", !1), f = h.const("tag", (0, e._)`${m}${(0, e.getProperty)(v)}`);
4408
- h.if((0, e._)`typeof ${f} == "string"`, () => y(), () => i.error(!1, { discrError: t.DiscrError.Tag, tag: f, tagName: v })), i.ok(E);
4407
+ const E = h.let("valid", !1), l = h.const("tag", (0, e._)`${m}${(0, e.getProperty)(v)}`);
4408
+ h.if((0, e._)`typeof ${l} == "string"`, () => y(), () => i.error(!1, { discrError: t.DiscrError.Tag, tag: l, tagName: v })), i.ok(E);
4409
4409
  function y() {
4410
4410
  const w = p();
4411
4411
  h.if(!1);
4412
4412
  for (const d in w)
4413
- h.elseIf((0, e._)`${f} === ${d}`), h.assign(E, s(w[d]));
4414
- h.else(), i.error(!1, { discrError: t.DiscrError.Mapping, tag: f, tagName: v }), h.endIf();
4413
+ h.elseIf((0, e._)`${l} === ${d}`), h.assign(E, s(w[d]));
4414
+ h.else(), i.error(!1, { discrError: t.DiscrError.Mapping, tag: l, tagName: v }), h.endIf();
4415
4415
  }
4416
4416
  function s(w) {
4417
4417
  const d = h.name("valid"), _ = i.subschema({ keyword: "oneOf", schemaProp: w }, d);
@@ -4651,9 +4651,9 @@ function Jo() {
4651
4651
  if (oe !== void 0)
4652
4652
  return oe || m(B, se);
4653
4653
  }
4654
- const E = /\/|:/, f = /^(?:[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;
4654
+ const E = /\/|:/, l = /^(?:[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;
4655
4655
  function y(A) {
4656
- return E.test(A) && f.test(A);
4656
+ return E.test(A) && l.test(A);
4657
4657
  }
4658
4658
  const s = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
4659
4659
  function p(A) {
@@ -4705,8 +4705,8 @@ function Yo() {
4705
4705
  if (!u.validateFormats)
4706
4706
  return;
4707
4707
  const E = new t.KeywordCxt(b, v.RULES.all.format.definition, "format");
4708
- E.$data ? f() : y();
4709
- function f() {
4708
+ E.$data ? l() : y();
4709
+ function l() {
4710
4710
  const p = h.scopeValue("formats", {
4711
4711
  ref: v.formats,
4712
4712
  code: u.code.formats
@@ -4772,7 +4772,7 @@ function xo() {
4772
4772
  dependencies: "property",
4773
4773
  dependentRequired: "property"
4774
4774
  }, N = /\$\{[^}]+\}/, b = /\$\{([^}]+)\}/g, u = /^""\s*\+\s*|\s*\+\s*""$/g;
4775
- function v(f) {
4775
+ function v(l) {
4776
4776
  return {
4777
4777
  keyword: h,
4778
4778
  schemaType: ["string", "object"],
@@ -4784,28 +4784,28 @@ function xo() {
4784
4784
  const P = w, T = n.strConcat(i.default.instancePath, _.errorPath);
4785
4785
  s.if(r._`${i.default.errors} > 0`, () => {
4786
4786
  if (typeof P == "object") {
4787
- const [O, l] = U(P);
4788
- l && A(l), O && L(O), K(D(P));
4787
+ const [O, f] = U(P);
4788
+ f && A(f), O && L(O), K(D(P));
4789
4789
  }
4790
4790
  const k = typeof P == "string" ? P : P._;
4791
- k && B(k), f.keepErrors || x();
4791
+ k && B(k), l.keepErrors || x();
4792
4792
  });
4793
4793
  function D({ properties: k, items: O }) {
4794
- const l = {};
4794
+ const f = {};
4795
4795
  if (k) {
4796
- l.props = {};
4796
+ f.props = {};
4797
4797
  for (const S in k)
4798
- l.props[S] = [];
4798
+ f.props[S] = [];
4799
4799
  }
4800
4800
  if (O) {
4801
- l.items = {};
4801
+ f.items = {};
4802
4802
  for (let S = 0; S < O.length; S++)
4803
- l.items[S] = [];
4803
+ f.items[S] = [];
4804
4804
  }
4805
- return l;
4805
+ return f;
4806
4806
  }
4807
4807
  function U(k) {
4808
- let O, l;
4808
+ let O, f;
4809
4809
  for (const S in k) {
4810
4810
  if (S === "properties" || S === "items")
4811
4811
  continue;
@@ -4816,14 +4816,14 @@ function xo() {
4816
4816
  for (const z in q)
4817
4817
  F[z] = [];
4818
4818
  } else
4819
- l || (l = {}), l[S] = [];
4819
+ f || (f = {}), f[S] = [];
4820
4820
  }
4821
- return [O, l];
4821
+ return [O, f];
4822
4822
  }
4823
4823
  function A(k) {
4824
- const O = s.const("emErrors", r.stringify(k)), l = s.const("templates", de(k, w));
4824
+ const O = s.const("emErrors", r.stringify(k)), f = s.const("templates", de(k, w));
4825
4825
  s.forOf("err", i.default.vErrors, (z) => s.if(se(z, O), () => s.code(r._`${O}[${z}.keyword].push(${z})`).assign(r._`${z}.${m}`, !0)));
4826
- const { singleError: S } = f;
4826
+ const { singleError: S } = l;
4827
4827
  if (S) {
4828
4828
  const z = s.let("message", r._`""`), H = s.let("paramsErrors", r._`[]`);
4829
4829
  q((G) => {
@@ -4838,17 +4838,17 @@ function xo() {
4838
4838
  s.forIn("key", O, (H) => s.if(r._`${O}[${H}].length`, () => z(H)));
4839
4839
  }
4840
4840
  function F(z) {
4841
- return r._`${z} in ${l} ? ${l}[${z}]() : ${d}[${z}]`;
4841
+ return r._`${z} in ${f} ? ${f}[${z}]() : ${d}[${z}]`;
4842
4842
  }
4843
4843
  }
4844
4844
  function L(k) {
4845
- const O = s.const("emErrors", r.stringify(k)), l = [];
4845
+ const O = s.const("emErrors", r.stringify(k)), f = [];
4846
4846
  for (const H in k)
4847
- l.push([
4847
+ f.push([
4848
4848
  H,
4849
4849
  de(k[H], w[H])
4850
4850
  ]);
4851
- const S = s.const("templates", s.object(...l)), q = s.scopeValue("obj", {
4851
+ const S = s.const("templates", s.object(...f)), q = s.scopeValue("obj", {
4852
4852
  ref: g,
4853
4853
  code: r.stringify(g)
4854
4854
  }), F = s.let("emPropParams"), z = s.let("emParamsErrors");
@@ -4865,17 +4865,17 @@ function xo() {
4865
4865
  }));
4866
4866
  }
4867
4867
  function K(k) {
4868
- const { props: O, items: l } = k;
4869
- if (!O && !l)
4868
+ const { props: O, items: f } = k;
4869
+ if (!O && !f)
4870
4870
  return;
4871
4871
  const S = r._`typeof ${p} == "object"`, q = r._`Array.isArray(${p})`, F = s.let("emErrors");
4872
4872
  let z, H;
4873
4873
  const G = s.let("templates");
4874
- O && l ? (z = s.let("emChildKwd"), s.if(S), s.if(q, () => {
4875
- R(l, w.items), s.assign(z, r.str`items`);
4874
+ O && f ? (z = s.let("emChildKwd"), s.if(S), s.if(q, () => {
4875
+ R(f, w.items), s.assign(z, r.str`items`);
4876
4876
  }, () => {
4877
4877
  R(O, w.properties), s.assign(z, r.str`properties`);
4878
- }), H = r._`[${z}]`) : l ? (s.if(q), R(l, w.items), H = r._`.items`) : O && (s.if(n.and(S, n.not(q))), R(O, w.properties), H = r._`.properties`), s.forOf("err", i.default.vErrors, (I) => oe(I, F, (V) => s.code(r._`${F}[${V}].push(${I})`).assign(r._`${I}.${m}`, !0))), s.forIn("key", F, (I) => s.if(r._`${F}[${I}].length`, () => {
4878
+ }), H = r._`[${z}]`) : f ? (s.if(q), R(f, w.items), H = r._`.items`) : O && (s.if(n.and(S, n.not(q))), R(O, w.properties), H = r._`.properties`), s.forOf("err", i.default.vErrors, (I) => oe(I, F, (V) => s.code(r._`${F}[${V}].push(${I})`).assign(r._`${I}.${m}`, !0))), s.forIn("key", F, (I) => s.if(r._`${F}[${I}].length`, () => {
4879
4879
  o.reportError(y, {
4880
4880
  message: r._`${I} in ${G} ? ${G}[${I}]() : ${d}${H}[${I}]`,
4881
4881
  params: r._`{errors: ${F}[${I}]}`
@@ -4887,7 +4887,7 @@ function xo() {
4887
4887
  }
4888
4888
  function B(k) {
4889
4889
  const O = s.const("emErrs", r._`[]`);
4890
- s.forOf("err", i.default.vErrors, (l) => s.if(te(l), () => s.code(r._`${O}.push(${l})`).assign(r._`${l}.${m}`, !0))), s.if(r._`${O}.length`, () => o.reportError(y, {
4890
+ s.forOf("err", i.default.vErrors, (f) => s.if(te(f), () => s.code(r._`${O}.push(${f})`).assign(r._`${f}.${m}`, !0))), s.if(r._`${O}.length`, () => o.reportError(y, {
4891
4891
  message: M(k),
4892
4892
  params: r._`{errors: ${O}}`
4893
4893
  }));
@@ -4907,28 +4907,28 @@ function xo() {
4907
4907
  r._`/^\\/[^\\/]*$/.test(${k}.schemaPath.slice(${_.errSchemaPath.length}))`
4908
4908
  );
4909
4909
  }
4910
- function oe(k, O, l) {
4910
+ function oe(k, O, f) {
4911
4911
  s.if(n.and(r._`${k}.keyword !== ${h}`, r._`!${k}.${m}`, r._`${k}.instancePath.indexOf(${T}) === 0`), () => {
4912
4912
  const S = s.scopeValue("pattern", {
4913
4913
  ref: /^\/([^/]*)(?:\/|$)/,
4914
4914
  code: r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`
4915
4915
  }), q = s.const("emMatches", r._`${S}.exec(${k}.instancePath.slice(${T}.length))`), F = s.const("emChild", r._`${q} && ${q}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);
4916
- s.if(r._`${F} !== undefined && ${F} in ${O}`, () => l(F));
4916
+ s.if(r._`${F} !== undefined && ${F} in ${O}`, () => f(F));
4917
4917
  });
4918
4918
  }
4919
4919
  function te(k) {
4920
4920
  return n.and(r._`${k}.keyword !== ${h}`, r._`!${k}.${m}`, n.or(r._`${k}.instancePath === ${T}`, n.and(r._`${k}.instancePath.indexOf(${T}) === 0`, r._`${k}.instancePath[${T}.length] === "/"`)), r._`${k}.schemaPath.indexOf(${_.errSchemaPath}) === 0`, r._`${k}.schemaPath[${_.errSchemaPath}.length] === "/"`);
4921
4921
  }
4922
4922
  function de(k, O) {
4923
- const l = [];
4923
+ const f = [];
4924
4924
  for (const S in k) {
4925
4925
  const q = O[S];
4926
- N.test(q) && l.push([S, j(q)]);
4926
+ N.test(q) && f.push([S, j(q)]);
4927
4927
  }
4928
- return s.object(...l);
4928
+ return s.object(...f);
4929
4929
  }
4930
4930
  function M(k) {
4931
- return N.test(k) ? new c._Code(c.safeStringify(k).replace(b, (O, l) => `" + JSON.stringify(${a.getData(l, _)}) + "`).replace(u, "")) : r.stringify(k);
4931
+ return N.test(k) ? new c._Code(c.safeStringify(k).replace(b, (O, f) => `" + JSON.stringify(${a.getData(f, _)}) + "`).replace(u, "")) : r.stringify(k);
4932
4932
  }
4933
4933
  function j(k) {
4934
4934
  return r._`function(){return ${M(k)}}`;
@@ -4961,12 +4961,12 @@ function xo() {
4961
4961
  }
4962
4962
  };
4963
4963
  }
4964
- const E = (f, y = {}) => {
4965
- if (!f.opts.allErrors)
4964
+ const E = (l, y = {}) => {
4965
+ if (!l.opts.allErrors)
4966
4966
  throw new Error("ajv-errors: Ajv option allErrors must be true");
4967
- if (f.opts.jsPropertySyntax)
4967
+ if (l.opts.jsPropertySyntax)
4968
4968
  throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");
4969
- return f.addKeyword(v(y));
4969
+ return l.addKeyword(v(y));
4970
4970
  };
4971
4971
  t.default = E, e.exports = E, e.exports.default = E;
4972
4972
  })(Dt, Dt.exports)), Dt.exports;
@@ -5159,10 +5159,10 @@ function aa(e, t, { signal: r, edges: n } = {}) {
5159
5159
  b(), c = void 0, a = null;
5160
5160
  }, v = () => {
5161
5161
  h();
5162
- }, E = function(...f) {
5162
+ }, E = function(...l) {
5163
5163
  if (r != null && r.aborted)
5164
5164
  return;
5165
- c = this, a = f;
5165
+ c = this, a = l;
5166
5166
  const y = g == null;
5167
5167
  N(), o && y && h();
5168
5168
  };
@@ -7063,7 +7063,7 @@ async function qi(e) {
7063
7063
  var s;
7064
7064
  const u = this;
7065
7065
  or(u);
7066
- const v = Bn(u._newState), E = Bn(u), f = Is(E, v), y = !!((s = Object.keys(f)) != null && s.length);
7066
+ const v = Bn(u._newState), E = Bn(u), l = Is(E, v), y = !!((s = Object.keys(l)) != null && s.length);
7067
7067
  if (!y) return !1;
7068
7068
  if (Ri(u), js(u, v), e.category === "config") {
7069
7069
  Ii(u, v, m);
@@ -7075,7 +7075,7 @@ async function qi(e) {
7075
7075
  {
7076
7076
  t: "edit",
7077
7077
  node: u,
7078
- changes: f,
7078
+ changes: l,
7079
7079
  links: [],
7080
7080
  dirty: RED.nodes.dirty(),
7081
7081
  changed: y
@@ -7103,12 +7103,15 @@ async function qi(e) {
7103
7103
  b
7104
7104
  )), g && i) {
7105
7105
  const u = Object.keys(i)[0];
7106
- u && (i[u] = {
7107
- ...i[u],
7108
- validate: function(v, E) {
7109
- return sa(this, g);
7110
- }
7111
- });
7106
+ if (u) {
7107
+ const { required: v, ...E } = i[u];
7108
+ i[u] = {
7109
+ ...E,
7110
+ validate: function(l, y) {
7111
+ return sa(this, g);
7112
+ }
7113
+ };
7114
+ }
7112
7115
  }
7113
7116
  RED.nodes.registerType(t, {
7114
7117
  type: t,