@genome-spy/app 0.88.1 → 0.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/{agentApi-BIpg3JKh.js → agentApi-Z65dw-sD.js} +5976 -6711
  2. package/dist/agentApi.es.js +3580 -4470
  3. package/dist/agentShared.es.js +742 -683
  4. package/dist/{canvas2d-BVQ7-2eJ.js → canvas2d-DiPQvNtZ.js} +122 -109
  5. package/dist/{canvas2d-D7SZK3xv.js → canvas2d-t_N10CeW.js} +114 -101
  6. package/dist/{canvasSizeHelper-7h_8rOcx.js → canvasSizeHelper-foL2YvGL.js} +15 -8
  7. package/dist/{clipOptions-DTMcB_9z.js → clipOptions-B5PibDq3.js} +1610 -1342
  8. package/dist/{clipOptions-BWHr3aTa.js → clipOptions-Cba4I0AO.js} +1872 -1644
  9. package/dist/{componentStyles-FsNmIb22.js → componentStyles-DGtQXvwc.js} +17 -15
  10. package/dist/{debug-CVpoEOWx.js → debug-CVAlrcZt.js} +2 -2
  11. package/dist/{debug-DYAMZZKl.js → debug-DP4WzTNo.js} +2 -2
  12. package/dist/dialog.es.js +4 -3
  13. package/dist/esm-BiqrFjMh.js +443 -0
  14. package/dist/{esm-lwYrRdbg.js → esm-Bv7Frz7C.js} +142 -79
  15. package/dist/{esm-VvpZ9hsq.js → esm-C3A-AuRi.js} +1 -1
  16. package/dist/esm-CvpR1OcU.js +322 -0
  17. package/dist/esm-DFHFX1sH.js +1526 -0
  18. package/dist/esm-Dndm-NaA.js +1193 -0
  19. package/dist/{esm-CcDLRSvC.js → esm-DtNElqRr.js} +64 -63
  20. package/dist/esm-L53qjcYH.js +1155 -0
  21. package/dist/esm-VFJeyk9i.js +249 -0
  22. package/dist/{esm-BdLYkz-m.js → esm-_xCtpDwm.js} +1 -1
  23. package/dist/index.es.js +4203 -3910
  24. package/dist/index.js +971 -482
  25. package/dist/{indexer-CXjZDo2Q.js → indexer-DbFTKGlm.js} +1 -1
  26. package/dist/{indexer-DAH_ruVn.js → indexer-En7gpvLN.js} +1 -1
  27. package/dist/{lit-ByuJ0FJ4.js → lit-CoXp9NFX.js} +12 -10
  28. package/dist/order-BkYCnwD7.js +1062 -0
  29. package/dist/order-R043xTpC.js +1062 -0
  30. package/dist/{parquetRead-Cs2xRrvz.js → parquetRead-0hFIa3Cc.js} +532 -350
  31. package/dist/rasterExport-C_FcNBkC.js +52 -0
  32. package/dist/rasterExport-Z7gs5346.js +52 -0
  33. package/dist/rasterization-_-9JmSas.js +63 -0
  34. package/dist/rectangle-DE98gIxF.js +108 -0
  35. package/dist/{renderCanvas2D-DxturTEW.js → renderCanvas2D-DK1c9TFK.js} +68 -67
  36. package/dist/{renderCanvas2D-DtcJjqpB.js → renderCanvas2D-IM-A9DYG.js} +57 -56
  37. package/dist/schema.json +599 -116
  38. package/dist/{src-DjOlFqSn.js → src-DJtvThVC.js} +3 -5
  39. package/dist/style.css +1 -1
  40. package/dist/{svg-SDJMzL--.js → svg-DW3tfUmm.js} +339 -326
  41. package/dist/{svg-CyrLfa9e.js → svg-PabUdcDi.js} +365 -352
  42. package/dist/{svgRasterizer-f7DJ3UO0.js → svgRasterizer-B6YtWLJs.js} +6 -5
  43. package/dist/{svgRasterizer-mWK7HTkx.js → svgRasterizer-BEVDyyS3.js} +6 -5
  44. package/dist/{vega-scale-DLKCwWRs.js → vega-scale-Byaw1K8O.js} +823 -780
  45. package/dist/{vega-scale-CypF85iS.js → vega-scale-Ctz_wa3z.js} +963 -923
  46. package/dist/{viewIdentityRegistry-Dl-vMN9I.js → viewIdentityRegistry-BW415b3o.js} +1 -1
  47. package/dist/{viewIdentityRegistry-DIDo44XQ.js → viewIdentityRegistry-_F0E7nkA.js} +1 -1
  48. package/dist/{viewSelectors-CymbZyE6.js → viewSelectors-DYz-PhTO.js} +407 -340
  49. package/dist/{viewSelectors-DNiDip5e.js → viewSelectors-KtD-QSN0.js} +349 -282
  50. package/dist/{viewUtils-BrJLIj2o.js → viewUtils-BZGPseMx.js} +2052 -1871
  51. package/dist/{webgl-tZfZ8y3q.js → webgl-BKSGqHaz.js} +2144 -784
  52. package/dist/{webgl-CTJt7jQd.js → webgl-tdKf9SlZ.js} +2386 -1026
  53. package/package.json +5 -5
  54. package/dist/esm-80V4xF_D.js +0 -1098
  55. package/dist/esm-BA6yMcc-.js +0 -1222
  56. package/dist/esm-BdT7qUL-.js +0 -157
  57. package/dist/esm-CfYZhLHN.js +0 -1367
  58. package/dist/esm-D-iG_TIX.js +0 -441
  59. package/dist/esm-JAiZmFIS.js +0 -128
  60. package/dist/order-C5CzA37O.js +0 -918
  61. package/dist/order-DvY7KNcu.js +0 -918
  62. package/dist/rasterExport-BgZ98e6U.js +0 -44
  63. package/dist/rasterExport-DEr8fOLm.js +0 -44
  64. package/dist/rasterization-CFogVB3B.js +0 -50
  65. package/dist/rectangle-DKnrAmKs.js +0 -142
@@ -1,9 +1,9 @@
1
- import { C as e, E as t, Jt as n, Q as r, S as i, Wt as a, Yt as o, Z as s, b as c, o as l, qt as u, t as d, tn as f, un as p, ut as m, y as h, yt as ee } from "./clipOptions-BWHr3aTa.js";
2
- import { E as te, it as ne, m as g, y as _ } from "./vega-scale-CypF85iS.js";
3
- import { a as v, n as re, r as ie, t as y } from "./viewError-BiR9VCgL.js";
1
+ import { C as e, E as t, Kt as n, Q as r, S as i, Z as a, b as o, cn as s, dn as c, fn as l, k as u, nn as d, o as f, pn as p, t as m, ut as h, y as g, yn as ee, yt as te } from "./clipOptions-B5PibDq3.js";
2
+ import { E as ne, m as _, y as v } from "./vega-scale-Ctz_wa3z.js";
3
+ import { a as y, n as re, r as ie, t as b } from "./viewError-BiR9VCgL.js";
4
4
  import { t as ae } from "./warning-CpIIpk8e.js";
5
5
  //#region ../../node_modules/flatqueue/index.js
6
- var b = class {
6
+ var x = class {
7
7
  constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
8
8
  let r = e !== Infinity;
9
9
  this.ids = r ? new n(e) : [], this.values = r ? new t(e) : [], this.capacity = e, this.length = 0;
@@ -27,7 +27,7 @@ var b = class {
27
27
  if (r > 0) {
28
28
  let n = e[r], i = t[r], a = 0, o = r >> 1;
29
29
  for (; a < o;) {
30
- let n = (a << 1) + 1, o = n + 1, s = n + (o < r & +(t[o] < t[n]));
30
+ let n = (a << 1) + 1, o = n + 1, s = n + (+(o < r) & t[o] < t[n]);
31
31
  if (t[s] >= i) break;
32
32
  e[a] = e[s], t[a] = t[s], a = s;
33
33
  }
@@ -44,15 +44,16 @@ var b = class {
44
44
  shrink() {
45
45
  Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
46
46
  }
47
- }, x = Symbol("runtimeNode"), oe = 1e6;
47
+ }, S = Symbol("runtimeNode"), oe = 1e6;
48
48
  function se(e) {
49
49
  return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
50
50
  }
51
- function ce(e, t) {
52
- let n = {
51
+ function ce(e, t, n = !0) {
52
+ let r = {
53
53
  id: e.id,
54
54
  name: e.name,
55
55
  kind: e.kind,
56
+ batchStable: n,
56
57
  get() {
57
58
  return e.value;
58
59
  },
@@ -62,17 +63,17 @@ function ce(e, t) {
62
63
  };
63
64
  }
64
65
  };
65
- return Object.defineProperty(n, x, {
66
+ return Object.defineProperty(r, S, {
66
67
  enumerable: !1,
67
68
  configurable: !1,
68
69
  writable: !1,
69
70
  value: e
70
- }), t ? Object.assign(n, { set(e) {
71
+ }), t ? Object.assign(r, { set(e) {
71
72
  t(e);
72
- } }) : n;
73
+ } }) : r;
73
74
  }
74
75
  function le(e) {
75
- let t = e[x];
76
+ let t = e[S];
76
77
  if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
77
78
  return t;
78
79
  }
@@ -96,8 +97,8 @@ var fe = class {
96
97
  #u = /* @__PURE__ */ new Map();
97
98
  #d = /* @__PURE__ */ new Set();
98
99
  #f = /* @__PURE__ */ new Set();
99
- #p = new b();
100
- #m = new b();
100
+ #p = new x();
101
+ #m = new x();
101
102
  #h = /* @__PURE__ */ new Set();
102
103
  #g;
103
104
  constructor(e = {}) {
@@ -123,7 +124,7 @@ var fe = class {
123
124
  }, l = () => {
124
125
  s.disposed = !0, s.listeners.clear(), u();
125
126
  }, u = this.#g(e, l);
126
- return Object.assign(ce(s, c), { dispose: l });
127
+ return Object.assign(ce(s, c, o), { dispose: l });
127
128
  }
128
129
  computed(e, t, n, r, i = {}) {
129
130
  return this.#_(e, t, n, r, i);
@@ -163,7 +164,7 @@ var fe = class {
163
164
  rebind: (e, n) => {
164
165
  if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
165
166
  let r = /* @__PURE__ */ new Set(), i = (e) => {
166
- let n = e[x];
167
+ let n = e[S];
167
168
  if (n === s) throw Error("Reactive dependency cycle: " + t);
168
169
  if (!r.has(n)) {
169
170
  r.add(n);
@@ -428,7 +429,7 @@ function he(e, t = {}, n = {}) {
428
429
  }
429
430
  //#endregion
430
431
  //#region ../core/src/paramRuntime/expressionRef.js
431
- function S(e, t, n = {}) {
432
+ function ge(e, t, n = {}) {
432
433
  let r = {}, i = he(e, r, n), a = /* @__PURE__ */ new Map();
433
434
  for (let n of i.globals) {
434
435
  if (a.has(n)) continue;
@@ -453,6 +454,17 @@ function S(e, t, n = {}) {
453
454
  }, i.invalidate = () => {
454
455
  for (let e of o) e();
455
456
  o.clear();
457
+ }, i.createSnapshotEvaluator = () => {
458
+ let e = {};
459
+ for (let t of Object.keys(r)) a.has(t) || (e[t] = r[t]);
460
+ for (let [t, n] of a) n.batchStable || Object.defineProperty(e, t, {
461
+ enumerable: !0,
462
+ get: () => n.get()
463
+ });
464
+ let t = Object.assign(i.createEvaluator(e), { refresh() {
465
+ for (let [t, n] of a) n.batchStable && (e[t] = n.get());
466
+ } });
467
+ return t.refresh(), t;
456
468
  }, i.identifier = () => i.code + "|" + Array.from(a.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), i.dependencies = Array.from(a.values()).concat(i.scaleDependencies ?? []), {
457
469
  expression: i,
458
470
  dependencies: i.dependencies
@@ -460,7 +472,7 @@ function S(e, t, n = {}) {
460
472
  }
461
473
  //#endregion
462
474
  //#region ../core/src/paramRuntime/paramRuntime.js
463
- var ge = class {
475
+ var _e = class {
464
476
  #e = new pe();
465
477
  #t = new fe({ lifecycleRegistry: this.#e });
466
478
  #n = new me();
@@ -488,11 +500,11 @@ var ge = class {
488
500
  return this.#n.register(e, t, a);
489
501
  }
490
502
  registerDerived(e, t, n, r) {
491
- let { expression: i, dependencies: a } = S(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
503
+ let { expression: i, dependencies: a } = ge(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
492
504
  return this.#n.register(e, t, s);
493
505
  }
494
506
  createExpression(e, t, n) {
495
- let { expression: r } = S(t, (t) => this.resolve(e, t), n);
507
+ let { expression: r } = ge(t, (t) => this.resolve(e, t), n);
496
508
  return r;
497
509
  }
498
510
  resolve(e, t) {
@@ -525,11 +537,11 @@ var ge = class {
525
537
  whenPropagated(e) {
526
538
  return this.#t.whenPropagated(e);
527
539
  }
528
- }, _e = (e) => new Promise((t) => setTimeout(t, e));
529
- function ve() {
540
+ }, ve = (e) => new Promise((t) => setTimeout(t, e));
541
+ function ye() {
530
542
  return { canceled: !1 };
531
543
  }
532
- function ye(e) {
544
+ function be(e) {
533
545
  let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
534
546
  if (r?.canceled) return i();
535
547
  if (n?.aborted) return a("aborted");
@@ -542,11 +554,11 @@ function ye(e) {
542
554
  };
543
555
  t(m);
544
556
  });
545
- return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : _e(e.delay).then(i) : i();
557
+ return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : ve(e.delay).then(i) : i();
546
558
  }
547
559
  //#endregion
548
560
  //#region ../core/src/utils/animator.js
549
- var be = class {
561
+ var xe = class {
550
562
  constructor(e) {
551
563
  this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
552
564
  }
@@ -572,13 +584,13 @@ var be = class {
572
584
  this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
573
585
  }
574
586
  transition(e) {
575
- return ye({
587
+ return be({
576
588
  requestAnimationFrame: (e) => this.requestTransition(e),
577
589
  ...e
578
590
  });
579
591
  }
580
592
  };
581
- function C(e, t, n, r, i) {
593
+ function Se(e, t, n, r, i) {
582
594
  let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
583
595
  function u(e, t, n, r) {
584
596
  return t + (e - t) * 2 ** (-n / r);
@@ -597,7 +609,7 @@ function C(e, t, n, r, i) {
597
609
  s || (s = !0, e.requestTransition(d));
598
610
  }
599
611
  function p(n) {
600
- l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = xe(), d(a));
612
+ l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = Ce(), d(a));
601
613
  }
602
614
  return p.stop = () => {
603
615
  o = !0, s = !1, e.cancelTransition(d);
@@ -605,13 +617,13 @@ function C(e, t, n, r, i) {
605
617
  l = e, c = e, p.stop(), t(c);
606
618
  }, p;
607
619
  }
608
- function xe() {
620
+ function Ce() {
609
621
  let e = globalThis.document?.timeline?.currentTime;
610
622
  return typeof e == "number" ? e : performance.now();
611
623
  }
612
624
  //#endregion
613
625
  //#region ../core/src/paramRuntime/viewParamRuntime.js
614
- var w = class {
626
+ var C = class {
615
627
  #e;
616
628
  #t;
617
629
  #n = /* @__PURE__ */ new Map();
@@ -619,37 +631,69 @@ var w = class {
619
631
  #i = /* @__PURE__ */ new Map();
620
632
  #a = /* @__PURE__ */ new Set();
621
633
  #o = /* @__PURE__ */ new Map();
622
- #s = /* @__PURE__ */ new Map();
623
- #c;
624
- #l;
625
- #u;
634
+ #s;
635
+ #c = /* @__PURE__ */ new Map();
636
+ #l = /* @__PURE__ */ new Map();
637
+ #u = /* @__PURE__ */ new Map();
626
638
  #d;
627
- #f = !1;
639
+ #f;
640
+ #p;
641
+ #m;
642
+ #h = !1;
628
643
  constructor(e, t, n, r = {}) {
629
- this.#c = e ?? (() => void 0), this.#l = t ?? (() => void 0), this.#u = n, this.#d = r.snapTransitionedUpdates ?? !1;
630
- let i = this.#c();
631
- i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new ge(), this.#t = this.#e.createScope());
644
+ this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
645
+ let i = this.#d();
646
+ i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new _e(), this.#t = this.#e.createScope());
647
+ }
648
+ setSelectionSource(e) {
649
+ this.#s = e;
650
+ }
651
+ findSelectionCapability(e) {
652
+ let t = this.findRuntimeForParam(e), n = t && t.#c.get(e);
653
+ if (!n?.size) return;
654
+ let r = Array.from(n, (t) => ({
655
+ type: t.kind,
656
+ components: t.components.map((e) => ({
657
+ component: e,
658
+ type: t.source?.getScaleResolution(e)?.type
659
+ })),
660
+ location: t.source?.name ?? e
661
+ })), i = r[0], a = JSON.stringify(i.components), o = r.find(({ components: e }) => JSON.stringify(e) !== a);
662
+ if (o) throw Error(`Conflicting selection declarations for "${e}" in "${i.location}" and "${o.location}".`);
663
+ return i;
632
664
  }
633
- get #p() {
634
- return { resolveScaleResolution: this.#l };
665
+ #g(e) {
666
+ if (!("select" in e)) return;
667
+ let t = u(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", r = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], i = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, a = {
668
+ kind: n,
669
+ components: r,
670
+ source: this.#s
671
+ }, o = i.#c.get(e.name) ?? /* @__PURE__ */ new Set(), s = o.values().next().value;
672
+ if (s && (s.kind !== n || JSON.stringify(s.components) !== JSON.stringify(r))) throw Error(`Conflicting selection declarations for "${e.name}" in "${s.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
673
+ o.add(a), i.#c.set(e.name, o), this.#e.addScopeDisposer(this.#t, () => {
674
+ o.delete(a);
675
+ });
676
+ }
677
+ get #_() {
678
+ return { resolveScaleResolution: this.#f };
635
679
  }
636
680
  registerParam(e, n = {}) {
637
681
  let r = e.name;
638
682
  if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
639
- if (Ce(e), n.defer) {
683
+ if (Te(e), n.defer) {
640
684
  if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
641
685
  return this.#e.registerInitializer(this.#t, r, () => {
642
- this.#m(e);
686
+ this.#v(e);
643
687
  }), this.#i.set(r, e), () => {
644
688
  throw Error("Cannot set derived parameter \"" + r + "\".");
645
689
  };
646
690
  }
647
- return this.#m(e);
691
+ return this.#v(e);
648
692
  }
649
693
  registerLazyExpression(e, t, n) {
650
694
  this.#e.registerInitializer(this.#t, e, () => {
651
695
  n?.();
652
- let r = this.#e.registerDerived(this.#t, e, t, this.#p);
696
+ let r = this.#e.registerDerived(this.#t, e, t, this.#_);
653
697
  this.#r.set(e, r);
654
698
  }), this.#a.add(e);
655
699
  }
@@ -659,7 +703,7 @@ var w = class {
659
703
  this.#e.registerInitializer(this.#t, e, () => {
660
704
  let r = this.#e.registerDerived(this.#t, e, t, {
661
705
  expressionScope: n.#t,
662
- ...n.#p
706
+ ...n.#_
663
707
  });
664
708
  this.#r.set(e, r);
665
709
  }), this.#i.set(e, {
@@ -667,7 +711,7 @@ var w = class {
667
711
  expr: t
668
712
  });
669
713
  }
670
- #m(e) {
714
+ #v(e) {
671
715
  let t = e.name, n, r;
672
716
  if (e.push == "outer") {
673
717
  let i = this.findRuntimeForParam(t);
@@ -677,20 +721,21 @@ var w = class {
677
721
  if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
678
722
  n = (e) => {
679
723
  i.setValue(t, e);
680
- }, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
681
- } else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#g(t, r, e.transition) : this.#h(t, r);
724
+ }, this.#n.set(t, n), "ruler" in e && (r = g(e, this), n(r));
725
+ } else if ("value" in e) r = g(e, this), n = "transition" in e ? this.#b(t, r, e.transition) : this.#y(t, r);
682
726
  else if ("expr" in e) {
683
- if ("transition" in e) this.#_(t, e.expr, e.transition);
727
+ if ("transition" in e) this.#x(t, e.expr, e.transition);
728
+ else if ("debounce" in e) this.#S(t, e.expr, e.debounce);
684
729
  else {
685
- let n = this.#e.registerDerived(this.#t, t, e.expr, this.#p);
730
+ let n = this.#e.registerDerived(this.#t, t, e.expr, this.#_);
686
731
  this.#r.set(t, n);
687
732
  }
688
733
  n = () => {
689
734
  throw Error("Cannot set derived parameter \"" + t + "\".");
690
735
  };
691
- } else r = h(e, this), n = this.#h(t, r);
736
+ } else r = g(e, this), n = this.#y(t, r);
692
737
  if ("select" in e) {
693
- if (r ??= h(e, this), !this.#n.has(t)) {
738
+ if (r ??= g(e, this), !this.#n.has(t)) {
694
739
  let e = this.#e.registerSelection(this.#t, t, r);
695
740
  this.#r.set(t, e), this.#n.set(t, (t) => {
696
741
  e.set(t), this.#e.flushNow();
@@ -698,7 +743,7 @@ var w = class {
698
743
  }
699
744
  n(r);
700
745
  }
701
- return this.#i.set(t, e), n;
746
+ return this.#i.set(t, e), this.#g(e), n;
702
747
  }
703
748
  allocateSetter(e, n, r = !1) {
704
749
  if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
@@ -724,7 +769,7 @@ var w = class {
724
769
  if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
725
770
  }
726
771
  getTargetValue(e) {
727
- return t(e), this.#s.get(e)?.target ?? this.getValue(e);
772
+ return t(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
728
773
  }
729
774
  subscribe(e, t) {
730
775
  let n = this.getParamRef(e);
@@ -750,17 +795,17 @@ var w = class {
750
795
  return t !== void 0 && !t.#r.has(e);
751
796
  }
752
797
  hasConfiguredParamInScopeChain(e) {
753
- return t(e), this.#i.has(e) ? !0 : this.#c()?.hasConfiguredParamInScopeChain(e) ?? !1;
798
+ return t(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
754
799
  }
755
800
  findRuntimeForParam(e) {
756
- return this.hasLocalParam(e) ? this : this.#c()?.findRuntimeForParam(e);
801
+ return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
757
802
  }
758
803
  findConfiguredParam(e) {
759
804
  let t = this.#i.get(e);
760
805
  return t ? {
761
806
  runtime: this,
762
807
  config: t
763
- } : this.#c()?.findConfiguredParam(e);
808
+ } : this.#d()?.findConfiguredParam(e);
764
809
  }
765
810
  registerSelectionController(e, t) {
766
811
  let n = this.#o.get(e);
@@ -781,22 +826,22 @@ var w = class {
781
826
  let r = this.#i.get(t);
782
827
  e.push({
783
828
  name: t,
784
- kind: Se(r),
829
+ kind: we(r),
785
830
  value: n.get(),
786
831
  writable: this.#n.has(t),
787
832
  configured: !!r,
788
833
  config: r ? structuredClone(r) : void 0,
789
- target: this.#s.get(t)?.target
834
+ target: this.#l.get(t)?.target ?? this.#u.get(t)?.target
790
835
  });
791
836
  }
792
837
  return {
793
838
  scopeId: this.#t,
794
- disposed: this.#f,
839
+ disposed: this.#h,
795
840
  params: e
796
841
  };
797
842
  }
798
843
  createExpression(e) {
799
- return this.#e.createExpression(this.#t, e, this.#p);
844
+ return this.#e.createExpression(this.#t, e, this.#_);
800
845
  }
801
846
  watchExpression(e, t, n = {}) {
802
847
  let r = this.createExpression(e), i = r.subscribe(t);
@@ -823,7 +868,7 @@ var w = class {
823
868
  cancelUpdate(e) {
824
869
  this.#e.cancelUpdate(e);
825
870
  }
826
- #h(e, t) {
871
+ #y(e, t) {
827
872
  let n = this.#e.registerBase(this.#t, e, t);
828
873
  this.#r.set(e, n);
829
874
  let r = (e) => {
@@ -831,36 +876,51 @@ var w = class {
831
876
  };
832
877
  return this.#n.set(e, r), r;
833
878
  }
834
- #g(e, t, n) {
835
- let r = this.#v(e, t, n), i = (t, n) => {
836
- this.#y(e, r, t, n);
879
+ #b(e, t, n) {
880
+ let r = this.#C(e, t, n), i = (t, n) => {
881
+ this.#w(e, r, t, n);
837
882
  };
838
883
  return this.#n.set(e, i), i;
839
884
  }
840
- #_(e, t, n) {
841
- let r = this.createExpression(t), i = this.#v(e, r(null), n), a = r.subscribe(() => {
842
- this.#y(e, i, r(null), { animate: !this.#d });
885
+ #x(e, t, n) {
886
+ let r = this.createExpression(t), i = this.#C(e, r(null), n), a = r.subscribe(() => {
887
+ this.#w(e, i, r(null), { animate: !this.#m });
843
888
  });
844
889
  this.#e.addScopeDisposer(this.#t, a);
845
890
  }
846
- #v(e, t, n) {
847
- let r = T(e, t), i = this.#e.registerBase(this.#t, e, r);
891
+ #S(e, t, n) {
892
+ let r = this.createExpression(t), i = r(null), a = this.#e.registerBase(this.#t, e, i);
893
+ this.#r.set(e, a);
894
+ let o = {
895
+ target: i,
896
+ timeout: void 0
897
+ }, s = () => {
898
+ o.timeout = void 0, a.set(o.target), this.#e.flushNow();
899
+ }, c = r.subscribe(() => {
900
+ o.target = r(null), clearTimeout(o.timeout), o.timeout = void 0, o.target !== a.get() && (this.#m ? s() : o.timeout = setTimeout(s, n));
901
+ });
902
+ this.#u.set(e, o), this.#e.addScopeDisposer(this.#t, () => {
903
+ clearTimeout(o.timeout), c(), this.#u.delete(e);
904
+ });
905
+ }
906
+ #C(e, t, n) {
907
+ let r = w(e, t), i = this.#e.registerBase(this.#t, e, r);
848
908
  this.#r.set(e, i);
849
- let a = this.#u;
909
+ let a = this.#p;
850
910
  if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
851
- let o = C(a, ({ value: e }) => {
911
+ let o = Se(a, ({ value: e }) => {
852
912
  i.set(e), this.#e.flushNow();
853
913
  }, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
854
914
  target: i.get(),
855
915
  smoother: o,
856
916
  dispose: () => {
857
- o.stop(), this.#s.delete(e);
917
+ o.stop(), this.#l.delete(e);
858
918
  }
859
919
  };
860
- return this.#s.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
920
+ return this.#l.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
861
921
  }
862
- #y(e, t, n, r = {}) {
863
- let i = T(e, n);
922
+ #w(e, t, n, r = {}) {
923
+ let i = w(e, n);
864
924
  t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
865
925
  }
866
926
  evaluateAndGet(e) {
@@ -876,28 +936,33 @@ var w = class {
876
936
  return this.#e.whenPropagated(e);
877
937
  }
878
938
  finalizeInitialization() {
879
- this.#d = !1;
939
+ this.#m = !1;
880
940
  }
881
941
  dispose() {
882
- this.#f || (this.#f = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#s.clear());
942
+ this.#h || (this.#h = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#l.clear(), this.#u.clear());
883
943
  }
884
944
  hasPointSelections() {
885
945
  for (let e of this.#i.values()) if (i(e)) {
886
946
  let t = e.select;
887
- if (o(t)) {
947
+ if (p(t)) {
888
948
  if (t == "point") return !0;
889
949
  } else if (t.type == "point") return !0;
890
950
  }
891
951
  return !1;
892
952
  }
893
953
  };
894
- function Se(e) {
954
+ function we(e) {
895
955
  return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
896
956
  }
897
- function Ce(e) {
957
+ function Te(e) {
898
958
  let t = e.name;
899
959
  if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
900
960
  if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
961
+ if ("debounce" in e) {
962
+ if (!("expr" in e) || e.push === "outer") throw Error(`The debounced parameter "${t}" must have an expr property and must not use push.`);
963
+ if ("transition" in e) throw Error(`The parameter "${t}" must not use debounce and transition together.`);
964
+ if (!Number.isFinite(e.debounce) || e.debounce < 0) throw Error(`The debounce for parameter "${t}" must be a non-negative finite number.`);
965
+ }
901
966
  if (!("transition" in e)) return;
902
967
  if ("select" in e || "ruler" in e || e.push === "outer") throw Error(`The parameter "${t}" must not use transition with select, ruler, or push.`);
903
968
  if (!("value" in e || "expr" in e)) throw Error(`The transitioned parameter "${t}" must have a value or expr property.`);
@@ -907,13 +972,13 @@ function Ce(e) {
907
972
  if (n.halfLife != null && (!Number.isFinite(n.halfLife) || n.halfLife <= 0)) throw Error(`The transition halfLife for parameter "${t}" must be a positive finite number.`);
908
973
  if (n.epsilon != null && (!Number.isFinite(n.epsilon) || n.epsilon < 0)) throw Error(`The transition epsilon for parameter "${t}" must be a non-negative finite number.`);
909
974
  }
910
- function T(e, t) {
975
+ function w(e, t) {
911
976
  if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
912
977
  return t;
913
978
  }
914
979
  //#endregion
915
980
  //#region ../core/src/view/layout/flexLayout.js
916
- function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
981
+ function Ee(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
917
982
  n ||= 0, i ||= 0;
918
983
  let o = Ne(e, t, n), s = 0, c = 0;
919
984
  for (let t = 0; t < e.length; t++) s += o[t], O(e[t]) || c++;
@@ -946,34 +1011,34 @@ function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
946
1011
  }
947
1012
  return m += a ? n : -n, p(!1), f;
948
1013
  }
949
- function Te(e, { spacing: t } = { spacing: 0 }) {
1014
+ function De(e, { spacing: t } = { spacing: 0 }) {
950
1015
  let n = 0;
951
- for (let r of e) n += M(r) + (O(r) ? 0 : t);
1016
+ for (let r of e) n += N(r) + (O(r) ? 0 : t);
952
1017
  return Math.max(0, n - t);
953
1018
  }
954
- function Ee(e, t, { spacing: n = 0 } = {}) {
1019
+ function Oe(e, t, { spacing: n = 0 } = {}) {
955
1020
  let r = [], i = [], a = 0, o = 0;
956
1021
  for (let [s, c] of e.entries()) {
957
- let e = M(c), l = !O(c), u = o && l ? n : 0;
1022
+ let e = N(c), l = !O(c), u = o && l ? n : 0;
958
1023
  i.length && a + u + e > t && (r.push(i), i = [], a = 0, o = 0), i.push(s), a += (o && l ? n : 0) + e, o += +!!l;
959
1024
  }
960
1025
  return i.length && r.push(i), r;
961
1026
  }
962
- function De(e) {
1027
+ function ke(e) {
963
1028
  let t = 0, n = 0, r = 0, i, a = !0;
964
1029
  for (let o of e) {
965
- t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, M(o));
966
- let e = N(o);
1030
+ t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, N(o));
1031
+ let e = P(o);
967
1032
  e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
968
1033
  }
969
- return I({
1034
+ return L({
970
1035
  px: t,
971
1036
  grow: n,
972
1037
  minPx: r,
973
1038
  maxPx: a ? i : void 0
974
1039
  });
975
1040
  }
976
- function Oe(e) {
1041
+ function Ae(e) {
977
1042
  let t = {
978
1043
  px: 0,
979
1044
  grow: 0,
@@ -981,13 +1046,13 @@ function Oe(e) {
981
1046
  maxPx: 0
982
1047
  }, n = !0;
983
1048
  for (let r of e) {
984
- t.px += k(r.px), t.grow += k(r.grow), t.minPx += M(r);
985
- let e = N(r);
1049
+ t.px += k(r.px), t.grow += k(r.grow), t.minPx += N(r);
1050
+ let e = P(r);
986
1051
  e === void 0 ? n = !1 : t.maxPx += e;
987
1052
  }
988
- return n || delete t.maxPx, I(t);
1053
+ return n || delete t.maxPx, L(t);
989
1054
  }
990
- var E = class e {
1055
+ var T = class e {
991
1056
  constructor(e, t) {
992
1057
  this.width = e, this.height = t;
993
1058
  }
@@ -998,31 +1063,31 @@ var E = class e {
998
1063
  return this.#e(-e.width, -e.height);
999
1064
  }
1000
1065
  #e(t, n) {
1001
- return new e(F(this.width, t), F(this.height, n));
1066
+ return new e(I(this.width, t), I(this.height, n));
1002
1067
  }
1003
1068
  isGrowing() {
1004
1069
  return !!(this.width.grow || this.height.grow);
1005
1070
  }
1006
- }, D = Object.freeze({
1071
+ }, E = Object.freeze({
1007
1072
  px: 0,
1008
1073
  grow: 0
1009
- }), ke = new E(D, D);
1074
+ }), D = new T(E, E);
1010
1075
  function O(e) {
1011
1076
  return !e.px && !e.grow && !e.minPx;
1012
1077
  }
1013
- function Ae(e, t) {
1078
+ function je(e, t) {
1014
1079
  return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
1015
1080
  }
1016
1081
  function k(e) {
1017
1082
  return e || 0;
1018
1083
  }
1019
- function je(e) {
1020
- return e && (u(e.px) || u(e.grow) || u(e.minPx) || u(e.maxPx));
1021
- }
1022
1084
  function Me(e) {
1085
+ return e && (c(e.px) || c(e.grow) || c(e.minPx) || c(e.maxPx));
1086
+ }
1087
+ function A(e) {
1023
1088
  if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
1024
- if (je(e)) return A(e), I(e);
1025
- if (u(e)) return {
1089
+ if (Me(e)) return j(e), L(e);
1090
+ if (c(e)) return {
1026
1091
  px: e,
1027
1092
  grow: 0
1028
1093
  };
@@ -1034,26 +1099,26 @@ function Me(e) {
1034
1099
  }
1035
1100
  function Ne(e, t, n) {
1036
1101
  let r = !1;
1037
- for (let t of e) A(t), r ||= P(t);
1102
+ for (let t of e) j(t), r ||= F(t);
1038
1103
  if (!r) return Pe(e, t, n);
1039
1104
  let i = Array(e.length).fill(0), a = [];
1040
1105
  for (let t = 0; t < e.length; t++) O(e[t]) || a.push(t);
1041
1106
  let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
1042
1107
  for (let t of a) {
1043
1108
  let n = e[t];
1044
- k(n.grow) || (i[t] = j(k(n.px), n), c.add(t));
1109
+ k(n.grow) || (i[t] = M(k(n.px), n), c.add(t));
1045
1110
  }
1046
1111
  for (;;) {
1047
1112
  let t = 0, n = 0, r = 0;
1048
1113
  for (let o of a) c.has(o) ? r += i[o] : (t += k(e[o].px), n += k(e[o].grow));
1049
1114
  if (!n) {
1050
- for (let t of a) c.has(t) || (i[t] = j(k(e[t].px), e[t]), c.add(t));
1115
+ for (let t of a) c.has(t) || (i[t] = M(k(e[t].px), e[t]), c.add(t));
1051
1116
  break;
1052
1117
  }
1053
1118
  let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
1054
1119
  for (let t of a) {
1055
1120
  if (c.has(t)) continue;
1056
- let r = e[t], a = k(r.px) + k(r.grow) / n * o, s = j(a, r);
1121
+ let r = e[t], a = k(r.px) + k(r.grow) / n * o, s = M(a, r);
1057
1122
  i[t] = s;
1058
1123
  let f = s - a;
1059
1124
  l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
@@ -1076,36 +1141,36 @@ function Pe(e, t, n) {
1076
1141
  }
1077
1142
  return o;
1078
1143
  }
1079
- function A(e) {
1144
+ function j(e) {
1080
1145
  if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
1081
1146
  }
1082
- function j(e, t) {
1147
+ function M(e, t) {
1083
1148
  return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
1084
1149
  }
1085
- function M(e) {
1086
- return j(k(e.px), e);
1087
- }
1088
1150
  function N(e) {
1089
- return e.maxPx ?? (k(e.grow) ? void 0 : M(e));
1151
+ return M(k(e.px), e);
1090
1152
  }
1091
1153
  function P(e) {
1154
+ return e.maxPx ?? (k(e.grow) ? void 0 : N(e));
1155
+ }
1156
+ function F(e) {
1092
1157
  return e.minPx !== void 0 || e.maxPx !== void 0;
1093
1158
  }
1094
- function F(e, t) {
1095
- return I({
1159
+ function I(e, t) {
1160
+ return L({
1096
1161
  px: (e.px ?? 0) + t,
1097
1162
  grow: e.grow,
1098
1163
  minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
1099
1164
  maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
1100
1165
  });
1101
1166
  }
1102
- function I(e) {
1103
- let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = P(e);
1167
+ function L(e) {
1168
+ let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = F(e);
1104
1169
  return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx > k(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (k(t.grow) || e.maxPx < k(e.px)) && (t.maxPx = e.maxPx), t;
1105
1170
  }
1106
1171
  //#endregion
1107
1172
  //#region ../core/src/view/layout/padding.js
1108
- var L = class e {
1173
+ var R = class e {
1109
1174
  constructor(e, t, n, r) {
1110
1175
  this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
1111
1176
  }
@@ -1140,59 +1205,60 @@ var L = class e {
1140
1205
  return this.top + this.bottom;
1141
1206
  }
1142
1207
  static createFromConfig(e) {
1143
- return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : R;
1208
+ return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : z;
1144
1209
  }
1145
1210
  static createFromRecord(t) {
1146
1211
  return new e(t.top, t.right, t.bottom, t.left);
1147
1212
  }
1148
1213
  static zero() {
1149
- return R;
1214
+ return z;
1150
1215
  }
1151
1216
  static createUniformPadding(t) {
1152
1217
  return new e(t, t, t, t);
1153
1218
  }
1154
1219
  };
1155
1220
  function Fe(e, t) {
1156
- return t ? new L(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
1221
+ return t ? new R(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
1157
1222
  }
1158
- var R = L.createUniformPadding(0);
1159
- Object.freeze(R);
1223
+ var z = R.createUniformPadding(0);
1224
+ Object.freeze(z);
1160
1225
  //#endregion
1161
1226
  //#region ../core/src/utils/url.js
1162
1227
  var Ie = /^([A-Za-z]+:)?\/\//;
1163
- function z(e, t) {
1228
+ function B(e, t) {
1164
1229
  if (t && Ie.test(t)) return t;
1165
1230
  let n = typeof e == "function" ? e() : e;
1166
1231
  if (!n) return t;
1167
1232
  if (!t) return n;
1168
1233
  if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
1169
- return B(n) + t;
1234
+ return Re(n) + t;
1170
1235
  }
1171
- function Le(e, t, n = Re()) {
1236
+ function Le(e, t, n = ze()) {
1172
1237
  let r = typeof e == "function" ? e() : e;
1173
1238
  if (!t) return r;
1174
1239
  try {
1175
1240
  if (r) {
1176
1241
  let e = n ? new URL(r, n).href : new URL(r).href;
1177
1242
  return new URL(t, e).href;
1178
- } else if (n) return new URL(t, n).href;
1243
+ }
1244
+ if (n) return new URL(t, n).href;
1179
1245
  } catch {}
1180
- return z(r, t);
1246
+ return B(r, t);
1181
1247
  }
1182
- function B(e) {
1248
+ function Re(e) {
1183
1249
  let t = e.replace(/[^/]*$/, "");
1184
1250
  return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
1185
1251
  }
1186
- function Re() {
1252
+ function ze() {
1187
1253
  if (typeof document < "u" && document.baseURI) return document.baseURI;
1188
1254
  if (typeof window < "u" && window.location?.href) return window.location.href;
1189
1255
  }
1190
1256
  //#endregion
1191
1257
  //#region ../core/src/utils/addBaseUrl.js
1192
- function ze(e, t) {
1258
+ function Be(e, t) {
1193
1259
  return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
1194
1260
  }
1195
- function Be(e) {
1261
+ function Ve(e) {
1196
1262
  if (!e) return e;
1197
1263
  if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
1198
1264
  return e.endsWith("/") ? e : e + "/";
@@ -1200,42 +1266,42 @@ function Be(e) {
1200
1266
  //#endregion
1201
1267
  //#region ../core/src/config/mergeConfig.js
1202
1268
  function V(e) {
1203
- return n(e) && !Array.isArray(e);
1269
+ return l(e) && !Array.isArray(e);
1204
1270
  }
1205
- function Ve(e) {
1271
+ function He(e) {
1206
1272
  let t = {};
1207
1273
  for (let [n, r] of Object.entries(e)) t[n] = H(r);
1208
1274
  return t;
1209
1275
  }
1210
1276
  function H(e) {
1211
- return Array.isArray(e) ? e.map(H) : V(e) ? Ve(e) : e;
1277
+ return Array.isArray(e) ? e.map(H) : V(e) ? He(e) : e;
1212
1278
  }
1213
- function He(e, t) {
1279
+ function Ue(e, t) {
1214
1280
  for (let [n, r] of Object.entries(t)) {
1215
1281
  if (r === void 0) continue;
1216
1282
  let t = e[n];
1217
- V(r) && V(t) ? He(t, r) : e[n] = H(r);
1283
+ V(r) && V(t) ? Ue(t, r) : e[n] = H(r);
1218
1284
  }
1219
1285
  return e;
1220
1286
  }
1221
- function Ue(e) {
1287
+ function We(e) {
1222
1288
  let t = {};
1223
- for (let n of e) n && He(t, n);
1289
+ for (let n of e) n && Ue(t, n);
1224
1290
  return t;
1225
1291
  }
1226
1292
  //#endregion
1227
1293
  //#region ../core/src/view/viewChrome.js
1228
1294
  var U = /* @__PURE__ */ new WeakMap();
1229
- function We(e, t) {
1295
+ function Ge(e, t) {
1230
1296
  U.set(e, t);
1231
1297
  }
1232
- function Ge(e) {
1298
+ function Ke(e) {
1233
1299
  return U.get(e);
1234
1300
  }
1235
- function Ke(e) {
1301
+ function qe(e) {
1236
1302
  return U.has(e);
1237
1303
  }
1238
- function qe(e) {
1304
+ function Je(e) {
1239
1305
  let t = e;
1240
1306
  for (; t;) {
1241
1307
  let n = U.get(t);
@@ -1246,16 +1312,16 @@ function qe(e) {
1246
1312
  }
1247
1313
  //#endregion
1248
1314
  //#region ../core/src/view/postScaleParams.js
1249
- var Je = /* @__PURE__ */ new WeakMap();
1250
- function Ye(e, t) {
1251
- Je.set(e, t);
1315
+ var Ye = /* @__PURE__ */ new WeakMap();
1316
+ function Xe(e, t) {
1317
+ Ye.set(e, t);
1252
1318
  }
1253
- function Xe(e) {
1254
- return Je.get(e);
1319
+ function Ze(e) {
1320
+ return Ye.get(e);
1255
1321
  }
1256
1322
  //#endregion
1257
1323
  //#region ../core/src/data/namedDataScope.js
1258
- var Ze = class {
1324
+ var Qe = class {
1259
1325
  name;
1260
1326
  owner;
1261
1327
  getDefaultData;
@@ -1293,13 +1359,13 @@ var Ze = class {
1293
1359
  dispose() {
1294
1360
  this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
1295
1361
  }
1296
- }, Qe = class {
1362
+ }, $e = class {
1297
1363
  view;
1298
1364
  #e = /* @__PURE__ */ new Map();
1299
1365
  #t = /* @__PURE__ */ new Map();
1300
1366
  constructor(e) {
1301
1367
  this.view = e;
1302
- for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ze(t, e, () => n));
1368
+ for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Qe(t, e, () => n));
1303
1369
  }
1304
1370
  getLocalBinding(e) {
1305
1371
  return this.#e.get(e);
@@ -1313,7 +1379,7 @@ var Ze = class {
1313
1379
  let n = this.view.dataParent?.namedDataScope;
1314
1380
  if (n) return n.resolve(e);
1315
1381
  let r = this.#t.get(e);
1316
- return r || (r = new Ze(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1382
+ return r || (r = new Qe(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1317
1383
  }
1318
1384
  dispose() {
1319
1385
  for (let e of this.#e.values()) e.dispose();
@@ -1321,7 +1387,7 @@ var Ze = class {
1321
1387
  for (let e of this.#t.values()) e.dispose();
1322
1388
  this.#t.clear();
1323
1389
  }
1324
- }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, $e = class {
1390
+ }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, et = class {
1325
1391
  spec;
1326
1392
  namedDataScope;
1327
1393
  #e;
@@ -1340,27 +1406,27 @@ var Ze = class {
1340
1406
  #f = [];
1341
1407
  #p = "none";
1342
1408
  #m = /* @__PURE__ */ new Map();
1343
- facetCoords = new ne([], JSON.stringify);
1344
- constructor(e, t, n, r, i, a = {}) {
1409
+ facetCoords = new d([], JSON.stringify);
1410
+ constructor(e, t, n, r, i, o = {}) {
1345
1411
  if (!e) throw Error("View spec must be defined!");
1346
- if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Qe(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1347
- let o = r ? r.getConfigScopes() : [t.getBaseConfig()], c = e.config;
1348
- this.#e = [...o, c].filter((e) => !!e), this.resolutions = {
1412
+ if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new $e(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1413
+ let s = r ? r.getConfigScopes() : [t.getBaseConfig()], c = e.config;
1414
+ this.#e = [...s, c].filter((e) => !!e), this.resolutions = {
1349
1415
  scale: {},
1350
1416
  axis: {},
1351
1417
  legend: {}
1352
1418
  }, ie(this), this.options = {
1353
1419
  inheritEncoding: !1,
1354
1420
  layoutSizeParams: "own",
1355
- ...a
1421
+ ...o
1356
1422
  }, this.flowHandle = void 0, this.needsAxes = {
1357
1423
  x: !1,
1358
1424
  y: !1
1359
- }, this.paramRuntime = new w(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 }), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ae("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1360
- let l = [...e.params ?? [], ...Xe(e) ?? []];
1425
+ }, this.paramRuntime = new C(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { settleTemporalUpdatesImmediately: !0 }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ae("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1426
+ let l = [...e.params ?? [], ...Ze(e) ?? []];
1361
1427
  for (let e of l) {
1362
1428
  if ("expr" in e) {
1363
- let { usesScaleHelper: t, globals: n } = s(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1429
+ let { usesScaleHelper: t, globals: n } = a(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1364
1430
  if (t || r) {
1365
1431
  this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
1366
1432
  continue;
@@ -1386,18 +1452,18 @@ var Ze = class {
1386
1452
  return this.#t;
1387
1453
  }
1388
1454
  getConfig() {
1389
- return Ue(this.#e);
1455
+ return We(this.#e);
1390
1456
  }
1391
1457
  getCursorSpec() {
1392
1458
  return this.spec.cursor;
1393
1459
  }
1394
1460
  getCursor() {
1395
1461
  let e = this.getCursorSpec();
1396
- return c(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1462
+ return o(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1397
1463
  }
1398
1464
  watchCursor(e, t) {
1399
1465
  let n = this.getCursorSpec();
1400
- c(n) && this.paramRuntime.watchExpression(n.expr, e, {
1466
+ o(n) && this.paramRuntime.watchExpression(n.expr, e, {
1401
1467
  scopeOwned: !1,
1402
1468
  registerDisposer: t
1403
1469
  });
@@ -1409,53 +1475,55 @@ var Ze = class {
1409
1475
  return this.facetCoords.values().next().value;
1410
1476
  }
1411
1477
  getPadding() {
1412
- return this._cache("size/padding", () => L.createFromConfig(this.spec.padding));
1478
+ return this._cache("size/padding", () => R.createFromConfig(this.spec.padding));
1413
1479
  }
1414
1480
  getOverhang() {
1415
- return L.zero();
1481
+ return R.zero();
1416
1482
  }
1417
1483
  isScrollable() {
1418
1484
  return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
1419
1485
  }
1420
1486
  getSize() {
1421
- return this._cache("size/size", () => this.isConfiguredVisible() ? new E(this.#g("width"), this.#g("height")) : ke);
1487
+ return this._cache("size/size", () => this.isConfiguredVisible() ? new T(this.#g("width"), this.#g("height")) : D);
1422
1488
  }
1423
1489
  getViewportSize() {
1424
1490
  if (!this.isScrollable()) return this.getSize();
1425
- if (!this.isConfiguredVisible()) return ke;
1491
+ if (!this.isConfiguredVisible()) return D;
1426
1492
  let e = this.getSize();
1427
- return new E(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1493
+ return new T(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1428
1494
  }
1429
1495
  #g(e) {
1430
- let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = q(r), a = e == "viewportWidth" || e == "viewportHeight";
1431
- if (i) {
1432
- if (a) throw new y(`Cannot use step-based size with "${e}"!`, this);
1433
- let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1434
- if (i) {
1435
- let n;
1436
- if (_(i.type)) n = i.domain().length;
1437
- else if (["locus", "index"].includes(i.type)) {
1438
- let e = i.domain();
1439
- n = p(e) - e[0];
1440
- } else throw new y(`Cannot use step-based size with "${i.type}" scale!`, this);
1441
- let a = i;
1442
- n = g(n, a.paddingInner(), a.paddingOuter());
1443
- let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && _(s.type) ? "offset" : "position"), l = t;
1444
- if (c == "offset") {
1445
- if (!s || !_(s.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
1446
- let t = s, n = g(s.domain().length, t.paddingInner(), t.paddingOuter());
1447
- l *= n / (1 - a.paddingInner());
1496
+ let { value: t, implicit: r } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
1497
+ if (a) {
1498
+ if (o) throw new b(`Cannot use step-based size with "${e}"!`, this);
1499
+ let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1500
+ if (a) {
1501
+ let r;
1502
+ if (v(a.type)) r = a.domain().length;
1503
+ else if (["locus", "index"].includes(a.type)) {
1504
+ let e = a.domain();
1505
+ r = n(e) - e[0];
1506
+ } else throw new b(`Cannot use step-based size with "${a.type}" scale!`, this);
1507
+ let o = a;
1508
+ r = _(r, o.paddingInner(), o.paddingOuter());
1509
+ let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && v(c.type) ? "offset" : "position"), u = t;
1510
+ if (l == "offset") {
1511
+ if (!c || !v(c.type)) throw new b(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
1512
+ let t = c, n = _(c.domain().length, t.paddingInner(), t.paddingOuter());
1513
+ u *= n / (1 - o.paddingInner());
1448
1514
  }
1449
1515
  return {
1450
- px: n * l,
1516
+ px: r * u,
1451
1517
  grow: 0
1452
1518
  };
1453
- } else if (n) return {
1519
+ }
1520
+ if (r) return {
1454
1521
  px: t,
1455
1522
  grow: 0
1456
1523
  };
1457
- else throw new y(`Cannot use step-based size with "${e}"!`, this);
1458
- } else return (r && Me(r)) ?? (a ? void 0 : {
1524
+ throw new b(`Cannot use step-based size with "${e}"!`, this);
1525
+ }
1526
+ return (i && A(i)) ?? (o ? void 0 : {
1459
1527
  px: 0,
1460
1528
  grow: 1
1461
1529
  });
@@ -1471,17 +1539,17 @@ var Ze = class {
1471
1539
  };
1472
1540
  }
1473
1541
  #v(e) {
1474
- if (qe(this)) return;
1542
+ if (Je(this)) return;
1475
1543
  let t = this.getConfig().view;
1476
1544
  if (!t) return;
1477
1545
  let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
1478
- return r && !_(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
1546
+ return r && !v(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
1479
1547
  }
1480
1548
  resolveSizeValue(e, t) {
1481
- if (!c(t)) return t;
1549
+ if (!o(t)) return t;
1482
1550
  let n = this.#C(e)();
1483
- if (it(n) || n === "container") return n;
1484
- throw new y(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1551
+ if (at(n) || n === "container") return n;
1552
+ throw new b(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1485
1553
  }
1486
1554
  registerSizeInvalidation() {
1487
1555
  this.#y("width", "x"), this.#y("height", "y"), this.#b("width"), this.#b("height"), this.#b("viewportWidth"), this.#b("viewportHeight");
@@ -1492,27 +1560,27 @@ var Ze = class {
1492
1560
  let i = this.getScaleResolution(t);
1493
1561
  if (!i) {
1494
1562
  if (r) return;
1495
- throw new y("Cannot use 'step' size without a scale!", this);
1563
+ throw new b("Cannot use 'step' size without a scale!", this);
1496
1564
  }
1497
1565
  let a = () => {
1498
1566
  let t = this.getSize()[e];
1499
1567
  this.invalidateSizeCache();
1500
1568
  let n = this.getSize()[e];
1501
- Ae(t, n) || this.context.requestLayoutReflow();
1569
+ je(t, n) || this.context.requestLayoutReflow();
1502
1570
  };
1503
1571
  if (i.addEventListener("domain", a), this.registerDisposer(() => i.removeEventListener("domain", a)), n.for != "position") {
1504
1572
  let t = e == "width" ? "xOffset" : "yOffset", n = this.getScaleResolution(t);
1505
- n && _(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
1573
+ n && v(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
1506
1574
  }
1507
1575
  }
1508
1576
  #b(e) {
1509
1577
  let { value: t } = this.#_(e);
1510
- c(t) ? this.#S(e, t.expr) : q(t) && c(t.step) && this.#S(e + ".step", t.step.expr);
1578
+ o(t) ? this.#S(e, t.expr) : q(t) && o(t.step) && this.#S(e + ".step", t.step.expr);
1511
1579
  }
1512
1580
  #x(e, t) {
1513
- let n = c(t.step) ? this.#C(e + ".step")() : t.step;
1514
- if (it(n)) return n;
1515
- throw new y(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1581
+ let n = o(t.step) ? this.#C(e + ".step")() : t.step;
1582
+ if (at(n)) return n;
1583
+ throw new b(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1516
1584
  }
1517
1585
  #S(e, t) {
1518
1586
  if (!this.#m.has(e)) {
@@ -1524,7 +1592,7 @@ var Ze = class {
1524
1592
  }
1525
1593
  #C(e) {
1526
1594
  let t = this.#m.get(e);
1527
- if (!t) throw new y(`"${e}" ExprRef was not registered before layout!`, this);
1595
+ if (!t) throw new b(`"${e}" ExprRef was not registered before layout!`, this);
1528
1596
  return t;
1529
1597
  }
1530
1598
  isConfiguredVisible() {
@@ -1643,7 +1711,7 @@ var Ze = class {
1643
1711
  }
1644
1712
  }
1645
1713
  configureViewOpacity() {
1646
- (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = tt(this));
1714
+ (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = nt(this));
1647
1715
  }
1648
1716
  finalizeParamRuntimeInitialization() {
1649
1717
  this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
@@ -1655,8 +1723,8 @@ var Ze = class {
1655
1723
  return this.#s;
1656
1724
  }
1657
1725
  arrange(e, t, n = {}) {
1658
- if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, d(t, l(n))), this.#a || this.#o) {
1659
- let e = this.getOverhang(), n = this.layoutParent ? L.zero() : this.getPadding();
1726
+ if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
1727
+ let e = this.getOverhang(), n = this.layoutParent ? R.zero() : this.getPadding();
1660
1728
  this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
1661
1729
  }
1662
1730
  this.#c = !0, this.#T();
@@ -1677,7 +1745,7 @@ var Ze = class {
1677
1745
  }
1678
1746
  getFacetFields(e) {
1679
1747
  let t = this.getEncoding().sample;
1680
- return ee(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1748
+ return te(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1681
1749
  }
1682
1750
  usesSampleFacetRendering() {
1683
1751
  return this.layoutParent?.usesSampleFacetRendering() ?? !1;
@@ -1689,15 +1757,15 @@ var Ze = class {
1689
1757
  };
1690
1758
  }
1691
1759
  getScaleResolution(e) {
1692
- let t = m(e);
1760
+ let t = h(e);
1693
1761
  return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
1694
1762
  }
1695
1763
  getAxisResolution(e) {
1696
- let t = m(e);
1764
+ let t = h(e);
1697
1765
  return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
1698
1766
  }
1699
1767
  getLegendResolution(e) {
1700
- let t = m(e);
1768
+ let t = h(e);
1701
1769
  return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
1702
1770
  }
1703
1771
  getConfiguredResolution(e, t) {
@@ -1710,14 +1778,14 @@ var Ze = class {
1710
1778
  return "independent";
1711
1779
  }
1712
1780
  getBaseUrl() {
1713
- return z(() => this.dataParent?.getBaseUrl(), Be(this.spec.baseUrl));
1781
+ return B(() => this.dataParent?.getBaseUrl(), Ve(this.spec.baseUrl));
1714
1782
  }
1715
1783
  isPickingSupported() {
1716
1784
  return !0;
1717
1785
  }
1718
1786
  getTitleText() {
1719
1787
  let e = this.spec.title;
1720
- if (e) return o(e) ? e : c(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1788
+ if (e) return p(e) ? e : o(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1721
1789
  }
1722
1790
  _cache(e, t) {
1723
1791
  return re(this, e, t);
@@ -1725,30 +1793,27 @@ var Ze = class {
1725
1793
  _invalidateCacheByPrefix(e, t = "self") {
1726
1794
  switch (t) {
1727
1795
  case "self":
1728
- v(this, e);
1796
+ y(this, e);
1729
1797
  break;
1730
1798
  case "ancestors":
1731
- for (let t of this.getLayoutAncestors()) v(t, e);
1732
- break;
1733
- case "progeny":
1734
- this.visit((t) => v(t, e));
1799
+ for (let t of this.getLayoutAncestors()) y(t, e);
1735
1800
  break;
1736
- default:
1801
+ case "progeny": this.visit((t) => y(t, e));
1737
1802
  }
1738
1803
  }
1739
1804
  invalidateSizeCache() {
1740
- v(this, "size"), this._invalidateCacheByPrefix("size", "ancestors");
1805
+ y(this, "size"), this._invalidateCacheByPrefix("size", "ancestors");
1741
1806
  }
1742
1807
  propagateInteraction(e) {}
1743
1808
  };
1744
- function et(e) {
1809
+ function tt(e) {
1745
1810
  return "unitsPerPixel" in e;
1746
1811
  }
1747
- function tt(e) {
1812
+ function nt(e) {
1748
1813
  let t = "opacity" in e.spec ? e.spec.opacity : void 0;
1749
1814
  if (t !== void 0) {
1750
- if (u(t)) return (e) => e * t;
1751
- if (et(t)) {
1815
+ if (c(t)) return (e) => e * t;
1816
+ if (tt(t)) {
1752
1817
  let n = (t) => {
1753
1818
  let n = e.getScaleResolution(t), r = n?.getScale();
1754
1819
  if ([
@@ -1759,48 +1824,50 @@ function tt(e) {
1759
1824
  scale: r,
1760
1825
  scaleResolution: n
1761
1826
  };
1762
- }, r = rt(t.values, "opacity.values", e);
1763
- if (!a(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
1764
- let i = () => 1, o = [], s = () => {
1765
- let t = nt(rt(o.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = te().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1827
+ }, r = it(t.values, "opacity.values", e);
1828
+ if (!s(t.unitsPerPixel)) throw new b("\"opacity.unitsPerPixel\" must be an array.", e);
1829
+ let i = () => 1, a = [], c = () => {
1830
+ let t = rt(it(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = ne().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1766
1831
  i = (e) => n(e);
1767
1832
  };
1768
- o = t.unitsPerPixel.map((t) => {
1769
- if (c(t)) {
1833
+ a = t.unitsPerPixel.map((t) => {
1834
+ if (o(t)) {
1770
1835
  let n = e.paramRuntime.watchExpression(t.expr, () => {
1771
- s(), e.context.animator.requestRender();
1836
+ c(), e.context.animator.requestRender();
1772
1837
  });
1773
1838
  return () => n(null);
1774
- } else return () => t;
1775
- }), s();
1839
+ }
1840
+ return () => t;
1841
+ }), c();
1776
1842
  let l = (e) => {
1777
1843
  let t = e.scaleResolution.getAxisLength() || 1e3;
1778
- return f(e.scale.domain()) / t;
1844
+ return ee(e.scale.domain()) / t;
1779
1845
  }, u;
1780
1846
  if (t.channel === "auto") {
1781
1847
  let t = n("x"), r = n("y");
1782
1848
  if (t && r) u = () => (l(t) + l(r)) / 2;
1783
1849
  else if (t) u = () => l(t);
1784
1850
  else if (r) u = () => l(r);
1785
- else throw new y("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
1851
+ else throw new b("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
1786
1852
  } else {
1787
1853
  let r = t.channel ? n(t.channel) : n("x") ?? n("y");
1788
- if (!r) throw new y("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1854
+ if (!r) throw new b("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1789
1855
  u = () => l(r);
1790
1856
  }
1791
1857
  return (e) => i(u()) * e;
1792
- } else if (c(t)) {
1858
+ }
1859
+ if (o(t)) {
1793
1860
  let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
1794
1861
  return (e) => n(null) * e;
1795
1862
  }
1796
1863
  }
1797
1864
  return K;
1798
1865
  }
1799
- function nt(e, t, n) {
1800
- if (!e.length) throw new y("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1801
- if (e.length !== t.length) throw new y("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1866
+ function rt(e, t, n) {
1867
+ if (!e.length) throw new b("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1868
+ if (e.length !== t.length) throw new b("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1802
1869
  e.forEach((e, t) => {
1803
- if (e <= 0) throw new y("Invalid opacity.unitsPerPixel value at index " + t + ". Stop values must be positive.", n);
1870
+ if (e <= 0) throw new b("Invalid opacity.unitsPerPixel value at index " + t + ". Stop values must be positive.", n);
1804
1871
  });
1805
1872
  let r = e.map((e, n) => ({
1806
1873
  stop: e,
@@ -1808,46 +1875,46 @@ function nt(e, t, n) {
1808
1875
  }));
1809
1876
  r.sort((e, t) => t.stop - e.stop);
1810
1877
  let i = r.map((e) => e.stop), a = r.map((e) => e.value);
1811
- for (let t = 1; t < e.length; t++) if (i[t - 1] <= i[t]) throw new y("\"opacity.unitsPerPixel\" must be strictly decreasing.", n);
1878
+ for (let t = 1; t < e.length; t++) if (i[t - 1] <= i[t]) throw new b("\"opacity.unitsPerPixel\" must be strictly decreasing.", n);
1812
1879
  return {
1813
1880
  unitsPerPixel: i,
1814
1881
  values: a
1815
1882
  };
1816
1883
  }
1817
- function rt(e, t, n) {
1818
- if (!a(e)) throw new y("\"" + t + "\" must evaluate to an array.", n);
1884
+ function it(e, t, n) {
1885
+ if (!s(e)) throw new b("\"" + t + "\" must evaluate to an array.", n);
1819
1886
  return e.map((e, r) => {
1820
- if (!u(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1887
+ if (!c(e) || !Number.isFinite(e)) throw new b("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1821
1888
  return e;
1822
1889
  });
1823
1890
  }
1824
1891
  var q = (e) => !!e && typeof e == "object" && "step" in e;
1825
- function it(e) {
1892
+ function at(e) {
1826
1893
  return typeof e == "number" && Number.isFinite(e);
1827
1894
  }
1828
1895
  var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
1829
- function at(e, t) {
1830
- st(e, t, "Import");
1831
- }
1832
1896
  function ot(e, t) {
1833
- st(e, t, "View");
1897
+ ct(e, t, "Import");
1834
1898
  }
1835
- function st(e, t, n) {
1899
+ function st(e, t) {
1900
+ ct(e, t, "View");
1901
+ }
1902
+ function ct(e, t, n) {
1836
1903
  if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
1837
1904
  J.set(e, { name: t });
1838
1905
  }
1839
- function ct(e) {
1906
+ function lt(e) {
1840
1907
  return J.get(e);
1841
1908
  }
1842
- function lt(e, t = {}) {
1909
+ function ut(e, t = {}) {
1843
1910
  let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
1844
1911
  Y.set(e, n);
1845
1912
  }
1846
- function ut(e, t = {}) {
1847
- We(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1913
+ function dt(e, t = {}) {
1914
+ Ge(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1848
1915
  }
1849
- function dt(e) {
1850
- return e.getLayoutAncestors().some(Ke);
1916
+ function ft(e) {
1917
+ return e.getLayoutAncestors().some(qe);
1851
1918
  }
1852
1919
  function X(e) {
1853
1920
  let t = e.getDataAncestors(), n = [];
@@ -1857,7 +1924,7 @@ function X(e) {
1857
1924
  }
1858
1925
  return n;
1859
1926
  }
1860
- function ft(e) {
1927
+ function pt(e) {
1861
1928
  let t = e.explicitName;
1862
1929
  if (!t) throw Error("Cannot build a selector for a view without a name.");
1863
1930
  return {
@@ -1865,7 +1932,7 @@ function ft(e) {
1865
1932
  view: t
1866
1933
  };
1867
1934
  }
1868
- function pt(e, t) {
1935
+ function Z(e, t) {
1869
1936
  if (!t) throw Error("Cannot build a selector for a parameter without a name.");
1870
1937
  return {
1871
1938
  scope: X(e),
@@ -1880,7 +1947,7 @@ function mt(e) {
1880
1947
  }
1881
1948
  function ht(e, t) {
1882
1949
  e.visit((e) => {
1883
- let n = Ge(e);
1950
+ let n = Ke(e);
1884
1951
  if (n === "excludeSubtree") return W;
1885
1952
  if (n !== "exclude") return t(e);
1886
1953
  });
@@ -1895,7 +1962,7 @@ function gt(e, t) {
1895
1962
  function _t(e, t) {
1896
1963
  if (Ct(t), !jt(e, t.scope)) return;
1897
1964
  let n = [];
1898
- if (Q(e, t.scope, (e) => {
1965
+ if ($(e, t.scope, (e) => {
1899
1966
  e.explicitName === t.view && n.push(e);
1900
1967
  }, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
1901
1968
  if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
@@ -1903,8 +1970,8 @@ function _t(e, t) {
1903
1970
  function vt(e, t) {
1904
1971
  if (St(t), !jt(e, t.scope)) return;
1905
1972
  let n = [];
1906
- if (Q(e, t.scope, (e) => {
1907
- for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
1973
+ if ($(e, t.scope, (e) => {
1974
+ for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
1908
1975
  view: e,
1909
1976
  param: i
1910
1977
  });
@@ -1915,10 +1982,10 @@ function yt(e, t) {
1915
1982
  e.visit((e) => {
1916
1983
  let n = Y.get(e);
1917
1984
  if (n === "excludeSubtree") return W;
1918
- if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
1985
+ if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
1919
1986
  view: e,
1920
1987
  param: r,
1921
- selector: pt(e, n)
1988
+ selector: Z(e, n)
1922
1989
  });
1923
1990
  });
1924
1991
  }
@@ -1942,7 +2009,7 @@ function Ct(e) {
1942
2009
  if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
1943
2010
  if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
1944
2011
  }
1945
- function Z(t) {
2012
+ function Q(t) {
1946
2013
  return t.persist === !1 ? !1 : i(t) ? !0 : e(t) ? !!t.bind : !1;
1947
2014
  }
1948
2015
  function wt(e) {
@@ -1960,9 +2027,9 @@ function Et(e) {
1960
2027
  }
1961
2028
  function Dt(e, t, n) {
1962
2029
  let r = /* @__PURE__ */ new Map();
1963
- Q(e, t, (e) => {
2030
+ $(e, t, (e) => {
1964
2031
  for (let [t, n] of e.paramRuntime.paramConfigs) {
1965
- if (!Z(n)) continue;
2032
+ if (!Q(n)) continue;
1966
2033
  let i = r.get(t);
1967
2034
  i ? i.push(e) : r.set(t, [e]);
1968
2035
  }
@@ -1984,7 +2051,7 @@ function Ot(e, t, n) {
1984
2051
  let a = /* @__PURE__ */ new Map();
1985
2052
  for (let e of i) {
1986
2053
  let t = J.get(e), n = t ? t.name : void 0;
1987
- typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
2054
+ typeof n == "string" && n.length && a.set(n, (a.get(n) ?? 0) + 1);
1988
2055
  }
1989
2056
  for (let [e, r] of a) r > 1 && n.push({
1990
2057
  message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
@@ -1993,10 +2060,10 @@ function Ot(e, t, n) {
1993
2060
  }
1994
2061
  function kt(e, t) {
1995
2062
  let n = [];
1996
- return Q(e, t, (e) => {
2063
+ return $(e, t, (e) => {
1997
2064
  if (X(e).length !== t.length + 1) return;
1998
2065
  let r = J.get(e);
1999
- !r || typeof r.name != "string" || n.push(e);
2066
+ r && typeof r.name == "string" && n.push(e);
2000
2067
  }, { includeNamedImportRoots: !0 }), n;
2001
2068
  }
2002
2069
  function At(e) {
@@ -2005,7 +2072,7 @@ function At(e) {
2005
2072
  let n = Y.get(e);
2006
2073
  if (n === "excludeSubtree") return W;
2007
2074
  if (n !== "exclude") {
2008
- for (let n of e.paramRuntime.paramConfigs.values()) if (Z(n)) return t = !0, G;
2075
+ for (let n of e.paramRuntime.paramConfigs.values()) if (Q(n)) return t = !0, G;
2009
2076
  }
2010
2077
  }), t;
2011
2078
  }
@@ -2014,9 +2081,9 @@ function jt(e, t) {
2014
2081
  for (let i of t) {
2015
2082
  if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
2016
2083
  let t, a = !1;
2017
- if (Q(e, r, (e) => {
2084
+ if ($(e, r, (e) => {
2018
2085
  let n = J.get(e);
2019
- if (!(!n || n.name !== i) && X(e).length === r.length + 1) {
2086
+ if (n && n.name === i && X(e).length === r.length + 1) {
2020
2087
  if (t) return a = !0, G;
2021
2088
  t = e;
2022
2089
  }
@@ -2026,7 +2093,7 @@ function jt(e, t) {
2026
2093
  }
2027
2094
  return n;
2028
2095
  }
2029
- function Q(e, t, n, r = {}) {
2096
+ function $(e, t, n, r = {}) {
2030
2097
  let i = r.includeNamedImportRoots ?? !1;
2031
2098
  e.visit((e) => {
2032
2099
  let r = J.get(e), a = Y.get(e);
@@ -2036,15 +2103,15 @@ function Q(e, t, n, r = {}) {
2036
2103
  }
2037
2104
  function Mt(e, t, n, r) {
2038
2105
  let i = X(e);
2039
- return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : $(t, i);
2106
+ return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Pt(t, i);
2040
2107
  }
2041
2108
  function Nt(e, t) {
2042
- return e.length === t.length && $(e, t);
2109
+ return e.length === t.length && Pt(e, t);
2043
2110
  }
2044
- function $(e, t) {
2111
+ function Pt(e, t) {
2045
2112
  if (e.length > t.length) return !1;
2046
2113
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
2047
2114
  return !0;
2048
2115
  }
2049
2116
  //#endregion
2050
- export { E as A, w as B, Ue as C, Le as D, B as E, M as F, b as G, C as H, we as I, Me as L, De as M, Te as N, L as O, N as P, Oe as R, qe as S, z as T, ve as U, be as V, ye as W, W as _, ft as a, Ye as b, ut as c, ot as d, vt as f, ht as g, gt as h, X as i, D as j, Fe as k, lt as l, xt as m, ct as n, dt as o, _t as p, pt as r, mt as s, bt as t, at as u, G as v, ze as w, Ke as x, $e as y, Ee as z };
2117
+ export { T as A, C as B, We as C, Le as D, Re as E, N as F, x as G, Se as H, Ee as I, A as L, ke as M, De as N, R as O, P, Ae as R, Je as S, B as T, ye as U, xe as V, be as W, W as _, pt as a, Xe as b, dt as c, st as d, vt as f, ht as g, gt as h, X as i, E as j, Fe as k, ut as l, xt as m, lt as n, ft as o, _t as p, Z as r, mt as s, bt as t, ot as u, G as v, Be as w, qe as x, et as y, Oe as z };