@video-editor/protocol 0.0.1-beta.20 → 0.0.1-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1059 -1055
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -255,7 +255,7 @@ function Ln() {
255
255
  })(Or)), Or;
256
256
  }
257
257
  var $n;
258
- function W() {
258
+ function Z() {
259
259
  return $n || ($n = 1, (function(l) {
260
260
  Object.defineProperty(l, "__esModule", { value: !0 }), l.or = l.and = l.not = l.CodeGen = l.operators = l.varKinds = l.ValueScopeName = l.ValueScope = l.Scope = l.Name = l.regexpCode = l.stringify = l.getProperty = l.nil = l.strConcat = l.str = l._ = void 0;
261
261
  const o = Gt(), c = Ln();
@@ -302,45 +302,45 @@ function W() {
302
302
  optimizeNodes() {
303
303
  return this;
304
304
  }
305
- optimizeNames(x, T) {
305
+ optimizeNames(x, I) {
306
306
  return this;
307
307
  }
308
308
  }
309
309
  class g extends h {
310
- constructor(x, T, D) {
311
- super(), this.varKind = x, this.name = T, this.rhs = D;
310
+ constructor(x, I, D) {
311
+ super(), this.varKind = x, this.name = I, this.rhs = D;
312
312
  }
313
- render({ es5: x, _n: T }) {
313
+ render({ es5: x, _n: I }) {
314
314
  const D = x ? c.varKinds.var : this.varKind, N = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
315
- return `${D} ${this.name}${N};` + T;
315
+ return `${D} ${this.name}${N};` + I;
316
316
  }
317
- optimizeNames(x, T) {
317
+ optimizeNames(x, I) {
318
318
  if (x[this.name.str])
319
- return this.rhs && (this.rhs = V(this.rhs, x, T)), this;
319
+ return this.rhs && (this.rhs = V(this.rhs, x, I)), this;
320
320
  }
321
321
  get names() {
322
322
  return this.rhs instanceof o._CodeOrName ? this.rhs.names : {};
323
323
  }
324
324
  }
325
325
  class n extends h {
326
- constructor(x, T, D) {
327
- super(), this.lhs = x, this.rhs = T, this.sideEffects = D;
326
+ constructor(x, I, D) {
327
+ super(), this.lhs = x, this.rhs = I, this.sideEffects = D;
328
328
  }
329
329
  render({ _n: x }) {
330
330
  return `${this.lhs} = ${this.rhs};` + x;
331
331
  }
332
- optimizeNames(x, T) {
332
+ optimizeNames(x, I) {
333
333
  if (!(this.lhs instanceof o.Name && !x[this.lhs.str] && !this.sideEffects))
334
- return this.rhs = V(this.rhs, x, T), this;
334
+ return this.rhs = V(this.rhs, x, I), this;
335
335
  }
336
336
  get names() {
337
337
  const x = this.lhs instanceof o.Name ? {} : { ...this.lhs.names };
338
- return j(x, this.rhs);
338
+ return G(x, this.rhs);
339
339
  }
340
340
  }
341
341
  class v extends n {
342
- constructor(x, T, D, N) {
343
- super(x, D, N), this.op = T;
342
+ constructor(x, I, D, N) {
343
+ super(x, D, N), this.op = I;
344
344
  }
345
345
  render({ _n: x }) {
346
346
  return `${this.lhs} ${this.op}= ${this.rhs};` + x;
@@ -383,8 +383,8 @@ function W() {
383
383
  optimizeNodes() {
384
384
  return `${this.code}` ? this : void 0;
385
385
  }
386
- optimizeNames(x, T) {
387
- return this.code = V(this.code, x, T), this;
386
+ optimizeNames(x, I) {
387
+ return this.code = V(this.code, x, I), this;
388
388
  }
389
389
  get names() {
390
390
  return this.code instanceof o._CodeOrName ? this.code.names : {};
@@ -395,28 +395,28 @@ function W() {
395
395
  super(), this.nodes = x;
396
396
  }
397
397
  render(x) {
398
- return this.nodes.reduce((T, D) => T + D.render(x), "");
398
+ return this.nodes.reduce((I, D) => I + D.render(x), "");
399
399
  }
400
400
  optimizeNodes() {
401
401
  const { nodes: x } = this;
402
- let T = x.length;
403
- for (; T--; ) {
404
- const D = x[T].optimizeNodes();
405
- Array.isArray(D) ? x.splice(T, 1, ...D) : D ? x[T] = D : x.splice(T, 1);
402
+ let I = x.length;
403
+ for (; I--; ) {
404
+ const D = x[I].optimizeNodes();
405
+ Array.isArray(D) ? x.splice(I, 1, ...D) : D ? x[I] = D : x.splice(I, 1);
406
406
  }
407
407
  return x.length > 0 ? this : void 0;
408
408
  }
409
- optimizeNames(x, T) {
409
+ optimizeNames(x, I) {
410
410
  const { nodes: D } = this;
411
411
  let N = D.length;
412
412
  for (; N--; ) {
413
413
  const L = D[N];
414
- L.optimizeNames(x, T) || (K(x, L.names), D.splice(N, 1));
414
+ L.optimizeNames(x, I) || (K(x, L.names), D.splice(N, 1));
415
415
  }
416
416
  return D.length > 0 ? this : void 0;
417
417
  }
418
418
  get names() {
419
- return this.nodes.reduce((x, T) => M(x, T.names), {});
419
+ return this.nodes.reduce((x, I) => M(x, I.names), {});
420
420
  }
421
421
  }
422
422
  class e extends a {
@@ -430,36 +430,36 @@ function W() {
430
430
  }
431
431
  s.kind = "else";
432
432
  class f extends e {
433
- constructor(x, T) {
434
- super(T), this.condition = x;
433
+ constructor(x, I) {
434
+ super(I), this.condition = x;
435
435
  }
436
436
  render(x) {
437
- let T = `if(${this.condition})` + super.render(x);
438
- return this.else && (T += "else " + this.else.render(x)), T;
437
+ let I = `if(${this.condition})` + super.render(x);
438
+ return this.else && (I += "else " + this.else.render(x)), I;
439
439
  }
440
440
  optimizeNodes() {
441
441
  super.optimizeNodes();
442
442
  const x = this.condition;
443
443
  if (x === !0)
444
444
  return this.nodes;
445
- let T = this.else;
446
- if (T) {
447
- const D = T.optimizeNodes();
448
- T = this.else = Array.isArray(D) ? new s(D) : D;
445
+ let I = this.else;
446
+ if (I) {
447
+ const D = I.optimizeNodes();
448
+ I = this.else = Array.isArray(D) ? new s(D) : D;
449
449
  }
450
- if (T)
451
- return x === !1 ? T instanceof f ? T : T.nodes : this.nodes.length ? this : new f(ee(x), T instanceof f ? [T] : T.nodes);
450
+ if (I)
451
+ return x === !1 ? I instanceof f ? I : I.nodes : this.nodes.length ? this : new f(ee(x), I instanceof f ? [I] : I.nodes);
452
452
  if (!(x === !1 || !this.nodes.length))
453
453
  return this;
454
454
  }
455
- optimizeNames(x, T) {
455
+ optimizeNames(x, I) {
456
456
  var D;
457
- if (this.else = (D = this.else) === null || D === void 0 ? void 0 : D.optimizeNames(x, T), !!(super.optimizeNames(x, T) || this.else))
458
- return this.condition = V(this.condition, x, T), this;
457
+ if (this.else = (D = this.else) === null || D === void 0 ? void 0 : D.optimizeNames(x, I), !!(super.optimizeNames(x, I) || this.else))
458
+ return this.condition = V(this.condition, x, I), this;
459
459
  }
460
460
  get names() {
461
461
  const x = super.names;
462
- return j(x, this.condition), this.else && M(x, this.else.names), x;
462
+ return G(x, this.condition), this.else && M(x, this.else.names), x;
463
463
  }
464
464
  }
465
465
  f.kind = "if";
@@ -473,45 +473,45 @@ function W() {
473
473
  render(x) {
474
474
  return `for(${this.iteration})` + super.render(x);
475
475
  }
476
- optimizeNames(x, T) {
477
- if (super.optimizeNames(x, T))
478
- return this.iteration = V(this.iteration, x, T), this;
476
+ optimizeNames(x, I) {
477
+ if (super.optimizeNames(x, I))
478
+ return this.iteration = V(this.iteration, x, I), this;
479
479
  }
480
480
  get names() {
481
481
  return M(super.names, this.iteration.names);
482
482
  }
483
483
  }
484
484
  class m extends d {
485
- constructor(x, T, D, N) {
486
- super(), this.varKind = x, this.name = T, this.from = D, this.to = N;
485
+ constructor(x, I, D, N) {
486
+ super(), this.varKind = x, this.name = I, this.from = D, this.to = N;
487
487
  }
488
488
  render(x) {
489
- const T = x.es5 ? c.varKinds.var : this.varKind, { name: D, from: N, to: L } = this;
490
- return `for(${T} ${D}=${N}; ${D}<${L}; ${D}++)` + super.render(x);
489
+ const I = x.es5 ? c.varKinds.var : this.varKind, { name: D, from: N, to: L } = this;
490
+ return `for(${I} ${D}=${N}; ${D}<${L}; ${D}++)` + super.render(x);
491
491
  }
492
492
  get names() {
493
- const x = j(super.names, this.from);
494
- return j(x, this.to);
493
+ const x = G(super.names, this.from);
494
+ return G(x, this.to);
495
495
  }
496
496
  }
497
497
  class b extends d {
498
- constructor(x, T, D, N) {
499
- super(), this.loop = x, this.varKind = T, this.name = D, this.iterable = N;
498
+ constructor(x, I, D, N) {
499
+ super(), this.loop = x, this.varKind = I, this.name = D, this.iterable = N;
500
500
  }
501
501
  render(x) {
502
502
  return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(x);
503
503
  }
504
- optimizeNames(x, T) {
505
- if (super.optimizeNames(x, T))
506
- return this.iterable = V(this.iterable, x, T), this;
504
+ optimizeNames(x, I) {
505
+ if (super.optimizeNames(x, I))
506
+ return this.iterable = V(this.iterable, x, I), this;
507
507
  }
508
508
  get names() {
509
509
  return M(super.names, this.iterable.names);
510
510
  }
511
511
  }
512
512
  class w extends e {
513
- constructor(x, T, D) {
514
- super(), this.name = x, this.args = T, this.async = D;
513
+ constructor(x, I, D) {
514
+ super(), this.name = x, this.args = I, this.async = D;
515
515
  }
516
516
  render(x) {
517
517
  return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(x);
@@ -524,18 +524,18 @@ function W() {
524
524
  }
525
525
  }
526
526
  U.kind = "return";
527
- class A extends e {
527
+ class P extends e {
528
528
  render(x) {
529
- let T = "try" + super.render(x);
530
- return this.catch && (T += this.catch.render(x)), this.finally && (T += this.finally.render(x)), T;
529
+ let I = "try" + super.render(x);
530
+ return this.catch && (I += this.catch.render(x)), this.finally && (I += this.finally.render(x)), I;
531
531
  }
532
532
  optimizeNodes() {
533
- var x, T;
534
- return super.optimizeNodes(), (x = this.catch) === null || x === void 0 || x.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
533
+ var x, I;
534
+ return super.optimizeNodes(), (x = this.catch) === null || x === void 0 || x.optimizeNodes(), (I = this.finally) === null || I === void 0 || I.optimizeNodes(), this;
535
535
  }
536
- optimizeNames(x, T) {
536
+ optimizeNames(x, I) {
537
537
  var D, N;
538
- return super.optimizeNames(x, T), (D = this.catch) === null || D === void 0 || D.optimizeNames(x, T), (N = this.finally) === null || N === void 0 || N.optimizeNames(x, T), this;
538
+ return super.optimizeNames(x, I), (D = this.catch) === null || D === void 0 || D.optimizeNames(x, I), (N = this.finally) === null || N === void 0 || N.optimizeNames(x, I), this;
539
539
  }
540
540
  get names() {
541
541
  const x = super.names;
@@ -551,15 +551,15 @@ function W() {
551
551
  }
552
552
  }
553
553
  C.kind = "catch";
554
- class $ extends e {
554
+ class O extends e {
555
555
  render(x) {
556
556
  return "finally" + super.render(x);
557
557
  }
558
558
  }
559
- $.kind = "finally";
559
+ O.kind = "finally";
560
560
  class z {
561
- constructor(x, T = {}) {
562
- this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...T, _n: T.lines ? `
561
+ constructor(x, I = {}) {
562
+ this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...I, _n: I.lines ? `
563
563
  ` : "" }, this._extScope = x, this._scope = new c.Scope({ parent: x }), this._nodes = [new r()];
564
564
  }
565
565
  toString() {
@@ -574,12 +574,12 @@ function W() {
574
574
  return this._extScope.name(x);
575
575
  }
576
576
  // reserves unique name in the external scope and assigns value to it
577
- scopeValue(x, T) {
578
- const D = this._extScope.value(x, T);
577
+ scopeValue(x, I) {
578
+ const D = this._extScope.value(x, I);
579
579
  return (this._values[D.prefix] || (this._values[D.prefix] = /* @__PURE__ */ new Set())).add(D), D;
580
580
  }
581
- getScopeValue(x, T) {
582
- return this._extScope.getValue(x, T);
581
+ getScopeValue(x, I) {
582
+ return this._extScope.getValue(x, I);
583
583
  }
584
584
  // return code that assigns values in the external scope to the names that are used internally
585
585
  // (same names that were returned by gen.scopeName or gen.scopeValue)
@@ -589,29 +589,29 @@ function W() {
589
589
  scopeCode() {
590
590
  return this._extScope.scopeCode(this._values);
591
591
  }
592
- _def(x, T, D, N) {
593
- const L = this._scope.toName(T);
592
+ _def(x, I, D, N) {
593
+ const L = this._scope.toName(I);
594
594
  return D !== void 0 && N && (this._constants[L.str] = D), this._leafNode(new g(x, L, D)), L;
595
595
  }
596
596
  // `const` declaration (`var` in es5 mode)
597
- const(x, T, D) {
598
- return this._def(c.varKinds.const, x, T, D);
597
+ const(x, I, D) {
598
+ return this._def(c.varKinds.const, x, I, D);
599
599
  }
600
600
  // `let` declaration with optional assignment (`var` in es5 mode)
601
- let(x, T, D) {
602
- return this._def(c.varKinds.let, x, T, D);
601
+ let(x, I, D) {
602
+ return this._def(c.varKinds.let, x, I, D);
603
603
  }
604
604
  // `var` declaration with optional assignment
605
- var(x, T, D) {
606
- return this._def(c.varKinds.var, x, T, D);
605
+ var(x, I, D) {
606
+ return this._def(c.varKinds.var, x, I, D);
607
607
  }
608
608
  // assignment code
609
- assign(x, T, D) {
610
- return this._leafNode(new n(x, T, D));
609
+ assign(x, I, D) {
610
+ return this._leafNode(new n(x, I, D));
611
611
  }
612
612
  // `+=` code
613
- add(x, T) {
614
- return this._leafNode(new v(x, l.operators.ADD, T));
613
+ add(x, I) {
614
+ return this._leafNode(new v(x, l.operators.ADD, I));
615
615
  }
616
616
  // appends passed SafeExpr to code or executes Block
617
617
  code(x) {
@@ -619,17 +619,17 @@ function W() {
619
619
  }
620
620
  // returns code for object literal for the passed argument list of key-value pairs
621
621
  object(...x) {
622
- const T = ["{"];
622
+ const I = ["{"];
623
623
  for (const [D, N] of x)
624
- T.length > 1 && T.push(","), T.push(D), (D !== N || this.opts.es5) && (T.push(":"), (0, o.addCodeArg)(T, N));
625
- return T.push("}"), new o._Code(T);
624
+ I.length > 1 && I.push(","), I.push(D), (D !== N || this.opts.es5) && (I.push(":"), (0, o.addCodeArg)(I, N));
625
+ return I.push("}"), new o._Code(I);
626
626
  }
627
627
  // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
628
- if(x, T, D) {
629
- if (this._blockNode(new f(x)), T && D)
630
- this.code(T).else().code(D).endIf();
631
- else if (T)
632
- this.code(T).endIf();
628
+ if(x, I, D) {
629
+ if (this._blockNode(new f(x)), I && D)
630
+ this.code(I).else().code(D).endIf();
631
+ else if (I)
632
+ this.code(I).endIf();
633
633
  else if (D)
634
634
  throw new Error('CodeGen: "else" body without "then" body');
635
635
  return this;
@@ -646,36 +646,36 @@ function W() {
646
646
  endIf() {
647
647
  return this._endBlockNode(f, s);
648
648
  }
649
- _for(x, T) {
650
- return this._blockNode(x), T && this.code(T).endFor(), this;
649
+ _for(x, I) {
650
+ return this._blockNode(x), I && this.code(I).endFor(), this;
651
651
  }
652
652
  // a generic `for` clause (or statement if `forBody` is passed)
653
- for(x, T) {
654
- return this._for(new p(x), T);
653
+ for(x, I) {
654
+ return this._for(new p(x), I);
655
655
  }
656
656
  // `for` statement for a range of values
657
- forRange(x, T, D, N, L = this.opts.es5 ? c.varKinds.var : c.varKinds.let) {
657
+ forRange(x, I, D, N, L = this.opts.es5 ? c.varKinds.var : c.varKinds.let) {
658
658
  const q = this._scope.toName(x);
659
- return this._for(new m(L, q, T, D), () => N(q));
659
+ return this._for(new m(L, q, I, D), () => N(q));
660
660
  }
661
661
  // `for-of` statement (in es5 mode replace with a normal for loop)
662
- forOf(x, T, D, N = c.varKinds.const) {
662
+ forOf(x, I, D, N = c.varKinds.const) {
663
663
  const L = this._scope.toName(x);
664
664
  if (this.opts.es5) {
665
- const q = T instanceof o.Name ? T : this.var("_arr", T);
665
+ const q = I instanceof o.Name ? I : this.var("_arr", I);
666
666
  return this.forRange("_i", 0, (0, o._)`${q}.length`, (H) => {
667
667
  this.var(L, (0, o._)`${q}[${H}]`), D(L);
668
668
  });
669
669
  }
670
- return this._for(new b("of", N, L, T), () => D(L));
670
+ return this._for(new b("of", N, L, I), () => D(L));
671
671
  }
672
672
  // `for-in` statement.
673
673
  // With option `ownProperties` replaced with a `for-of` loop for object keys
674
- forIn(x, T, D, N = this.opts.es5 ? c.varKinds.var : c.varKinds.const) {
674
+ forIn(x, I, D, N = this.opts.es5 ? c.varKinds.var : c.varKinds.const) {
675
675
  if (this.opts.ownProperties)
676
- return this.forOf(x, (0, o._)`Object.keys(${T})`, D);
676
+ return this.forOf(x, (0, o._)`Object.keys(${I})`, D);
677
677
  const L = this._scope.toName(x);
678
- return this._for(new b("in", N, L, T), () => D(L));
678
+ return this._for(new b("in", N, L, I), () => D(L));
679
679
  }
680
680
  // end `for` loop
681
681
  endFor() {
@@ -691,43 +691,43 @@ function W() {
691
691
  }
692
692
  // `return` statement
693
693
  return(x) {
694
- const T = new U();
695
- if (this._blockNode(T), this.code(x), T.nodes.length !== 1)
694
+ const I = new U();
695
+ if (this._blockNode(I), this.code(x), I.nodes.length !== 1)
696
696
  throw new Error('CodeGen: "return" should have one node');
697
697
  return this._endBlockNode(U);
698
698
  }
699
699
  // `try` statement
700
- try(x, T, D) {
701
- if (!T && !D)
700
+ try(x, I, D) {
701
+ if (!I && !D)
702
702
  throw new Error('CodeGen: "try" without "catch" and "finally"');
703
- const N = new A();
704
- if (this._blockNode(N), this.code(x), T) {
703
+ const N = new P();
704
+ if (this._blockNode(N), this.code(x), I) {
705
705
  const L = this.name("e");
706
- this._currNode = N.catch = new C(L), T(L);
706
+ this._currNode = N.catch = new C(L), I(L);
707
707
  }
708
- return D && (this._currNode = N.finally = new $(), this.code(D)), this._endBlockNode(C, $);
708
+ return D && (this._currNode = N.finally = new O(), this.code(D)), this._endBlockNode(C, O);
709
709
  }
710
710
  // `throw` statement
711
711
  throw(x) {
712
712
  return this._leafNode(new E(x));
713
713
  }
714
714
  // start self-balancing block
715
- block(x, T) {
716
- return this._blockStarts.push(this._nodes.length), x && this.code(x).endBlock(T), this;
715
+ block(x, I) {
716
+ return this._blockStarts.push(this._nodes.length), x && this.code(x).endBlock(I), this;
717
717
  }
718
718
  // end the current self-balancing block
719
719
  endBlock(x) {
720
- const T = this._blockStarts.pop();
721
- if (T === void 0)
720
+ const I = this._blockStarts.pop();
721
+ if (I === void 0)
722
722
  throw new Error("CodeGen: not in self-balancing block");
723
- const D = this._nodes.length - T;
723
+ const D = this._nodes.length - I;
724
724
  if (D < 0 || x !== void 0 && D !== x)
725
725
  throw new Error(`CodeGen: wrong number of nodes: ${D} vs ${x} expected`);
726
- return this._nodes.length = T, this;
726
+ return this._nodes.length = I, this;
727
727
  }
728
728
  // `function` heading (or definition if funcBody is passed)
729
- func(x, T = o.nil, D, N) {
730
- return this._blockNode(new w(x, T, D)), N && this.code(N).endFunc(), this;
729
+ func(x, I = o.nil, D, N) {
730
+ return this._blockNode(new w(x, I, D)), N && this.code(N).endFunc(), this;
731
731
  }
732
732
  // end function definition
733
733
  endFunc() {
@@ -743,17 +743,17 @@ function W() {
743
743
  _blockNode(x) {
744
744
  this._currNode.nodes.push(x), this._nodes.push(x);
745
745
  }
746
- _endBlockNode(x, T) {
746
+ _endBlockNode(x, I) {
747
747
  const D = this._currNode;
748
- if (D instanceof x || T && D instanceof T)
748
+ if (D instanceof x || I && D instanceof I)
749
749
  return this._nodes.pop(), this;
750
- throw new Error(`CodeGen: not in block "${T ? `${x.kind}/${T.kind}` : x.kind}"`);
750
+ throw new Error(`CodeGen: not in block "${I ? `${x.kind}/${I.kind}` : x.kind}"`);
751
751
  }
752
752
  _elseNode(x) {
753
- const T = this._currNode;
754
- if (!(T instanceof f))
753
+ const I = this._currNode;
754
+ if (!(I instanceof f))
755
755
  throw new Error('CodeGen: "else" without "if"');
756
- return this._currNode = T.else = x, this;
756
+ return this._currNode = I.else = x, this;
757
757
  }
758
758
  get _root() {
759
759
  return this._nodes[0];
@@ -763,56 +763,56 @@ function W() {
763
763
  return x[x.length - 1];
764
764
  }
765
765
  set _currNode(x) {
766
- const T = this._nodes;
767
- T[T.length - 1] = x;
766
+ const I = this._nodes;
767
+ I[I.length - 1] = x;
768
768
  }
769
769
  }
770
770
  l.CodeGen = z;
771
- function M(I, x) {
772
- for (const T in x)
773
- I[T] = (I[T] || 0) + (x[T] || 0);
774
- return I;
775
- }
776
- function j(I, x) {
777
- return x instanceof o._CodeOrName ? M(I, x.names) : I;
778
- }
779
- function V(I, x, T) {
780
- if (I instanceof o.Name)
781
- return D(I);
782
- if (!N(I))
783
- return I;
784
- return new o._Code(I._items.reduce((L, q) => (q instanceof o.Name && (q = D(q)), q instanceof o._Code ? L.push(...q._items) : L.push(q), L), []));
771
+ function M(T, x) {
772
+ for (const I in x)
773
+ T[I] = (T[I] || 0) + (x[I] || 0);
774
+ return T;
775
+ }
776
+ function G(T, x) {
777
+ return x instanceof o._CodeOrName ? M(T, x.names) : T;
778
+ }
779
+ function V(T, x, I) {
780
+ if (T instanceof o.Name)
781
+ return D(T);
782
+ if (!N(T))
783
+ return T;
784
+ return new o._Code(T._items.reduce((L, q) => (q instanceof o.Name && (q = D(q)), q instanceof o._Code ? L.push(...q._items) : L.push(q), L), []));
785
785
  function D(L) {
786
- const q = T[L.str];
786
+ const q = I[L.str];
787
787
  return q === void 0 || x[L.str] !== 1 ? L : (delete x[L.str], q);
788
788
  }
789
789
  function N(L) {
790
- return L instanceof o._Code && L._items.some((q) => q instanceof o.Name && x[q.str] === 1 && T[q.str] !== void 0);
790
+ return L instanceof o._Code && L._items.some((q) => q instanceof o.Name && x[q.str] === 1 && I[q.str] !== void 0);
791
791
  }
792
792
  }
793
- function K(I, x) {
794
- for (const T in x)
795
- I[T] = (I[T] || 0) - (x[T] || 0);
793
+ function K(T, x) {
794
+ for (const I in x)
795
+ T[I] = (T[I] || 0) - (x[I] || 0);
796
796
  }
797
- function ee(I) {
798
- return typeof I == "boolean" || typeof I == "number" || I === null ? !I : (0, o._)`!${k(I)}`;
797
+ function ee(T) {
798
+ return typeof T == "boolean" || typeof T == "number" || T === null ? !T : (0, o._)`!${k(T)}`;
799
799
  }
800
800
  l.not = ee;
801
- const J = P(l.operators.AND);
802
- function X(...I) {
803
- return I.reduce(J);
801
+ const J = A(l.operators.AND);
802
+ function X(...T) {
803
+ return T.reduce(J);
804
804
  }
805
805
  l.and = X;
806
- const ne = P(l.operators.OR);
807
- function B(...I) {
808
- return I.reduce(ne);
806
+ const ne = A(l.operators.OR);
807
+ function B(...T) {
808
+ return T.reduce(ne);
809
809
  }
810
810
  l.or = B;
811
- function P(I) {
812
- return (x, T) => x === o.nil ? T : T === o.nil ? x : (0, o._)`${k(x)} ${I} ${k(T)}`;
811
+ function A(T) {
812
+ return (x, I) => x === o.nil ? I : I === o.nil ? x : (0, o._)`${k(x)} ${T} ${k(I)}`;
813
813
  }
814
- function k(I) {
815
- return I instanceof o.Name ? I : (0, o._)`(${I})`;
814
+ function k(T) {
815
+ return T instanceof o.Name ? T : (0, o._)`(${T})`;
816
816
  }
817
817
  })(Lr)), Lr;
818
818
  }
@@ -820,7 +820,7 @@ var Q = {}, On;
820
820
  function re() {
821
821
  if (On) return Q;
822
822
  On = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.checkStrictMode = Q.getErrorPath = Q.Type = Q.useFunc = Q.setEvaluated = Q.evaluatedPropsToName = Q.mergeEvaluated = Q.eachItem = Q.unescapeJsonPointer = Q.escapeJsonPointer = Q.escapeFragment = Q.unescapeFragment = Q.schemaRefOrVal = Q.schemaHasRulesButRef = Q.schemaHasRules = Q.checkUnknownRules = Q.alwaysValidSchema = Q.toHash = void 0;
823
- const l = W(), o = Gt();
823
+ const l = Z(), o = Gt();
824
824
  function c(b) {
825
825
  const w = {};
826
826
  for (const U of b)
@@ -833,12 +833,12 @@ function re() {
833
833
  }
834
834
  Q.alwaysValidSchema = u;
835
835
  function _(b, w = b.schema) {
836
- const { opts: U, self: A } = b;
836
+ const { opts: U, self: P } = b;
837
837
  if (!U.strictSchema || typeof w == "boolean")
838
838
  return;
839
- const C = A.RULES.keywords;
840
- for (const $ in w)
841
- C[$] || m(b, `unknown keyword: "${$}"`);
839
+ const C = P.RULES.keywords;
840
+ for (const O in w)
841
+ C[O] || m(b, `unknown keyword: "${O}"`);
842
842
  }
843
843
  Q.checkUnknownRules = _;
844
844
  function h(b, w) {
@@ -859,14 +859,14 @@ function re() {
859
859
  return !1;
860
860
  }
861
861
  Q.schemaHasRulesButRef = g;
862
- function n({ topSchemaRef: b, schemaPath: w }, U, A, C) {
862
+ function n({ topSchemaRef: b, schemaPath: w }, U, P, C) {
863
863
  if (!C) {
864
864
  if (typeof U == "number" || typeof U == "boolean")
865
865
  return U;
866
866
  if (typeof U == "string")
867
867
  return (0, l._)`${U}`;
868
868
  }
869
- return (0, l._)`${b}${w}${(0, l.getProperty)(A)}`;
869
+ return (0, l._)`${b}${w}${(0, l.getProperty)(P)}`;
870
870
  }
871
871
  Q.schemaRefOrVal = n;
872
872
  function v(b) {
@@ -893,10 +893,10 @@ function re() {
893
893
  w(b);
894
894
  }
895
895
  Q.eachItem = t;
896
- function a({ mergeNames: b, mergeToName: w, mergeValues: U, resultToName: A }) {
897
- return (C, $, z, M) => {
898
- const j = z === void 0 ? $ : z instanceof l.Name ? ($ instanceof l.Name ? b(C, $, z) : w(C, $, z), z) : $ instanceof l.Name ? (w(C, z, $), $) : U($, z);
899
- return M === l.Name && !(j instanceof l.Name) ? A(C, j) : j;
896
+ function a({ mergeNames: b, mergeToName: w, mergeValues: U, resultToName: P }) {
897
+ return (C, O, z, M) => {
898
+ const G = z === void 0 ? O : z instanceof l.Name ? (O instanceof l.Name ? b(C, O, z) : w(C, O, z), z) : O instanceof l.Name ? (w(C, z, O), O) : U(O, z);
899
+ return M === l.Name && !(G instanceof l.Name) ? P(C, G) : G;
900
900
  };
901
901
  }
902
902
  Q.mergeEvaluated = {
@@ -925,7 +925,7 @@ function re() {
925
925
  }
926
926
  Q.evaluatedPropsToName = e;
927
927
  function r(b, w, U) {
928
- Object.keys(U).forEach((A) => b.assign((0, l._)`${w}${(0, l.getProperty)(A)}`, !0));
928
+ Object.keys(U).forEach((P) => b.assign((0, l._)`${w}${(0, l.getProperty)(P)}`, !0));
929
929
  }
930
930
  Q.setEvaluated = r;
931
931
  const s = {};
@@ -942,8 +942,8 @@ function re() {
942
942
  })(d || (Q.Type = d = {}));
943
943
  function p(b, w, U) {
944
944
  if (b instanceof l.Name) {
945
- const A = w === d.Num;
946
- return U ? A ? (0, l._)`"[" + ${b} + "]"` : (0, l._)`"['" + ${b} + "']"` : A ? (0, l._)`"/" + ${b}` : (0, l._)`"/" + ${b}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
945
+ const P = w === d.Num;
946
+ return U ? P ? (0, l._)`"[" + ${b} + "]"` : (0, l._)`"['" + ${b} + "']"` : P ? (0, l._)`"/" + ${b}` : (0, l._)`"/" + ${b}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
947
947
  }
948
948
  return U ? (0, l.getProperty)(b).toString() : "/" + y(b);
949
949
  }
@@ -961,7 +961,7 @@ var oi = {}, Nn;
961
961
  function De() {
962
962
  if (Nn) return oi;
963
963
  Nn = 1, Object.defineProperty(oi, "__esModule", { value: !0 });
964
- const l = W(), o = {
964
+ const l = Z(), o = {
965
965
  // validation function arguments
966
966
  data: new l.Name("data"),
967
967
  // data passed to validation function
@@ -996,15 +996,15 @@ var Mn;
996
996
  function Xt() {
997
997
  return Mn || (Mn = 1, (function(l) {
998
998
  Object.defineProperty(l, "__esModule", { value: !0 }), l.extendErrors = l.resetErrorsCount = l.reportExtraError = l.reportError = l.keyword$DataError = l.keywordError = void 0;
999
- const o = W(), c = re(), u = De();
999
+ const o = Z(), c = re(), u = De();
1000
1000
  l.keywordError = {
1001
1001
  message: ({ keyword: s }) => (0, o.str)`must pass "${s}" keyword validation`
1002
1002
  }, l.keyword$DataError = {
1003
1003
  message: ({ keyword: s, schemaType: f }) => f ? (0, o.str)`"${s}" keyword must be ${f} ($data)` : (0, o.str)`"${s}" keyword is invalid ($data)`
1004
1004
  };
1005
1005
  function _(s, f = l.keywordError, d, p) {
1006
- const { it: m } = s, { gen: b, compositeRule: w, allErrors: U } = m, A = E(s, f, d);
1007
- p ?? (w || U) ? v(b, A) : S(m, (0, o._)`[${A}]`);
1006
+ const { it: m } = s, { gen: b, compositeRule: w, allErrors: U } = m, P = E(s, f, d);
1007
+ p ?? (w || U) ? v(b, P) : S(m, (0, o._)`[${P}]`);
1008
1008
  }
1009
1009
  l.reportError = _;
1010
1010
  function h(s, f = l.keywordError, d) {
@@ -1063,8 +1063,8 @@ function Xt() {
1063
1063
  return d && (m = (0, o.str)`${m}${(0, c.getErrorPath)(d, c.Type.Str)}`), [y.schemaPath, m];
1064
1064
  }
1065
1065
  function r(s, { params: f, message: d }, p) {
1066
- const { keyword: m, data: b, schemaValue: w, it: U } = s, { opts: A, propertyName: C, topSchemaRef: $, schemaPath: z } = U;
1067
- p.push([y.keyword, m], [y.params, typeof f == "function" ? f(s) : f || (0, o._)`{}`]), A.messages && p.push([y.message, typeof d == "function" ? d(s) : d]), A.verbose && p.push([y.schema, w], [y.parentSchema, (0, o._)`${$}${z}`], [u.default.data, b]), C && p.push([y.propertyName, C]);
1066
+ const { keyword: m, data: b, schemaValue: w, it: U } = s, { opts: P, propertyName: C, topSchemaRef: O, schemaPath: z } = U;
1067
+ p.push([y.keyword, m], [y.params, typeof f == "function" ? f(s) : f || (0, o._)`{}`]), P.messages && p.push([y.message, typeof d == "function" ? d(s) : d]), P.verbose && p.push([y.schema, w], [y.parentSchema, (0, o._)`${O}${z}`], [u.default.data, b]), C && p.push([y.propertyName, C]);
1068
1068
  }
1069
1069
  })(Dr)), Dr;
1070
1070
  }
@@ -1072,7 +1072,7 @@ var jn;
1072
1072
  function bl() {
1073
1073
  if (jn) return Ge;
1074
1074
  jn = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.boolOrEmptySchema = Ge.topBoolOrEmptySchema = void 0;
1075
- const l = Xt(), o = W(), c = De(), u = {
1075
+ const l = Xt(), o = Z(), c = De(), u = {
1076
1076
  message: "boolean schema is false"
1077
1077
  };
1078
1078
  function _(n) {
@@ -1149,7 +1149,7 @@ var Vn;
1149
1149
  function yr() {
1150
1150
  if (Vn) return ce;
1151
1151
  Vn = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.reportTypeError = ce.checkDataTypes = ce.checkDataType = ce.coerceAndCheckDataType = ce.getJSONTypes = ce.getSchemaTypes = ce.DataType = void 0;
1152
- const l = Co(), o = ko(), c = Xt(), u = W(), _ = re();
1152
+ const l = Co(), o = ko(), c = Xt(), u = Z(), _ = re();
1153
1153
  var h;
1154
1154
  (function(d) {
1155
1155
  d[d.Correct = 0] = "Correct", d[d.Wrong = 1] = "Wrong";
@@ -1175,14 +1175,14 @@ function yr() {
1175
1175
  }
1176
1176
  ce.getJSONTypes = n;
1177
1177
  function v(d, p) {
1178
- const { gen: m, data: b, opts: w } = d, U = y(p, w.coerceTypes), A = p.length > 0 && !(U.length === 0 && p.length === 1 && (0, o.schemaHasRulesForType)(d, p[0]));
1179
- if (A) {
1178
+ const { gen: m, data: b, opts: w } = d, U = y(p, w.coerceTypes), P = p.length > 0 && !(U.length === 0 && p.length === 1 && (0, o.schemaHasRulesForType)(d, p[0]));
1179
+ if (P) {
1180
1180
  const C = e(p, b, w.strictNumbers, h.Wrong);
1181
1181
  m.if(C, () => {
1182
1182
  U.length ? E(d, p, U) : s(d);
1183
1183
  });
1184
1184
  }
1185
- return A;
1185
+ return P;
1186
1186
  }
1187
1187
  ce.coerceAndCheckDataType = v;
1188
1188
  const S = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
@@ -1190,25 +1190,25 @@ function yr() {
1190
1190
  return p ? d.filter((m) => S.has(m) || p === "array" && m === "array") : [];
1191
1191
  }
1192
1192
  function E(d, p, m) {
1193
- const { gen: b, data: w, opts: U } = d, A = b.let("dataType", (0, u._)`typeof ${w}`), C = b.let("coerced", (0, u._)`undefined`);
1194
- U.coerceTypes === "array" && b.if((0, u._)`${A} == 'object' && Array.isArray(${w}) && ${w}.length == 1`, () => b.assign(w, (0, u._)`${w}[0]`).assign(A, (0, u._)`typeof ${w}`).if(e(p, w, U.strictNumbers), () => b.assign(C, w))), b.if((0, u._)`${C} !== undefined`);
1193
+ const { gen: b, data: w, opts: U } = d, P = b.let("dataType", (0, u._)`typeof ${w}`), C = b.let("coerced", (0, u._)`undefined`);
1194
+ U.coerceTypes === "array" && b.if((0, u._)`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`, () => b.assign(w, (0, u._)`${w}[0]`).assign(P, (0, u._)`typeof ${w}`).if(e(p, w, U.strictNumbers), () => b.assign(C, w))), b.if((0, u._)`${C} !== undefined`);
1195
1195
  for (const z of m)
1196
- (S.has(z) || z === "array" && U.coerceTypes === "array") && $(z);
1196
+ (S.has(z) || z === "array" && U.coerceTypes === "array") && O(z);
1197
1197
  b.else(), s(d), b.endIf(), b.if((0, u._)`${C} !== undefined`, () => {
1198
1198
  b.assign(w, C), t(d, C);
1199
1199
  });
1200
- function $(z) {
1200
+ function O(z) {
1201
1201
  switch (z) {
1202
1202
  case "string":
1203
- b.elseIf((0, u._)`${A} == "number" || ${A} == "boolean"`).assign(C, (0, u._)`"" + ${w}`).elseIf((0, u._)`${w} === null`).assign(C, (0, u._)`""`);
1203
+ b.elseIf((0, u._)`${P} == "number" || ${P} == "boolean"`).assign(C, (0, u._)`"" + ${w}`).elseIf((0, u._)`${w} === null`).assign(C, (0, u._)`""`);
1204
1204
  return;
1205
1205
  case "number":
1206
- b.elseIf((0, u._)`${A} == "boolean" || ${w} === null
1207
- || (${A} == "string" && ${w} && ${w} == +${w})`).assign(C, (0, u._)`+${w}`);
1206
+ b.elseIf((0, u._)`${P} == "boolean" || ${w} === null
1207
+ || (${P} == "string" && ${w} && ${w} == +${w})`).assign(C, (0, u._)`+${w}`);
1208
1208
  return;
1209
1209
  case "integer":
1210
- b.elseIf((0, u._)`${A} === "boolean" || ${w} === null
1211
- || (${A} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(C, (0, u._)`+${w}`);
1210
+ b.elseIf((0, u._)`${P} === "boolean" || ${w} === null
1211
+ || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(C, (0, u._)`+${w}`);
1212
1212
  return;
1213
1213
  case "boolean":
1214
1214
  b.elseIf((0, u._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(C, !1).elseIf((0, u._)`${w} === "true" || ${w} === 1`).assign(C, !0);
@@ -1217,8 +1217,8 @@ function yr() {
1217
1217
  b.elseIf((0, u._)`${w} === "" || ${w} === 0 || ${w} === false`), b.assign(C, null);
1218
1218
  return;
1219
1219
  case "array":
1220
- b.elseIf((0, u._)`${A} === "string" || ${A} === "number"
1221
- || ${A} === "boolean" || ${w} === null`).assign(C, (0, u._)`[${w}]`);
1220
+ b.elseIf((0, u._)`${P} === "string" || ${P} === "number"
1221
+ || ${P} === "boolean" || ${w} === null`).assign(C, (0, u._)`[${w}]`);
1222
1222
  }
1223
1223
  }
1224
1224
  }
@@ -1238,16 +1238,16 @@ function yr() {
1238
1238
  U = (0, u._)`${p} && typeof ${p} == "object" && !Array.isArray(${p})`;
1239
1239
  break;
1240
1240
  case "integer":
1241
- U = A((0, u._)`!(${p} % 1) && !isNaN(${p})`);
1241
+ U = P((0, u._)`!(${p} % 1) && !isNaN(${p})`);
1242
1242
  break;
1243
1243
  case "number":
1244
- U = A();
1244
+ U = P();
1245
1245
  break;
1246
1246
  default:
1247
1247
  return (0, u._)`typeof ${p} ${w} ${d}`;
1248
1248
  }
1249
1249
  return b === h.Correct ? U : (0, u.not)(U);
1250
- function A(C = u.nil) {
1250
+ function P(C = u.nil) {
1251
1251
  return (0, u.and)((0, u._)`typeof ${p} == "number"`, C, m ? (0, u._)`isFinite(${p})` : u.nil);
1252
1252
  }
1253
1253
  }
@@ -1258,13 +1258,13 @@ function yr() {
1258
1258
  let w;
1259
1259
  const U = (0, _.toHash)(d);
1260
1260
  if (U.array && U.object) {
1261
- const A = (0, u._)`typeof ${p} != "object"`;
1262
- w = U.null ? A : (0, u._)`!${p} || ${A}`, delete U.null, delete U.array, delete U.object;
1261
+ const P = (0, u._)`typeof ${p} != "object"`;
1262
+ w = U.null ? P : (0, u._)`!${p} || ${P}`, delete U.null, delete U.array, delete U.object;
1263
1263
  } else
1264
1264
  w = u.nil;
1265
1265
  U.number && delete U.integer;
1266
- for (const A in U)
1267
- w = (0, u.and)(w, a(A, p, m, b));
1266
+ for (const P in U)
1267
+ w = (0, u.and)(w, a(P, p, m, b));
1268
1268
  return w;
1269
1269
  }
1270
1270
  ce.checkDataTypes = e;
@@ -1297,7 +1297,7 @@ var ct = {}, Hn;
1297
1297
  function wl() {
1298
1298
  if (Hn) return ct;
1299
1299
  Hn = 1, Object.defineProperty(ct, "__esModule", { value: !0 }), ct.assignDefaults = void 0;
1300
- const l = W(), o = re();
1300
+ const l = Z(), o = re();
1301
1301
  function c(_, h) {
1302
1302
  const { properties: g, items: n } = _.schema;
1303
1303
  if (h === "object" && g)
@@ -1324,7 +1324,7 @@ var Ue = {}, se = {}, Yn;
1324
1324
  function Ee() {
1325
1325
  if (Yn) return se;
1326
1326
  Yn = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.validateUnion = se.validateArray = se.usePattern = se.callValidateCode = se.schemaProperties = se.allSchemaProperties = se.noPropertyInData = se.propertyInData = se.isOwnProperty = se.hasPropFunc = se.reportMissingProp = se.checkMissingProp = se.checkReportMissingProp = void 0;
1327
- const l = W(), o = re(), c = De(), u = re();
1327
+ const l = Z(), o = re(), c = De(), u = re();
1328
1328
  function _(d, p) {
1329
1329
  const { gen: m, data: b, it: w } = d;
1330
1330
  m.if(y(m, b, p, w.opts.ownProperties), () => {
@@ -1370,16 +1370,16 @@ function Ee() {
1370
1370
  return E(p).filter((m) => !(0, o.alwaysValidSchema)(d, p[m]));
1371
1371
  }
1372
1372
  se.schemaProperties = t;
1373
- function a({ schemaCode: d, data: p, it: { gen: m, topSchemaRef: b, schemaPath: w, errorPath: U }, it: A }, C, $, z) {
1374
- const M = z ? (0, l._)`${d}, ${p}, ${b}${w}` : p, j = [
1373
+ function a({ schemaCode: d, data: p, it: { gen: m, topSchemaRef: b, schemaPath: w, errorPath: U }, it: P }, C, O, z) {
1374
+ const M = z ? (0, l._)`${d}, ${p}, ${b}${w}` : p, G = [
1375
1375
  [c.default.instancePath, (0, l.strConcat)(c.default.instancePath, U)],
1376
- [c.default.parentData, A.parentData],
1377
- [c.default.parentDataProperty, A.parentDataProperty],
1376
+ [c.default.parentData, P.parentData],
1377
+ [c.default.parentDataProperty, P.parentDataProperty],
1378
1378
  [c.default.rootData, c.default.rootData]
1379
1379
  ];
1380
- A.opts.dynamicRef && j.push([c.default.dynamicAnchors, c.default.dynamicAnchors]);
1381
- const V = (0, l._)`${M}, ${m.object(...j)}`;
1382
- return $ !== l.nil ? (0, l._)`${C}.call(${$}, ${V})` : (0, l._)`${C}(${V})`;
1380
+ P.opts.dynamicRef && G.push([c.default.dynamicAnchors, c.default.dynamicAnchors]);
1381
+ const V = (0, l._)`${M}, ${m.object(...G)}`;
1382
+ return O !== l.nil ? (0, l._)`${C}.call(${O}, ${V})` : (0, l._)`${C}(${V})`;
1383
1383
  }
1384
1384
  se.callValidateCode = a;
1385
1385
  const e = (0, l._)`new RegExp`;
@@ -1396,12 +1396,12 @@ function Ee() {
1396
1396
  const { gen: p, data: m, keyword: b, it: w } = d, U = p.name("valid");
1397
1397
  if (w.allErrors) {
1398
1398
  const C = p.let("valid", !0);
1399
- return A(() => p.assign(C, !1)), C;
1399
+ return P(() => p.assign(C, !1)), C;
1400
1400
  }
1401
- return p.var(U, !0), A(() => p.break()), U;
1402
- function A(C) {
1403
- const $ = p.const("len", (0, l._)`${m}.length`);
1404
- p.forRange("i", 0, $, (z) => {
1401
+ return p.var(U, !0), P(() => p.break()), U;
1402
+ function P(C) {
1403
+ const O = p.const("len", (0, l._)`${m}.length`);
1404
+ p.forRange("i", 0, O, (z) => {
1405
1405
  d.subschema({
1406
1406
  keyword: b,
1407
1407
  dataProp: z,
@@ -1415,17 +1415,17 @@ function Ee() {
1415
1415
  const { gen: p, schema: m, keyword: b, it: w } = d;
1416
1416
  if (!Array.isArray(m))
1417
1417
  throw new Error("ajv implementation error");
1418
- if (m.some(($) => (0, o.alwaysValidSchema)(w, $)) && !w.opts.unevaluated)
1418
+ if (m.some((O) => (0, o.alwaysValidSchema)(w, O)) && !w.opts.unevaluated)
1419
1419
  return;
1420
- const A = p.let("valid", !1), C = p.name("_valid");
1421
- p.block(() => m.forEach(($, z) => {
1420
+ const P = p.let("valid", !1), C = p.name("_valid");
1421
+ p.block(() => m.forEach((O, z) => {
1422
1422
  const M = d.subschema({
1423
1423
  keyword: b,
1424
1424
  schemaProp: z,
1425
1425
  compositeRule: !0
1426
1426
  }, C);
1427
- p.assign(A, (0, l._)`${A} || ${C}`), d.mergeValidEvaluated(M, C) || p.if((0, l.not)(A));
1428
- })), d.result(A, () => d.reset(), () => d.error(!0));
1427
+ p.assign(P, (0, l._)`${P} || ${C}`), d.mergeValidEvaluated(M, C) || p.if((0, l.not)(P));
1428
+ })), d.result(P, () => d.reset(), () => d.error(!0));
1429
1429
  }
1430
1430
  return se.validateUnion = f, se;
1431
1431
  }
@@ -1433,7 +1433,7 @@ var Kn;
1433
1433
  function Sl() {
1434
1434
  if (Kn) return Ue;
1435
1435
  Kn = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.validateKeywordUsage = Ue.validSchemaType = Ue.funcKeywordCode = Ue.macroKeywordCode = void 0;
1436
- const l = W(), o = De(), c = Ee(), u = Xt();
1436
+ const l = Z(), o = De(), c = Ee(), u = Xt();
1437
1437
  function _(t, a) {
1438
1438
  const { gen: e, keyword: r, schema: s, parentSchema: f, it: d } = t, p = a.macro.call(d.self, s, f, d), m = S(e, r, p);
1439
1439
  d.opts.validateSchema !== !1 && d.self.validateSchema(p, !0);
@@ -1452,30 +1452,30 @@ function Sl() {
1452
1452
  const { gen: r, keyword: s, schema: f, parentSchema: d, $data: p, it: m } = t;
1453
1453
  v(m, a);
1454
1454
  const b = !p && a.compile ? a.compile.call(m.self, f, d, m) : a.validate, w = S(r, s, b), U = r.let("valid");
1455
- t.block$data(U, A), t.ok((e = a.valid) !== null && e !== void 0 ? e : U);
1456
- function A() {
1455
+ t.block$data(U, P), t.ok((e = a.valid) !== null && e !== void 0 ? e : U);
1456
+ function P() {
1457
1457
  if (a.errors === !1)
1458
1458
  z(), a.modifying && g(t), M(() => t.error());
1459
1459
  else {
1460
- const j = a.async ? C() : $();
1461
- a.modifying && g(t), M(() => n(t, j));
1460
+ const G = a.async ? C() : O();
1461
+ a.modifying && g(t), M(() => n(t, G));
1462
1462
  }
1463
1463
  }
1464
1464
  function C() {
1465
- const j = r.let("ruleErrs", null);
1466
- return r.try(() => z((0, l._)`await `), (V) => r.assign(U, !1).if((0, l._)`${V} instanceof ${m.ValidationError}`, () => r.assign(j, (0, l._)`${V}.errors`), () => r.throw(V))), j;
1465
+ const G = r.let("ruleErrs", null);
1466
+ return r.try(() => z((0, l._)`await `), (V) => r.assign(U, !1).if((0, l._)`${V} instanceof ${m.ValidationError}`, () => r.assign(G, (0, l._)`${V}.errors`), () => r.throw(V))), G;
1467
1467
  }
1468
- function $() {
1469
- const j = (0, l._)`${w}.errors`;
1470
- return r.assign(j, null), z(l.nil), j;
1468
+ function O() {
1469
+ const G = (0, l._)`${w}.errors`;
1470
+ return r.assign(G, null), z(l.nil), G;
1471
1471
  }
1472
- function z(j = a.async ? (0, l._)`await ` : l.nil) {
1472
+ function z(G = a.async ? (0, l._)`await ` : l.nil) {
1473
1473
  const V = m.opts.passContext ? o.default.this : o.default.self, K = !("compile" in a && !p || a.schema === !1);
1474
- r.assign(U, (0, l._)`${j}${(0, c.callValidateCode)(t, w, V, K)}`, a.modifying);
1474
+ r.assign(U, (0, l._)`${G}${(0, c.callValidateCode)(t, w, V, K)}`, a.modifying);
1475
1475
  }
1476
- function M(j) {
1476
+ function M(G) {
1477
1477
  var V;
1478
- r.if((0, l.not)((V = a.valid) !== null && V !== void 0 ? V : U), j);
1478
+ r.if((0, l.not)((V = a.valid) !== null && V !== void 0 ? V : U), G);
1479
1479
  }
1480
1480
  }
1481
1481
  Ue.funcKeywordCode = h;
@@ -1522,7 +1522,7 @@ var Ce = {}, Wn;
1522
1522
  function xl() {
1523
1523
  if (Wn) return Ce;
1524
1524
  Wn = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.extendSubschemaMode = Ce.extendSubschemaData = Ce.getSubschema = void 0;
1525
- const l = W(), o = re();
1525
+ const l = Z(), o = re();
1526
1526
  function c(h, { keyword: g, schemaProp: n, schema: v, schemaPath: S, errSchemaPath: y, topSchemaRef: E }) {
1527
1527
  if (g !== void 0 && v !== void 0)
1528
1528
  throw new Error('both "keyword" and "schema" passed, only one allowed');
@@ -1754,19 +1754,19 @@ function Tr() {
1754
1754
  if (typeof r == "boolean")
1755
1755
  return {};
1756
1756
  const { schemaId: f, uriResolver: d } = this.opts, p = E(r[f] || s), m = { "": p }, b = v(d, p, !1), w = {}, U = /* @__PURE__ */ new Set();
1757
- return c(r, { allKeys: !0 }, ($, z, M, j) => {
1758
- if (j === void 0)
1757
+ return c(r, { allKeys: !0 }, (O, z, M, G) => {
1758
+ if (G === void 0)
1759
1759
  return;
1760
1760
  const V = b + z;
1761
- let K = m[j];
1762
- typeof $[f] == "string" && (K = ee.call(this, $[f])), J.call(this, $.$anchor), J.call(this, $.$dynamicAnchor), m[z] = K;
1761
+ let K = m[G];
1762
+ typeof O[f] == "string" && (K = ee.call(this, O[f])), J.call(this, O.$anchor), J.call(this, O.$dynamicAnchor), m[z] = K;
1763
1763
  function ee(X) {
1764
1764
  const ne = this.opts.uriResolver.resolve;
1765
1765
  if (X = E(K ? ne(K, X) : X), U.has(X))
1766
1766
  throw C(X);
1767
1767
  U.add(X);
1768
1768
  let B = this.refs[X];
1769
- return typeof B == "string" && (B = this.refs[B]), typeof B == "object" ? A($, B.schema, X) : X !== E(V) && (X[0] === "#" ? (A($, w[X], X), w[X] = $) : this.refs[X] = V), X;
1769
+ return typeof B == "string" && (B = this.refs[B]), typeof B == "object" ? P(O, B.schema, X) : X !== E(V) && (X[0] === "#" ? (P(O, w[X], X), w[X] = O) : this.refs[X] = V), X;
1770
1770
  }
1771
1771
  function J(X) {
1772
1772
  if (typeof X == "string") {
@@ -1776,12 +1776,12 @@ function Tr() {
1776
1776
  }
1777
1777
  }
1778
1778
  }), w;
1779
- function A($, z, M) {
1780
- if (z !== void 0 && !o($, z))
1779
+ function P(O, z, M) {
1780
+ if (z !== void 0 && !o(O, z))
1781
1781
  throw C(M);
1782
1782
  }
1783
- function C($) {
1784
- return new Error(`reference "${$}" resolves to more than one schema`);
1783
+ function C(O) {
1784
+ return new Error(`reference "${O}" resolves to more than one schema`);
1785
1785
  }
1786
1786
  }
1787
1787
  return pe.getSchemaRefs = e, pe;
@@ -1790,213 +1790,213 @@ var Qn;
1790
1790
  function Jt() {
1791
1791
  if (Qn) return Pe;
1792
1792
  Qn = 1, Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.getData = Pe.KeywordCxt = Pe.validateFunctionCode = void 0;
1793
- const l = bl(), o = yr(), c = ko(), u = yr(), _ = wl(), h = Sl(), g = xl(), n = W(), v = De(), S = Tr(), y = re(), E = Xt();
1794
- function t(R) {
1795
- if (b(R) && (U(R), m(R))) {
1796
- s(R);
1793
+ const l = bl(), o = yr(), c = ko(), u = yr(), _ = wl(), h = Sl(), g = xl(), n = Z(), v = De(), S = Tr(), y = re(), E = Xt();
1794
+ function t(F) {
1795
+ if (b(F) && (U(F), m(F))) {
1796
+ s(F);
1797
1797
  return;
1798
1798
  }
1799
- a(R, () => (0, l.topBoolOrEmptySchema)(R));
1799
+ a(F, () => (0, l.topBoolOrEmptySchema)(F));
1800
1800
  }
1801
1801
  Pe.validateFunctionCode = t;
1802
- function a({ gen: R, validateName: F, schema: O, schemaEnv: G, opts: Y }, Z) {
1803
- Y.code.es5 ? R.func(F, (0, n._)`${v.default.data}, ${v.default.valCxt}`, G.$async, () => {
1804
- R.code((0, n._)`"use strict"; ${d(O, Y)}`), r(R, Y), R.code(Z);
1805
- }) : R.func(F, (0, n._)`${v.default.data}, ${e(Y)}`, G.$async, () => R.code(d(O, Y)).code(Z));
1802
+ function a({ gen: F, validateName: R, schema: $, schemaEnv: j, opts: Y }, W) {
1803
+ Y.code.es5 ? F.func(R, (0, n._)`${v.default.data}, ${v.default.valCxt}`, j.$async, () => {
1804
+ F.code((0, n._)`"use strict"; ${d($, Y)}`), r(F, Y), F.code(W);
1805
+ }) : F.func(R, (0, n._)`${v.default.data}, ${e(Y)}`, j.$async, () => F.code(d($, Y)).code(W));
1806
1806
  }
1807
- function e(R) {
1808
- return (0, n._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${R.dynamicRef ? (0, n._)`, ${v.default.dynamicAnchors}={}` : n.nil}}={}`;
1807
+ function e(F) {
1808
+ return (0, n._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${F.dynamicRef ? (0, n._)`, ${v.default.dynamicAnchors}={}` : n.nil}}={}`;
1809
1809
  }
1810
- function r(R, F) {
1811
- R.if(v.default.valCxt, () => {
1812
- R.var(v.default.instancePath, (0, n._)`${v.default.valCxt}.${v.default.instancePath}`), R.var(v.default.parentData, (0, n._)`${v.default.valCxt}.${v.default.parentData}`), R.var(v.default.parentDataProperty, (0, n._)`${v.default.valCxt}.${v.default.parentDataProperty}`), R.var(v.default.rootData, (0, n._)`${v.default.valCxt}.${v.default.rootData}`), F.dynamicRef && R.var(v.default.dynamicAnchors, (0, n._)`${v.default.valCxt}.${v.default.dynamicAnchors}`);
1810
+ function r(F, R) {
1811
+ F.if(v.default.valCxt, () => {
1812
+ F.var(v.default.instancePath, (0, n._)`${v.default.valCxt}.${v.default.instancePath}`), F.var(v.default.parentData, (0, n._)`${v.default.valCxt}.${v.default.parentData}`), F.var(v.default.parentDataProperty, (0, n._)`${v.default.valCxt}.${v.default.parentDataProperty}`), F.var(v.default.rootData, (0, n._)`${v.default.valCxt}.${v.default.rootData}`), R.dynamicRef && F.var(v.default.dynamicAnchors, (0, n._)`${v.default.valCxt}.${v.default.dynamicAnchors}`);
1813
1813
  }, () => {
1814
- R.var(v.default.instancePath, (0, n._)`""`), R.var(v.default.parentData, (0, n._)`undefined`), R.var(v.default.parentDataProperty, (0, n._)`undefined`), R.var(v.default.rootData, v.default.data), F.dynamicRef && R.var(v.default.dynamicAnchors, (0, n._)`{}`);
1814
+ F.var(v.default.instancePath, (0, n._)`""`), F.var(v.default.parentData, (0, n._)`undefined`), F.var(v.default.parentDataProperty, (0, n._)`undefined`), F.var(v.default.rootData, v.default.data), R.dynamicRef && F.var(v.default.dynamicAnchors, (0, n._)`{}`);
1815
1815
  });
1816
1816
  }
1817
- function s(R) {
1818
- const { schema: F, opts: O, gen: G } = R;
1819
- a(R, () => {
1820
- O.$comment && F.$comment && j(R), $(R), G.let(v.default.vErrors, null), G.let(v.default.errors, 0), O.unevaluated && f(R), A(R), V(R);
1817
+ function s(F) {
1818
+ const { schema: R, opts: $, gen: j } = F;
1819
+ a(F, () => {
1820
+ $.$comment && R.$comment && G(F), O(F), j.let(v.default.vErrors, null), j.let(v.default.errors, 0), $.unevaluated && f(F), P(F), V(F);
1821
1821
  });
1822
1822
  }
1823
- function f(R) {
1824
- const { gen: F, validateName: O } = R;
1825
- R.evaluated = F.const("evaluated", (0, n._)`${O}.evaluated`), F.if((0, n._)`${R.evaluated}.dynamicProps`, () => F.assign((0, n._)`${R.evaluated}.props`, (0, n._)`undefined`)), F.if((0, n._)`${R.evaluated}.dynamicItems`, () => F.assign((0, n._)`${R.evaluated}.items`, (0, n._)`undefined`));
1823
+ function f(F) {
1824
+ const { gen: R, validateName: $ } = F;
1825
+ F.evaluated = R.const("evaluated", (0, n._)`${$}.evaluated`), R.if((0, n._)`${F.evaluated}.dynamicProps`, () => R.assign((0, n._)`${F.evaluated}.props`, (0, n._)`undefined`)), R.if((0, n._)`${F.evaluated}.dynamicItems`, () => R.assign((0, n._)`${F.evaluated}.items`, (0, n._)`undefined`));
1826
1826
  }
1827
- function d(R, F) {
1828
- const O = typeof R == "object" && R[F.schemaId];
1829
- return O && (F.code.source || F.code.process) ? (0, n._)`/*# sourceURL=${O} */` : n.nil;
1827
+ function d(F, R) {
1828
+ const $ = typeof F == "object" && F[R.schemaId];
1829
+ return $ && (R.code.source || R.code.process) ? (0, n._)`/*# sourceURL=${$} */` : n.nil;
1830
1830
  }
1831
- function p(R, F) {
1832
- if (b(R) && (U(R), m(R))) {
1833
- w(R, F);
1831
+ function p(F, R) {
1832
+ if (b(F) && (U(F), m(F))) {
1833
+ w(F, R);
1834
1834
  return;
1835
1835
  }
1836
- (0, l.boolOrEmptySchema)(R, F);
1836
+ (0, l.boolOrEmptySchema)(F, R);
1837
1837
  }
1838
- function m({ schema: R, self: F }) {
1839
- if (typeof R == "boolean")
1840
- return !R;
1841
- for (const O in R)
1842
- if (F.RULES.all[O])
1838
+ function m({ schema: F, self: R }) {
1839
+ if (typeof F == "boolean")
1840
+ return !F;
1841
+ for (const $ in F)
1842
+ if (R.RULES.all[$])
1843
1843
  return !0;
1844
1844
  return !1;
1845
1845
  }
1846
- function b(R) {
1847
- return typeof R.schema != "boolean";
1846
+ function b(F) {
1847
+ return typeof F.schema != "boolean";
1848
1848
  }
1849
- function w(R, F) {
1850
- const { schema: O, gen: G, opts: Y } = R;
1851
- Y.$comment && O.$comment && j(R), z(R), M(R);
1852
- const Z = G.const("_errs", v.default.errors);
1853
- A(R, Z), G.var(F, (0, n._)`${Z} === ${v.default.errors}`);
1849
+ function w(F, R) {
1850
+ const { schema: $, gen: j, opts: Y } = F;
1851
+ Y.$comment && $.$comment && G(F), z(F), M(F);
1852
+ const W = j.const("_errs", v.default.errors);
1853
+ P(F, W), j.var(R, (0, n._)`${W} === ${v.default.errors}`);
1854
1854
  }
1855
- function U(R) {
1856
- (0, y.checkUnknownRules)(R), C(R);
1855
+ function U(F) {
1856
+ (0, y.checkUnknownRules)(F), C(F);
1857
1857
  }
1858
- function A(R, F) {
1859
- if (R.opts.jtd)
1860
- return ee(R, [], !1, F);
1861
- const O = (0, o.getSchemaTypes)(R.schema), G = (0, o.coerceAndCheckDataType)(R, O);
1862
- ee(R, O, !G, F);
1858
+ function P(F, R) {
1859
+ if (F.opts.jtd)
1860
+ return ee(F, [], !1, R);
1861
+ const $ = (0, o.getSchemaTypes)(F.schema), j = (0, o.coerceAndCheckDataType)(F, $);
1862
+ ee(F, $, !j, R);
1863
1863
  }
1864
- function C(R) {
1865
- const { schema: F, errSchemaPath: O, opts: G, self: Y } = R;
1866
- F.$ref && G.ignoreKeywordsWithRef && (0, y.schemaHasRulesButRef)(F, Y.RULES) && Y.logger.warn(`$ref: keywords ignored in schema at path "${O}"`);
1864
+ function C(F) {
1865
+ const { schema: R, errSchemaPath: $, opts: j, self: Y } = F;
1866
+ R.$ref && j.ignoreKeywordsWithRef && (0, y.schemaHasRulesButRef)(R, Y.RULES) && Y.logger.warn(`$ref: keywords ignored in schema at path "${$}"`);
1867
1867
  }
1868
- function $(R) {
1869
- const { schema: F, opts: O } = R;
1870
- F.default !== void 0 && O.useDefaults && O.strictSchema && (0, y.checkStrictMode)(R, "default is ignored in the schema root");
1868
+ function O(F) {
1869
+ const { schema: R, opts: $ } = F;
1870
+ R.default !== void 0 && $.useDefaults && $.strictSchema && (0, y.checkStrictMode)(F, "default is ignored in the schema root");
1871
1871
  }
1872
- function z(R) {
1873
- const F = R.schema[R.opts.schemaId];
1874
- F && (R.baseId = (0, S.resolveUrl)(R.opts.uriResolver, R.baseId, F));
1872
+ function z(F) {
1873
+ const R = F.schema[F.opts.schemaId];
1874
+ R && (F.baseId = (0, S.resolveUrl)(F.opts.uriResolver, F.baseId, R));
1875
1875
  }
1876
- function M(R) {
1877
- if (R.schema.$async && !R.schemaEnv.$async)
1876
+ function M(F) {
1877
+ if (F.schema.$async && !F.schemaEnv.$async)
1878
1878
  throw new Error("async schema in sync schema");
1879
1879
  }
1880
- function j({ gen: R, schemaEnv: F, schema: O, errSchemaPath: G, opts: Y }) {
1881
- const Z = O.$comment;
1880
+ function G({ gen: F, schemaEnv: R, schema: $, errSchemaPath: j, opts: Y }) {
1881
+ const W = $.$comment;
1882
1882
  if (Y.$comment === !0)
1883
- R.code((0, n._)`${v.default.self}.logger.log(${Z})`);
1883
+ F.code((0, n._)`${v.default.self}.logger.log(${W})`);
1884
1884
  else if (typeof Y.$comment == "function") {
1885
- const ae = (0, n.str)`${G}/$comment`, he = R.scopeValue("root", { ref: F.root });
1886
- R.code((0, n._)`${v.default.self}.opts.$comment(${Z}, ${ae}, ${he}.schema)`);
1885
+ const ae = (0, n.str)`${j}/$comment`, he = F.scopeValue("root", { ref: R.root });
1886
+ F.code((0, n._)`${v.default.self}.opts.$comment(${W}, ${ae}, ${he}.schema)`);
1887
1887
  }
1888
1888
  }
1889
- function V(R) {
1890
- const { gen: F, schemaEnv: O, validateName: G, ValidationError: Y, opts: Z } = R;
1891
- O.$async ? F.if((0, n._)`${v.default.errors} === 0`, () => F.return(v.default.data), () => F.throw((0, n._)`new ${Y}(${v.default.vErrors})`)) : (F.assign((0, n._)`${G}.errors`, v.default.vErrors), Z.unevaluated && K(R), F.return((0, n._)`${v.default.errors} === 0`));
1889
+ function V(F) {
1890
+ const { gen: R, schemaEnv: $, validateName: j, ValidationError: Y, opts: W } = F;
1891
+ $.$async ? R.if((0, n._)`${v.default.errors} === 0`, () => R.return(v.default.data), () => R.throw((0, n._)`new ${Y}(${v.default.vErrors})`)) : (R.assign((0, n._)`${j}.errors`, v.default.vErrors), W.unevaluated && K(F), R.return((0, n._)`${v.default.errors} === 0`));
1892
1892
  }
1893
- function K({ gen: R, evaluated: F, props: O, items: G }) {
1894
- O instanceof n.Name && R.assign((0, n._)`${F}.props`, O), G instanceof n.Name && R.assign((0, n._)`${F}.items`, G);
1893
+ function K({ gen: F, evaluated: R, props: $, items: j }) {
1894
+ $ instanceof n.Name && F.assign((0, n._)`${R}.props`, $), j instanceof n.Name && F.assign((0, n._)`${R}.items`, j);
1895
1895
  }
1896
- function ee(R, F, O, G) {
1897
- const { gen: Y, schema: Z, data: ae, allErrors: he, opts: fe, self: me } = R, { RULES: ue } = me;
1898
- if (Z.$ref && (fe.ignoreKeywordsWithRef || !(0, y.schemaHasRulesButRef)(Z, ue))) {
1899
- Y.block(() => N(R, "$ref", ue.all.$ref.definition));
1896
+ function ee(F, R, $, j) {
1897
+ const { gen: Y, schema: W, data: ae, allErrors: he, opts: le, self: me } = F, { RULES: ue } = me;
1898
+ if (W.$ref && (le.ignoreKeywordsWithRef || !(0, y.schemaHasRulesButRef)(W, ue))) {
1899
+ Y.block(() => N(F, "$ref", ue.all.$ref.definition));
1900
1900
  return;
1901
1901
  }
1902
- fe.jtd || X(R, F), Y.block(() => {
1902
+ le.jtd || X(F, R), Y.block(() => {
1903
1903
  for (const ve of ue.rules)
1904
1904
  Qe(ve);
1905
1905
  Qe(ue.post);
1906
1906
  });
1907
1907
  function Qe(ve) {
1908
- (0, c.shouldUseGroup)(Z, ve) && (ve.type ? (Y.if((0, u.checkDataType)(ve.type, ae, fe.strictNumbers)), J(R, ve), F.length === 1 && F[0] === ve.type && O && (Y.else(), (0, u.reportTypeError)(R)), Y.endIf()) : J(R, ve), he || Y.if((0, n._)`${v.default.errors} === ${G || 0}`));
1908
+ (0, c.shouldUseGroup)(W, ve) && (ve.type ? (Y.if((0, u.checkDataType)(ve.type, ae, le.strictNumbers)), J(F, ve), R.length === 1 && R[0] === ve.type && $ && (Y.else(), (0, u.reportTypeError)(F)), Y.endIf()) : J(F, ve), he || Y.if((0, n._)`${v.default.errors} === ${j || 0}`));
1909
1909
  }
1910
1910
  }
1911
- function J(R, F) {
1912
- const { gen: O, schema: G, opts: { useDefaults: Y } } = R;
1913
- Y && (0, _.assignDefaults)(R, F.type), O.block(() => {
1914
- for (const Z of F.rules)
1915
- (0, c.shouldUseRule)(G, Z) && N(R, Z.keyword, Z.definition, F.type);
1911
+ function J(F, R) {
1912
+ const { gen: $, schema: j, opts: { useDefaults: Y } } = F;
1913
+ Y && (0, _.assignDefaults)(F, R.type), $.block(() => {
1914
+ for (const W of R.rules)
1915
+ (0, c.shouldUseRule)(j, W) && N(F, W.keyword, W.definition, R.type);
1916
1916
  });
1917
1917
  }
1918
- function X(R, F) {
1919
- R.schemaEnv.meta || !R.opts.strictTypes || (ne(R, F), R.opts.allowUnionTypes || B(R, F), P(R, R.dataTypes));
1918
+ function X(F, R) {
1919
+ F.schemaEnv.meta || !F.opts.strictTypes || (ne(F, R), F.opts.allowUnionTypes || B(F, R), A(F, F.dataTypes));
1920
1920
  }
1921
- function ne(R, F) {
1922
- if (F.length) {
1923
- if (!R.dataTypes.length) {
1924
- R.dataTypes = F;
1921
+ function ne(F, R) {
1922
+ if (R.length) {
1923
+ if (!F.dataTypes.length) {
1924
+ F.dataTypes = R;
1925
1925
  return;
1926
1926
  }
1927
- F.forEach((O) => {
1928
- I(R.dataTypes, O) || T(R, `type "${O}" not allowed by context "${R.dataTypes.join(",")}"`);
1929
- }), x(R, F);
1927
+ R.forEach(($) => {
1928
+ T(F.dataTypes, $) || I(F, `type "${$}" not allowed by context "${F.dataTypes.join(",")}"`);
1929
+ }), x(F, R);
1930
1930
  }
1931
1931
  }
1932
- function B(R, F) {
1933
- F.length > 1 && !(F.length === 2 && F.includes("null")) && T(R, "use allowUnionTypes to allow union type keyword");
1932
+ function B(F, R) {
1933
+ R.length > 1 && !(R.length === 2 && R.includes("null")) && I(F, "use allowUnionTypes to allow union type keyword");
1934
1934
  }
1935
- function P(R, F) {
1936
- const O = R.self.RULES.all;
1937
- for (const G in O) {
1938
- const Y = O[G];
1939
- if (typeof Y == "object" && (0, c.shouldUseRule)(R.schema, Y)) {
1940
- const { type: Z } = Y.definition;
1941
- Z.length && !Z.some((ae) => k(F, ae)) && T(R, `missing type "${Z.join(",")}" for keyword "${G}"`);
1935
+ function A(F, R) {
1936
+ const $ = F.self.RULES.all;
1937
+ for (const j in $) {
1938
+ const Y = $[j];
1939
+ if (typeof Y == "object" && (0, c.shouldUseRule)(F.schema, Y)) {
1940
+ const { type: W } = Y.definition;
1941
+ W.length && !W.some((ae) => k(R, ae)) && I(F, `missing type "${W.join(",")}" for keyword "${j}"`);
1942
1942
  }
1943
1943
  }
1944
1944
  }
1945
- function k(R, F) {
1946
- return R.includes(F) || F === "number" && R.includes("integer");
1945
+ function k(F, R) {
1946
+ return F.includes(R) || R === "number" && F.includes("integer");
1947
1947
  }
1948
- function I(R, F) {
1949
- return R.includes(F) || F === "integer" && R.includes("number");
1948
+ function T(F, R) {
1949
+ return F.includes(R) || R === "integer" && F.includes("number");
1950
1950
  }
1951
- function x(R, F) {
1952
- const O = [];
1953
- for (const G of R.dataTypes)
1954
- I(F, G) ? O.push(G) : F.includes("integer") && G === "number" && O.push("integer");
1955
- R.dataTypes = O;
1951
+ function x(F, R) {
1952
+ const $ = [];
1953
+ for (const j of F.dataTypes)
1954
+ T(R, j) ? $.push(j) : R.includes("integer") && j === "number" && $.push("integer");
1955
+ F.dataTypes = $;
1956
1956
  }
1957
- function T(R, F) {
1958
- const O = R.schemaEnv.baseId + R.errSchemaPath;
1959
- F += ` at "${O}" (strictTypes)`, (0, y.checkStrictMode)(R, F, R.opts.strictTypes);
1957
+ function I(F, R) {
1958
+ const $ = F.schemaEnv.baseId + F.errSchemaPath;
1959
+ R += ` at "${$}" (strictTypes)`, (0, y.checkStrictMode)(F, R, F.opts.strictTypes);
1960
1960
  }
1961
1961
  class D {
1962
- constructor(F, O, G) {
1963
- if ((0, h.validateKeywordUsage)(F, O, G), this.gen = F.gen, this.allErrors = F.allErrors, this.keyword = G, this.data = F.data, this.schema = F.schema[G], this.$data = O.$data && F.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, y.schemaRefOrVal)(F, this.schema, G, this.$data), this.schemaType = O.schemaType, this.parentSchema = F.schema, this.params = {}, this.it = F, this.def = O, this.$data)
1964
- this.schemaCode = F.gen.const("vSchema", H(this.$data, F));
1965
- else if (this.schemaCode = this.schemaValue, !(0, h.validSchemaType)(this.schema, O.schemaType, O.allowUndefined))
1966
- throw new Error(`${G} value must be ${JSON.stringify(O.schemaType)}`);
1967
- ("code" in O ? O.trackErrors : O.errors !== !1) && (this.errsCount = F.gen.const("_errs", v.default.errors));
1962
+ constructor(R, $, j) {
1963
+ if ((0, h.validateKeywordUsage)(R, $, j), this.gen = R.gen, this.allErrors = R.allErrors, this.keyword = j, this.data = R.data, this.schema = R.schema[j], this.$data = $.$data && R.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, y.schemaRefOrVal)(R, this.schema, j, this.$data), this.schemaType = $.schemaType, this.parentSchema = R.schema, this.params = {}, this.it = R, this.def = $, this.$data)
1964
+ this.schemaCode = R.gen.const("vSchema", H(this.$data, R));
1965
+ else if (this.schemaCode = this.schemaValue, !(0, h.validSchemaType)(this.schema, $.schemaType, $.allowUndefined))
1966
+ throw new Error(`${j} value must be ${JSON.stringify($.schemaType)}`);
1967
+ ("code" in $ ? $.trackErrors : $.errors !== !1) && (this.errsCount = R.gen.const("_errs", v.default.errors));
1968
1968
  }
1969
- result(F, O, G) {
1970
- this.failResult((0, n.not)(F), O, G);
1969
+ result(R, $, j) {
1970
+ this.failResult((0, n.not)(R), $, j);
1971
1971
  }
1972
- failResult(F, O, G) {
1973
- this.gen.if(F), G ? G() : this.error(), O ? (this.gen.else(), O(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else();
1972
+ failResult(R, $, j) {
1973
+ this.gen.if(R), j ? j() : this.error(), $ ? (this.gen.else(), $(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else();
1974
1974
  }
1975
- pass(F, O) {
1976
- this.failResult((0, n.not)(F), void 0, O);
1975
+ pass(R, $) {
1976
+ this.failResult((0, n.not)(R), void 0, $);
1977
1977
  }
1978
- fail(F) {
1979
- if (F === void 0) {
1978
+ fail(R) {
1979
+ if (R === void 0) {
1980
1980
  this.error(), this.allErrors || this.gen.if(!1);
1981
1981
  return;
1982
1982
  }
1983
- this.gen.if(F), this.error(), this.allErrors ? this.gen.endIf() : this.gen.else();
1983
+ this.gen.if(R), this.error(), this.allErrors ? this.gen.endIf() : this.gen.else();
1984
1984
  }
1985
- fail$data(F) {
1985
+ fail$data(R) {
1986
1986
  if (!this.$data)
1987
- return this.fail(F);
1988
- const { schemaCode: O } = this;
1989
- this.fail((0, n._)`${O} !== undefined && (${(0, n.or)(this.invalid$data(), F)})`);
1987
+ return this.fail(R);
1988
+ const { schemaCode: $ } = this;
1989
+ this.fail((0, n._)`${$} !== undefined && (${(0, n.or)(this.invalid$data(), R)})`);
1990
1990
  }
1991
- error(F, O, G) {
1992
- if (O) {
1993
- this.setParams(O), this._error(F, G), this.setParams({});
1991
+ error(R, $, j) {
1992
+ if ($) {
1993
+ this.setParams($), this._error(R, j), this.setParams({});
1994
1994
  return;
1995
1995
  }
1996
- this._error(F, G);
1996
+ this._error(R, j);
1997
1997
  }
1998
- _error(F, O) {
1999
- (F ? E.reportExtraError : E.reportError)(this, this.def.error, O);
1998
+ _error(R, $) {
1999
+ (R ? E.reportExtraError : E.reportError)(this, this.def.error, $);
2000
2000
  }
2001
2001
  $dataError() {
2002
2002
  (0, E.reportError)(this, this.def.$dataError || E.keyword$DataError);
@@ -2006,95 +2006,95 @@ function Jt() {
2006
2006
  throw new Error('add "trackErrors" to keyword definition');
2007
2007
  (0, E.resetErrorsCount)(this.gen, this.errsCount);
2008
2008
  }
2009
- ok(F) {
2010
- this.allErrors || this.gen.if(F);
2009
+ ok(R) {
2010
+ this.allErrors || this.gen.if(R);
2011
2011
  }
2012
- setParams(F, O) {
2013
- O ? Object.assign(this.params, F) : this.params = F;
2012
+ setParams(R, $) {
2013
+ $ ? Object.assign(this.params, R) : this.params = R;
2014
2014
  }
2015
- block$data(F, O, G = n.nil) {
2015
+ block$data(R, $, j = n.nil) {
2016
2016
  this.gen.block(() => {
2017
- this.check$data(F, G), O();
2017
+ this.check$data(R, j), $();
2018
2018
  });
2019
2019
  }
2020
- check$data(F = n.nil, O = n.nil) {
2020
+ check$data(R = n.nil, $ = n.nil) {
2021
2021
  if (!this.$data)
2022
2022
  return;
2023
- const { gen: G, schemaCode: Y, schemaType: Z, def: ae } = this;
2024
- G.if((0, n.or)((0, n._)`${Y} === undefined`, O)), F !== n.nil && G.assign(F, !0), (Z.length || ae.validateSchema) && (G.elseIf(this.invalid$data()), this.$dataError(), F !== n.nil && G.assign(F, !1)), G.else();
2023
+ const { gen: j, schemaCode: Y, schemaType: W, def: ae } = this;
2024
+ j.if((0, n.or)((0, n._)`${Y} === undefined`, $)), R !== n.nil && j.assign(R, !0), (W.length || ae.validateSchema) && (j.elseIf(this.invalid$data()), this.$dataError(), R !== n.nil && j.assign(R, !1)), j.else();
2025
2025
  }
2026
2026
  invalid$data() {
2027
- const { gen: F, schemaCode: O, schemaType: G, def: Y, it: Z } = this;
2027
+ const { gen: R, schemaCode: $, schemaType: j, def: Y, it: W } = this;
2028
2028
  return (0, n.or)(ae(), he());
2029
2029
  function ae() {
2030
- if (G.length) {
2031
- if (!(O instanceof n.Name))
2030
+ if (j.length) {
2031
+ if (!($ instanceof n.Name))
2032
2032
  throw new Error("ajv implementation error");
2033
- const fe = Array.isArray(G) ? G : [G];
2034
- return (0, n._)`${(0, u.checkDataTypes)(fe, O, Z.opts.strictNumbers, u.DataType.Wrong)}`;
2033
+ const le = Array.isArray(j) ? j : [j];
2034
+ return (0, n._)`${(0, u.checkDataTypes)(le, $, W.opts.strictNumbers, u.DataType.Wrong)}`;
2035
2035
  }
2036
2036
  return n.nil;
2037
2037
  }
2038
2038
  function he() {
2039
2039
  if (Y.validateSchema) {
2040
- const fe = F.scopeValue("validate$data", { ref: Y.validateSchema });
2041
- return (0, n._)`!${fe}(${O})`;
2040
+ const le = R.scopeValue("validate$data", { ref: Y.validateSchema });
2041
+ return (0, n._)`!${le}(${$})`;
2042
2042
  }
2043
2043
  return n.nil;
2044
2044
  }
2045
2045
  }
2046
- subschema(F, O) {
2047
- const G = (0, g.getSubschema)(this.it, F);
2048
- (0, g.extendSubschemaData)(G, this.it, F), (0, g.extendSubschemaMode)(G, F);
2049
- const Y = { ...this.it, ...G, items: void 0, props: void 0 };
2050
- return p(Y, O), Y;
2046
+ subschema(R, $) {
2047
+ const j = (0, g.getSubschema)(this.it, R);
2048
+ (0, g.extendSubschemaData)(j, this.it, R), (0, g.extendSubschemaMode)(j, R);
2049
+ const Y = { ...this.it, ...j, items: void 0, props: void 0 };
2050
+ return p(Y, $), Y;
2051
2051
  }
2052
- mergeEvaluated(F, O) {
2053
- const { it: G, gen: Y } = this;
2054
- G.opts.unevaluated && (G.props !== !0 && F.props !== void 0 && (G.props = y.mergeEvaluated.props(Y, F.props, G.props, O)), G.items !== !0 && F.items !== void 0 && (G.items = y.mergeEvaluated.items(Y, F.items, G.items, O)));
2052
+ mergeEvaluated(R, $) {
2053
+ const { it: j, gen: Y } = this;
2054
+ j.opts.unevaluated && (j.props !== !0 && R.props !== void 0 && (j.props = y.mergeEvaluated.props(Y, R.props, j.props, $)), j.items !== !0 && R.items !== void 0 && (j.items = y.mergeEvaluated.items(Y, R.items, j.items, $)));
2055
2055
  }
2056
- mergeValidEvaluated(F, O) {
2057
- const { it: G, gen: Y } = this;
2058
- if (G.opts.unevaluated && (G.props !== !0 || G.items !== !0))
2059
- return Y.if(O, () => this.mergeEvaluated(F, n.Name)), !0;
2056
+ mergeValidEvaluated(R, $) {
2057
+ const { it: j, gen: Y } = this;
2058
+ if (j.opts.unevaluated && (j.props !== !0 || j.items !== !0))
2059
+ return Y.if($, () => this.mergeEvaluated(R, n.Name)), !0;
2060
2060
  }
2061
2061
  }
2062
2062
  Pe.KeywordCxt = D;
2063
- function N(R, F, O, G) {
2064
- const Y = new D(R, O, F);
2065
- "code" in O ? O.code(Y, G) : Y.$data && O.validate ? (0, h.funcKeywordCode)(Y, O) : "macro" in O ? (0, h.macroKeywordCode)(Y, O) : (O.compile || O.validate) && (0, h.funcKeywordCode)(Y, O);
2063
+ function N(F, R, $, j) {
2064
+ const Y = new D(F, $, R);
2065
+ "code" in $ ? $.code(Y, j) : Y.$data && $.validate ? (0, h.funcKeywordCode)(Y, $) : "macro" in $ ? (0, h.macroKeywordCode)(Y, $) : ($.compile || $.validate) && (0, h.funcKeywordCode)(Y, $);
2066
2066
  }
2067
2067
  const L = /^\/(?:[^~]|~0|~1)*$/, q = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
2068
- function H(R, { dataLevel: F, dataNames: O, dataPathArr: G }) {
2069
- let Y, Z;
2070
- if (R === "")
2068
+ function H(F, { dataLevel: R, dataNames: $, dataPathArr: j }) {
2069
+ let Y, W;
2070
+ if (F === "")
2071
2071
  return v.default.rootData;
2072
- if (R[0] === "/") {
2073
- if (!L.test(R))
2074
- throw new Error(`Invalid JSON-pointer: ${R}`);
2075
- Y = R, Z = v.default.rootData;
2072
+ if (F[0] === "/") {
2073
+ if (!L.test(F))
2074
+ throw new Error(`Invalid JSON-pointer: ${F}`);
2075
+ Y = F, W = v.default.rootData;
2076
2076
  } else {
2077
- const me = q.exec(R);
2077
+ const me = q.exec(F);
2078
2078
  if (!me)
2079
- throw new Error(`Invalid JSON-pointer: ${R}`);
2079
+ throw new Error(`Invalid JSON-pointer: ${F}`);
2080
2080
  const ue = +me[1];
2081
2081
  if (Y = me[2], Y === "#") {
2082
- if (ue >= F)
2083
- throw new Error(fe("property/index", ue));
2084
- return G[F - ue];
2082
+ if (ue >= R)
2083
+ throw new Error(le("property/index", ue));
2084
+ return j[R - ue];
2085
2085
  }
2086
- if (ue > F)
2087
- throw new Error(fe("data", ue));
2088
- if (Z = O[F - ue], !Y)
2089
- return Z;
2086
+ if (ue > R)
2087
+ throw new Error(le("data", ue));
2088
+ if (W = $[R - ue], !Y)
2089
+ return W;
2090
2090
  }
2091
- let ae = Z;
2091
+ let ae = W;
2092
2092
  const he = Y.split("/");
2093
2093
  for (const me of he)
2094
- me && (Z = (0, n._)`${Z}${(0, n.getProperty)((0, y.unescapeJsonPointer)(me))}`, ae = (0, n._)`${ae} && ${Z}`);
2094
+ me && (W = (0, n._)`${W}${(0, n.getProperty)((0, y.unescapeJsonPointer)(me))}`, ae = (0, n._)`${ae} && ${W}`);
2095
2095
  return ae;
2096
- function fe(me, ue) {
2097
- return `Cannot access ${me} ${ue} levels up, current level is ${F}`;
2096
+ function le(me, ue) {
2097
+ return `Cannot access ${me} ${ue} levels up, current level is ${R}`;
2098
2098
  }
2099
2099
  }
2100
2100
  return Pe.getData = H, Pe;
@@ -2126,7 +2126,7 @@ var ye = {}, is;
2126
2126
  function vn() {
2127
2127
  if (is) return ye;
2128
2128
  is = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.resolveSchema = ye.getCompilingSchema = ye.resolveRef = ye.compileSchema = ye.SchemaEnv = void 0;
2129
- const l = W(), o = gn(), c = De(), u = Tr(), _ = re(), h = Jt();
2129
+ const l = Z(), o = gn(), c = De(), u = Tr(), _ = re(), h = Jt();
2130
2130
  class g {
2131
2131
  constructor(f) {
2132
2132
  var d;
@@ -2146,8 +2146,8 @@ function vn() {
2146
2146
  ref: o.default,
2147
2147
  code: (0, l._)`require("ajv/dist/runtime/validation_error").default`
2148
2148
  }));
2149
- const A = w.scopeName("validate");
2150
- s.validateName = A;
2149
+ const P = w.scopeName("validate");
2150
+ s.validateName = P;
2151
2151
  const C = {
2152
2152
  gen: w,
2153
2153
  allErrors: this.opts.allErrors,
@@ -2161,7 +2161,7 @@ function vn() {
2161
2161
  dataTypes: [],
2162
2162
  definedProperties: /* @__PURE__ */ new Set(),
2163
2163
  topSchemaRef: w.scopeValue("schema", this.opts.code.source === !0 ? { ref: s.schema, code: (0, l.stringify)(s.schema) } : { ref: s.schema }),
2164
- validateName: A,
2164
+ validateName: P,
2165
2165
  ValidationError: U,
2166
2166
  schema: s.schema,
2167
2167
  schemaEnv: s,
@@ -2173,24 +2173,24 @@ function vn() {
2173
2173
  opts: this.opts,
2174
2174
  self: this
2175
2175
  };
2176
- let $;
2176
+ let O;
2177
2177
  try {
2178
2178
  this._compilations.add(s), (0, h.validateFunctionCode)(C), w.optimize(this.opts.code.optimize);
2179
2179
  const z = w.toString();
2180
- $ = `${w.scopeRefs(c.default.scope)}return ${z}`, this.opts.code.process && ($ = this.opts.code.process($, s));
2181
- const j = new Function(`${c.default.self}`, `${c.default.scope}`, $)(this, this.scope.get());
2182
- if (this.scope.value(A, { ref: j }), j.errors = null, j.schema = s.schema, j.schemaEnv = s, s.$async && (j.$async = !0), this.opts.code.source === !0 && (j.source = { validateName: A, validateCode: z, scopeValues: w._values }), this.opts.unevaluated) {
2180
+ O = `${w.scopeRefs(c.default.scope)}return ${z}`, this.opts.code.process && (O = this.opts.code.process(O, s));
2181
+ const G = new Function(`${c.default.self}`, `${c.default.scope}`, O)(this, this.scope.get());
2182
+ if (this.scope.value(P, { ref: G }), G.errors = null, G.schema = s.schema, G.schemaEnv = s, s.$async && (G.$async = !0), this.opts.code.source === !0 && (G.source = { validateName: P, validateCode: z, scopeValues: w._values }), this.opts.unevaluated) {
2183
2183
  const { props: V, items: K } = C;
2184
- j.evaluated = {
2184
+ G.evaluated = {
2185
2185
  props: V instanceof l.Name ? void 0 : V,
2186
2186
  items: K instanceof l.Name ? void 0 : K,
2187
2187
  dynamicProps: V instanceof l.Name,
2188
2188
  dynamicItems: K instanceof l.Name
2189
- }, j.source && (j.source.evaluated = (0, l.stringify)(j.evaluated));
2189
+ }, G.source && (G.source.evaluated = (0, l.stringify)(G.evaluated));
2190
2190
  }
2191
- return s.validate = j, s;
2191
+ return s.validate = G, s;
2192
2192
  } catch (z) {
2193
- throw delete s.validate, delete s.validateName, $ && this.logger.error("Error compiling schema, function code:", $), z;
2193
+ throw delete s.validate, delete s.validateName, O && this.logger.error("Error compiling schema, function code:", O), z;
2194
2194
  } finally {
2195
2195
  this._compilations.delete(s);
2196
2196
  }
@@ -2241,8 +2241,8 @@ function vn() {
2241
2241
  }
2242
2242
  if (typeof w?.schema == "object") {
2243
2243
  if (w.validate || n.call(this, w), b === (0, u.normalizeId)(f)) {
2244
- const { schema: U } = w, { schemaId: A } = this.opts, C = U[A];
2245
- return C && (m = (0, u.resolveUrl)(this.opts.uriResolver, m, C)), new g({ schema: U, schemaId: A, root: s, baseId: m });
2244
+ const { schema: U } = w, { schemaId: P } = this.opts, C = U[P];
2245
+ return C && (m = (0, u.resolveUrl)(this.opts.uriResolver, m, C)), new g({ schema: U, schemaId: P, root: s, baseId: m });
2246
2246
  }
2247
2247
  return r.call(this, d, w);
2248
2248
  }
@@ -2262,10 +2262,10 @@ function vn() {
2262
2262
  for (const U of s.fragment.slice(1).split("/")) {
2263
2263
  if (typeof d == "boolean")
2264
2264
  return;
2265
- const A = d[(0, _.unescapeFragment)(U)];
2266
- if (A === void 0)
2265
+ const P = d[(0, _.unescapeFragment)(U)];
2266
+ if (P === void 0)
2267
2267
  return;
2268
- d = A;
2268
+ d = P;
2269
2269
  const C = typeof d == "object" && d[this.opts.schemaId];
2270
2270
  !e.has(U) && C && (f = (0, u.resolveUrl)(this.opts.uriResolver, f, C));
2271
2271
  }
@@ -2343,9 +2343,9 @@ function Fl() {
2343
2343
  function U() {
2344
2344
  if (p.length) {
2345
2345
  if (m === !1) {
2346
- const A = u(p);
2347
- if (A !== void 0)
2348
- d.push(A);
2346
+ const P = u(p);
2347
+ if (P !== void 0)
2348
+ d.push(P);
2349
2349
  else
2350
2350
  return f.error = !0, !1;
2351
2351
  }
@@ -2353,8 +2353,8 @@ function Fl() {
2353
2353
  }
2354
2354
  return !0;
2355
2355
  }
2356
- for (let A = 0; A < r.length; A++) {
2357
- const C = r[A];
2356
+ for (let P = 0; P < r.length; P++) {
2357
+ const C = r[P];
2358
2358
  if (!(C === "[" || C === "]"))
2359
2359
  if (C === ":") {
2360
2360
  if (b === !0 && (w = !0), !U())
@@ -2363,7 +2363,7 @@ function Fl() {
2363
2363
  f.error = !0;
2364
2364
  break;
2365
2365
  }
2366
- A - 1 >= 0 && r[A - 1] === ":" && (b = !0);
2366
+ P - 1 >= 0 && r[P - 1] === ":" && (b = !0);
2367
2367
  continue;
2368
2368
  } else if (C === "%") {
2369
2369
  if (!U())
@@ -2493,8 +2493,8 @@ function Rl() {
2493
2493
  function v(d, p) {
2494
2494
  const m = p.scheme || d.scheme || "urn", b = d.nid.toLowerCase(), w = `${m}:${p.nid || b}`, U = f[w];
2495
2495
  U && (d = U.serialize(d, p));
2496
- const A = d, C = d.nss;
2497
- return A.path = `${b || p.nid}:${C}`, p.skipEscape = !0, A;
2496
+ const P = d, C = d.nss;
2497
+ return P.path = `${b || p.nid}:${C}`, p.skipEscape = !0, P;
2498
2498
  }
2499
2499
  function S(d, p) {
2500
2500
  const m = d;
@@ -2612,20 +2612,20 @@ function Bl() {
2612
2612
  const w = s.match(a);
2613
2613
  if (w) {
2614
2614
  if (p.scheme = w[1], p.userinfo = w[3], p.host = w[4], p.port = parseInt(w[5], 10), p.path = w[6] || "", p.query = w[7], p.fragment = w[8], isNaN(p.port) && (p.port = w[5]), p.host) {
2615
- const A = o(p.host);
2616
- if (A.isIPV4 === !1) {
2617
- const C = l(A.host);
2615
+ const P = o(p.host);
2616
+ if (P.isIPV4 === !1) {
2617
+ const C = l(P.host);
2618
2618
  p.host = C.host.toLowerCase(), b = C.isIPV6;
2619
2619
  } else
2620
- p.host = A.host, b = !0;
2620
+ p.host = P.host, b = !0;
2621
2621
  }
2622
2622
  p.scheme === void 0 && p.userinfo === void 0 && p.host === void 0 && p.port === void 0 && p.query === void 0 && !p.path ? p.reference = "same-document" : p.scheme === void 0 ? p.reference = "relative" : p.fragment === void 0 ? p.reference = "absolute" : p.reference = "uri", d.reference && d.reference !== "suffix" && d.reference !== p.reference && (p.error = p.error || "URI is not a " + d.reference + " reference.");
2623
2623
  const U = h[(d.scheme || p.scheme || "").toLowerCase()];
2624
2624
  if (!d.unicodeSupport && (!U || !U.unicodeSupport) && p.host && (d.domainHost || U && U.domainHost) && b === !1 && t(p.host))
2625
2625
  try {
2626
2626
  p.host = URL.domainToASCII(p.host.toLowerCase());
2627
- } catch (A) {
2628
- p.error = p.error || "Host's domain name can not be converted to ASCII: " + A;
2627
+ } catch (P) {
2628
+ p.error = p.error || "Host's domain name can not be converted to ASCII: " + P;
2629
2629
  }
2630
2630
  (!U || U && !U.skipNormalize) && (m && p.scheme !== void 0 && (p.scheme = unescape(p.scheme)), m && 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)))), U && U.parse && U.parse(p, d);
2631
2631
  } else
@@ -2658,7 +2658,7 @@ function Ll() {
2658
2658
  Object.defineProperty(l, "KeywordCxt", { enumerable: !0, get: function() {
2659
2659
  return o.KeywordCxt;
2660
2660
  } });
2661
- var c = W();
2661
+ var c = Z();
2662
2662
  Object.defineProperty(l, "_", { enumerable: !0, get: function() {
2663
2663
  return c._;
2664
2664
  } }), Object.defineProperty(l, "str", { enumerable: !0, get: function() {
@@ -2672,7 +2672,7 @@ function Ll() {
2672
2672
  } }), Object.defineProperty(l, "CodeGen", { enumerable: !0, get: function() {
2673
2673
  return c.CodeGen;
2674
2674
  } });
2675
- const u = gn(), _ = Ir(), h = Co(), g = vn(), n = W(), v = Tr(), S = yr(), y = re(), E = kl, t = Dl(), a = (B, P) => new RegExp(B, P);
2675
+ const u = gn(), _ = Ir(), h = Co(), g = vn(), n = Z(), v = Tr(), S = yr(), y = re(), E = kl, t = Dl(), a = (B, A) => new RegExp(B, A);
2676
2676
  a.code = "new RegExp";
2677
2677
  const e = ["removeAdditional", "useDefaults", "coerceTypes"], r = /* @__PURE__ */ new Set([
2678
2678
  "validate",
@@ -2710,20 +2710,20 @@ function Ll() {
2710
2710
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
2711
2711
  }, d = 200;
2712
2712
  function p(B) {
2713
- var P, k, I, x, T, D, N, L, q, H, R, F, O, G, Y, Z, ae, he, fe, me, ue, Qe, ve, zr, Fr;
2714
- const ut = B.strict, Rr = (P = B.code) === null || P === void 0 ? void 0 : P.optimize, Fn = Rr === !0 || Rr === void 0 ? 1 : Rr || 0, Rn = (I = (k = B.code) === null || k === void 0 ? void 0 : k.regExp) !== null && I !== void 0 ? I : a, pl = (x = B.uriResolver) !== null && x !== void 0 ? x : t.default;
2713
+ var A, k, T, x, I, D, N, L, q, H, F, R, $, j, Y, W, ae, he, le, me, ue, Qe, ve, zr, Fr;
2714
+ const ut = B.strict, Rr = (A = B.code) === null || A === void 0 ? void 0 : A.optimize, Fn = Rr === !0 || Rr === void 0 ? 1 : Rr || 0, Rn = (T = (k = B.code) === null || k === void 0 ? void 0 : k.regExp) !== null && T !== void 0 ? T : a, pl = (x = B.uriResolver) !== null && x !== void 0 ? x : t.default;
2715
2715
  return {
2716
- strictSchema: (D = (T = B.strictSchema) !== null && T !== void 0 ? T : ut) !== null && D !== void 0 ? D : !0,
2716
+ strictSchema: (D = (I = B.strictSchema) !== null && I !== void 0 ? I : ut) !== null && D !== void 0 ? D : !0,
2717
2717
  strictNumbers: (L = (N = B.strictNumbers) !== null && N !== void 0 ? N : ut) !== null && L !== void 0 ? L : !0,
2718
2718
  strictTypes: (H = (q = B.strictTypes) !== null && q !== void 0 ? q : ut) !== null && H !== void 0 ? H : "log",
2719
- strictTuples: (F = (R = B.strictTuples) !== null && R !== void 0 ? R : ut) !== null && F !== void 0 ? F : "log",
2720
- strictRequired: (G = (O = B.strictRequired) !== null && O !== void 0 ? O : ut) !== null && G !== void 0 ? G : !1,
2719
+ strictTuples: (R = (F = B.strictTuples) !== null && F !== void 0 ? F : ut) !== null && R !== void 0 ? R : "log",
2720
+ strictRequired: (j = ($ = B.strictRequired) !== null && $ !== void 0 ? $ : ut) !== null && j !== void 0 ? j : !1,
2721
2721
  code: B.code ? { ...B.code, optimize: Fn, regExp: Rn } : { optimize: Fn, regExp: Rn },
2722
2722
  loopRequired: (Y = B.loopRequired) !== null && Y !== void 0 ? Y : d,
2723
- loopEnum: (Z = B.loopEnum) !== null && Z !== void 0 ? Z : d,
2723
+ loopEnum: (W = B.loopEnum) !== null && W !== void 0 ? W : d,
2724
2724
  meta: (ae = B.meta) !== null && ae !== void 0 ? ae : !0,
2725
2725
  messages: (he = B.messages) !== null && he !== void 0 ? he : !0,
2726
- inlineRefs: (fe = B.inlineRefs) !== null && fe !== void 0 ? fe : !0,
2726
+ inlineRefs: (le = B.inlineRefs) !== null && le !== void 0 ? le : !0,
2727
2727
  schemaId: (me = B.schemaId) !== null && me !== void 0 ? me : "$id",
2728
2728
  addUsedSchema: (ue = B.addUsedSchema) !== null && ue !== void 0 ? ue : !0,
2729
2729
  validateSchema: (Qe = B.validateSchema) !== null && Qe !== void 0 ? Qe : !0,
@@ -2734,130 +2734,130 @@ function Ll() {
2734
2734
  };
2735
2735
  }
2736
2736
  class m {
2737
- constructor(P = {}) {
2738
- this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), P = this.opts = { ...P, ...p(P) };
2739
- const { es5: k, lines: I } = this.opts.code;
2740
- this.scope = new n.ValueScope({ scope: {}, prefixes: r, es5: k, lines: I }), this.logger = M(P.logger);
2741
- const x = P.validateFormats;
2742
- P.validateFormats = !1, this.RULES = (0, h.getRules)(), b.call(this, s, P, "NOT SUPPORTED"), b.call(this, f, P, "DEPRECATED", "warn"), this._metaOpts = $.call(this), P.formats && A.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), P.keywords && C.call(this, P.keywords), typeof P.meta == "object" && this.addMetaSchema(P.meta), U.call(this), P.validateFormats = x;
2737
+ constructor(A = {}) {
2738
+ this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), A = this.opts = { ...A, ...p(A) };
2739
+ const { es5: k, lines: T } = this.opts.code;
2740
+ this.scope = new n.ValueScope({ scope: {}, prefixes: r, es5: k, lines: T }), this.logger = M(A.logger);
2741
+ const x = A.validateFormats;
2742
+ A.validateFormats = !1, this.RULES = (0, h.getRules)(), b.call(this, s, A, "NOT SUPPORTED"), b.call(this, f, A, "DEPRECATED", "warn"), this._metaOpts = O.call(this), A.formats && P.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), A.keywords && C.call(this, A.keywords), typeof A.meta == "object" && this.addMetaSchema(A.meta), U.call(this), A.validateFormats = x;
2743
2743
  }
2744
2744
  _addVocabularies() {
2745
2745
  this.addKeyword("$async");
2746
2746
  }
2747
2747
  _addDefaultMetaSchema() {
2748
- const { $data: P, meta: k, schemaId: I } = this.opts;
2748
+ const { $data: A, meta: k, schemaId: T } = this.opts;
2749
2749
  let x = E;
2750
- I === "id" && (x = { ...E }, x.id = x.$id, delete x.$id), k && P && this.addMetaSchema(x, x[I], !1);
2750
+ T === "id" && (x = { ...E }, x.id = x.$id, delete x.$id), k && A && this.addMetaSchema(x, x[T], !1);
2751
2751
  }
2752
2752
  defaultMeta() {
2753
- const { meta: P, schemaId: k } = this.opts;
2754
- return this.opts.defaultMeta = typeof P == "object" ? P[k] || P : void 0;
2753
+ const { meta: A, schemaId: k } = this.opts;
2754
+ return this.opts.defaultMeta = typeof A == "object" ? A[k] || A : void 0;
2755
2755
  }
2756
- validate(P, k) {
2757
- let I;
2758
- if (typeof P == "string") {
2759
- if (I = this.getSchema(P), !I)
2760
- throw new Error(`no schema with key or ref "${P}"`);
2756
+ validate(A, k) {
2757
+ let T;
2758
+ if (typeof A == "string") {
2759
+ if (T = this.getSchema(A), !T)
2760
+ throw new Error(`no schema with key or ref "${A}"`);
2761
2761
  } else
2762
- I = this.compile(P);
2763
- const x = I(k);
2764
- return "$async" in I || (this.errors = I.errors), x;
2762
+ T = this.compile(A);
2763
+ const x = T(k);
2764
+ return "$async" in T || (this.errors = T.errors), x;
2765
2765
  }
2766
- compile(P, k) {
2767
- const I = this._addSchema(P, k);
2768
- return I.validate || this._compileSchemaEnv(I);
2766
+ compile(A, k) {
2767
+ const T = this._addSchema(A, k);
2768
+ return T.validate || this._compileSchemaEnv(T);
2769
2769
  }
2770
- compileAsync(P, k) {
2770
+ compileAsync(A, k) {
2771
2771
  if (typeof this.opts.loadSchema != "function")
2772
2772
  throw new Error("options.loadSchema should be a function");
2773
- const { loadSchema: I } = this.opts;
2774
- return x.call(this, P, k);
2775
- async function x(H, R) {
2776
- await T.call(this, H.$schema);
2777
- const F = this._addSchema(H, R);
2778
- return F.validate || D.call(this, F);
2779
- }
2780
- async function T(H) {
2773
+ const { loadSchema: T } = this.opts;
2774
+ return x.call(this, A, k);
2775
+ async function x(H, F) {
2776
+ await I.call(this, H.$schema);
2777
+ const R = this._addSchema(H, F);
2778
+ return R.validate || D.call(this, R);
2779
+ }
2780
+ async function I(H) {
2781
2781
  H && !this.getSchema(H) && await x.call(this, { $ref: H }, !0);
2782
2782
  }
2783
2783
  async function D(H) {
2784
2784
  try {
2785
2785
  return this._compileSchemaEnv(H);
2786
- } catch (R) {
2787
- if (!(R instanceof _.default))
2788
- throw R;
2789
- return N.call(this, R), await L.call(this, R.missingSchema), D.call(this, H);
2786
+ } catch (F) {
2787
+ if (!(F instanceof _.default))
2788
+ throw F;
2789
+ return N.call(this, F), await L.call(this, F.missingSchema), D.call(this, H);
2790
2790
  }
2791
2791
  }
2792
- function N({ missingSchema: H, missingRef: R }) {
2792
+ function N({ missingSchema: H, missingRef: F }) {
2793
2793
  if (this.refs[H])
2794
- throw new Error(`AnySchema ${H} is loaded but ${R} cannot be resolved`);
2794
+ throw new Error(`AnySchema ${H} is loaded but ${F} cannot be resolved`);
2795
2795
  }
2796
2796
  async function L(H) {
2797
- const R = await q.call(this, H);
2798
- this.refs[H] || await T.call(this, R.$schema), this.refs[H] || this.addSchema(R, H, k);
2797
+ const F = await q.call(this, H);
2798
+ this.refs[H] || await I.call(this, F.$schema), this.refs[H] || this.addSchema(F, H, k);
2799
2799
  }
2800
2800
  async function q(H) {
2801
- const R = this._loading[H];
2802
- if (R)
2803
- return R;
2801
+ const F = this._loading[H];
2802
+ if (F)
2803
+ return F;
2804
2804
  try {
2805
- return await (this._loading[H] = I(H));
2805
+ return await (this._loading[H] = T(H));
2806
2806
  } finally {
2807
2807
  delete this._loading[H];
2808
2808
  }
2809
2809
  }
2810
2810
  }
2811
2811
  // Adds schema to the instance
2812
- addSchema(P, k, I, x = this.opts.validateSchema) {
2813
- if (Array.isArray(P)) {
2814
- for (const D of P)
2815
- this.addSchema(D, void 0, I, x);
2812
+ addSchema(A, k, T, x = this.opts.validateSchema) {
2813
+ if (Array.isArray(A)) {
2814
+ for (const D of A)
2815
+ this.addSchema(D, void 0, T, x);
2816
2816
  return this;
2817
2817
  }
2818
- let T;
2819
- if (typeof P == "object") {
2818
+ let I;
2819
+ if (typeof A == "object") {
2820
2820
  const { schemaId: D } = this.opts;
2821
- if (T = P[D], T !== void 0 && typeof T != "string")
2821
+ if (I = A[D], I !== void 0 && typeof I != "string")
2822
2822
  throw new Error(`schema ${D} must be string`);
2823
2823
  }
2824
- return k = (0, v.normalizeId)(k || T), this._checkUnique(k), this.schemas[k] = this._addSchema(P, I, k, x, !0), this;
2824
+ return k = (0, v.normalizeId)(k || I), this._checkUnique(k), this.schemas[k] = this._addSchema(A, T, k, x, !0), this;
2825
2825
  }
2826
2826
  // Add schema that will be used to validate other schemas
2827
2827
  // options in META_IGNORE_OPTIONS are alway set to false
2828
- addMetaSchema(P, k, I = this.opts.validateSchema) {
2829
- return this.addSchema(P, k, !0, I), this;
2828
+ addMetaSchema(A, k, T = this.opts.validateSchema) {
2829
+ return this.addSchema(A, k, !0, T), this;
2830
2830
  }
2831
2831
  // Validate schema against its meta-schema
2832
- validateSchema(P, k) {
2833
- if (typeof P == "boolean")
2832
+ validateSchema(A, k) {
2833
+ if (typeof A == "boolean")
2834
2834
  return !0;
2835
- let I;
2836
- if (I = P.$schema, I !== void 0 && typeof I != "string")
2835
+ let T;
2836
+ if (T = A.$schema, T !== void 0 && typeof T != "string")
2837
2837
  throw new Error("$schema must be a string");
2838
- if (I = I || this.opts.defaultMeta || this.defaultMeta(), !I)
2838
+ if (T = T || this.opts.defaultMeta || this.defaultMeta(), !T)
2839
2839
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
2840
- const x = this.validate(I, P);
2840
+ const x = this.validate(T, A);
2841
2841
  if (!x && k) {
2842
- const T = "schema is invalid: " + this.errorsText();
2842
+ const I = "schema is invalid: " + this.errorsText();
2843
2843
  if (this.opts.validateSchema === "log")
2844
- this.logger.error(T);
2844
+ this.logger.error(I);
2845
2845
  else
2846
- throw new Error(T);
2846
+ throw new Error(I);
2847
2847
  }
2848
2848
  return x;
2849
2849
  }
2850
2850
  // Get compiled schema by `key` or `ref`.
2851
2851
  // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
2852
- getSchema(P) {
2852
+ getSchema(A) {
2853
2853
  let k;
2854
- for (; typeof (k = w.call(this, P)) == "string"; )
2855
- P = k;
2854
+ for (; typeof (k = w.call(this, A)) == "string"; )
2855
+ A = k;
2856
2856
  if (k === void 0) {
2857
- const { schemaId: I } = this.opts, x = new g.SchemaEnv({ schema: {}, schemaId: I });
2858
- if (k = g.resolveSchema.call(this, x, P), !k)
2857
+ const { schemaId: T } = this.opts, x = new g.SchemaEnv({ schema: {}, schemaId: T });
2858
+ if (k = g.resolveSchema.call(this, x, A), !k)
2859
2859
  return;
2860
- this.refs[P] = k;
2860
+ this.refs[A] = k;
2861
2861
  }
2862
2862
  return k.validate || this._compileSchemaEnv(k);
2863
2863
  }
@@ -2865,138 +2865,138 @@ function Ll() {
2865
2865
  // If no parameter is passed all schemas but meta-schemas are removed.
2866
2866
  // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
2867
2867
  // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
2868
- removeSchema(P) {
2869
- if (P instanceof RegExp)
2870
- return this._removeAllSchemas(this.schemas, P), this._removeAllSchemas(this.refs, P), this;
2871
- switch (typeof P) {
2868
+ removeSchema(A) {
2869
+ if (A instanceof RegExp)
2870
+ return this._removeAllSchemas(this.schemas, A), this._removeAllSchemas(this.refs, A), this;
2871
+ switch (typeof A) {
2872
2872
  case "undefined":
2873
2873
  return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
2874
2874
  case "string": {
2875
- const k = w.call(this, P);
2876
- return typeof k == "object" && this._cache.delete(k.schema), delete this.schemas[P], delete this.refs[P], this;
2875
+ const k = w.call(this, A);
2876
+ return typeof k == "object" && this._cache.delete(k.schema), delete this.schemas[A], delete this.refs[A], this;
2877
2877
  }
2878
2878
  case "object": {
2879
- const k = P;
2879
+ const k = A;
2880
2880
  this._cache.delete(k);
2881
- let I = P[this.opts.schemaId];
2882
- return I && (I = (0, v.normalizeId)(I), delete this.schemas[I], delete this.refs[I]), this;
2881
+ let T = A[this.opts.schemaId];
2882
+ return T && (T = (0, v.normalizeId)(T), delete this.schemas[T], delete this.refs[T]), this;
2883
2883
  }
2884
2884
  default:
2885
2885
  throw new Error("ajv.removeSchema: invalid parameter");
2886
2886
  }
2887
2887
  }
2888
2888
  // add "vocabulary" - a collection of keywords
2889
- addVocabulary(P) {
2890
- for (const k of P)
2889
+ addVocabulary(A) {
2890
+ for (const k of A)
2891
2891
  this.addKeyword(k);
2892
2892
  return this;
2893
2893
  }
2894
- addKeyword(P, k) {
2895
- let I;
2896
- if (typeof P == "string")
2897
- I = P, typeof k == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), k.keyword = I);
2898
- else if (typeof P == "object" && k === void 0) {
2899
- if (k = P, I = k.keyword, Array.isArray(I) && !I.length)
2894
+ addKeyword(A, k) {
2895
+ let T;
2896
+ if (typeof A == "string")
2897
+ T = A, typeof k == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), k.keyword = T);
2898
+ else if (typeof A == "object" && k === void 0) {
2899
+ if (k = A, T = k.keyword, Array.isArray(T) && !T.length)
2900
2900
  throw new Error("addKeywords: keyword must be string or non-empty array");
2901
2901
  } else
2902
2902
  throw new Error("invalid addKeywords parameters");
2903
- if (V.call(this, I, k), !k)
2904
- return (0, y.eachItem)(I, (T) => K.call(this, T)), this;
2903
+ if (V.call(this, T, k), !k)
2904
+ return (0, y.eachItem)(T, (I) => K.call(this, I)), this;
2905
2905
  J.call(this, k);
2906
2906
  const x = {
2907
2907
  ...k,
2908
2908
  type: (0, S.getJSONTypes)(k.type),
2909
2909
  schemaType: (0, S.getJSONTypes)(k.schemaType)
2910
2910
  };
2911
- return (0, y.eachItem)(I, x.type.length === 0 ? (T) => K.call(this, T, x) : (T) => x.type.forEach((D) => K.call(this, T, x, D))), this;
2911
+ return (0, y.eachItem)(T, x.type.length === 0 ? (I) => K.call(this, I, x) : (I) => x.type.forEach((D) => K.call(this, I, x, D))), this;
2912
2912
  }
2913
- getKeyword(P) {
2914
- const k = this.RULES.all[P];
2913
+ getKeyword(A) {
2914
+ const k = this.RULES.all[A];
2915
2915
  return typeof k == "object" ? k.definition : !!k;
2916
2916
  }
2917
2917
  // Remove keyword
2918
- removeKeyword(P) {
2918
+ removeKeyword(A) {
2919
2919
  const { RULES: k } = this;
2920
- delete k.keywords[P], delete k.all[P];
2921
- for (const I of k.rules) {
2922
- const x = I.rules.findIndex((T) => T.keyword === P);
2923
- x >= 0 && I.rules.splice(x, 1);
2920
+ delete k.keywords[A], delete k.all[A];
2921
+ for (const T of k.rules) {
2922
+ const x = T.rules.findIndex((I) => I.keyword === A);
2923
+ x >= 0 && T.rules.splice(x, 1);
2924
2924
  }
2925
2925
  return this;
2926
2926
  }
2927
2927
  // Add format
2928
- addFormat(P, k) {
2929
- return typeof k == "string" && (k = new RegExp(k)), this.formats[P] = k, this;
2928
+ addFormat(A, k) {
2929
+ return typeof k == "string" && (k = new RegExp(k)), this.formats[A] = k, this;
2930
2930
  }
2931
- errorsText(P = this.errors, { separator: k = ", ", dataVar: I = "data" } = {}) {
2932
- return !P || P.length === 0 ? "No errors" : P.map((x) => `${I}${x.instancePath} ${x.message}`).reduce((x, T) => x + k + T);
2931
+ errorsText(A = this.errors, { separator: k = ", ", dataVar: T = "data" } = {}) {
2932
+ return !A || A.length === 0 ? "No errors" : A.map((x) => `${T}${x.instancePath} ${x.message}`).reduce((x, I) => x + k + I);
2933
2933
  }
2934
- $dataMetaSchema(P, k) {
2935
- const I = this.RULES.all;
2936
- P = JSON.parse(JSON.stringify(P));
2934
+ $dataMetaSchema(A, k) {
2935
+ const T = this.RULES.all;
2936
+ A = JSON.parse(JSON.stringify(A));
2937
2937
  for (const x of k) {
2938
- const T = x.split("/").slice(1);
2939
- let D = P;
2940
- for (const N of T)
2938
+ const I = x.split("/").slice(1);
2939
+ let D = A;
2940
+ for (const N of I)
2941
2941
  D = D[N];
2942
- for (const N in I) {
2943
- const L = I[N];
2942
+ for (const N in T) {
2943
+ const L = T[N];
2944
2944
  if (typeof L != "object")
2945
2945
  continue;
2946
2946
  const { $data: q } = L.definition, H = D[N];
2947
2947
  q && H && (D[N] = ne(H));
2948
2948
  }
2949
2949
  }
2950
- return P;
2950
+ return A;
2951
2951
  }
2952
- _removeAllSchemas(P, k) {
2953
- for (const I in P) {
2954
- const x = P[I];
2955
- (!k || k.test(I)) && (typeof x == "string" ? delete P[I] : x && !x.meta && (this._cache.delete(x.schema), delete P[I]));
2952
+ _removeAllSchemas(A, k) {
2953
+ for (const T in A) {
2954
+ const x = A[T];
2955
+ (!k || k.test(T)) && (typeof x == "string" ? delete A[T] : x && !x.meta && (this._cache.delete(x.schema), delete A[T]));
2956
2956
  }
2957
2957
  }
2958
- _addSchema(P, k, I, x = this.opts.validateSchema, T = this.opts.addUsedSchema) {
2958
+ _addSchema(A, k, T, x = this.opts.validateSchema, I = this.opts.addUsedSchema) {
2959
2959
  let D;
2960
2960
  const { schemaId: N } = this.opts;
2961
- if (typeof P == "object")
2962
- D = P[N];
2961
+ if (typeof A == "object")
2962
+ D = A[N];
2963
2963
  else {
2964
2964
  if (this.opts.jtd)
2965
2965
  throw new Error("schema must be object");
2966
- if (typeof P != "boolean")
2966
+ if (typeof A != "boolean")
2967
2967
  throw new Error("schema must be object or boolean");
2968
2968
  }
2969
- let L = this._cache.get(P);
2969
+ let L = this._cache.get(A);
2970
2970
  if (L !== void 0)
2971
2971
  return L;
2972
- I = (0, v.normalizeId)(D || I);
2973
- const q = v.getSchemaRefs.call(this, P, I);
2974
- return L = new g.SchemaEnv({ schema: P, schemaId: N, meta: k, baseId: I, localRefs: q }), this._cache.set(L.schema, L), T && !I.startsWith("#") && (I && this._checkUnique(I), this.refs[I] = L), x && this.validateSchema(P, !0), L;
2972
+ T = (0, v.normalizeId)(D || T);
2973
+ const q = v.getSchemaRefs.call(this, A, T);
2974
+ return L = new g.SchemaEnv({ schema: A, schemaId: N, meta: k, baseId: T, localRefs: q }), this._cache.set(L.schema, L), I && !T.startsWith("#") && (T && this._checkUnique(T), this.refs[T] = L), x && this.validateSchema(A, !0), L;
2975
2975
  }
2976
- _checkUnique(P) {
2977
- if (this.schemas[P] || this.refs[P])
2978
- throw new Error(`schema with key or id "${P}" already exists`);
2976
+ _checkUnique(A) {
2977
+ if (this.schemas[A] || this.refs[A])
2978
+ throw new Error(`schema with key or id "${A}" already exists`);
2979
2979
  }
2980
- _compileSchemaEnv(P) {
2981
- if (P.meta ? this._compileMetaSchema(P) : g.compileSchema.call(this, P), !P.validate)
2980
+ _compileSchemaEnv(A) {
2981
+ if (A.meta ? this._compileMetaSchema(A) : g.compileSchema.call(this, A), !A.validate)
2982
2982
  throw new Error("ajv implementation error");
2983
- return P.validate;
2983
+ return A.validate;
2984
2984
  }
2985
- _compileMetaSchema(P) {
2985
+ _compileMetaSchema(A) {
2986
2986
  const k = this.opts;
2987
2987
  this.opts = this._metaOpts;
2988
2988
  try {
2989
- g.compileSchema.call(this, P);
2989
+ g.compileSchema.call(this, A);
2990
2990
  } finally {
2991
2991
  this.opts = k;
2992
2992
  }
2993
2993
  }
2994
2994
  }
2995
2995
  m.ValidationError = u.default, m.MissingRefError = _.default, l.default = m;
2996
- function b(B, P, k, I = "error") {
2996
+ function b(B, A, k, T = "error") {
2997
2997
  for (const x in B) {
2998
- const T = x;
2999
- T in P && this.logger[I](`${k}: option ${x}. ${B[T]}`);
2998
+ const I = x;
2999
+ I in A && this.logger[T](`${k}: option ${x}. ${B[I]}`);
3000
3000
  }
3001
3001
  }
3002
3002
  function w(B) {
@@ -3008,13 +3008,13 @@ function Ll() {
3008
3008
  if (Array.isArray(B))
3009
3009
  this.addSchema(B);
3010
3010
  else
3011
- for (const P in B)
3012
- this.addSchema(B[P], P);
3011
+ for (const A in B)
3012
+ this.addSchema(B[A], A);
3013
3013
  }
3014
- function A() {
3014
+ function P() {
3015
3015
  for (const B in this.opts.formats) {
3016
- const P = this.opts.formats[B];
3017
- P && this.addFormat(B, P);
3016
+ const A = this.opts.formats[B];
3017
+ A && this.addFormat(B, A);
3018
3018
  }
3019
3019
  }
3020
3020
  function C(B) {
@@ -3023,15 +3023,15 @@ function Ll() {
3023
3023
  return;
3024
3024
  }
3025
3025
  this.logger.warn("keywords option as map is deprecated, pass array");
3026
- for (const P in B) {
3027
- const k = B[P];
3028
- k.keyword || (k.keyword = P), this.addKeyword(k);
3026
+ for (const A in B) {
3027
+ const k = B[A];
3028
+ k.keyword || (k.keyword = A), this.addKeyword(k);
3029
3029
  }
3030
3030
  }
3031
- function $() {
3031
+ function O() {
3032
3032
  const B = { ...this.opts };
3033
- for (const P of e)
3034
- delete B[P];
3033
+ for (const A of e)
3034
+ delete B[A];
3035
3035
  return B;
3036
3036
  }
3037
3037
  const z = { log() {
@@ -3047,43 +3047,43 @@ function Ll() {
3047
3047
  return B;
3048
3048
  throw new Error("logger must implement log, warn and error methods");
3049
3049
  }
3050
- const j = /^[a-z_$][a-z0-9_$:-]*$/i;
3051
- function V(B, P) {
3050
+ const G = /^[a-z_$][a-z0-9_$:-]*$/i;
3051
+ function V(B, A) {
3052
3052
  const { RULES: k } = this;
3053
- if ((0, y.eachItem)(B, (I) => {
3054
- if (k.keywords[I])
3055
- throw new Error(`Keyword ${I} is already defined`);
3056
- if (!j.test(I))
3057
- throw new Error(`Keyword ${I} has invalid name`);
3058
- }), !!P && P.$data && !("code" in P || "validate" in P))
3053
+ if ((0, y.eachItem)(B, (T) => {
3054
+ if (k.keywords[T])
3055
+ throw new Error(`Keyword ${T} is already defined`);
3056
+ if (!G.test(T))
3057
+ throw new Error(`Keyword ${T} has invalid name`);
3058
+ }), !!A && A.$data && !("code" in A || "validate" in A))
3059
3059
  throw new Error('$data keyword must have "code" or "validate" function');
3060
3060
  }
3061
- function K(B, P, k) {
3062
- var I;
3063
- const x = P?.post;
3061
+ function K(B, A, k) {
3062
+ var T;
3063
+ const x = A?.post;
3064
3064
  if (k && x)
3065
3065
  throw new Error('keyword with "post" flag cannot have "type"');
3066
- const { RULES: T } = this;
3067
- let D = x ? T.post : T.rules.find(({ type: L }) => L === k);
3068
- if (D || (D = { type: k, rules: [] }, T.rules.push(D)), T.keywords[B] = !0, !P)
3066
+ const { RULES: I } = this;
3067
+ let D = x ? I.post : I.rules.find(({ type: L }) => L === k);
3068
+ if (D || (D = { type: k, rules: [] }, I.rules.push(D)), I.keywords[B] = !0, !A)
3069
3069
  return;
3070
3070
  const N = {
3071
3071
  keyword: B,
3072
3072
  definition: {
3073
- ...P,
3074
- type: (0, S.getJSONTypes)(P.type),
3075
- schemaType: (0, S.getJSONTypes)(P.schemaType)
3073
+ ...A,
3074
+ type: (0, S.getJSONTypes)(A.type),
3075
+ schemaType: (0, S.getJSONTypes)(A.schemaType)
3076
3076
  }
3077
3077
  };
3078
- P.before ? ee.call(this, D, N, P.before) : D.rules.push(N), T.all[B] = N, (I = P.implements) === null || I === void 0 || I.forEach((L) => this.addKeyword(L));
3078
+ A.before ? ee.call(this, D, N, A.before) : D.rules.push(N), I.all[B] = N, (T = A.implements) === null || T === void 0 || T.forEach((L) => this.addKeyword(L));
3079
3079
  }
3080
- function ee(B, P, k) {
3081
- const I = B.rules.findIndex((x) => x.keyword === k);
3082
- I >= 0 ? B.rules.splice(I, 0, P) : (B.rules.push(P), this.logger.warn(`rule ${k} is not defined`));
3080
+ function ee(B, A, k) {
3081
+ const T = B.rules.findIndex((x) => x.keyword === k);
3082
+ T >= 0 ? B.rules.splice(T, 0, A) : (B.rules.push(A), this.logger.warn(`rule ${k} is not defined`));
3083
3083
  }
3084
3084
  function J(B) {
3085
- let { metaSchema: P } = B;
3086
- P !== void 0 && (B.$data && this.opts.$data && (P = ne(P)), B.validateSchema = this.compile(P, !0));
3085
+ let { metaSchema: A } = B;
3086
+ A !== void 0 && (B.$data && this.opts.$data && (A = ne(A)), B.validateSchema = this.compile(A, !0));
3087
3087
  }
3088
3088
  const X = {
3089
3089
  $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
@@ -3109,7 +3109,7 @@ var Le = {}, fs;
3109
3109
  function Ol() {
3110
3110
  if (fs) return Le;
3111
3111
  fs = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.callRef = Le.getValidate = void 0;
3112
- const l = Ir(), o = Ee(), c = W(), u = De(), _ = vn(), h = re(), g = {
3112
+ const l = Ir(), o = Ee(), c = Z(), u = De(), _ = vn(), h = re(), g = {
3113
3113
  keyword: "$ref",
3114
3114
  schemaType: "string",
3115
3115
  code(S) {
@@ -3129,18 +3129,18 @@ function Ol() {
3129
3129
  return v(S, (0, c._)`${U}.validate`, d, d.$async);
3130
3130
  }
3131
3131
  function b(U) {
3132
- const A = n(S, U);
3133
- v(S, A, U, U.$async);
3132
+ const P = n(S, U);
3133
+ v(S, P, U, U.$async);
3134
3134
  }
3135
3135
  function w(U) {
3136
- const A = y.scopeValue("schema", s.code.source === !0 ? { ref: U, code: (0, c.stringify)(U) } : { ref: U }), C = y.name("valid"), $ = S.subschema({
3136
+ const P = y.scopeValue("schema", s.code.source === !0 ? { ref: U, code: (0, c.stringify)(U) } : { ref: U }), C = y.name("valid"), O = S.subschema({
3137
3137
  schema: U,
3138
3138
  dataTypes: [],
3139
3139
  schemaPath: c.nil,
3140
- topSchemaRef: A,
3140
+ topSchemaRef: P,
3141
3141
  errSchemaPath: E
3142
3142
  }, C);
3143
- S.mergeEvaluated($), S.ok(C);
3143
+ S.mergeEvaluated(O), S.ok(C);
3144
3144
  }
3145
3145
  }
3146
3146
  };
@@ -3158,35 +3158,35 @@ function Ol() {
3158
3158
  const U = a.let("valid");
3159
3159
  a.try(() => {
3160
3160
  a.code((0, c._)`await ${(0, o.callValidateCode)(S, y, d)}`), w(y), r || a.assign(U, !0);
3161
- }, (A) => {
3162
- a.if((0, c._)`!(${A} instanceof ${e.ValidationError})`, () => a.throw(A)), b(A), r || a.assign(U, !1);
3161
+ }, (P) => {
3162
+ a.if((0, c._)`!(${P} instanceof ${e.ValidationError})`, () => a.throw(P)), b(P), r || a.assign(U, !1);
3163
3163
  }), S.ok(U);
3164
3164
  }
3165
3165
  function m() {
3166
3166
  S.result((0, o.callValidateCode)(S, y, d), () => w(y), () => b(y));
3167
3167
  }
3168
3168
  function b(U) {
3169
- const A = (0, c._)`${U}.errors`;
3170
- a.assign(u.default.vErrors, (0, c._)`${u.default.vErrors} === null ? ${A} : ${u.default.vErrors}.concat(${A})`), a.assign(u.default.errors, (0, c._)`${u.default.vErrors}.length`);
3169
+ const P = (0, c._)`${U}.errors`;
3170
+ a.assign(u.default.vErrors, (0, c._)`${u.default.vErrors} === null ? ${P} : ${u.default.vErrors}.concat(${P})`), a.assign(u.default.errors, (0, c._)`${u.default.vErrors}.length`);
3171
3171
  }
3172
3172
  function w(U) {
3173
- var A;
3173
+ var P;
3174
3174
  if (!e.opts.unevaluated)
3175
3175
  return;
3176
- const C = (A = E?.validate) === null || A === void 0 ? void 0 : A.evaluated;
3176
+ const C = (P = E?.validate) === null || P === void 0 ? void 0 : P.evaluated;
3177
3177
  if (e.props !== !0)
3178
3178
  if (C && !C.dynamicProps)
3179
3179
  C.props !== void 0 && (e.props = h.mergeEvaluated.props(a, C.props, e.props));
3180
3180
  else {
3181
- const $ = a.var("props", (0, c._)`${U}.evaluated.props`);
3182
- e.props = h.mergeEvaluated.props(a, $, e.props, c.Name);
3181
+ const O = a.var("props", (0, c._)`${U}.evaluated.props`);
3182
+ e.props = h.mergeEvaluated.props(a, O, e.props, c.Name);
3183
3183
  }
3184
3184
  if (e.items !== !0)
3185
3185
  if (C && !C.dynamicItems)
3186
3186
  C.items !== void 0 && (e.items = h.mergeEvaluated.items(a, C.items, e.items));
3187
3187
  else {
3188
- const $ = a.var("items", (0, c._)`${U}.evaluated.items`);
3189
- e.items = h.mergeEvaluated.items(a, $, e.items, c.Name);
3188
+ const O = a.var("items", (0, c._)`${U}.evaluated.items`);
3189
+ e.items = h.mergeEvaluated.items(a, O, e.items, c.Name);
3190
3190
  }
3191
3191
  }
3192
3192
  }
@@ -3212,7 +3212,7 @@ var pi = {}, _i = {}, cs;
3212
3212
  function Ml() {
3213
3213
  if (cs) return _i;
3214
3214
  cs = 1, Object.defineProperty(_i, "__esModule", { value: !0 });
3215
- const l = W(), o = l.operators, c = {
3215
+ const l = Z(), o = l.operators, c = {
3216
3216
  maximum: { okStr: "<=", ok: o.LTE, fail: o.GT },
3217
3217
  minimum: { okStr: ">=", ok: o.GTE, fail: o.LT },
3218
3218
  exclusiveMaximum: { okStr: "<", ok: o.LT, fail: o.GTE },
@@ -3237,7 +3237,7 @@ var mi = {}, hs;
3237
3237
  function jl() {
3238
3238
  if (hs) return mi;
3239
3239
  hs = 1, Object.defineProperty(mi, "__esModule", { value: !0 });
3240
- const l = W(), c = {
3240
+ const l = Z(), c = {
3241
3241
  keyword: "multipleOf",
3242
3242
  type: "number",
3243
3243
  schemaType: "number",
@@ -3270,7 +3270,7 @@ var _s;
3270
3270
  function ql() {
3271
3271
  if (_s) return yi;
3272
3272
  _s = 1, Object.defineProperty(yi, "__esModule", { value: !0 });
3273
- const l = W(), o = re(), c = Gl(), _ = {
3273
+ const l = Z(), o = re(), c = Gl(), _ = {
3274
3274
  keyword: ["maxLength", "minLength"],
3275
3275
  type: "string",
3276
3276
  schemaType: "number",
@@ -3293,7 +3293,7 @@ var vi = {}, ms;
3293
3293
  function Vl() {
3294
3294
  if (ms) return vi;
3295
3295
  ms = 1, Object.defineProperty(vi, "__esModule", { value: !0 });
3296
- const l = Ee(), o = W(), u = {
3296
+ const l = Ee(), o = Z(), u = {
3297
3297
  keyword: "pattern",
3298
3298
  type: "string",
3299
3299
  schemaType: "string",
@@ -3313,7 +3313,7 @@ var bi = {}, ys;
3313
3313
  function Hl() {
3314
3314
  if (ys) return bi;
3315
3315
  ys = 1, Object.defineProperty(bi, "__esModule", { value: !0 });
3316
- const l = W(), c = {
3316
+ const l = Z(), c = {
3317
3317
  keyword: ["maxProperties", "minProperties"],
3318
3318
  type: "object",
3319
3319
  schemaType: "number",
@@ -3336,7 +3336,7 @@ var wi = {}, gs;
3336
3336
  function Yl() {
3337
3337
  if (gs) return wi;
3338
3338
  gs = 1, Object.defineProperty(wi, "__esModule", { value: !0 });
3339
- const l = Ee(), o = W(), c = re(), _ = {
3339
+ const l = Ee(), o = Z(), c = re(), _ = {
3340
3340
  keyword: "required",
3341
3341
  type: "object",
3342
3342
  schemaType: "array",
@@ -3393,7 +3393,7 @@ var Si = {}, vs;
3393
3393
  function Kl() {
3394
3394
  if (vs) return Si;
3395
3395
  vs = 1, Object.defineProperty(Si, "__esModule", { value: !0 });
3396
- const l = W(), c = {
3396
+ const l = Z(), c = {
3397
3397
  keyword: ["maxItems", "minItems"],
3398
3398
  type: "array",
3399
3399
  schemaType: "number",
@@ -3423,7 +3423,7 @@ var ws;
3423
3423
  function Wl() {
3424
3424
  if (ws) return xi;
3425
3425
  ws = 1, Object.defineProperty(xi, "__esModule", { value: !0 });
3426
- const l = yr(), o = W(), c = re(), u = bn(), h = {
3426
+ const l = yr(), o = Z(), c = re(), u = bn(), h = {
3427
3427
  keyword: "uniqueItems",
3428
3428
  type: "array",
3429
3429
  schemaType: "boolean",
@@ -3446,11 +3446,11 @@ function Wl() {
3446
3446
  return r.length > 0 && !r.some((m) => m === "object" || m === "array");
3447
3447
  }
3448
3448
  function d(m, b) {
3449
- const w = n.name("item"), U = (0, l.checkDataTypes)(r, w, a.opts.strictNumbers, l.DataType.Wrong), A = n.const("indices", (0, o._)`{}`);
3449
+ const w = n.name("item"), U = (0, l.checkDataTypes)(r, w, a.opts.strictNumbers, l.DataType.Wrong), P = n.const("indices", (0, o._)`{}`);
3450
3450
  n.for((0, o._)`;${m}--;`, () => {
3451
- n.let(w, (0, o._)`${v}[${m}]`), n.if(U, (0, o._)`continue`), r.length > 1 && n.if((0, o._)`typeof ${w} == "string"`, (0, o._)`${w} += "_"`), n.if((0, o._)`typeof ${A}[${w}] == "number"`, () => {
3452
- n.assign(b, (0, o._)`${A}[${w}]`), g.error(), n.assign(e, !1).break();
3453
- }).code((0, o._)`${A}[${w}] = ${m}`);
3451
+ n.let(w, (0, o._)`${v}[${m}]`), n.if(U, (0, o._)`continue`), r.length > 1 && n.if((0, o._)`typeof ${w} == "string"`, (0, o._)`${w} += "_"`), n.if((0, o._)`typeof ${P}[${w}] == "number"`, () => {
3452
+ n.assign(b, (0, o._)`${P}[${w}]`), g.error(), n.assign(e, !1).break();
3453
+ }).code((0, o._)`${P}[${w}] = ${m}`);
3454
3454
  });
3455
3455
  }
3456
3456
  function p(m, b) {
@@ -3467,7 +3467,7 @@ var Ei = {}, Ss;
3467
3467
  function Zl() {
3468
3468
  if (Ss) return Ei;
3469
3469
  Ss = 1, Object.defineProperty(Ei, "__esModule", { value: !0 });
3470
- const l = W(), o = re(), c = bn(), _ = {
3470
+ const l = Z(), o = re(), c = bn(), _ = {
3471
3471
  keyword: "const",
3472
3472
  $data: !0,
3473
3473
  error: {
@@ -3485,7 +3485,7 @@ var Ti = {}, xs;
3485
3485
  function Xl() {
3486
3486
  if (xs) return Ti;
3487
3487
  xs = 1, Object.defineProperty(Ti, "__esModule", { value: !0 });
3488
- const l = W(), o = re(), c = bn(), _ = {
3488
+ const l = Z(), o = re(), c = bn(), _ = {
3489
3489
  keyword: "enum",
3490
3490
  schemaType: "array",
3491
3491
  $data: !0,
@@ -3550,7 +3550,7 @@ var Ii = {}, et = {}, Es;
3550
3550
  function zo() {
3551
3551
  if (Es) return et;
3552
3552
  Es = 1, Object.defineProperty(et, "__esModule", { value: !0 }), et.validateAdditionalItems = void 0;
3553
- const l = W(), o = re(), u = {
3553
+ const l = Z(), o = re(), u = {
3554
3554
  keyword: "additionalItems",
3555
3555
  type: "array",
3556
3556
  schemaType: ["boolean", "object"],
@@ -3590,7 +3590,7 @@ var Pi = {}, tt = {}, Ts;
3590
3590
  function Fo() {
3591
3591
  if (Ts) return tt;
3592
3592
  Ts = 1, Object.defineProperty(tt, "__esModule", { value: !0 }), tt.validateTuple = void 0;
3593
- const l = W(), o = re(), c = Ee(), u = {
3593
+ const l = Z(), o = re(), c = Ee(), u = {
3594
3594
  keyword: "items",
3595
3595
  type: "array",
3596
3596
  schemaType: ["object", "array", "boolean"],
@@ -3640,7 +3640,7 @@ var Ai = {}, Ps;
3640
3640
  function ed() {
3641
3641
  if (Ps) return Ai;
3642
3642
  Ps = 1, Object.defineProperty(Ai, "__esModule", { value: !0 });
3643
- const l = W(), o = re(), c = Ee(), u = zo(), h = {
3643
+ const l = Z(), o = re(), c = Ee(), u = zo(), h = {
3644
3644
  keyword: "items",
3645
3645
  type: "array",
3646
3646
  schemaType: ["object", "boolean"],
@@ -3660,7 +3660,7 @@ var Ci = {}, As;
3660
3660
  function td() {
3661
3661
  if (As) return Ci;
3662
3662
  As = 1, Object.defineProperty(Ci, "__esModule", { value: !0 });
3663
- const l = W(), o = re(), u = {
3663
+ const l = Z(), o = re(), u = {
3664
3664
  keyword: "contains",
3665
3665
  type: "array",
3666
3666
  schemaType: ["object", "boolean"],
@@ -3717,7 +3717,7 @@ var Vr = {}, Cs;
3717
3717
  function id() {
3718
3718
  return Cs || (Cs = 1, (function(l) {
3719
3719
  Object.defineProperty(l, "__esModule", { value: !0 }), l.validateSchemaDeps = l.validatePropertyDeps = l.error = void 0;
3720
- const o = W(), c = re(), u = Ee();
3720
+ const o = Z(), c = re(), u = Ee();
3721
3721
  l.error = {
3722
3722
  message: ({ params: { property: v, depsCount: S, deps: y } }) => {
3723
3723
  const E = S === 1 ? "property" : "properties";
@@ -3790,7 +3790,7 @@ var ki = {}, ks;
3790
3790
  function rd() {
3791
3791
  if (ks) return ki;
3792
3792
  ks = 1, Object.defineProperty(ki, "__esModule", { value: !0 });
3793
- const l = W(), o = re(), u = {
3793
+ const l = Z(), o = re(), u = {
3794
3794
  keyword: "propertyNames",
3795
3795
  type: "object",
3796
3796
  schemaType: ["object", "boolean"],
@@ -3822,7 +3822,7 @@ var zi = {}, zs;
3822
3822
  function Ro() {
3823
3823
  if (zs) return zi;
3824
3824
  zs = 1, Object.defineProperty(zi, "__esModule", { value: !0 });
3825
- const l = Ee(), o = W(), c = De(), u = re(), h = {
3825
+ const l = Ee(), o = Z(), c = De(), u = re(), h = {
3826
3826
  keyword: "additionalProperties",
3827
3827
  type: ["object"],
3828
3828
  schemaType: ["boolean", "object"],
@@ -3849,10 +3849,10 @@ function Ro() {
3849
3849
  function d(w) {
3850
3850
  let U;
3851
3851
  if (r.length > 8) {
3852
- const A = (0, u.schemaRefOrVal)(t, S.properties, "properties");
3853
- U = (0, l.isOwnProperty)(n, A, w);
3854
- } else r.length ? U = (0, o.or)(...r.map((A) => (0, o._)`${w} === ${A}`)) : U = o.nil;
3855
- return s.length && (U = (0, o.or)(U, ...s.map((A) => (0, o._)`${(0, l.usePattern)(g, A)}.test(${w})`))), (0, o.not)(U);
3852
+ const P = (0, u.schemaRefOrVal)(t, S.properties, "properties");
3853
+ U = (0, l.isOwnProperty)(n, P, w);
3854
+ } else r.length ? U = (0, o.or)(...r.map((P) => (0, o._)`${w} === ${P}`)) : U = o.nil;
3855
+ return s.length && (U = (0, o.or)(U, ...s.map((P) => (0, o._)`${(0, l.usePattern)(g, P)}.test(${w})`))), (0, o.not)(U);
3856
3856
  }
3857
3857
  function p(w) {
3858
3858
  n.code((0, o._)`delete ${y}[${w}]`);
@@ -3873,13 +3873,13 @@ function Ro() {
3873
3873
  })) : (b(w, U), a || n.if((0, o.not)(U), () => n.break()));
3874
3874
  }
3875
3875
  }
3876
- function b(w, U, A) {
3876
+ function b(w, U, P) {
3877
3877
  const C = {
3878
3878
  keyword: "additionalProperties",
3879
3879
  dataProp: w,
3880
3880
  dataPropType: u.Type.Str
3881
3881
  };
3882
- A === !1 && Object.assign(C, {
3882
+ P === !1 && Object.assign(C, {
3883
3883
  compositeRule: !0,
3884
3884
  createErrors: !1,
3885
3885
  allErrors: !1
@@ -3928,7 +3928,7 @@ var Ri = {}, Rs;
3928
3928
  function sd() {
3929
3929
  if (Rs) return Ri;
3930
3930
  Rs = 1, Object.defineProperty(Ri, "__esModule", { value: !0 });
3931
- const l = Ee(), o = W(), c = re(), u = re(), _ = {
3931
+ const l = Ee(), o = Z(), c = re(), u = re(), _ = {
3932
3932
  keyword: "patternProperties",
3933
3933
  type: "object",
3934
3934
  schemaType: "object",
@@ -4008,7 +4008,7 @@ var Li = {}, Ls;
4008
4008
  function ld() {
4009
4009
  if (Ls) return Li;
4010
4010
  Ls = 1, Object.defineProperty(Li, "__esModule", { value: !0 });
4011
- const l = W(), o = re(), u = {
4011
+ const l = Z(), o = re(), u = {
4012
4012
  keyword: "oneOf",
4013
4013
  schemaType: "array",
4014
4014
  trackErrors: !0,
@@ -4066,7 +4066,7 @@ var Oi = {}, Os;
4066
4066
  function fd() {
4067
4067
  if (Os) return Oi;
4068
4068
  Os = 1, Object.defineProperty(Oi, "__esModule", { value: !0 });
4069
- const l = W(), o = re(), u = {
4069
+ const l = Z(), o = re(), u = {
4070
4070
  keyword: "if",
4071
4071
  schemaType: ["object", "boolean"],
4072
4072
  trackErrors: !0,
@@ -4151,7 +4151,7 @@ var Mi = {}, ji = {}, js;
4151
4151
  function hd() {
4152
4152
  if (js) return ji;
4153
4153
  js = 1, Object.defineProperty(ji, "__esModule", { value: !0 });
4154
- const l = W(), c = {
4154
+ const l = Z(), c = {
4155
4155
  keyword: "format",
4156
4156
  type: ["number", "string"],
4157
4157
  schemaType: "string",
@@ -4175,8 +4175,8 @@ function hd() {
4175
4175
  return E.strictSchema === !1 ? l.nil : (0, l._)`${S} && !${m}`;
4176
4176
  }
4177
4177
  function w() {
4178
- const U = a.$async ? (0, l._)`(${d}.async ? await ${m}(${g}) : ${m}(${g}))` : (0, l._)`${m}(${g})`, A = (0, l._)`(typeof ${m} == "function" ? ${U} : ${m}.test(${g}))`;
4179
- return (0, l._)`${m} && ${m} !== true && ${p} === ${_} && !${A}`;
4178
+ const U = a.$async ? (0, l._)`(${d}.async ? await ${m}(${g}) : ${m}(${g}))` : (0, l._)`${m}(${g})`, P = (0, l._)`(typeof ${m} == "function" ? ${U} : ${m}.test(${g}))`;
4179
+ return (0, l._)`${m} && ${m} !== true && ${p} === ${_} && !${P}`;
4180
4180
  }
4181
4181
  }
4182
4182
  function s() {
@@ -4191,17 +4191,17 @@ function hd() {
4191
4191
  d === _ && u.pass(U());
4192
4192
  function b() {
4193
4193
  if (E.strictSchema === !1) {
4194
- e.logger.warn(A());
4194
+ e.logger.warn(P());
4195
4195
  return;
4196
4196
  }
4197
- throw new Error(A());
4198
- function A() {
4197
+ throw new Error(P());
4198
+ function P() {
4199
4199
  return `unknown format "${v}" ignored in schema at path "${t}"`;
4200
4200
  }
4201
4201
  }
4202
- function w(A) {
4203
- const C = A instanceof RegExp ? (0, l.regexpCode)(A) : E.code.formats ? (0, l._)`${E.code.formats}${(0, l.getProperty)(v)}` : void 0, $ = h.scopeValue("formats", { key: v, ref: A, code: C });
4204
- return typeof A == "object" && !(A instanceof RegExp) ? [A.type || "string", A.validate, (0, l._)`${$}.validate`] : ["string", A, $];
4202
+ function w(P) {
4203
+ const C = P instanceof RegExp ? (0, l.regexpCode)(P) : E.code.formats ? (0, l._)`${E.code.formats}${(0, l.getProperty)(v)}` : void 0, O = h.scopeValue("formats", { key: v, ref: P, code: C });
4204
+ return typeof P == "object" && !(P instanceof RegExp) ? [P.type || "string", P.validate, (0, l._)`${O}.validate`] : ["string", P, O];
4205
4205
  }
4206
4206
  function U() {
4207
4207
  if (typeof f == "object" && !(f instanceof RegExp) && f.async) {
@@ -4266,7 +4266,7 @@ var Ys;
4266
4266
  function gd() {
4267
4267
  if (Ys) return Gi;
4268
4268
  Ys = 1, Object.defineProperty(Gi, "__esModule", { value: !0 });
4269
- const l = W(), o = yd(), c = vn(), u = Ir(), _ = re(), g = {
4269
+ const l = Z(), o = yd(), c = vn(), u = Ir(), _ = re(), g = {
4270
4270
  keyword: "discriminator",
4271
4271
  type: "object",
4272
4272
  schemaType: "object",
@@ -4300,7 +4300,7 @@ function gd() {
4300
4300
  }
4301
4301
  function p() {
4302
4302
  var m;
4303
- const b = {}, w = A(E);
4303
+ const b = {}, w = P(E);
4304
4304
  let U = !0;
4305
4305
  for (let z = 0; z < a.length; z++) {
4306
4306
  let M = a[z];
@@ -4309,27 +4309,27 @@ function gd() {
4309
4309
  if (M = c.resolveRef.call(t.self, t.schemaEnv.root, t.baseId, V), M instanceof c.SchemaEnv && (M = M.schema), M === void 0)
4310
4310
  throw new u.default(t.opts.uriResolver, t.baseId, V);
4311
4311
  }
4312
- const j = (m = M?.properties) === null || m === void 0 ? void 0 : m[e];
4313
- if (typeof j != "object")
4312
+ const G = (m = M?.properties) === null || m === void 0 ? void 0 : m[e];
4313
+ if (typeof G != "object")
4314
4314
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${e}"`);
4315
- U = U && (w || A(M)), C(j, z);
4315
+ U = U && (w || P(M)), C(G, z);
4316
4316
  }
4317
4317
  if (!U)
4318
4318
  throw new Error(`discriminator: "${e}" must be required`);
4319
4319
  return b;
4320
- function A({ required: z }) {
4320
+ function P({ required: z }) {
4321
4321
  return Array.isArray(z) && z.includes(e);
4322
4322
  }
4323
4323
  function C(z, M) {
4324
4324
  if (z.const)
4325
- $(z.const, M);
4325
+ O(z.const, M);
4326
4326
  else if (z.enum)
4327
- for (const j of z.enum)
4328
- $(j, M);
4327
+ for (const G of z.enum)
4328
+ O(G, M);
4329
4329
  else
4330
4330
  throw new Error(`discriminator: "properties/${e}" must have "const" or "enum"`);
4331
4331
  }
4332
- function $(z, M) {
4332
+ function O(z, M) {
4333
4333
  if (typeof z != "string" || z in b)
4334
4334
  throw new Error(`discriminator: "${e}" values must be unique strings`);
4335
4335
  b[z] = M;
@@ -4372,7 +4372,7 @@ function wn() {
4372
4372
  Object.defineProperty(o, "KeywordCxt", { enumerable: !0, get: function() {
4373
4373
  return S.KeywordCxt;
4374
4374
  } });
4375
- var y = W();
4375
+ var y = Z();
4376
4376
  Object.defineProperty(o, "_", { enumerable: !0, get: function() {
4377
4377
  return y._;
4378
4378
  } }), Object.defineProperty(o, "str", { enumerable: !0, get: function() {
@@ -4402,7 +4402,7 @@ var qi = { exports: {} }, Ws;
4402
4402
  function Pd() {
4403
4403
  return Ws || (Ws = 1, (function(l, o) {
4404
4404
  Object.defineProperty(o, "__esModule", { value: !0 });
4405
- const c = wn(), u = W(), _ = Gt(), h = Jt(), g = Xt(), n = De(), v = "errorMessage", S = new c.Name("emUsed"), y = {
4405
+ const c = wn(), u = Z(), _ = Gt(), h = Jt(), g = Xt(), n = De(), v = "errorMessage", S = new c.Name("emUsed"), y = {
4406
4406
  required: "missingProperty",
4407
4407
  dependencies: "property",
4408
4408
  dependentRequired: "property"
@@ -4416,156 +4416,156 @@ function Pd() {
4416
4416
  const { gen: d, data: p, schema: m, schemaValue: b, it: w } = f;
4417
4417
  if (w.createErrors === !1)
4418
4418
  return;
4419
- const U = m, A = u.strConcat(n.default.instancePath, w.errorPath);
4419
+ const U = m, P = u.strConcat(n.default.instancePath, w.errorPath);
4420
4420
  d.if(c._`${n.default.errors} > 0`, () => {
4421
4421
  if (typeof U == "object") {
4422
- const [I, x] = $(U);
4423
- x && z(x), I && M(I), j(C(U));
4422
+ const [T, x] = O(U);
4423
+ x && z(x), T && M(T), G(C(U));
4424
4424
  }
4425
4425
  const k = typeof U == "string" ? U : U._;
4426
4426
  k && V(k), s.keepErrors || K();
4427
4427
  });
4428
- function C({ properties: k, items: I }) {
4428
+ function C({ properties: k, items: T }) {
4429
4429
  const x = {};
4430
4430
  if (k) {
4431
4431
  x.props = {};
4432
- for (const T in k)
4433
- x.props[T] = [];
4432
+ for (const I in k)
4433
+ x.props[I] = [];
4434
4434
  }
4435
- if (I) {
4435
+ if (T) {
4436
4436
  x.items = {};
4437
- for (let T = 0; T < I.length; T++)
4438
- x.items[T] = [];
4437
+ for (let I = 0; I < T.length; I++)
4438
+ x.items[I] = [];
4439
4439
  }
4440
4440
  return x;
4441
4441
  }
4442
- function $(k) {
4443
- let I, x;
4444
- for (const T in k) {
4445
- if (T === "properties" || T === "items")
4442
+ function O(k) {
4443
+ let T, x;
4444
+ for (const I in k) {
4445
+ if (I === "properties" || I === "items")
4446
4446
  continue;
4447
- const D = k[T];
4447
+ const D = k[I];
4448
4448
  if (typeof D == "object") {
4449
- I || (I = {});
4450
- const N = I[T] = {};
4449
+ T || (T = {});
4450
+ const N = T[I] = {};
4451
4451
  for (const L in D)
4452
4452
  N[L] = [];
4453
4453
  } else
4454
- x || (x = {}), x[T] = [];
4454
+ x || (x = {}), x[I] = [];
4455
4455
  }
4456
- return [I, x];
4456
+ return [T, x];
4457
4457
  }
4458
4458
  function z(k) {
4459
- const I = d.const("emErrors", c.stringify(k)), x = d.const("templates", ne(k, m));
4460
- d.forOf("err", n.default.vErrors, (L) => d.if(ee(L, I), () => d.code(c._`${I}[${L}.keyword].push(${L})`).assign(c._`${L}.${S}`, !0)));
4461
- const { singleError: T } = s;
4462
- if (T) {
4459
+ const T = d.const("emErrors", c.stringify(k)), x = d.const("templates", ne(k, m));
4460
+ d.forOf("err", n.default.vErrors, (L) => d.if(ee(L, T), () => d.code(c._`${T}[${L}.keyword].push(${L})`).assign(c._`${L}.${S}`, !0)));
4461
+ const { singleError: I } = s;
4462
+ if (I) {
4463
4463
  const L = d.let("message", c._`""`), q = d.let("paramsErrors", c._`[]`);
4464
4464
  D((H) => {
4465
- d.if(L, () => d.code(c._`${L} += ${typeof T == "string" ? T : ";"}`)), d.code(c._`${L} += ${N(H)}`), d.assign(q, c._`${q}.concat(${I}[${H}])`);
4465
+ d.if(L, () => d.code(c._`${L} += ${typeof I == "string" ? I : ";"}`)), d.code(c._`${L} += ${N(H)}`), d.assign(q, c._`${q}.concat(${T}[${H}])`);
4466
4466
  }), g.reportError(f, { message: L, params: c._`{errors: ${q}}` });
4467
4467
  } else
4468
4468
  D((L) => g.reportError(f, {
4469
4469
  message: N(L),
4470
- params: c._`{errors: ${I}[${L}]}`
4470
+ params: c._`{errors: ${T}[${L}]}`
4471
4471
  }));
4472
4472
  function D(L) {
4473
- d.forIn("key", I, (q) => d.if(c._`${I}[${q}].length`, () => L(q)));
4473
+ d.forIn("key", T, (q) => d.if(c._`${T}[${q}].length`, () => L(q)));
4474
4474
  }
4475
4475
  function N(L) {
4476
4476
  return c._`${L} in ${x} ? ${x}[${L}]() : ${b}[${L}]`;
4477
4477
  }
4478
4478
  }
4479
4479
  function M(k) {
4480
- const I = d.const("emErrors", c.stringify(k)), x = [];
4480
+ const T = d.const("emErrors", c.stringify(k)), x = [];
4481
4481
  for (const q in k)
4482
4482
  x.push([
4483
4483
  q,
4484
4484
  ne(k[q], m[q])
4485
4485
  ]);
4486
- const T = d.const("templates", d.object(...x)), D = d.scopeValue("obj", {
4486
+ const I = d.const("templates", d.object(...x)), D = d.scopeValue("obj", {
4487
4487
  ref: y,
4488
4488
  code: c.stringify(y)
4489
4489
  }), N = d.let("emPropParams"), L = d.let("emParamsErrors");
4490
- d.forOf("err", n.default.vErrors, (q) => d.if(ee(q, I), () => {
4491
- d.assign(N, c._`${D}[${q}.keyword]`), d.assign(L, c._`${I}[${q}.keyword][${q}.params[${N}]]`), d.if(L, () => d.code(c._`${L}.push(${q})`).assign(c._`${q}.${S}`, !0));
4492
- })), d.forIn("key", I, (q) => d.forIn("keyProp", c._`${I}[${q}]`, (H) => {
4493
- d.assign(L, c._`${I}[${q}][${H}]`), d.if(c._`${L}.length`, () => {
4494
- const R = d.const("tmpl", c._`${T}[${q}] && ${T}[${q}][${H}]`);
4490
+ d.forOf("err", n.default.vErrors, (q) => d.if(ee(q, T), () => {
4491
+ d.assign(N, c._`${D}[${q}.keyword]`), d.assign(L, c._`${T}[${q}.keyword][${q}.params[${N}]]`), d.if(L, () => d.code(c._`${L}.push(${q})`).assign(c._`${q}.${S}`, !0));
4492
+ })), d.forIn("key", T, (q) => d.forIn("keyProp", c._`${T}[${q}]`, (H) => {
4493
+ d.assign(L, c._`${T}[${q}][${H}]`), d.if(c._`${L}.length`, () => {
4494
+ const F = d.const("tmpl", c._`${I}[${q}] && ${I}[${q}][${H}]`);
4495
4495
  g.reportError(f, {
4496
- message: c._`${R} ? ${R}() : ${b}[${q}][${H}]`,
4496
+ message: c._`${F} ? ${F}() : ${b}[${q}][${H}]`,
4497
4497
  params: c._`{errors: ${L}}`
4498
4498
  });
4499
4499
  });
4500
4500
  }));
4501
4501
  }
4502
- function j(k) {
4503
- const { props: I, items: x } = k;
4504
- if (!I && !x)
4502
+ function G(k) {
4503
+ const { props: T, items: x } = k;
4504
+ if (!T && !x)
4505
4505
  return;
4506
- const T = c._`typeof ${p} == "object"`, D = c._`Array.isArray(${p})`, N = d.let("emErrors");
4506
+ const I = c._`typeof ${p} == "object"`, D = c._`Array.isArray(${p})`, N = d.let("emErrors");
4507
4507
  let L, q;
4508
4508
  const H = d.let("templates");
4509
- I && x ? (L = d.let("emChildKwd"), d.if(T), d.if(D, () => {
4510
- R(x, m.items), d.assign(L, c.str`items`);
4509
+ T && x ? (L = d.let("emChildKwd"), d.if(I), d.if(D, () => {
4510
+ F(x, m.items), d.assign(L, c.str`items`);
4511
4511
  }, () => {
4512
- R(I, m.properties), d.assign(L, c.str`properties`);
4513
- }), q = c._`[${L}]`) : x ? (d.if(D), R(x, m.items), q = c._`.items`) : I && (d.if(u.and(T, u.not(D))), R(I, m.properties), q = c._`.properties`), d.forOf("err", n.default.vErrors, (F) => J(F, N, (O) => d.code(c._`${N}[${O}].push(${F})`).assign(c._`${F}.${S}`, !0))), d.forIn("key", N, (F) => d.if(c._`${N}[${F}].length`, () => {
4512
+ F(T, m.properties), d.assign(L, c.str`properties`);
4513
+ }), q = c._`[${L}]`) : x ? (d.if(D), F(x, m.items), q = c._`.items`) : T && (d.if(u.and(I, u.not(D))), F(T, m.properties), q = c._`.properties`), d.forOf("err", n.default.vErrors, (R) => J(R, N, ($) => d.code(c._`${N}[${$}].push(${R})`).assign(c._`${R}.${S}`, !0))), d.forIn("key", N, (R) => d.if(c._`${N}[${R}].length`, () => {
4514
4514
  g.reportError(f, {
4515
- message: c._`${F} in ${H} ? ${H}[${F}]() : ${b}${q}[${F}]`,
4516
- params: c._`{errors: ${N}[${F}]}`
4517
- }), d.assign(c._`${n.default.vErrors}[${n.default.errors}-1].instancePath`, c._`${A} + "/" + ${F}.replace(/~/g, "~0").replace(/\\//g, "~1")`);
4515
+ message: c._`${R} in ${H} ? ${H}[${R}]() : ${b}${q}[${R}]`,
4516
+ params: c._`{errors: ${N}[${R}]}`
4517
+ }), d.assign(c._`${n.default.vErrors}[${n.default.errors}-1].instancePath`, c._`${P} + "/" + ${R}.replace(/~/g, "~0").replace(/\\//g, "~1")`);
4518
4518
  })), d.endIf();
4519
- function R(F, O) {
4520
- d.assign(N, c.stringify(F)), d.assign(H, ne(F, O));
4519
+ function F(R, $) {
4520
+ d.assign(N, c.stringify(R)), d.assign(H, ne(R, $));
4521
4521
  }
4522
4522
  }
4523
4523
  function V(k) {
4524
- const I = d.const("emErrs", c._`[]`);
4525
- d.forOf("err", n.default.vErrors, (x) => d.if(X(x), () => d.code(c._`${I}.push(${x})`).assign(c._`${x}.${S}`, !0))), d.if(c._`${I}.length`, () => g.reportError(f, {
4524
+ const T = d.const("emErrs", c._`[]`);
4525
+ d.forOf("err", n.default.vErrors, (x) => d.if(X(x), () => d.code(c._`${T}.push(${x})`).assign(c._`${x}.${S}`, !0))), d.if(c._`${T}.length`, () => g.reportError(f, {
4526
4526
  message: B(k),
4527
- params: c._`{errors: ${I}}`
4527
+ params: c._`{errors: ${T}}`
4528
4528
  }));
4529
4529
  }
4530
4530
  function K() {
4531
4531
  const k = d.const("emErrs", c._`[]`);
4532
- d.forOf("err", n.default.vErrors, (I) => d.if(c._`!${I}.${S}`, () => d.code(c._`${k}.push(${I})`))), d.assign(n.default.vErrors, k).assign(n.default.errors, c._`${k}.length`);
4532
+ d.forOf("err", n.default.vErrors, (T) => d.if(c._`!${T}.${S}`, () => d.code(c._`${k}.push(${T})`))), d.assign(n.default.vErrors, k).assign(n.default.errors, c._`${k}.length`);
4533
4533
  }
4534
- function ee(k, I) {
4534
+ function ee(k, T) {
4535
4535
  return u.and(
4536
4536
  c._`${k}.keyword !== ${v}`,
4537
4537
  c._`!${k}.${S}`,
4538
- c._`${k}.instancePath === ${A}`,
4539
- c._`${k}.keyword in ${I}`,
4538
+ c._`${k}.instancePath === ${P}`,
4539
+ c._`${k}.keyword in ${T}`,
4540
4540
  // TODO match the end of the string?
4541
4541
  c._`${k}.schemaPath.indexOf(${w.errSchemaPath}) === 0`,
4542
4542
  c._`/^\\/[^\\/]*$/.test(${k}.schemaPath.slice(${w.errSchemaPath.length}))`
4543
4543
  );
4544
4544
  }
4545
- function J(k, I, x) {
4546
- d.if(u.and(c._`${k}.keyword !== ${v}`, c._`!${k}.${S}`, c._`${k}.instancePath.indexOf(${A}) === 0`), () => {
4547
- const T = d.scopeValue("pattern", {
4545
+ function J(k, T, x) {
4546
+ d.if(u.and(c._`${k}.keyword !== ${v}`, c._`!${k}.${S}`, c._`${k}.instancePath.indexOf(${P}) === 0`), () => {
4547
+ const I = d.scopeValue("pattern", {
4548
4548
  ref: /^\/([^/]*)(?:\/|$)/,
4549
4549
  code: c._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`
4550
- }), D = d.const("emMatches", c._`${T}.exec(${k}.instancePath.slice(${A}.length))`), N = d.const("emChild", c._`${D} && ${D}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);
4551
- d.if(c._`${N} !== undefined && ${N} in ${I}`, () => x(N));
4550
+ }), D = d.const("emMatches", c._`${I}.exec(${k}.instancePath.slice(${P}.length))`), N = d.const("emChild", c._`${D} && ${D}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);
4551
+ d.if(c._`${N} !== undefined && ${N} in ${T}`, () => x(N));
4552
4552
  });
4553
4553
  }
4554
4554
  function X(k) {
4555
- return u.and(c._`${k}.keyword !== ${v}`, c._`!${k}.${S}`, u.or(c._`${k}.instancePath === ${A}`, u.and(c._`${k}.instancePath.indexOf(${A}) === 0`, c._`${k}.instancePath[${A}.length] === "/"`)), c._`${k}.schemaPath.indexOf(${w.errSchemaPath}) === 0`, c._`${k}.schemaPath[${w.errSchemaPath}.length] === "/"`);
4555
+ return u.and(c._`${k}.keyword !== ${v}`, c._`!${k}.${S}`, u.or(c._`${k}.instancePath === ${P}`, u.and(c._`${k}.instancePath.indexOf(${P}) === 0`, c._`${k}.instancePath[${P}.length] === "/"`)), c._`${k}.schemaPath.indexOf(${w.errSchemaPath}) === 0`, c._`${k}.schemaPath[${w.errSchemaPath}.length] === "/"`);
4556
4556
  }
4557
- function ne(k, I) {
4557
+ function ne(k, T) {
4558
4558
  const x = [];
4559
- for (const T in k) {
4560
- const D = I[T];
4561
- E.test(D) && x.push([T, P(D)]);
4559
+ for (const I in k) {
4560
+ const D = T[I];
4561
+ E.test(D) && x.push([I, A(D)]);
4562
4562
  }
4563
4563
  return d.object(...x);
4564
4564
  }
4565
4565
  function B(k) {
4566
- return E.test(k) ? new _._Code(_.safeStringify(k).replace(t, (I, x) => `" + JSON.stringify(${h.getData(x, w)}) + "`).replace(a, "")) : c.stringify(k);
4566
+ return E.test(k) ? new _._Code(_.safeStringify(k).replace(t, (T, x) => `" + JSON.stringify(${h.getData(x, w)}) + "`).replace(a, "")) : c.stringify(k);
4567
4567
  }
4568
- function P(k) {
4568
+ function A(k) {
4569
4569
  return c._`function(){return ${B(k)}}`;
4570
4570
  }
4571
4571
  },
@@ -4637,7 +4637,7 @@ function kd() {
4637
4637
  // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
4638
4638
  ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
4639
4639
  ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
4640
- regex: $,
4640
+ regex: O,
4641
4641
  // uuid: http://tools.ietf.org/html/rfc4122
4642
4642
  uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
4643
4643
  // JSON-pointer: https://tools.ietf.org/html/rfc6901
@@ -4654,9 +4654,9 @@ function kd() {
4654
4654
  // signed 64 bit integer
4655
4655
  int64: { type: "number", validate: U },
4656
4656
  // C-type float
4657
- float: { type: "number", validate: A },
4657
+ float: { type: "number", validate: P },
4658
4658
  // C-type double
4659
- double: { type: "number", validate: A },
4659
+ double: { type: "number", validate: P },
4660
4660
  // hint to the UI to hide input strings
4661
4661
  password: !0,
4662
4662
  // unchecked string payload
@@ -4684,8 +4684,8 @@ function kd() {
4684
4684
  const M = u.exec(z);
4685
4685
  if (!M)
4686
4686
  return !1;
4687
- const j = +M[1], V = +M[2], K = +M[3];
4688
- return V >= 1 && V <= 12 && K >= 1 && K <= (V === 2 && c(j) ? 29 : _[V]);
4687
+ const G = +M[1], V = +M[2], K = +M[3];
4688
+ return V >= 1 && V <= 12 && K >= 1 && K <= (V === 2 && c(G) ? 29 : _[V]);
4689
4689
  }
4690
4690
  function g(z, M) {
4691
4691
  if (z && M)
@@ -4693,32 +4693,32 @@ function kd() {
4693
4693
  }
4694
4694
  const n = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
4695
4695
  function v(z) {
4696
- return function(j) {
4697
- const V = n.exec(j);
4696
+ return function(G) {
4697
+ const V = n.exec(G);
4698
4698
  if (!V)
4699
4699
  return !1;
4700
- const K = +V[1], ee = +V[2], J = +V[3], X = V[4], ne = V[5] === "-" ? -1 : 1, B = +(V[6] || 0), P = +(V[7] || 0);
4701
- if (B > 23 || P > 59 || z && !X)
4700
+ const K = +V[1], ee = +V[2], J = +V[3], X = V[4], ne = V[5] === "-" ? -1 : 1, B = +(V[6] || 0), A = +(V[7] || 0);
4701
+ if (B > 23 || A > 59 || z && !X)
4702
4702
  return !1;
4703
4703
  if (K <= 23 && ee <= 59 && J < 60)
4704
4704
  return !0;
4705
- const k = ee - P * ne, I = K - B * ne - (k < 0 ? 1 : 0);
4706
- return (I === 23 || I === -1) && (k === 59 || k === -1) && J < 61;
4705
+ const k = ee - A * ne, T = K - B * ne - (k < 0 ? 1 : 0);
4706
+ return (T === 23 || T === -1) && (k === 59 || k === -1) && J < 61;
4707
4707
  };
4708
4708
  }
4709
4709
  function S(z, M) {
4710
4710
  if (!(z && M))
4711
4711
  return;
4712
- const j = (/* @__PURE__ */ new Date("2020-01-01T" + z)).valueOf(), V = (/* @__PURE__ */ new Date("2020-01-01T" + M)).valueOf();
4713
- if (j && V)
4714
- return j - V;
4712
+ const G = (/* @__PURE__ */ new Date("2020-01-01T" + z)).valueOf(), V = (/* @__PURE__ */ new Date("2020-01-01T" + M)).valueOf();
4713
+ if (G && V)
4714
+ return G - V;
4715
4715
  }
4716
4716
  function y(z, M) {
4717
4717
  if (!(z && M))
4718
4718
  return;
4719
- const j = n.exec(z), V = n.exec(M);
4720
- if (j && V)
4721
- return z = j[1] + j[2] + j[3], M = V[1] + V[2] + V[3], z > M ? 1 : z < M ? -1 : 0;
4719
+ const G = n.exec(z), V = n.exec(M);
4720
+ if (G && V)
4721
+ return z = G[1] + G[2] + G[3], M = V[1] + V[2] + V[3], z > M ? 1 : z < M ? -1 : 0;
4722
4722
  }
4723
4723
  const E = /t|\s/i;
4724
4724
  function t(z) {
@@ -4731,14 +4731,14 @@ function kd() {
4731
4731
  function a(z, M) {
4732
4732
  if (!(z && M))
4733
4733
  return;
4734
- const j = new Date(z).valueOf(), V = new Date(M).valueOf();
4735
- if (j && V)
4736
- return j - V;
4734
+ const G = new Date(z).valueOf(), V = new Date(M).valueOf();
4735
+ if (G && V)
4736
+ return G - V;
4737
4737
  }
4738
4738
  function e(z, M) {
4739
4739
  if (!(z && M))
4740
4740
  return;
4741
- const [j, V] = z.split(E), [K, ee] = M.split(E), J = g(j, K);
4741
+ const [G, V] = z.split(E), [K, ee] = M.split(E), J = g(G, K);
4742
4742
  if (J !== void 0)
4743
4743
  return J || S(V, ee);
4744
4744
  }
@@ -4757,11 +4757,11 @@ function kd() {
4757
4757
  function U(z) {
4758
4758
  return Number.isInteger(z);
4759
4759
  }
4760
- function A() {
4760
+ function P() {
4761
4761
  return !0;
4762
4762
  }
4763
4763
  const C = /[^\\]\\Z/;
4764
- function $(z) {
4764
+ function O(z) {
4765
4765
  if (C.test(z))
4766
4766
  return !1;
4767
4767
  try {
@@ -4776,7 +4776,7 @@ var Yr = {}, Xs;
4776
4776
  function zd() {
4777
4777
  return Xs || (Xs = 1, (function(l) {
4778
4778
  Object.defineProperty(l, "__esModule", { value: !0 }), l.formatLimitDefinition = void 0;
4779
- const o = wn(), c = W(), u = c.operators, _ = {
4779
+ const o = wn(), c = Z(), u = c.operators, _ = {
4780
4780
  formatMaximum: { okStr: "<=", ok: u.LTE, fail: u.GT },
4781
4781
  formatMinimum: { okStr: ">=", ok: u.GTE, fail: u.LT },
4782
4782
  formatExclusiveMaximum: { okStr: "<", ok: u.LT, fail: u.GTE },
@@ -4831,7 +4831,7 @@ var Js;
4831
4831
  function Fd() {
4832
4832
  return Js || (Js = 1, (function(l, o) {
4833
4833
  Object.defineProperty(o, "__esModule", { value: !0 });
4834
- const c = kd(), u = zd(), _ = W(), h = new _.Name("fullFormats"), g = new _.Name("fastFormats"), n = (S, y = { keywords: !0 }) => {
4834
+ const c = kd(), u = zd(), _ = Z(), h = new _.Name("fullFormats"), g = new _.Name("fastFormats"), n = (S, y = { keywords: !0 }) => {
4835
4835
  if (Array.isArray(y))
4836
4836
  return v(S, y, c.fullFormats, h), S;
4837
4837
  const [E, t] = y.mode === "fast" ? [c.fastFormats, g] : [c.fullFormats, h], a = y.formats || c.formatNames;
@@ -4858,7 +4858,7 @@ var _t = { exports: {} }, mt = { exports: {} }, yt = { exports: {} }, Hi = { exp
4858
4858
  function Dd() {
4859
4859
  return Qs || (Qs = 1, (function(l, o) {
4860
4860
  Object.defineProperty(o, "__esModule", { value: !0 });
4861
- const c = W(), u = ["undefined", "string", "number", "object", "function", "boolean", "symbol"];
4861
+ const c = Z(), u = ["undefined", "string", "number", "object", "function", "boolean", "symbol"];
4862
4862
  function _() {
4863
4863
  return {
4864
4864
  keyword: "typeof",
@@ -5023,7 +5023,7 @@ var xt = { exports: {} }, Wi = { exports: {} }, He = {}, pa;
5023
5023
  function Pr() {
5024
5024
  if (pa) return He;
5025
5025
  pa = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.usePattern = He.metaSchemaRef = void 0;
5026
- const l = W(), o = "http://json-schema.org/schema";
5026
+ const l = Z(), o = "http://json-schema.org/schema";
5027
5027
  function c({ defaultMeta: _ } = {}) {
5028
5028
  return _ === !1 ? {} : { $ref: _ || o };
5029
5029
  }
@@ -5042,7 +5042,7 @@ var _a;
5042
5042
  function qd() {
5043
5043
  return _a || (_a = 1, (function(l, o) {
5044
5044
  Object.defineProperty(o, "__esModule", { value: !0 });
5045
- const c = W(), u = Pr(), _ = {
5045
+ const c = Z(), u = Pr(), _ = {
5046
5046
  type: "object",
5047
5047
  properties: {
5048
5048
  pattern: { type: "string" },
@@ -5091,7 +5091,7 @@ var Ut = { exports: {} }, Zi = { exports: {} }, ga;
5091
5091
  function Hd() {
5092
5092
  return ga || (ga = 1, (function(l, o) {
5093
5093
  Object.defineProperty(o, "__esModule", { value: !0 });
5094
- const c = W(), u = {
5094
+ const c = Z(), u = {
5095
5095
  trimStart: (v) => v.trimStart(),
5096
5096
  trimEnd: (v) => v.trimEnd(),
5097
5097
  trimLeft: (v) => v.trimStart(),
@@ -5339,7 +5339,7 @@ var kt = { exports: {} }, er = { exports: {} }, Da;
5339
5339
  function rf() {
5340
5340
  return Da || (Da = 1, (function(l, o) {
5341
5341
  Object.defineProperty(o, "__esModule", { value: !0 });
5342
- const c = W(), u = Pr(), _ = {
5342
+ const c = Z(), u = Pr(), _ = {
5343
5343
  message: ({ params: { missingPattern: g } }) => (0, c.str)`should have property matching pattern '${g}'`,
5344
5344
  params: ({ params: { missingPattern: g } }) => (0, c._)`{missingPattern: ${g}}`
5345
5345
  };
@@ -5480,7 +5480,7 @@ var Rt = { exports: {} }, rr = { exports: {} }, Va;
5480
5480
  function df() {
5481
5481
  return Va || (Va = 1, (function(l, o) {
5482
5482
  Object.defineProperty(o, "__esModule", { value: !0 });
5483
- const c = W();
5483
+ const c = Z();
5484
5484
  function u() {
5485
5485
  return {
5486
5486
  keyword: "deepRequired",
@@ -5615,7 +5615,7 @@ var Dt = { exports: {} }, sr = { exports: {} }, Xa;
5615
5615
  function hf() {
5616
5616
  return Xa || (Xa = 1, (function(l, o) {
5617
5617
  Object.defineProperty(o, "__esModule", { value: !0 });
5618
- const c = W(), u = Pr(), _ = {
5618
+ const c = Z(), u = Pr(), _ = {
5619
5619
  message: ({ params: { schemaProp: g } }) => g ? (0, c.str)`should match case "${g}" schema` : (0, c.str)`should match default case schema`,
5620
5620
  params: ({ params: { schemaProp: g } }) => g ? (0, c._)`{failingCase: ${g}}` : (0, c._)`{failingDefault: true}`
5621
5621
  };
@@ -6149,21 +6149,21 @@ function ou() {
6149
6149
  filter: r
6150
6150
  })[p.segmentType](p);
6151
6151
  return { verify: (p) => {
6152
- const m = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), w = S(p), U = w.tracks.map((A) => {
6153
- const C = s(A);
6152
+ const m = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), w = S(p), U = w.tracks.map((P) => {
6153
+ const C = s(P);
6154
6154
  if (b.has(C.trackId))
6155
6155
  throw new Error(`${au} ${C.trackId}`);
6156
6156
  return b.add(C.trackId), C;
6157
6157
  });
6158
6158
  w.tracks = U;
6159
- for (const A of U) {
6160
- const C = A.children.map(($) => {
6161
- const z = f({ ...$, segmentType: A.trackType });
6159
+ for (const P of U) {
6160
+ const C = P.children.map((O) => {
6161
+ const z = f({ ...O, segmentType: P.trackType });
6162
6162
  if (m.has(z.id))
6163
6163
  throw new Error(`${su} ${z.id}`);
6164
6164
  return m.add(z.id), z;
6165
6165
  });
6166
- A.children = C;
6166
+ P.children = C;
6167
6167
  }
6168
6168
  return w;
6169
6169
  }, verifyBasic: S, verifyFramesSegment: y, verifyTextSegment: E, verifyStickerSegment: t, verifyAudioSegment: a, verifyEffectSegment: e, verifyFilterSegment: r, verifyTrack: s, verifySegment: f };
@@ -6199,7 +6199,7 @@ var Un = /* @__PURE__ */ Symbol.for("immer-nothing"), Mt = /* @__PURE__ */ Symbo
6199
6199
  // Note: if more errors are added, the errorOffset in Patches.ts should be increased
6200
6200
  // See Patches.ts for additional errors
6201
6201
  ] : [];
6202
- function de(l, ...o) {
6202
+ function fe(l, ...o) {
6203
6203
  if (process.env.NODE_ENV !== "production") {
6204
6204
  const c = Mo[l], u = $e(c) ? c.apply(null, o) : c;
6205
6205
  throw new Error(`[Immer] ${u}`);
@@ -6250,7 +6250,7 @@ function fu(l) {
6250
6250
  const o = +l;
6251
6251
  return Number.isInteger(o) && String(o) === l;
6252
6252
  }
6253
- var Go = (l) => nt(l) ? l?.[te] : null, le = (l) => l.copy_ || l.base_, uu = (l) => {
6253
+ var Go = (l) => nt(l) ? l?.[te] : null, de = (l) => l.copy_ || l.base_, uu = (l) => {
6254
6254
  const o = Go(l);
6255
6255
  return o ? o.copy_ ?? o.base_ : l;
6256
6256
  }, En = (l) => l.modified_ ? l.copy_ : l.base_;
@@ -6300,7 +6300,7 @@ function Tn(l, o = !1) {
6300
6300
  )), l;
6301
6301
  }
6302
6302
  function cu() {
6303
- de(2);
6303
+ fe(2);
6304
6304
  }
6305
6305
  var ar = {
6306
6306
  [Vt]: cu
@@ -6311,7 +6311,7 @@ function Ar(l) {
6311
6311
  var Ht = "MapSet", br = "Patches", so = "ArrayMethods", wr = {};
6312
6312
  function Xe(l) {
6313
6313
  const o = wr[l];
6314
- return o || de(0, l), o;
6314
+ return o || fe(0, l), o;
6315
6315
  }
6316
6316
  var ao = (l) => !!wr[l];
6317
6317
  function qo(l, o) {
@@ -6348,7 +6348,7 @@ function fo(l, o) {
6348
6348
  o.unfinalizedDrafts_ = o.drafts_.length;
6349
6349
  const c = o.drafts_[0];
6350
6350
  if (l !== void 0 && l !== c) {
6351
- c[te].modified_ && (an(o), de(4)), xe(l) && (l = uo(o, l));
6351
+ c[te].modified_ && (an(o), fe(4)), xe(l) && (l = uo(o, l));
6352
6352
  const { patchPlugin_: _ } = o;
6353
6353
  _ && _.generateReplacementPatches_(
6354
6354
  c[te].base_,
@@ -6386,7 +6386,7 @@ function Vo(l) {
6386
6386
  }
6387
6387
  var Cr = (l, o) => l.scope_ === o, mu = [];
6388
6388
  function Ho(l, o, c, u) {
6389
- const _ = le(l), h = l.type_;
6389
+ const _ = de(l), h = l.type_;
6390
6390
  if (u !== void 0 && ze(_, u, h) === o) {
6391
6391
  vr(_, u, c, h);
6392
6392
  return;
@@ -6434,7 +6434,7 @@ function gu(l, o, c) {
6434
6434
  Ho(l, c, g, o);
6435
6435
  });
6436
6436
  } else xe(c) && l.callbacks_.push(function() {
6437
- const h = le(l);
6437
+ const h = de(l);
6438
6438
  ze(h, o, l.type_) === c && u.drafts_.length > 1 && (l.assigned_.get(o) ?? !1) === !0 && l.copy_ && In(
6439
6439
  ze(l.copy_, o, l.type_),
6440
6440
  u.handledSet_,
@@ -6493,7 +6493,7 @@ var Pn = {
6493
6493
  const u = l.type_ === 1 && typeof o == "string";
6494
6494
  if (u && c?.isArrayOperationMethod(o))
6495
6495
  return c.createMethodInterceptor(l, o);
6496
- const _ = le(l);
6496
+ const _ = de(l);
6497
6497
  if (!jt(_, o, l.type_))
6498
6498
  return bu(l, _, o);
6499
6499
  const h = _[o];
@@ -6509,17 +6509,17 @@ var Pn = {
6509
6509
  return h;
6510
6510
  },
6511
6511
  has(l, o) {
6512
- return o in le(l);
6512
+ return o in de(l);
6513
6513
  },
6514
6514
  ownKeys(l) {
6515
- return Reflect.ownKeys(le(l));
6515
+ return Reflect.ownKeys(de(l));
6516
6516
  },
6517
6517
  set(l, o, c) {
6518
- const u = Ko(le(l), o);
6518
+ const u = Ko(de(l), o);
6519
6519
  if (u?.set)
6520
6520
  return u.set.call(l.draft_, c), !0;
6521
6521
  if (!l.modified_) {
6522
- const _ = Wr(le(l), o), h = _?.[te];
6522
+ const _ = Wr(de(l), o), h = _?.[te];
6523
6523
  if (h && h.base_ === c)
6524
6524
  return l.copy_[o] = c, l.assigned_.set(o, !1), !0;
6525
6525
  if (du(c, _) && (c !== void 0 || jt(l.base_, o, l.type_)))
@@ -6536,7 +6536,7 @@ var Pn = {
6536
6536
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
6537
6537
  // the same guarantee in ES5 mode.
6538
6538
  getOwnPropertyDescriptor(l, o) {
6539
- const c = le(l), u = Reflect.getOwnPropertyDescriptor(c, o);
6539
+ const c = de(l), u = Reflect.getOwnPropertyDescriptor(c, o);
6540
6540
  return u && {
6541
6541
  [dr]: !0,
6542
6542
  [nn]: l.type_ !== 1 || o !== "length",
@@ -6545,13 +6545,13 @@ var Pn = {
6545
6545
  };
6546
6546
  },
6547
6547
  defineProperty() {
6548
- de(11);
6548
+ fe(11);
6549
6549
  },
6550
6550
  getPrototypeOf(l) {
6551
6551
  return We(l.base_);
6552
6552
  },
6553
6553
  setPrototypeOf() {
6554
- de(12);
6554
+ fe(12);
6555
6555
  }
6556
6556
  }, Kt = {};
6557
6557
  Je(Pn, (l, o) => {
@@ -6561,14 +6561,14 @@ Je(Pn, (l, o) => {
6561
6561
  };
6562
6562
  });
6563
6563
  Kt.deleteProperty = function(l, o) {
6564
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(o)) && de(13), Kt.set.call(this, l, o, void 0);
6564
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(o)) && fe(13), Kt.set.call(this, l, o, void 0);
6565
6565
  };
6566
6566
  Kt.set = function(l, o, c) {
6567
- return process.env.NODE_ENV !== "production" && o !== "length" && isNaN(parseInt(o)) && de(14), Pn.set.call(this, l[0], o, c, l[0]);
6567
+ return process.env.NODE_ENV !== "production" && o !== "length" && isNaN(parseInt(o)) && fe(14), Pn.set.call(this, l[0], o, c, l[0]);
6568
6568
  };
6569
6569
  function Wr(l, o) {
6570
6570
  const c = l[te];
6571
- return (c ? le(c) : l)[o];
6571
+ return (c ? de(c) : l)[o];
6572
6572
  }
6573
6573
  function bu(l, o, c) {
6574
6574
  const u = Ko(o, c);
@@ -6609,7 +6609,7 @@ var wu = class {
6609
6609
  return g.produce(v, (y) => c.call(this, y, ...S));
6610
6610
  };
6611
6611
  }
6612
- $e(c) || de(6), u !== void 0 && !$e(u) && de(7);
6612
+ $e(c) || fe(6), u !== void 0 && !$e(u) && fe(7);
6613
6613
  let _;
6614
6614
  if (xe(o)) {
6615
6615
  const h = lo(this), g = Wt(h, o, void 0);
@@ -6630,7 +6630,7 @@ var wu = class {
6630
6630
  }
6631
6631
  return _;
6632
6632
  } else
6633
- de(1, o);
6633
+ fe(1, o);
6634
6634
  }, this.produceWithPatches = (o, c) => {
6635
6635
  if ($e(o))
6636
6636
  return (g, ...n) => this.produceWithPatches(g, (v) => o(v, ...n));
@@ -6641,13 +6641,13 @@ var wu = class {
6641
6641
  }, Kr(l?.autoFreeze) && this.setAutoFreeze(l.autoFreeze), Kr(l?.useStrictShallowCopy) && this.setUseStrictShallowCopy(l.useStrictShallowCopy), Kr(l?.useStrictIteration) && this.setUseStrictIteration(l.useStrictIteration);
6642
6642
  }
6643
6643
  createDraft(l) {
6644
- xe(l) || de(8), Be(l) && (l = Su(l));
6644
+ xe(l) || fe(8), Be(l) && (l = Su(l));
6645
6645
  const o = lo(this), c = Wt(o, l, void 0);
6646
6646
  return c[te].isManual_ = !0, on(o), c;
6647
6647
  }
6648
6648
  finishDraft(l, o) {
6649
6649
  const c = l && l[te];
6650
- (!c || !c.isManual_) && de(9);
6650
+ (!c || !c.isManual_) && fe(9);
6651
6651
  const { scope_: u } = c;
6652
6652
  return oo(u, o), fo(void 0, u);
6653
6653
  }
@@ -6705,7 +6705,7 @@ function Wt(l, o, c, u) {
6705
6705
  }), _;
6706
6706
  }
6707
6707
  function Su(l) {
6708
- return Be(l) || de(10, l), Wo(l);
6708
+ return Be(l) || fe(10, l), Wo(l);
6709
6709
  }
6710
6710
  function Wo(l) {
6711
6711
  if (!xe(l) || Ar(l))
@@ -6808,10 +6808,10 @@ function xu() {
6808
6808
  m.length < d.length && ([d, m] = [m, d], [s, f] = [f, s]);
6809
6809
  const b = e.allIndicesReassigned_ === !0;
6810
6810
  for (let w = 0; w < d.length; w++) {
6811
- const U = m[w], A = d[w];
6812
- if ((b || p?.get(w.toString())) && U !== A) {
6813
- const $ = U?.[te];
6814
- if ($ && $.modified_)
6811
+ const U = m[w], P = d[w];
6812
+ if ((b || p?.get(w.toString())) && U !== P) {
6813
+ const O = U?.[te];
6814
+ if (O && O.modified_)
6815
6815
  continue;
6816
6816
  const z = r.concat([w]);
6817
6817
  s.push({
@@ -6823,7 +6823,7 @@ function xu() {
6823
6823
  }), f.push({
6824
6824
  op: u,
6825
6825
  path: z,
6826
- value: a(A)
6826
+ value: a(P)
6827
6827
  });
6828
6828
  }
6829
6829
  }
@@ -6848,14 +6848,14 @@ function xu() {
6848
6848
  function v(e, r, s, f) {
6849
6849
  const { base_: d, copy_: p, type_: m } = e;
6850
6850
  Je(e.assigned_, (b, w) => {
6851
- const U = ze(d, b, m), A = ze(p, b, m), C = w ? jt(d, b) ? u : _ : h;
6852
- if (U === A && C === u)
6851
+ const U = ze(d, b, m), P = ze(p, b, m), C = w ? jt(d, b) ? u : _ : h;
6852
+ if (U === P && C === u)
6853
6853
  return;
6854
- const $ = r.concat(b);
6854
+ const O = r.concat(b);
6855
6855
  s.push(
6856
- C === h ? { op: C, path: $ } : { op: C, path: $, value: a(A) }
6856
+ C === h ? { op: C, path: O } : { op: C, path: O, value: a(P) }
6857
6857
  ), f.push(
6858
- C === _ ? { op: h, path: $ } : C === h ? { op: _, path: $, value: a(U) } : { op: u, path: $, value: a(U) }
6858
+ C === _ ? { op: h, path: O } : C === h ? { op: _, path: O, value: a(U) } : { op: u, path: O, value: a(U) }
6859
6859
  );
6860
6860
  });
6861
6861
  }
@@ -6908,9 +6908,9 @@ function xu() {
6908
6908
  const { path: f, op: d } = s;
6909
6909
  let p = e;
6910
6910
  for (let U = 0; U < f.length - 1; U++) {
6911
- const A = Ze(p);
6911
+ const P = Ze(p);
6912
6912
  let C = f[U];
6913
- typeof C != "string" && typeof C != "number" && (C = "" + C), (A === 0 || A === 1) && (C === "__proto__" || C === qt) && de(19), $e(p) && C === ei && de(19), p = ze(p, C), nt(p) || de(18, f.join("/"));
6913
+ typeof C != "string" && typeof C != "number" && (C = "" + C), (P === 0 || P === 1) && (C === "__proto__" || C === qt) && fe(19), $e(p) && C === ei && fe(19), p = ze(p, C), nt(p) || fe(18, f.join("/"));
6914
6914
  }
6915
6915
  const m = Ze(p), b = t(s.value), w = f[f.length - 1];
6916
6916
  switch (d) {
@@ -6919,7 +6919,7 @@ function xu() {
6919
6919
  case 2:
6920
6920
  return p.set(w, b);
6921
6921
  case 3:
6922
- de(16);
6922
+ fe(16);
6923
6923
  default:
6924
6924
  return p[w] = b;
6925
6925
  }
@@ -6946,7 +6946,7 @@ function xu() {
6946
6946
  return delete p[w];
6947
6947
  }
6948
6948
  default:
6949
- de(17, d);
6949
+ fe(17, d);
6950
6950
  }
6951
6951
  }), e;
6952
6952
  }
@@ -6995,14 +6995,14 @@ function Uu() {
6995
6995
  };
6996
6996
  }
6997
6997
  get size() {
6998
- return le(this[te]).size;
6998
+ return de(this[te]).size;
6999
6999
  }
7000
7000
  has(S) {
7001
- return le(this[te]).has(S);
7001
+ return de(this[te]).has(S);
7002
7002
  }
7003
7003
  set(S, y) {
7004
7004
  const E = this[te];
7005
- return g(E), (!le(E).has(S) || le(E).get(S) !== y) && (c(E), Fe(E), E.assigned_.set(S, !0), E.copy_.set(S, y), E.assigned_.set(S, !0)), this;
7005
+ return g(E), (!de(E).has(S) || de(E).get(S) !== y) && (c(E), Fe(E), E.assigned_.set(S, !0), E.copy_.set(S, y), E.assigned_.set(S, !0)), this;
7006
7006
  }
7007
7007
  delete(S) {
7008
7008
  if (!this.has(S))
@@ -7012,27 +7012,27 @@ function Uu() {
7012
7012
  }
7013
7013
  clear() {
7014
7014
  const S = this[te];
7015
- g(S), le(S).size && (c(S), Fe(S), S.assigned_ = /* @__PURE__ */ new Map(), Je(S.base_, (y) => {
7015
+ g(S), de(S).size && (c(S), Fe(S), S.assigned_ = /* @__PURE__ */ new Map(), Je(S.base_, (y) => {
7016
7016
  S.assigned_.set(y, !1);
7017
7017
  }), S.copy_.clear());
7018
7018
  }
7019
7019
  forEach(S, y) {
7020
7020
  const E = this[te];
7021
- le(E).forEach((t, a, e) => {
7021
+ de(E).forEach((t, a, e) => {
7022
7022
  S.call(y, this.get(a), a, this);
7023
7023
  });
7024
7024
  }
7025
7025
  get(S) {
7026
7026
  const y = this[te];
7027
7027
  g(y);
7028
- const E = le(y).get(S);
7028
+ const E = de(y).get(S);
7029
7029
  if (y.finalized_ || !xe(E) || E !== y.base_.get(S))
7030
7030
  return E;
7031
7031
  const t = Wt(y.scope_, E, y, S);
7032
7032
  return c(y), y.copy_.set(S, t), t;
7033
7033
  }
7034
7034
  keys() {
7035
- return le(this[te]).keys();
7035
+ return de(this[te]).keys();
7036
7036
  }
7037
7037
  values() {
7038
7038
  const S = this.keys();
@@ -7093,7 +7093,7 @@ function Uu() {
7093
7093
  };
7094
7094
  }
7095
7095
  get size() {
7096
- return le(this[te]).size;
7096
+ return de(this[te]).size;
7097
7097
  }
7098
7098
  has(S) {
7099
7099
  const y = this[te];
@@ -7114,7 +7114,7 @@ function Uu() {
7114
7114
  }
7115
7115
  clear() {
7116
7116
  const S = this[te];
7117
- g(S), le(S).size && (h(S), Fe(S), S.copy_.clear());
7117
+ g(S), de(S).size && (h(S), Fe(S), S.copy_.clear());
7118
7118
  }
7119
7119
  values() {
7120
7120
  const S = this[te];
@@ -7151,7 +7151,7 @@ function Uu() {
7151
7151
  }));
7152
7152
  }
7153
7153
  function g(v) {
7154
- v.revoked_ && de(3, JSON.stringify(le(v)));
7154
+ v.revoked_ && fe(3, JSON.stringify(de(v)));
7155
7155
  }
7156
7156
  function n(v) {
7157
7157
  if (v.type_ === 3 && v.copy_) {
@@ -7349,226 +7349,230 @@ function Jc(l, o) {
7349
7349
  return _.value[e.value];
7350
7350
  }), s = (B) => {
7351
7351
  e.value = B;
7352
- }, f = (B, P) => {
7352
+ }, f = (B, A) => {
7353
7353
  const k = {
7354
- isMain: B.segmentType === "frames" && !P?.length ? !0 : void 0,
7354
+ isMain: B.segmentType === "frames" && !A?.length ? !0 : void 0,
7355
7355
  trackType: B.segmentType,
7356
7356
  trackId: o?.idFactory?.track?.() ?? Zr(),
7357
7357
  children: [B]
7358
7358
  };
7359
- return P.push(k), B.id;
7360
- }, d = (B, P, k) => {
7361
- const I = _o(P.children, k), x = B.endTime - B.startTime;
7362
- if (I === 0)
7363
- B.startTime = 0, B.endTime = x;
7364
- else {
7365
- const T = P.children[I - 1];
7366
- B.startTime = T.endTime, B.endTime = T.endTime + x;
7367
- }
7368
- P.children.splice(I, 0, B);
7369
- for (let T = I; T < P.children.length; T++) {
7370
- const D = P.children[T], N = P.children[T - 1]?.endTime ?? 0, L = D.endTime - D.startTime;
7371
- D.startTime = N, D.endTime = N + L;
7372
- }
7359
+ return A.push(k), B.id;
7360
+ }, d = (B, A, k) => {
7361
+ if (A.isMain) {
7362
+ const T = _o(A.children, k), x = B.endTime - B.startTime;
7363
+ if (T === 0)
7364
+ B.startTime = 0, B.endTime = x;
7365
+ else {
7366
+ const I = A.children[T - 1];
7367
+ B.startTime = I.endTime, B.endTime = I.endTime + x;
7368
+ }
7369
+ A.children.splice(T, 0, B);
7370
+ for (let I = T; I < A.children.length; I++) {
7371
+ const D = A.children[I], N = A.children[I - 1]?.endTime ?? 0, L = D.endTime - D.startTime;
7372
+ D.startTime = N, D.endTime = N + L;
7373
+ }
7374
+ } else
7375
+ A.children.push(B), A.children.sort((T, x) => T.startTime - x.startTime);
7373
7376
  return B.id;
7374
- }, p = (B, P) => d(B, P, a.value), m = (B, P = 0) => {
7377
+ }, p = (B, A) => d(B, A, a.value), m = (B, A = 0) => {
7375
7378
  const k = B.children;
7376
- k.sort((x, T) => x.startTime - T.startTime);
7377
- const I = B.trackType === "frames" && B.isMain;
7378
- for (let x = P; x < k.length; x++) {
7379
- const T = k[x], D = T.endTime - T.startTime, N = k[x - 1];
7379
+ k.sort((x, I) => x.startTime - I.startTime);
7380
+ const T = B.trackType === "frames" && B.isMain;
7381
+ for (let x = A; x < k.length; x++) {
7382
+ const I = k[x], D = I.endTime - I.startTime, N = k[x - 1];
7380
7383
  if (!N) {
7381
- I && (T.startTime = 0, T.endTime = D);
7384
+ T && (I.startTime = 0, I.endTime = D);
7382
7385
  continue;
7383
7386
  }
7384
- (I || T.startTime < N.endTime) && (T.startTime = N.endTime, T.endTime = N.endTime + D);
7387
+ (T || I.startTime < N.endTime) && (I.startTime = N.endTime, I.endTime = N.endTime + D);
7385
7388
  }
7386
7389
  }, b = (B) => {
7387
- const P = ur(B);
7388
- (!P.id || _.value[P.id]) && (P.id = o?.idFactory?.segment?.() ?? Zr());
7389
- const k = a.value - P.startTime;
7390
- return P.startTime += k, P.endTime += k, P;
7391
- }, w = (B, P) => {
7390
+ const A = ur(B);
7391
+ (!A.id || _.value[A.id]) && (A.id = o?.idFactory?.segment?.() ?? Zr());
7392
+ const k = a.value - A.startTime;
7393
+ return A.startTime += k, A.endTime += k, A;
7394
+ }, w = (B, A) => {
7392
7395
  const k = _.value[B];
7393
- if (k && k.segmentType === P)
7396
+ if (k && k.segmentType === A)
7394
7397
  return k;
7395
- if (k && !P)
7398
+ if (k && !A)
7396
7399
  return k;
7397
- }, U = (B) => {
7398
- const P = b(B), k = /* @__PURE__ */ new Set(), I = [], x = [], T = [];
7400
+ }, U = (B, A) => {
7401
+ const k = b(B), T = /* @__PURE__ */ new Set(), x = [], I = [], D = [];
7399
7402
  try {
7400
- c.verifySegment(P);
7403
+ c.verifySegment(k);
7401
7404
  } catch {
7402
7405
  throw new Error("invalid segment data");
7403
7406
  }
7404
- const D = g((L) => {
7405
- if (P.segmentType === "frames") {
7406
- const O = L.tracks.filter((Y) => Y.trackType === "frames").find((Y) => Y.isMain);
7407
- if (!O) {
7408
- const Y = f(P, L.tracks), Z = L.tracks.find((ae) => ae.children.some((he) => he.id === Y));
7409
- return Z && (I.push(Ye(Z)), k.add(Z.trackId)), Y;
7407
+ const N = g((q) => {
7408
+ if (k.segmentType === "frames") {
7409
+ const $ = q.tracks.filter((W) => W.trackType === "frames");
7410
+ let j = $.find((W) => W.trackId === A);
7411
+ if (j || (j = $.find((W) => W.isMain)), !j) {
7412
+ const W = f(k, q.tracks), ae = q.tracks.find((he) => he.children.some((le) => le.id === W));
7413
+ return ae && (x.push(Ye(ae)), T.add(ae.trackId)), W;
7410
7414
  }
7411
- const G = p(P, O);
7412
- return k.add(O.trackId), G;
7415
+ const Y = p(k, j);
7416
+ return T.add(j.trackId), Y;
7413
7417
  }
7414
- const q = L.tracks;
7415
- for (let F = q.length - 1; F >= 0; F--) {
7416
- if (q[F].trackType !== P.segmentType)
7418
+ const H = q.tracks;
7419
+ for (let $ = H.length - 1; $ >= 0; $--) {
7420
+ if (H[$].trackType !== k.segmentType)
7417
7421
  continue;
7418
- const O = q[F].children, G = Au(P, O, a.value);
7419
- if (G !== -1)
7420
- return O.splice(G, 0, P), k.add(q[F].trackId), P.id;
7421
- }
7422
- const H = f(P, q), R = L.tracks.find((F) => F.children.some((O) => O.id === H));
7423
- return R && (I.push(Ye(R)), k.add(R.trackId)), H;
7424
- }), N = [];
7425
- if (k.size > 0) {
7426
- const L = S();
7427
- for (const q of k) {
7428
- const H = L.tracks.find((R) => R.trackId === q);
7429
- H && (N.push(...or(H.children)), x.push(Ye(H)));
7430
- }
7431
- }
7432
- return { id: D, affectedSegments: N, affectedTracks: x, createdTracks: I, removedTrackIds: T };
7433
- }, A = (B) => {
7434
- let P = null;
7435
- const k = [], I = [], x = [], T = g((N) => {
7422
+ const j = H[$].children, Y = Au(k, j, a.value);
7423
+ if (Y !== -1)
7424
+ return j.splice(Y, 0, k), T.add(H[$].trackId), k.id;
7425
+ }
7426
+ const F = f(k, H), R = q.tracks.find(($) => $.children.some((j) => j.id === F));
7427
+ return R && (x.push(Ye(R)), T.add(R.trackId)), F;
7428
+ }), L = [];
7429
+ if (T.size > 0) {
7430
+ const q = S();
7431
+ for (const H of T) {
7432
+ const F = q.tracks.find((R) => R.trackId === H);
7433
+ F && (L.push(...or(F.children)), I.push(Ye(F)));
7434
+ }
7435
+ }
7436
+ return { id: N, affectedSegments: L, affectedTracks: I, createdTracks: x, removedTrackIds: D };
7437
+ }, P = (B) => {
7438
+ let A = null;
7439
+ const k = [], T = [], x = [], I = g((N) => {
7436
7440
  for (let L = 0; L < N.tracks.length; L++) {
7437
- const q = N.tracks[L], H = q.children.findIndex((R) => R.id === B);
7441
+ const q = N.tracks[L], H = q.children.findIndex((F) => F.id === B);
7438
7442
  if (H !== -1)
7439
- return q.children.splice(H, 1), q.children.length > 0 ? q.trackType === "frames" && q.isMain && (m(q, 0), P = q.trackId) : (N.tracks.splice(L, 1), x.push(q.trackId)), !0;
7443
+ return q.children.splice(H, 1), q.children.length > 0 ? q.trackType === "frames" && q.isMain && (m(q, 0), A = q.trackId) : (N.tracks.splice(L, 1), x.push(q.trackId)), !0;
7440
7444
  }
7441
7445
  return !1;
7442
7446
  }), D = [];
7443
- if (T && P) {
7444
- const L = S().tracks.find((q) => q.trackId === P);
7447
+ if (I && A) {
7448
+ const L = S().tracks.find((q) => q.trackId === A);
7445
7449
  L && (D.push(...or(L.children)), k.push(Ye(L)));
7446
7450
  }
7447
- return { success: T, affectedSegments: D, affectedTracks: k, createdTracks: I, removedTrackIds: x };
7451
+ return { success: I, affectedSegments: D, affectedTracks: k, createdTracks: T, removedTrackIds: x };
7448
7452
  }, C = (B) => {
7449
- const P = /* @__PURE__ */ new Set(), k = [], I = [], x = [], T = g((N) => {
7450
- const L = N.tracks.find((F) => F.trackId === B.sourceTrackId);
7453
+ const A = /* @__PURE__ */ new Set(), k = [], T = [], x = [], I = g((N) => {
7454
+ const L = N.tracks.find((R) => R.trackId === B.sourceTrackId);
7451
7455
  if (!L)
7452
7456
  return !1;
7453
- const q = L.children.findIndex((F) => F.id === B.segmentId);
7457
+ const q = L.children.findIndex((R) => R.id === B.segmentId);
7454
7458
  if (q < 0)
7455
7459
  return !1;
7456
7460
  const H = L.children[q];
7457
7461
  if (B.targetTrackId === B.sourceTrackId && B.isNewTrack !== !0)
7458
- H.startTime = B.startTime, H.endTime = B.endTime, m(L), P.add(L.trackId);
7462
+ H.startTime = B.startTime, H.endTime = B.endTime, m(L), A.add(L.trackId);
7459
7463
  else {
7460
- if (L.children.splice(q, 1), L.children.length > 0 && (m(L), P.add(L.trackId)), L.children.length === 0) {
7461
- const F = N.tracks.findIndex((O) => O.trackId === L.trackId);
7462
- F >= 0 && (N.tracks.splice(F, 1), x.push(L.trackId));
7464
+ if (L.children.splice(q, 1), L.children.length > 0 && (m(L), A.add(L.trackId)), L.children.length === 0) {
7465
+ const R = N.tracks.findIndex(($) => $.trackId === L.trackId);
7466
+ R >= 0 && (N.tracks.splice(R, 1), x.push(L.trackId));
7463
7467
  }
7464
7468
  if (H.startTime = B.startTime, H.endTime = B.endTime, B.isNewTrack && B.newTrackInsertIndex !== void 0) {
7465
- const F = H.segmentType === "frames" && !N.tracks.some((G) => G.trackType === "frames" && G.isMain), O = {
7469
+ const R = H.segmentType === "frames" && !N.tracks.some((j) => j.trackType === "frames" && j.isMain), $ = {
7466
7470
  trackId: B.newTrackId ?? o?.idFactory?.track?.() ?? Zr(),
7467
7471
  trackType: H.segmentType,
7468
7472
  children: [H],
7469
- ...F ? { isMain: !0 } : {}
7473
+ ...R ? { isMain: !0 } : {}
7470
7474
  };
7471
- if (F) {
7472
- const G = H.endTime - H.startTime;
7473
- H.startTime = 0, H.endTime = G;
7475
+ if (R) {
7476
+ const j = H.endTime - H.startTime;
7477
+ H.startTime = 0, H.endTime = j;
7474
7478
  }
7475
- N.tracks.splice(B.newTrackInsertIndex, 0, O), P.add(O.trackId), I.push(Ye(O));
7479
+ N.tracks.splice(B.newTrackInsertIndex, 0, $), A.add($.trackId), T.push(Ye($));
7476
7480
  } else if (B.targetTrackId) {
7477
- const F = N.tracks.find((O) => O.trackId === B.targetTrackId);
7478
- if (!F || F.trackType !== H.segmentType)
7481
+ const R = N.tracks.find(($) => $.trackId === B.targetTrackId);
7482
+ if (!R || R.trackType !== H.segmentType)
7479
7483
  return !1;
7480
- F.trackType === "frames" ? d(
7484
+ R.trackType === "frames" ? d(
7481
7485
  H,
7482
- F,
7486
+ R,
7483
7487
  H.startTime
7484
- ) : (F.children.push(H), m(F)), P.add(F.trackId);
7488
+ ) : (R.children.push(H), m(R)), A.add(R.trackId);
7485
7489
  }
7486
7490
  }
7487
7491
  return !0;
7488
7492
  }), D = [];
7489
- if (T) {
7493
+ if (I) {
7490
7494
  const N = S();
7491
- for (const L of P) {
7495
+ for (const L of A) {
7492
7496
  const q = N.tracks.find((H) => H.trackId === L);
7493
7497
  q && (D.push(...or(q.children)), k.push(Ye(q)));
7494
7498
  }
7495
7499
  }
7496
- return { success: T, affectedSegments: D, affectedTracks: k, createdTracks: I, removedTrackIds: x };
7497
- }, $ = (B) => {
7498
- let P = null;
7499
- const k = [], I = [], x = [], T = g((N) => {
7500
+ return { success: I, affectedSegments: D, affectedTracks: k, createdTracks: T, removedTrackIds: x };
7501
+ }, O = (B) => {
7502
+ let A = null;
7503
+ const k = [], T = [], x = [], I = g((N) => {
7500
7504
  const L = N.tracks.find((ae) => ae.trackId === B.trackId);
7501
7505
  if (!L)
7502
7506
  return !1;
7503
7507
  const q = L.children.findIndex((ae) => ae.id === B.segmentId);
7504
7508
  if (q < 0)
7505
7509
  return !1;
7506
- const H = L.children[q], R = H.startTime;
7507
- let F = B.startTime, O = B.endTime, G = O - F;
7508
- if (!Number.isFinite(G) || G < 0)
7510
+ const H = L.children[q], F = H.startTime;
7511
+ let R = B.startTime, $ = B.endTime, j = $ - R;
7512
+ if (!Number.isFinite(j) || j < 0)
7509
7513
  return !1;
7510
7514
  const Y = ku(H) ? H : null;
7511
- let Z = Y ? Y.fromTime ?? 0 : 0;
7512
- if (Y && F !== R) {
7513
- const ae = Y.fromTime ?? 0, he = F - R, fe = Math.max(he, -ae);
7514
- if (fe !== he && (F = R + fe, G = O - F), !Number.isFinite(G) || G < 0)
7515
+ let W = Y ? Y.fromTime ?? 0 : 0;
7516
+ if (Y && R !== F) {
7517
+ const ae = Y.fromTime ?? 0, he = R - F, le = Math.max(he, -ae);
7518
+ if (le !== he && (R = F + le, j = $ - R), !Number.isFinite(j) || j < 0)
7515
7519
  return !1;
7516
- Z = ae + fe, Y.fromTime = Z;
7520
+ W = ae + le, Y.fromTime = W;
7517
7521
  }
7518
- return H.startTime = F, H.endTime = O, m(L, q), P = L.trackId, !0;
7522
+ return H.startTime = R, H.endTime = $, m(L, q), A = L.trackId, !0;
7519
7523
  }), D = [];
7520
- if (T && P) {
7521
- const L = S().tracks.find((q) => q.trackId === P);
7524
+ if (I && A) {
7525
+ const L = S().tracks.find((q) => q.trackId === A);
7522
7526
  L && D.push(...or(L.children));
7523
7527
  }
7524
- return { success: T, affectedSegments: D, affectedTracks: k, createdTracks: I, removedTrackIds: x };
7528
+ return { success: I, affectedSegments: D, affectedTracks: k, createdTracks: T, removedTrackIds: x };
7525
7529
  };
7526
- function z(B, P, k) {
7527
- g((I) => {
7528
- const x = P ?? r.value?.id;
7530
+ function z(B, A, k) {
7531
+ g((T) => {
7532
+ const x = A ?? r.value?.id;
7529
7533
  if (x === void 0)
7530
7534
  return;
7531
- const T = Ru(x, I);
7532
- T && (!k || T.segmentType === k) && B(T);
7533
- }, (I, x, T) => {
7534
- T((D) => {
7535
- Pu(I, x, D, c) ? Tu(I, x, D, n) : n();
7535
+ const I = Ru(x, T);
7536
+ I && (!k || I.segmentType === k) && B(I);
7537
+ }, (T, x, I) => {
7538
+ I((D) => {
7539
+ Pu(T, x, D, c) ? Tu(T, x, D, n) : n();
7536
7540
  });
7537
7541
  });
7538
7542
  }
7539
- const M = (B, P) => g((k) => {
7540
- const I = k.tracks.find((q) => q.trackType === "frames" && q.isMain);
7541
- if (!I || I.children.length < 2)
7543
+ const M = (B, A) => g((k) => {
7544
+ const T = k.tracks.find((q) => q.trackType === "frames" && q.isMain);
7545
+ if (!T || T.children.length < 2)
7542
7546
  return !1;
7543
- const x = Math.max(0, P ?? a.value);
7544
- let T = _o(I.children, x) - 1;
7545
- if (T = Math.min(Math.max(0, T), I.children.length - 2), !B || typeof B != "object" || typeof B.id != "string" || typeof B.name != "string" || typeof B.duration != "number" || B.duration < 0)
7547
+ const x = Math.max(0, A ?? a.value);
7548
+ let I = _o(T.children, x) - 1;
7549
+ if (I = Math.min(Math.max(0, I), T.children.length - 2), !B || typeof B != "object" || typeof B.id != "string" || typeof B.name != "string" || typeof B.duration != "number" || B.duration < 0)
7546
7550
  return !0;
7547
- const D = I.children[T], N = I.children[T + 1], L = ur(B);
7551
+ const D = T.children[I], N = T.children[I + 1], L = ur(B);
7548
7552
  return D.transitionIn = L, N.transitionOut = L, !0;
7549
- }), j = (B) => g((P) => {
7550
- const k = P.tracks.find((L) => L.trackType === "frames" && L.isMain);
7553
+ }), G = (B) => g((A) => {
7554
+ const k = A.tracks.find((L) => L.trackType === "frames" && L.isMain);
7551
7555
  if (!k)
7552
7556
  return !1;
7553
- const I = k.children.findIndex((L) => L.id === B);
7554
- if (I === -1)
7557
+ const T = k.children.findIndex((L) => L.id === B);
7558
+ if (T === -1)
7555
7559
  return !1;
7556
- const x = k.children[I], T = I > 0 ? k.children[I - 1] : void 0, D = I < k.children.length - 1 ? k.children[I + 1] : void 0;
7560
+ const x = k.children[T], I = T > 0 ? k.children[T - 1] : void 0, D = T < k.children.length - 1 ? k.children[T + 1] : void 0;
7557
7561
  let N = !1;
7558
- return x.transitionIn && (x.transitionIn = void 0, D && (D.transitionOut = void 0), N = !0), x.transitionOut && (x.transitionOut = void 0, T && (T.transitionIn = void 0), N = !0), N;
7559
- }), V = (B, P) => {
7562
+ return x.transitionIn && (x.transitionIn = void 0, D && (D.transitionOut = void 0), N = !0), x.transitionOut && (x.transitionOut = void 0, I && (I.transitionIn = void 0), N = !0), N;
7563
+ }), V = (B, A) => {
7560
7564
  const k = h.value.frames?.find((x) => x.trackType === "frames" && x.isMain);
7561
7565
  if (!k)
7562
7566
  return !1;
7563
- const I = k.children.findIndex((x) => x.id === B);
7564
- return I === -1 ? !1 : (z((x) => {
7565
- x.transitionIn && P(x.transitionIn);
7566
- }, k.children[I].id, "frames"), z((x) => {
7567
- x.transitionOut && P(x.transitionOut);
7568
- }, k.children[I + 1].id, "frames"), !0);
7569
- }, K = (B, P) => g((k) => {
7570
- const I = k.tracks.find((x) => x.trackId === B);
7571
- return I ? (I.trackId = P, !0) : !1;
7567
+ const T = k.children.findIndex((x) => x.id === B);
7568
+ return T === -1 ? !1 : (z((x) => {
7569
+ x.transitionIn && A(x.transitionIn);
7570
+ }, k.children[T].id, "frames"), z((x) => {
7571
+ x.transitionOut && A(x.transitionOut);
7572
+ }, k.children[T + 1].id, "frames"), !0);
7573
+ }, K = (B, A) => g((k) => {
7574
+ const T = k.tracks.find((x) => x.trackId === B);
7575
+ return T ? (T.trackId = A, !0) : !1;
7572
7576
  }), ee = {
7573
7577
  success: !1,
7574
7578
  affectedSegments: [],
@@ -7587,13 +7591,13 @@ function Jc(l, o) {
7587
7591
  protocol: t,
7588
7592
  getSegment: w,
7589
7593
  addSegment: U,
7590
- removeSegment: A,
7594
+ removeSegment: P,
7591
7595
  updateSegment: z,
7592
7596
  moveSegment: C,
7593
- resizeSegment: $,
7597
+ resizeSegment: O,
7594
7598
  exportProtocol: S,
7595
7599
  addTransition: M,
7596
- removeTransition: j,
7600
+ removeTransition: G,
7597
7601
  updateTransition: V,
7598
7602
  replaceTrackId: K,
7599
7603
  undo: () => {
@@ -7601,7 +7605,7 @@ function Jc(l, o) {
7601
7605
  return ee;
7602
7606
  const B = J();
7603
7607
  n();
7604
- const P = J(), k = mo(B, P);
7608
+ const A = J(), k = mo(B, A);
7605
7609
  return {
7606
7610
  success: !0,
7607
7611
  affectedSegments: k.affectedSegments,
@@ -7616,7 +7620,7 @@ function Jc(l, o) {
7616
7620
  return ee;
7617
7621
  const B = J();
7618
7622
  v();
7619
- const P = J(), k = mo(B, P);
7623
+ const A = J(), k = mo(B, A);
7620
7624
  return {
7621
7625
  success: !0,
7622
7626
  affectedSegments: k.affectedSegments,
@@ -8204,9 +8208,9 @@ function Yu() {
8204
8208
  o.getDurationString = function(t, a) {
8205
8209
  var e;
8206
8210
  function r(b, w) {
8207
- for (var U = "" + b, A = U.split("."); A[0].length < w; )
8208
- A[0] = "0" + A[0];
8209
- return A.join(".");
8211
+ for (var U = "" + b, P = U.split("."); P[0].length < w; )
8212
+ P[0] = "0" + P[0];
8213
+ return P.join(".");
8210
8214
  }
8211
8215
  t < 0 ? (e = !0, t = -t) : e = !1;
8212
8216
  var s = a || 1, f = t / s, d = Math.floor(f / 3600);
@@ -10021,8 +10025,8 @@ function Yu() {
10021
10025
  this.held_bits = C.readUint16(), this.num_held_bits = 16;
10022
10026
  },
10023
10027
  extract_bits: function(C) {
10024
- var $ = this.held_bits >> this.num_held_bits - C & (1 << C) - 1;
10025
- return this.num_held_bits -= C, $;
10028
+ var O = this.held_bits >> this.num_held_bits - C & (1 << C) - 1;
10029
+ return this.num_held_bits -= C, O;
10026
10030
  }
10027
10031
  };
10028
10032
  if (r.stream_read_1_bytes(t), r.extract_bits(5), this.lengthSizeMinusOne = r.extract_bits(2), this.ptl_present_flag = r.extract_bits(1), this.ptl_present_flag) {
@@ -10062,10 +10066,10 @@ function Yu() {
10062
10066
  this.nalu_arrays.push(w), r.stream_read_1_bytes(t), w.completeness = r.extract_bits(1), r.extract_bits(2), w.nalu_type = r.extract_bits(5);
10063
10067
  var U = 1;
10064
10068
  for (w.nalu_type != m && w.nalu_type != p && (U = t.readUint16()), e = 0; e < U; e++) {
10065
- var A = t.readUint16();
10069
+ var P = t.readUint16();
10066
10070
  w.push({
10067
- data: t.readUint8Array(A),
10068
- length: A
10071
+ data: t.readUint8Array(P),
10072
+ length: P
10069
10073
  });
10070
10074
  }
10071
10075
  }
@@ -10727,8 +10731,8 @@ function Yu() {
10727
10731
  a.description && f.addBox(a.description), a.description_boxes && a.description_boxes.forEach(function(C) {
10728
10732
  f.addBox(C);
10729
10733
  }), s.add("dinf").add("dref").addEntry(new n["url Box"]().set("flags", 1));
10730
- var A = s.add("stbl");
10731
- return A.add("stsd").addEntry(f), A.add("stts").set("sample_counts", []).set("sample_deltas", []), A.add("stsc").set("first_chunk", []).set("samples_per_chunk", []).set("sample_description_index", []), A.add("stco").set("chunk_offsets", []), A.add("stsz").set("sample_sizes", []), this.moov.mvex.add("trex").set("track_id", a.id).set("default_sample_description_index", a.default_sample_description_index || 1).set("default_sample_duration", a.default_sample_duration || 0).set("default_sample_size", a.default_sample_size || 0).set("default_sample_flags", a.default_sample_flags || 0), this.buildTrakSampleLists(e), a.id;
10734
+ var P = s.add("stbl");
10735
+ return P.add("stsd").addEntry(f), P.add("stts").set("sample_counts", []).set("sample_deltas", []), P.add("stsc").set("first_chunk", []).set("samples_per_chunk", []).set("sample_description_index", []), P.add("stco").set("chunk_offsets", []), P.add("stsz").set("sample_sizes", []), this.moov.mvex.add("trex").set("track_id", a.id).set("default_sample_description_index", a.default_sample_description_index || 1).set("default_sample_duration", a.default_sample_duration || 0).set("default_sample_size", a.default_sample_size || 0).set("default_sample_flags", a.default_sample_flags || 0), this.buildTrakSampleLists(e), a.id;
10732
10736
  }
10733
10737
  }, n.Box.prototype.computeSize = function(t) {
10734
10738
  var a = t || new u();
@@ -10756,8 +10760,8 @@ function Yu() {
10756
10760
  }
10757
10761
  }, y.initSampleGroups = function(t, a, e, r, s) {
10758
10762
  var f, d, p, m;
10759
- function b(w, U, A) {
10760
- this.grouping_type = w, this.grouping_type_parameter = U, this.sbgp = A, this.last_sample_in_run = -1, this.entry_index = -1;
10763
+ function b(w, U, P) {
10764
+ this.grouping_type = w, this.grouping_type_parameter = U, this.sbgp = P, this.last_sample_in_run = -1, this.entry_index = -1;
10761
10765
  }
10762
10766
  for (a && (a.sample_groups_info = []), t.sample_groups_info || (t.sample_groups_info = []), d = 0; d < e.length; d++) {
10763
10767
  for (m = e[d].grouping_type + "/" + e[d].grouping_type_parameter, p = new b(e[d].grouping_type, e[d].grouping_type_parameter, e[d]), a && (a.sample_groups_info[m] = p), t.sample_groups_info[m] || (t.sample_groups_info[m] = p), f = 0; f < r.length; f++)
@@ -10788,26 +10792,26 @@ function Yu() {
10788
10792
  for (t = 0; t < this.moov.traks.length; t++)
10789
10793
  a = this.moov.traks[t], this.buildTrakSampleLists(a);
10790
10794
  }, y.prototype.buildTrakSampleLists = function(t) {
10791
- var a, e, r, s, f, d, p, m, b, w, U, A, C, $, z, M, j, V, K, ee, J, X, ne, B;
10792
- if (t.samples = [], t.samples_duration = 0, t.samples_size = 0, e = t.mdia.minf.stbl.stco || t.mdia.minf.stbl.co64, r = t.mdia.minf.stbl.stsc, s = t.mdia.minf.stbl.stsz || t.mdia.minf.stbl.stz2, f = t.mdia.minf.stbl.stts, d = t.mdia.minf.stbl.ctts, p = t.mdia.minf.stbl.stss, m = t.mdia.minf.stbl.stsd, b = t.mdia.minf.stbl.subs, A = t.mdia.minf.stbl.stdp, w = t.mdia.minf.stbl.sbgps, U = t.mdia.minf.stbl.sgpds, V = -1, K = -1, ee = -1, J = -1, X = 0, ne = 0, B = 0, y.initSampleGroups(t, null, w, U), !(typeof s > "u")) {
10795
+ var a, e, r, s, f, d, p, m, b, w, U, P, C, O, z, M, G, V, K, ee, J, X, ne, B;
10796
+ if (t.samples = [], t.samples_duration = 0, t.samples_size = 0, e = t.mdia.minf.stbl.stco || t.mdia.minf.stbl.co64, r = t.mdia.minf.stbl.stsc, s = t.mdia.minf.stbl.stsz || t.mdia.minf.stbl.stz2, f = t.mdia.minf.stbl.stts, d = t.mdia.minf.stbl.ctts, p = t.mdia.minf.stbl.stss, m = t.mdia.minf.stbl.stsd, b = t.mdia.minf.stbl.subs, P = t.mdia.minf.stbl.stdp, w = t.mdia.minf.stbl.sbgps, U = t.mdia.minf.stbl.sgpds, V = -1, K = -1, ee = -1, J = -1, X = 0, ne = 0, B = 0, y.initSampleGroups(t, null, w, U), !(typeof s > "u")) {
10793
10797
  for (a = 0; a < s.sample_sizes.length; a++) {
10794
- var P = {};
10795
- P.number = a, P.track_id = t.tkhd.track_id, P.timescale = t.mdia.mdhd.timescale, P.alreadyRead = 0, t.samples[a] = P, P.size = s.sample_sizes[a], t.samples_size += P.size, a === 0 ? ($ = 1, C = 0, P.chunk_index = $, P.chunk_run_index = C, j = r.samples_per_chunk[C], M = 0, C + 1 < r.first_chunk.length ? z = r.first_chunk[C + 1] - 1 : z = 1 / 0) : a < j ? (P.chunk_index = $, P.chunk_run_index = C) : ($++, P.chunk_index = $, M = 0, $ <= z || (C++, C + 1 < r.first_chunk.length ? z = r.first_chunk[C + 1] - 1 : z = 1 / 0), P.chunk_run_index = C, j += r.samples_per_chunk[C]), P.description_index = r.sample_description_index[P.chunk_run_index] - 1, P.description = m.entries[P.description_index], P.offset = e.chunk_offsets[P.chunk_index - 1] + M, M += P.size, a > V && (K++, V < 0 && (V = 0), V += f.sample_counts[K]), a > 0 ? (t.samples[a - 1].duration = f.sample_deltas[K], t.samples_duration += t.samples[a - 1].duration, P.dts = t.samples[a - 1].dts + t.samples[a - 1].duration) : P.dts = 0, d ? (a >= ee && (J++, ee < 0 && (ee = 0), ee += d.sample_counts[J]), P.cts = t.samples[a].dts + d.sample_offsets[J]) : P.cts = P.dts, p ? (a == p.sample_numbers[X] - 1 ? (P.is_sync = !0, X++) : (P.is_sync = !1, P.degradation_priority = 0), b && b.entries[ne].sample_delta + B == a + 1 && (P.subsamples = b.entries[ne].subsamples, B += b.entries[ne].sample_delta, ne++)) : P.is_sync = !0, y.process_sdtp(t.mdia.minf.stbl.sdtp, P, P.number), A ? P.degradation_priority = A.priority[a] : P.degradation_priority = 0, b && b.entries[ne].sample_delta + B == a && (P.subsamples = b.entries[ne].subsamples, B += b.entries[ne].sample_delta), (w.length > 0 || U.length > 0) && y.setSampleGroupProperties(t, P, a, t.sample_groups_info);
10798
+ var A = {};
10799
+ A.number = a, A.track_id = t.tkhd.track_id, A.timescale = t.mdia.mdhd.timescale, A.alreadyRead = 0, t.samples[a] = A, A.size = s.sample_sizes[a], t.samples_size += A.size, a === 0 ? (O = 1, C = 0, A.chunk_index = O, A.chunk_run_index = C, G = r.samples_per_chunk[C], M = 0, C + 1 < r.first_chunk.length ? z = r.first_chunk[C + 1] - 1 : z = 1 / 0) : a < G ? (A.chunk_index = O, A.chunk_run_index = C) : (O++, A.chunk_index = O, M = 0, O <= z || (C++, C + 1 < r.first_chunk.length ? z = r.first_chunk[C + 1] - 1 : z = 1 / 0), A.chunk_run_index = C, G += r.samples_per_chunk[C]), A.description_index = r.sample_description_index[A.chunk_run_index] - 1, A.description = m.entries[A.description_index], A.offset = e.chunk_offsets[A.chunk_index - 1] + M, M += A.size, a > V && (K++, V < 0 && (V = 0), V += f.sample_counts[K]), a > 0 ? (t.samples[a - 1].duration = f.sample_deltas[K], t.samples_duration += t.samples[a - 1].duration, A.dts = t.samples[a - 1].dts + t.samples[a - 1].duration) : A.dts = 0, d ? (a >= ee && (J++, ee < 0 && (ee = 0), ee += d.sample_counts[J]), A.cts = t.samples[a].dts + d.sample_offsets[J]) : A.cts = A.dts, p ? (a == p.sample_numbers[X] - 1 ? (A.is_sync = !0, X++) : (A.is_sync = !1, A.degradation_priority = 0), b && b.entries[ne].sample_delta + B == a + 1 && (A.subsamples = b.entries[ne].subsamples, B += b.entries[ne].sample_delta, ne++)) : A.is_sync = !0, y.process_sdtp(t.mdia.minf.stbl.sdtp, A, A.number), P ? A.degradation_priority = P.priority[a] : A.degradation_priority = 0, b && b.entries[ne].sample_delta + B == a && (A.subsamples = b.entries[ne].subsamples, B += b.entries[ne].sample_delta), (w.length > 0 || U.length > 0) && y.setSampleGroupProperties(t, A, a, t.sample_groups_info);
10796
10800
  }
10797
10801
  a > 0 && (t.samples[a - 1].duration = Math.max(t.mdia.mdhd.duration - t.samples[a - 1].dts, 0), t.samples_duration += t.samples[a - 1].duration);
10798
10802
  }
10799
10803
  }, y.prototype.updateSampleLists = function() {
10800
- var t, a, e, r, s, f, d, p, m, b, w, U, A, C, $;
10804
+ var t, a, e, r, s, f, d, p, m, b, w, U, P, C, O;
10801
10805
  if (this.moov !== void 0) {
10802
10806
  for (; this.lastMoofIndex < this.moofs.length; )
10803
10807
  if (m = this.moofs[this.lastMoofIndex], this.lastMoofIndex++, m.type == "moof")
10804
10808
  for (b = m, t = 0; t < b.trafs.length; t++) {
10805
- for (w = b.trafs[t], U = this.getTrackById(w.tfhd.track_id), A = this.getTrexById(w.tfhd.track_id), w.tfhd.flags & n.TFHD_FLAG_SAMPLE_DESC ? r = w.tfhd.default_sample_description_index : r = A ? A.default_sample_description_index : 1, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_DUR ? s = w.tfhd.default_sample_duration : s = A ? A.default_sample_duration : 0, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_SIZE ? f = w.tfhd.default_sample_size : f = A ? A.default_sample_size : 0, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_FLAGS ? d = w.tfhd.default_sample_flags : d = A ? A.default_sample_flags : 0, w.sample_number = 0, w.sbgps.length > 0 && y.initSampleGroups(U, w, w.sbgps, U.mdia.minf.stbl.sgpds, w.sgpds), a = 0; a < w.truns.length; a++) {
10809
+ for (w = b.trafs[t], U = this.getTrackById(w.tfhd.track_id), P = this.getTrexById(w.tfhd.track_id), w.tfhd.flags & n.TFHD_FLAG_SAMPLE_DESC ? r = w.tfhd.default_sample_description_index : r = P ? P.default_sample_description_index : 1, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_DUR ? s = w.tfhd.default_sample_duration : s = P ? P.default_sample_duration : 0, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_SIZE ? f = w.tfhd.default_sample_size : f = P ? P.default_sample_size : 0, w.tfhd.flags & n.TFHD_FLAG_SAMPLE_FLAGS ? d = w.tfhd.default_sample_flags : d = P ? P.default_sample_flags : 0, w.sample_number = 0, w.sbgps.length > 0 && y.initSampleGroups(U, w, w.sbgps, U.mdia.minf.stbl.sgpds, w.sgpds), a = 0; a < w.truns.length; a++) {
10806
10810
  var z = w.truns[a];
10807
10811
  for (e = 0; e < z.sample_count; e++) {
10808
- C = {}, C.moof_number = this.lastMoofIndex, C.number_in_traf = w.sample_number, w.sample_number++, C.number = U.samples.length, w.first_sample_index = U.samples.length, U.samples.push(C), C.track_id = U.tkhd.track_id, C.timescale = U.mdia.mdhd.timescale, C.description_index = r - 1, C.description = U.mdia.minf.stbl.stsd.entries[C.description_index], C.size = f, z.flags & n.TRUN_FLAGS_SIZE && (C.size = z.sample_size[e]), U.samples_size += C.size, C.duration = s, z.flags & n.TRUN_FLAGS_DURATION && (C.duration = z.sample_duration[e]), U.samples_duration += C.duration, U.first_traf_merged || e > 0 ? C.dts = U.samples[U.samples.length - 2].dts + U.samples[U.samples.length - 2].duration : (w.tfdt ? C.dts = w.tfdt.baseMediaDecodeTime : C.dts = 0, U.first_traf_merged = !0), C.cts = C.dts, z.flags & n.TRUN_FLAGS_CTS_OFFSET && (C.cts = C.dts + z.sample_composition_time_offset[e]), $ = d, z.flags & n.TRUN_FLAGS_FLAGS ? $ = z.sample_flags[e] : e === 0 && z.flags & n.TRUN_FLAGS_FIRST_FLAG && ($ = z.first_sample_flags), C.is_sync = !($ >> 16 & 1), C.is_leading = $ >> 26 & 3, C.depends_on = $ >> 24 & 3, C.is_depended_on = $ >> 22 & 3, C.has_redundancy = $ >> 20 & 3, C.degradation_priority = $ & 65535;
10809
- var M = !!(w.tfhd.flags & n.TFHD_FLAG_BASE_DATA_OFFSET), j = !!(w.tfhd.flags & n.TFHD_FLAG_DEFAULT_BASE_IS_MOOF), V = !!(z.flags & n.TRUN_FLAGS_DATA_OFFSET), K = 0;
10810
- M ? K = w.tfhd.base_data_offset : j || a === 0 ? K = b.start : K = p, a === 0 && e === 0 ? V ? C.offset = K + z.data_offset : C.offset = K : C.offset = p, p = C.offset + C.size, (w.sbgps.length > 0 || w.sgpds.length > 0 || U.mdia.minf.stbl.sbgps.length > 0 || U.mdia.minf.stbl.sgpds.length > 0) && y.setSampleGroupProperties(U, C, C.number_in_traf, w.sample_groups_info);
10812
+ C = {}, C.moof_number = this.lastMoofIndex, C.number_in_traf = w.sample_number, w.sample_number++, C.number = U.samples.length, w.first_sample_index = U.samples.length, U.samples.push(C), C.track_id = U.tkhd.track_id, C.timescale = U.mdia.mdhd.timescale, C.description_index = r - 1, C.description = U.mdia.minf.stbl.stsd.entries[C.description_index], C.size = f, z.flags & n.TRUN_FLAGS_SIZE && (C.size = z.sample_size[e]), U.samples_size += C.size, C.duration = s, z.flags & n.TRUN_FLAGS_DURATION && (C.duration = z.sample_duration[e]), U.samples_duration += C.duration, U.first_traf_merged || e > 0 ? C.dts = U.samples[U.samples.length - 2].dts + U.samples[U.samples.length - 2].duration : (w.tfdt ? C.dts = w.tfdt.baseMediaDecodeTime : C.dts = 0, U.first_traf_merged = !0), C.cts = C.dts, z.flags & n.TRUN_FLAGS_CTS_OFFSET && (C.cts = C.dts + z.sample_composition_time_offset[e]), O = d, z.flags & n.TRUN_FLAGS_FLAGS ? O = z.sample_flags[e] : e === 0 && z.flags & n.TRUN_FLAGS_FIRST_FLAG && (O = z.first_sample_flags), C.is_sync = !(O >> 16 & 1), C.is_leading = O >> 26 & 3, C.depends_on = O >> 24 & 3, C.is_depended_on = O >> 22 & 3, C.has_redundancy = O >> 20 & 3, C.degradation_priority = O & 65535;
10813
+ var M = !!(w.tfhd.flags & n.TFHD_FLAG_BASE_DATA_OFFSET), G = !!(w.tfhd.flags & n.TFHD_FLAG_DEFAULT_BASE_IS_MOOF), V = !!(z.flags & n.TRUN_FLAGS_DATA_OFFSET), K = 0;
10814
+ M ? K = w.tfhd.base_data_offset : G || a === 0 ? K = b.start : K = p, a === 0 && e === 0 ? V ? C.offset = K + z.data_offset : C.offset = K : C.offset = p, p = C.offset + C.size, (w.sbgps.length > 0 || w.sgpds.length > 0 || U.mdia.minf.stbl.sbgps.length > 0 || U.mdia.minf.stbl.sgpds.length > 0) && y.setSampleGroupProperties(U, C, C.number_in_traf, w.sample_groups_info);
10811
10815
  }
10812
10816
  }
10813
10817
  if (w.subs) {
@@ -11230,10 +11234,10 @@ function ic() {
11230
11234
  })();
11231
11235
  o.getDurationString = function(e, r) {
11232
11236
  var s;
11233
- function f(U, A) {
11234
- for (var C = "" + U, $ = C.split("."); $[0].length < A; )
11235
- $[0] = "0" + $[0];
11236
- return $.join(".");
11237
+ function f(U, P) {
11238
+ for (var C = "" + U, O = C.split("."); O[0].length < P; )
11239
+ O[0] = "0" + O[0];
11240
+ return O.join(".");
11237
11241
  }
11238
11242
  e < 0 ? (s = !0, e = -e) : s = !1;
11239
11243
  var d = r || 1, p = e / d, m = Math.floor(p / 3600);
@@ -11965,10 +11969,10 @@ function ic() {
11965
11969
  };
11966
11970
  var p = this, m = {};
11967
11971
  return this.parseOneDescriptor = function(b) {
11968
- var w = 0, U, A, C;
11972
+ var w = 0, U, P, C;
11969
11973
  for (U = b.readUint8(), C = b.readUint8(); C & 128; )
11970
11974
  w = (C & 127) << 7, C = b.readUint8();
11971
- return w += C & 127, o.debug("MPEG4DescriptorParser", "Found " + (d[U] || "Descriptor " + U) + ", size " + w + " at position " + b.getPosition()), d[U] ? A = new m[d[U]](w) : A = new m.Descriptor(w), A.parse(b), A;
11975
+ return w += C & 127, o.debug("MPEG4DescriptorParser", "Found " + (d[U] || "Descriptor " + U) + ", size " + w + " at position " + b.getPosition()), d[U] ? P = new m[d[U]](w) : P = new m.Descriptor(w), P.parse(b), P;
11972
11976
  }, m.Descriptor = function(b, w) {
11973
11977
  this.tag = b, this.size = w, this.descs = [];
11974
11978
  }, m.Descriptor.prototype.parse = function(b) {
@@ -12000,8 +12004,8 @@ function ic() {
12000
12004
  if (!w) return null;
12001
12005
  var U = w.findDescriptor(s);
12002
12006
  if (U && U.data) {
12003
- var A = (U.data[0] & 248) >> 3;
12004
- return A === 31 && U.data.length >= 2 && (A = 32 + ((U.data[0] & 7) << 3) + ((U.data[1] & 224) >> 5)), A;
12007
+ var P = (U.data[0] & 248) >> 3;
12008
+ return P === 31 && U.data.length >= 2 && (P = 32 + ((U.data[0] & 7) << 3) + ((U.data[1] & 224) >> 5)), P;
12005
12009
  } else
12006
12010
  return null;
12007
12011
  }, m.DecoderConfigDescriptor = function(b) {
@@ -12167,11 +12171,11 @@ function ic() {
12167
12171
  return o.debug("BoxParser", "Not enough data in stream to parse the type and size of the box"), { code: n.ERR_NOT_ENOUGH_DATA };
12168
12172
  if (s && s < 8)
12169
12173
  return o.debug("BoxParser", "Not enough bytes left in the parent box to parse a new box"), { code: n.ERR_NOT_ENOUGH_DATA };
12170
- var w = e.readUint32(), U = e.readString(4), A = U;
12174
+ var w = e.readUint32(), U = e.readString(4), P = U;
12171
12175
  if (o.debug("BoxParser", "Found box of type '" + U + "' and size " + w + " at position " + d), p = 8, U == "uuid") {
12172
12176
  if (e.getEndPosition() - e.getPosition() < 16 || s - p < 16)
12173
12177
  return e.seek(d), o.debug("BoxParser", "Not enough bytes left in the parent box to parse a UUID box"), { code: n.ERR_NOT_ENOUGH_DATA };
12174
- b = n.parseUUID(e), p += 16, A = b;
12178
+ b = n.parseUUID(e), p += 16, P = b;
12175
12179
  }
12176
12180
  if (w == 1) {
12177
12181
  if (e.getEndPosition() - e.getPosition() < 8 || s && s - p < 8)
@@ -12183,7 +12187,7 @@ function ic() {
12183
12187
  else if (U !== "mdat")
12184
12188
  return o.error("BoxParser", "Unlimited box size not supported for type: '" + U + "'"), f = new n.Box(U, w), { code: n.OK, box: f, size: f.size };
12185
12189
  }
12186
- return w !== 0 && w < p ? (o.error("BoxParser", "Box of type " + U + " has an invalid size " + w + " (too small to be a box)"), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : w !== 0 && s && w > s ? (o.error("BoxParser", "Box of type '" + U + "' has a size " + w + " greater than its container size " + s), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : w !== 0 && d + w > e.getEndPosition() ? (e.seek(d), o.info("BoxParser", "Not enough data in stream to parse the entire '" + U + "' box"), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : r ? { code: n.OK, type: U, size: w, hdr_size: p, start: d } : (n[U + "Box"] ? f = new n[U + "Box"](w) : U !== "uuid" ? (o.warn("BoxParser", "Unknown box type: '" + U + "'"), f = new n.Box(U, w), f.has_unparsed_data = !0) : n.UUIDBoxes[b] ? f = new n.UUIDBoxes[b](w) : (o.warn("BoxParser", "Unknown uuid type: '" + b + "'"), f = new n.Box(U, w), f.uuid = b, f.has_unparsed_data = !0), f.hdr_size = p, f.start = d, f.write === n.Box.prototype.write && f.type !== "mdat" && (o.info("BoxParser", "'" + A + "' box writing not yet implemented, keeping unparsed data in memory for later write"), f.parseDataAndRewind(e)), f.parse(e), m = e.getPosition() - (f.start + f.size), m < 0 ? (o.warn("BoxParser", "Parsing of box '" + A + "' did not read the entire indicated box data size (missing " + -m + " bytes), seeking forward"), e.seek(f.start + f.size)) : m > 0 && (o.error("BoxParser", "Parsing of box '" + A + "' read " + m + " more bytes than the indicated box data size, seeking backwards"), f.size !== 0 && e.seek(f.start + f.size)), { code: n.OK, box: f, size: f.size });
12190
+ return w !== 0 && w < p ? (o.error("BoxParser", "Box of type " + U + " has an invalid size " + w + " (too small to be a box)"), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : w !== 0 && s && w > s ? (o.error("BoxParser", "Box of type '" + U + "' has a size " + w + " greater than its container size " + s), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : w !== 0 && d + w > e.getEndPosition() ? (e.seek(d), o.info("BoxParser", "Not enough data in stream to parse the entire '" + U + "' box"), { code: n.ERR_NOT_ENOUGH_DATA, type: U, size: w, hdr_size: p, start: d }) : r ? { code: n.OK, type: U, size: w, hdr_size: p, start: d } : (n[U + "Box"] ? f = new n[U + "Box"](w) : U !== "uuid" ? (o.warn("BoxParser", "Unknown box type: '" + U + "'"), f = new n.Box(U, w), f.has_unparsed_data = !0) : n.UUIDBoxes[b] ? f = new n.UUIDBoxes[b](w) : (o.warn("BoxParser", "Unknown uuid type: '" + b + "'"), f = new n.Box(U, w), f.uuid = b, f.has_unparsed_data = !0), f.hdr_size = p, f.start = d, f.write === n.Box.prototype.write && f.type !== "mdat" && (o.info("BoxParser", "'" + P + "' box writing not yet implemented, keeping unparsed data in memory for later write"), f.parseDataAndRewind(e)), f.parse(e), m = e.getPosition() - (f.start + f.size), m < 0 ? (o.warn("BoxParser", "Parsing of box '" + P + "' did not read the entire indicated box data size (missing " + -m + " bytes), seeking forward"), e.seek(f.start + f.size)) : m > 0 && (o.error("BoxParser", "Parsing of box '" + P + "' read " + m + " more bytes than the indicated box data size, seeking backwards"), f.size !== 0 && e.seek(f.start + f.size)), { code: n.OK, box: f, size: f.size });
12187
12191
  }, n.Box.prototype.parse = function(e) {
12188
12192
  this.type != "mdat" ? this.data = e.readUint8Array(this.size - this.hdr_size) : this.size === 0 ? e.seek(e.getEndPosition()) : e.seek(this.start + this.size);
12189
12193
  }, n.Box.prototype.parseDataAndRewind = function(e) {
@@ -13138,14 +13142,14 @@ function ic() {
13138
13142
  this.nalu_arrays = [];
13139
13143
  var U = e.readUint8();
13140
13144
  for (r = 0; r < U; r++) {
13141
- var A = [];
13142
- this.nalu_arrays.push(A), f.stream_read_1_bytes(e), A.completeness = f.extract_bits(1), f.extract_bits(2), A.nalu_type = f.extract_bits(5);
13145
+ var P = [];
13146
+ this.nalu_arrays.push(P), f.stream_read_1_bytes(e), P.completeness = f.extract_bits(1), f.extract_bits(2), P.nalu_type = f.extract_bits(5);
13143
13147
  var C = 1;
13144
- for (A.nalu_type != w && A.nalu_type != b && (C = e.readUint16()), s = 0; s < C; s++) {
13145
- var $ = e.readUint16();
13146
- A.push({
13147
- data: e.readUint8Array($),
13148
- length: $
13148
+ for (P.nalu_type != w && P.nalu_type != b && (C = e.readUint16()), s = 0; s < C; s++) {
13149
+ var O = e.readUint16();
13150
+ P.push({
13151
+ data: e.readUint8Array(O),
13152
+ length: O
13149
13153
  });
13150
13154
  }
13151
13155
  }
@@ -13784,14 +13788,14 @@ function ic() {
13784
13788
  switch (m) {
13785
13789
  case "Visual":
13786
13790
  if (d.add("vmhd").set("graphicsmode", 0).set("opcolor", [0, 0, 0]), p.set("width", r.width).set("height", r.height).set("horizresolution", 72 << 16).set("vertresolution", 72 << 16).set("frame_count", 1).set("compressorname", r.type + " Compressor").set("depth", 24), r.avcDecoderConfigRecord) {
13787
- var A = new n.avcCBox();
13788
- A.parse(new c(r.avcDecoderConfigRecord)), p.addBox(A);
13791
+ var P = new n.avcCBox();
13792
+ P.parse(new c(r.avcDecoderConfigRecord)), p.addBox(P);
13789
13793
  } else if (r.hevcDecoderConfigRecord) {
13790
13794
  var C = new n.hvcCBox();
13791
13795
  C.parse(new c(r.hevcDecoderConfigRecord)), p.addBox(C);
13792
13796
  } else if (r.vpcDecoderConfigRecord) {
13793
- var $ = new n.vpcCBox();
13794
- $.parse(new c(r.vpcDecoderConfigRecord)), p.addBox($);
13797
+ var O = new n.vpcCBox();
13798
+ O.parse(new c(r.vpcDecoderConfigRecord)), p.addBox(O);
13795
13799
  }
13796
13800
  break;
13797
13801
  case "Audio":
@@ -13845,8 +13849,8 @@ function ic() {
13845
13849
  }
13846
13850
  }, t.initSampleGroups = function(e, r, s, f, d) {
13847
13851
  var p, m, b, w;
13848
- function U(A, C, $) {
13849
- this.grouping_type = A, this.grouping_type_parameter = C, this.sbgp = $, this.last_sample_in_run = -1, this.entry_index = -1;
13852
+ function U(P, C, O) {
13853
+ this.grouping_type = P, this.grouping_type_parameter = C, this.sbgp = O, this.last_sample_in_run = -1, this.entry_index = -1;
13850
13854
  }
13851
13855
  for (r && (r.sample_groups_info = []), e.sample_groups_info || (e.sample_groups_info = []), m = 0; m < s.length; m++) {
13852
13856
  for (w = s[m].grouping_type + "/" + s[m].grouping_type_parameter, b = new U(s[m].grouping_type, s[m].grouping_type_parameter, s[m]), r && (r.sample_groups_info[w] = b), e.sample_groups_info[w] || (e.sample_groups_info[w] = b), p = 0; p < f.length; p++)
@@ -13877,33 +13881,33 @@ function ic() {
13877
13881
  for (e = 0; e < this.moov.traks.length; e++)
13878
13882
  r = this.moov.traks[e], this.buildTrakSampleLists(r);
13879
13883
  }, t.prototype.buildTrakSampleLists = function(e) {
13880
- var r, s, f, d, p, m, b, w, U, A, C, $, z, M, j, V, K, ee, J, X, ne, B, P, k;
13881
- if (e.samples = [], e.samples_duration = 0, e.samples_size = 0, s = e.mdia.minf.stbl.stco || e.mdia.minf.stbl.co64, f = e.mdia.minf.stbl.stsc, d = e.mdia.minf.stbl.stsz || e.mdia.minf.stbl.stz2, p = e.mdia.minf.stbl.stts, m = e.mdia.minf.stbl.ctts, b = e.mdia.minf.stbl.stss, w = e.mdia.minf.stbl.stsd, U = e.mdia.minf.stbl.subs, $ = e.mdia.minf.stbl.stdp, A = e.mdia.minf.stbl.sbgps, C = e.mdia.minf.stbl.sgpds, ee = -1, J = -1, X = -1, ne = -1, B = 0, P = 0, k = 0, t.initSampleGroups(e, null, A, C), !(typeof d > "u")) {
13884
+ var r, s, f, d, p, m, b, w, U, P, C, O, z, M, G, V, K, ee, J, X, ne, B, A, k;
13885
+ if (e.samples = [], e.samples_duration = 0, e.samples_size = 0, s = e.mdia.minf.stbl.stco || e.mdia.minf.stbl.co64, f = e.mdia.minf.stbl.stsc, d = e.mdia.minf.stbl.stsz || e.mdia.minf.stbl.stz2, p = e.mdia.minf.stbl.stts, m = e.mdia.minf.stbl.ctts, b = e.mdia.minf.stbl.stss, w = e.mdia.minf.stbl.stsd, U = e.mdia.minf.stbl.subs, O = e.mdia.minf.stbl.stdp, P = e.mdia.minf.stbl.sbgps, C = e.mdia.minf.stbl.sgpds, ee = -1, J = -1, X = -1, ne = -1, B = 0, A = 0, k = 0, t.initSampleGroups(e, null, P, C), !(typeof d > "u")) {
13882
13886
  for (r = 0; r < d.sample_sizes.length; r++) {
13883
- var I = {};
13884
- I.number = r, I.track_id = e.tkhd.track_id, I.timescale = e.mdia.mdhd.timescale, I.alreadyRead = 0, e.samples[r] = I, I.size = d.sample_sizes[r], e.samples_size += I.size, r === 0 ? (M = 1, z = 0, I.chunk_index = M, I.chunk_run_index = z, K = f.samples_per_chunk[z], V = 0, z + 1 < f.first_chunk.length ? j = f.first_chunk[z + 1] - 1 : j = 1 / 0) : r < K ? (I.chunk_index = M, I.chunk_run_index = z) : (M++, I.chunk_index = M, V = 0, M <= j || (z++, z + 1 < f.first_chunk.length ? j = f.first_chunk[z + 1] - 1 : j = 1 / 0), I.chunk_run_index = z, K += f.samples_per_chunk[z]), I.description_index = f.sample_description_index[I.chunk_run_index] - 1, I.description = w.entries[I.description_index], I.offset = s.chunk_offsets[I.chunk_index - 1] + V, V += I.size, r > ee && (J++, ee < 0 && (ee = 0), ee += p.sample_counts[J]), r > 0 ? (e.samples[r - 1].duration = p.sample_deltas[J], e.samples_duration += e.samples[r - 1].duration, I.dts = e.samples[r - 1].dts + e.samples[r - 1].duration) : I.dts = 0, m ? (r >= X && (ne++, X < 0 && (X = 0), X += m.sample_counts[ne]), I.cts = e.samples[r].dts + m.sample_offsets[ne]) : I.cts = I.dts, b ? (r == b.sample_numbers[B] - 1 ? (I.is_sync = !0, B++) : (I.is_sync = !1, I.degradation_priority = 0), U && U.entries[P].sample_delta + k == r + 1 && (I.subsamples = U.entries[P].subsamples, k += U.entries[P].sample_delta, P++)) : I.is_sync = !0, t.process_sdtp(e.mdia.minf.stbl.sdtp, I, I.number), $ ? I.degradation_priority = $.priority[r] : I.degradation_priority = 0, U && U.entries[P].sample_delta + k == r && (I.subsamples = U.entries[P].subsamples, k += U.entries[P].sample_delta), (A.length > 0 || C.length > 0) && t.setSampleGroupProperties(e, I, r, e.sample_groups_info);
13887
+ var T = {};
13888
+ T.number = r, T.track_id = e.tkhd.track_id, T.timescale = e.mdia.mdhd.timescale, T.alreadyRead = 0, e.samples[r] = T, T.size = d.sample_sizes[r], e.samples_size += T.size, r === 0 ? (M = 1, z = 0, T.chunk_index = M, T.chunk_run_index = z, K = f.samples_per_chunk[z], V = 0, z + 1 < f.first_chunk.length ? G = f.first_chunk[z + 1] - 1 : G = 1 / 0) : r < K ? (T.chunk_index = M, T.chunk_run_index = z) : (M++, T.chunk_index = M, V = 0, M <= G || (z++, z + 1 < f.first_chunk.length ? G = f.first_chunk[z + 1] - 1 : G = 1 / 0), T.chunk_run_index = z, K += f.samples_per_chunk[z]), T.description_index = f.sample_description_index[T.chunk_run_index] - 1, T.description = w.entries[T.description_index], T.offset = s.chunk_offsets[T.chunk_index - 1] + V, V += T.size, r > ee && (J++, ee < 0 && (ee = 0), ee += p.sample_counts[J]), r > 0 ? (e.samples[r - 1].duration = p.sample_deltas[J], e.samples_duration += e.samples[r - 1].duration, T.dts = e.samples[r - 1].dts + e.samples[r - 1].duration) : T.dts = 0, m ? (r >= X && (ne++, X < 0 && (X = 0), X += m.sample_counts[ne]), T.cts = e.samples[r].dts + m.sample_offsets[ne]) : T.cts = T.dts, b ? (r == b.sample_numbers[B] - 1 ? (T.is_sync = !0, B++) : (T.is_sync = !1, T.degradation_priority = 0), U && U.entries[A].sample_delta + k == r + 1 && (T.subsamples = U.entries[A].subsamples, k += U.entries[A].sample_delta, A++)) : T.is_sync = !0, t.process_sdtp(e.mdia.minf.stbl.sdtp, T, T.number), O ? T.degradation_priority = O.priority[r] : T.degradation_priority = 0, U && U.entries[A].sample_delta + k == r && (T.subsamples = U.entries[A].subsamples, k += U.entries[A].sample_delta), (P.length > 0 || C.length > 0) && t.setSampleGroupProperties(e, T, r, e.sample_groups_info);
13885
13889
  }
13886
13890
  r > 0 && (e.samples[r - 1].duration = Math.max(e.mdia.mdhd.duration - e.samples[r - 1].dts, 0), e.samples_duration += e.samples[r - 1].duration);
13887
13891
  }
13888
13892
  }, t.prototype.updateSampleLists = function() {
13889
- var e, r, s, f, d, p, m, b, w, U, A, C, $, z, M;
13893
+ var e, r, s, f, d, p, m, b, w, U, P, C, O, z, M;
13890
13894
  if (this.moov !== void 0) {
13891
13895
  for (; this.lastMoofIndex < this.moofs.length; )
13892
13896
  if (w = this.moofs[this.lastMoofIndex], this.lastMoofIndex++, w.type == "moof")
13893
13897
  for (U = w, e = 0; e < U.trafs.length; e++) {
13894
- for (A = U.trafs[e], C = this.getTrackById(A.tfhd.track_id), C.samples == null && (C.samples = []), $ = this.getTrexById(A.tfhd.track_id), A.tfhd.flags & n.TFHD_FLAG_SAMPLE_DESC ? f = A.tfhd.default_sample_description_index : f = $ ? $.default_sample_description_index : 1, A.tfhd.flags & n.TFHD_FLAG_SAMPLE_DUR ? d = A.tfhd.default_sample_duration : d = $ ? $.default_sample_duration : 0, A.tfhd.flags & n.TFHD_FLAG_SAMPLE_SIZE ? p = A.tfhd.default_sample_size : p = $ ? $.default_sample_size : 0, A.tfhd.flags & n.TFHD_FLAG_SAMPLE_FLAGS ? m = A.tfhd.default_sample_flags : m = $ ? $.default_sample_flags : 0, A.sample_number = 0, A.sbgps.length > 0 && t.initSampleGroups(C, A, A.sbgps, C.mdia.minf.stbl.sgpds, A.sgpds), r = 0; r < A.truns.length; r++) {
13895
- var j = A.truns[r];
13896
- for (s = 0; s < j.sample_count; s++) {
13897
- z = {}, z.moof_number = this.lastMoofIndex, z.number_in_traf = A.sample_number, A.sample_number++, z.number = C.samples.length, A.first_sample_index = C.samples.length, C.samples.push(z), z.track_id = C.tkhd.track_id, z.timescale = C.mdia.mdhd.timescale, z.description_index = f - 1, z.description = C.mdia.minf.stbl.stsd.entries[z.description_index], z.size = p, j.flags & n.TRUN_FLAGS_SIZE && (z.size = j.sample_size[s]), C.samples_size += z.size, z.duration = d, j.flags & n.TRUN_FLAGS_DURATION && (z.duration = j.sample_duration[s]), C.samples_duration += z.duration, C.first_traf_merged || s > 0 ? z.dts = C.samples[C.samples.length - 2].dts + C.samples[C.samples.length - 2].duration : (A.tfdt ? z.dts = A.tfdt.baseMediaDecodeTime : z.dts = 0, C.first_traf_merged = !0), z.cts = z.dts, j.flags & n.TRUN_FLAGS_CTS_OFFSET && (z.cts = z.dts + j.sample_composition_time_offset[s]), M = m, j.flags & n.TRUN_FLAGS_FLAGS ? M = j.sample_flags[s] : s === 0 && j.flags & n.TRUN_FLAGS_FIRST_FLAG && (M = j.first_sample_flags), z.is_sync = !(M >> 16 & 1), z.is_leading = M >> 26 & 3, z.depends_on = M >> 24 & 3, z.is_depended_on = M >> 22 & 3, z.has_redundancy = M >> 20 & 3, z.degradation_priority = M & 65535;
13898
- var V = !!(A.tfhd.flags & n.TFHD_FLAG_BASE_DATA_OFFSET), K = !!(A.tfhd.flags & n.TFHD_FLAG_DEFAULT_BASE_IS_MOOF), ee = !!(j.flags & n.TRUN_FLAGS_DATA_OFFSET), J = 0;
13899
- V ? J = A.tfhd.base_data_offset : K || r === 0 ? J = U.start : J = b, r === 0 && s === 0 ? ee ? z.offset = J + j.data_offset : z.offset = J : z.offset = b, b = z.offset + z.size, (A.sbgps.length > 0 || A.sgpds.length > 0 || C.mdia.minf.stbl.sbgps.length > 0 || C.mdia.minf.stbl.sgpds.length > 0) && t.setSampleGroupProperties(C, z, z.number_in_traf, A.sample_groups_info);
13898
+ for (P = U.trafs[e], C = this.getTrackById(P.tfhd.track_id), C.samples == null && (C.samples = []), O = this.getTrexById(P.tfhd.track_id), P.tfhd.flags & n.TFHD_FLAG_SAMPLE_DESC ? f = P.tfhd.default_sample_description_index : f = O ? O.default_sample_description_index : 1, P.tfhd.flags & n.TFHD_FLAG_SAMPLE_DUR ? d = P.tfhd.default_sample_duration : d = O ? O.default_sample_duration : 0, P.tfhd.flags & n.TFHD_FLAG_SAMPLE_SIZE ? p = P.tfhd.default_sample_size : p = O ? O.default_sample_size : 0, P.tfhd.flags & n.TFHD_FLAG_SAMPLE_FLAGS ? m = P.tfhd.default_sample_flags : m = O ? O.default_sample_flags : 0, P.sample_number = 0, P.sbgps.length > 0 && t.initSampleGroups(C, P, P.sbgps, C.mdia.minf.stbl.sgpds, P.sgpds), r = 0; r < P.truns.length; r++) {
13899
+ var G = P.truns[r];
13900
+ for (s = 0; s < G.sample_count; s++) {
13901
+ z = {}, z.moof_number = this.lastMoofIndex, z.number_in_traf = P.sample_number, P.sample_number++, z.number = C.samples.length, P.first_sample_index = C.samples.length, C.samples.push(z), z.track_id = C.tkhd.track_id, z.timescale = C.mdia.mdhd.timescale, z.description_index = f - 1, z.description = C.mdia.minf.stbl.stsd.entries[z.description_index], z.size = p, G.flags & n.TRUN_FLAGS_SIZE && (z.size = G.sample_size[s]), C.samples_size += z.size, z.duration = d, G.flags & n.TRUN_FLAGS_DURATION && (z.duration = G.sample_duration[s]), C.samples_duration += z.duration, C.first_traf_merged || s > 0 ? z.dts = C.samples[C.samples.length - 2].dts + C.samples[C.samples.length - 2].duration : (P.tfdt ? z.dts = P.tfdt.baseMediaDecodeTime : z.dts = 0, C.first_traf_merged = !0), z.cts = z.dts, G.flags & n.TRUN_FLAGS_CTS_OFFSET && (z.cts = z.dts + G.sample_composition_time_offset[s]), M = m, G.flags & n.TRUN_FLAGS_FLAGS ? M = G.sample_flags[s] : s === 0 && G.flags & n.TRUN_FLAGS_FIRST_FLAG && (M = G.first_sample_flags), z.is_sync = !(M >> 16 & 1), z.is_leading = M >> 26 & 3, z.depends_on = M >> 24 & 3, z.is_depended_on = M >> 22 & 3, z.has_redundancy = M >> 20 & 3, z.degradation_priority = M & 65535;
13902
+ var V = !!(P.tfhd.flags & n.TFHD_FLAG_BASE_DATA_OFFSET), K = !!(P.tfhd.flags & n.TFHD_FLAG_DEFAULT_BASE_IS_MOOF), ee = !!(G.flags & n.TRUN_FLAGS_DATA_OFFSET), J = 0;
13903
+ V ? J = P.tfhd.base_data_offset : K || r === 0 ? J = U.start : J = b, r === 0 && s === 0 ? ee ? z.offset = J + G.data_offset : z.offset = J : z.offset = b, b = z.offset + z.size, (P.sbgps.length > 0 || P.sgpds.length > 0 || C.mdia.minf.stbl.sbgps.length > 0 || C.mdia.minf.stbl.sgpds.length > 0) && t.setSampleGroupProperties(C, z, z.number_in_traf, P.sample_groups_info);
13900
13904
  }
13901
13905
  }
13902
- if (A.subs) {
13906
+ if (P.subs) {
13903
13907
  C.has_fragment_subsamples = !0;
13904
- var X = A.first_sample_index;
13905
- for (r = 0; r < A.subs.entries.length; r++)
13906
- X += A.subs.entries[r].sample_delta, z = C.samples[X - 1], z.subsamples = A.subs.entries[r].subsamples;
13908
+ var X = P.first_sample_index;
13909
+ for (r = 0; r < P.subs.entries.length; r++)
13910
+ X += P.subs.entries[r].sample_delta, z = C.samples[X - 1], z.subsamples = P.subs.entries[r].subsamples;
13907
13911
  }
13908
13912
  }
13909
13913
  }
@@ -14001,13 +14005,13 @@ function ic() {
14001
14005
  for (var w = 0; w < p.iprp.ipmas.length; w++) {
14002
14006
  var U = p.iprp.ipmas[w];
14003
14007
  for (s = 0; s < U.associations.length; s++) {
14004
- var A = U.associations[s];
14005
- if (d = e[A.id], d || (d = r[A.id]), d)
14006
- for (d.properties === void 0 && (d.properties = {}, d.properties.boxes = []), f = 0; f < A.props.length; f++) {
14007
- var C = A.props[f];
14008
+ var P = U.associations[s];
14009
+ if (d = e[P.id], d || (d = r[P.id]), d)
14010
+ for (d.properties === void 0 && (d.properties = {}, d.properties.boxes = []), f = 0; f < P.props.length; f++) {
14011
+ var C = P.props[f];
14008
14012
  if (C.property_index > 0 && C.property_index - 1 < p.iprp.ipco.boxes.length) {
14009
- var $ = p.iprp.ipco.boxes[C.property_index - 1];
14010
- d.properties[$.type] = $, d.properties.boxes.push($);
14013
+ var O = p.iprp.ipco.boxes[C.property_index - 1];
14014
+ d.properties[O.type] = O, d.properties.boxes.push(O);
14011
14015
  }
14012
14016
  }
14013
14017
  }