@genome-spy/app 1.1.1 → 1.2.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 (45) hide show
  1. package/dist/{agentApi-sPuuT0KS.js → agentApi-8hMSlqAQ.js} +8307 -6861
  2. package/dist/agentApi.es.js +5569 -4250
  3. package/dist/agentShared.es.js +9 -9
  4. package/dist/{canvas2d-iDK4BC5j.js → canvas2d-Bd8H8MMo.js} +149 -134
  5. package/dist/{canvas2d-MXaFeZnP.js → canvas2d-D6VYooRf.js} +136 -122
  6. package/dist/{clipOptions-Cba4I0AO.js → clipOptions-DElJ8dTZ.js} +2274 -2080
  7. package/dist/{clipOptions-B5PibDq3.js → clipOptions-D_wBNhzs.js} +2121 -1957
  8. package/dist/{viewIdentityRegistry-BDKkEjXl.js → containerView-CRJSc4bM.js} +24 -31
  9. package/dist/{viewIdentityRegistry-BIYd4TE0.js → containerView-aEVmYmkA.js} +24 -31
  10. package/dist/{debug-DbigmdrK.js → debug-CQ0agCrd.js} +9 -9
  11. package/dist/{debug-BlqDxTw3.js → debug-DkIMiGdW.js} +10 -10
  12. package/dist/index.es.js +3582 -3566
  13. package/dist/index.js +698 -454
  14. package/dist/{indexer-En7gpvLN.js → indexer-DDC0YRGn.js} +1 -1
  15. package/dist/{indexer-DbFTKGlm.js → indexer-DOYMJ-Md.js} +1 -1
  16. package/dist/markUtils-CvLDz744.js +75 -0
  17. package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
  18. package/dist/{order-B4uR9Q04.js → order-BVvkjDRT.js} +369 -316
  19. package/dist/{order-BSPy5DI8.js → order-DmMoZsi1.js} +360 -308
  20. package/dist/{rasterExport-DQH3hVg_.js → rasterExport-DxvowWjH.js} +3 -3
  21. package/dist/{rasterExport-B62RmAK1.js → rasterExport-jeRVq6kY.js} +4 -4
  22. package/dist/{rasterization-B05bDo5e.js → rasterization-DFj3Cvx4.js} +26 -19
  23. package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
  24. package/dist/rectangle-Dl4Dy0hS.js +191 -0
  25. package/dist/{renderCanvas2D-Bdv-B4wj.js → renderCanvas2D-Bfm1NHFu.js} +96 -91
  26. package/dist/{renderCanvas2D-ChdoHGrU.js → renderCanvas2D-DVjhp834.js} +98 -93
  27. package/dist/{scalePosition-ByvlXaML.js → scalePosition-0aeqp_kz.js} +8 -1
  28. package/dist/schema.json +27198 -13709
  29. package/dist/style.css +1 -1
  30. package/dist/{svg-N3tj05-e.js → svg-Bm2zxBPu.js} +315 -316
  31. package/dist/{svg-DHsq1RpV.js → svg-CkfuhONt.js} +290 -291
  32. package/dist/{svgRasterizer-CYVDlt5z.js → svgRasterizer-DoRQEqFA.js} +2 -2
  33. package/dist/{svgRasterizer-CvCBlxLj.js → svgRasterizer-raDDhBF-.js} +3 -3
  34. package/dist/{vega-scale-Byaw1K8O.js → vega-scale-BoGHANI7.js} +90 -90
  35. package/dist/{vega-scale-Ctz_wa3z.js → vega-scale-o9TRyzYH.js} +699 -699
  36. package/dist/viewError-BkJeVYXA.js +33 -0
  37. package/dist/viewError-IYqyluc7.js +33 -0
  38. package/dist/{viewSelectors-DDLW-byr.js → viewSelectors-7LyasQN-.js} +498 -434
  39. package/dist/{viewSelectors-j-F9XwsE.js → viewSelectors-CbmkSQRT.js} +549 -485
  40. package/dist/{viewUtils-JX6CMEYH.js → viewUtils-DuddMNNw.js} +2138 -2009
  41. package/dist/{webgl-Dw8xqZpX.js → webgl-CQfvgnxo.js} +1229 -1140
  42. package/dist/{webgl-DdmOwEH0.js → webgl-DVYkXtiZ.js} +1477 -1389
  43. package/package.json +4 -4
  44. package/src/spec/view.d.ts +44 -5
  45. package/dist/viewError-BiR9VCgL.js +0 -29
@@ -1,83 +1,87 @@
1
- import { $t as e, Ot as t, St as n, Tt as r, V as i, an as a, b as o, cn as s, ft as c, gn as l, k as u, ln as d, o as f, pt as p, t as m, u as ee, un as te, wt as ne, xt as h } from "./clipOptions-Cba4I0AO.js";
2
- import { a as g, n as re, r as ie, t as _ } from "./viewError-BiR9VCgL.js";
3
- import { H as ae, m as oe, y as v } from "./vega-scale-Byaw1K8O.js";
4
- import { t as se } from "./warning-CpIIpk8e.js";
1
+ import { At as e, B as t, Bt as n, Dt as r, It as i, Lt as a, Nt as o, O as s, On as c, Pt as l, Sn as u, _n as d, bn as f, dn as p, ft as m, l as ee, o as te, pt as ne, t as re, xn as ie, y as h } from "./clipOptions-D_wBNhzs.js";
2
+ import { a as g, n as ae, r as oe, t as _ } from "./viewError-IYqyluc7.js";
3
+ import { H as se, m as v, y } from "./vega-scale-BoGHANI7.js";
4
+ import { t as ce } from "./warning-CpIIpk8e.js";
5
5
  //#region ../core/src/view/layout/flexLayout.js
6
- function ce(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
7
- n ||= 0, i ||= 0;
8
- let o = ge(e, t, n), s = 0, c = 0;
9
- for (let t = 0; t < e.length; t++) s += o[t], S(e[t]) || c++;
10
- let l = s + Math.max(0, c - 1) * n, u = r === void 0 ? (e) => e : (e) => Math.round(e * r) / r, d = 0, f = [], p = (e) => {
6
+ function le(e, t, n = {}) {
7
+ let { sizes: r } = ve(e, t, n.spacing || 0);
8
+ return b(e, r, t, n);
9
+ }
10
+ function b(e, t, n, { spacing: r, devicePixelRatio: i, offset: a, reverse: o } = {}) {
11
+ r ||= 0, a ||= 0;
12
+ let s = 0, c = 0;
13
+ for (let n = 0; n < e.length; n++) s += t[n], C(e[n]) || c++;
14
+ let l = s + Math.max(0, c - 1) * r, u = i === void 0 ? (e) => e : (e) => Math.round(e * i) / i, d = 0, f = [], p = (e) => {
11
15
  let t = d;
12
16
  if (!t) return;
13
- let r = (e ? n : 0) * (a ? -1 : 1);
14
- m -= r;
17
+ let n = (e ? r : 0) * (o ? -1 : 1);
18
+ m -= n;
15
19
  for (let e = 0; e < t; e++) f.push({
16
- location: m + (e + 1) / (t + 1) * r,
20
+ location: m + (e + 1) / (t + 1) * n,
17
21
  size: 0
18
22
  });
19
- m += r, d = 0;
20
- }, m = a ? Math.max(t, l) : 0 + i;
21
- if (e.length == 1 && S(e[0])) return [{
23
+ m += n, d = 0;
24
+ }, m = o ? Math.max(n, l) : 0 + a;
25
+ if (e.length == 1 && C(e[0])) return [{
22
26
  location: m,
23
27
  size: 0
24
28
  }];
25
- for (let t = 0; t < e.length; t++) {
26
- let r = e[t];
27
- if (S(r)) d++;
29
+ for (let n = 0; n < e.length; n++) {
30
+ let i = e[n];
31
+ if (C(i)) d++;
28
32
  else {
29
33
  p(f.length > 0);
30
- let e = o[t];
31
- a && (m -= e), f.push({
34
+ let e = t[n];
35
+ o && (m -= e), f.push({
32
36
  location: u(m),
33
37
  size: u(e)
34
- }), a ? m -= n : m += e + n;
38
+ }), o ? m -= r : m += e + r;
35
39
  }
36
40
  }
37
- return m += a ? n : -n, p(!1), f;
41
+ return m += o ? r : -r, p(!1), f;
38
42
  }
39
- function le(e, { spacing: t } = { spacing: 0 }) {
43
+ function ue(e, { spacing: t } = { spacing: 0 }) {
40
44
  let n = 0;
41
- for (let r of e) n += E(r) + (S(r) ? 0 : t);
45
+ for (let r of e) n += E(r) + (C(r) ? 0 : t);
42
46
  return Math.max(0, n - t);
43
47
  }
44
- function ue(e, t, { spacing: n = 0 } = {}) {
48
+ function de(e, t, { spacing: n = 0 } = {}) {
45
49
  let r = [], i = [], a = 0, o = 0;
46
50
  for (let [s, c] of e.entries()) {
47
- let e = E(c), l = !S(c), u = o && l ? n : 0;
51
+ let e = E(c), l = !C(c), u = o && l ? n : 0;
48
52
  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;
49
53
  }
50
54
  return i.length && r.push(i), r;
51
55
  }
52
- function de(e) {
56
+ function fe(e) {
53
57
  let t = 0, n = 0, r = 0, i, a = !0;
54
58
  for (let o of e) {
55
59
  t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, E(o));
56
60
  let e = D(o);
57
61
  e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
58
62
  }
59
- return O({
63
+ return A({
60
64
  px: t,
61
65
  grow: n,
62
66
  minPx: r,
63
67
  maxPx: a ? i : void 0
64
68
  });
65
69
  }
66
- function fe(e) {
67
- let t = {
68
- px: 0,
69
- grow: 0,
70
- minPx: 0,
71
- maxPx: 0
72
- }, n = !0;
73
- for (let r of e) {
74
- t.px += C(r.px), t.grow += C(r.grow), t.minPx += E(r);
75
- let e = D(r);
76
- e === void 0 ? n = !1 : t.maxPx += e;
77
- }
78
- return n || delete t.maxPx, O(t);
79
- }
80
- var y = class e {
70
+ function pe(e, t = 0, n = 0) {
71
+ let r = Math.max(0, e.length - 1) * t, i = {
72
+ px: r,
73
+ grow: e.length ? 0 : n,
74
+ minPx: r,
75
+ maxPx: r
76
+ }, a = e.length > 0;
77
+ for (let t of e) {
78
+ i.px += w(t.px), i.grow += w(t.grow), i.minPx += E(t);
79
+ let e = D(t);
80
+ e === void 0 ? a = !1 : i.maxPx += e;
81
+ }
82
+ return a || delete i.maxPx, A(i);
83
+ }
84
+ var x = class e {
81
85
  constructor(e, t) {
82
86
  this.width = e, this.height = t;
83
87
  }
@@ -88,31 +92,31 @@ var y = class e {
88
92
  return this.#e(-e.width, -e.height);
89
93
  }
90
94
  #e(t, n) {
91
- return new e(ye(this.width, t), ye(this.height, n));
95
+ return new e(k(this.width, t), k(this.height, n));
92
96
  }
93
97
  isGrowing() {
94
98
  return !!(this.width.grow || this.height.grow);
95
99
  }
96
- }, b = Object.freeze({
100
+ }, me = Object.freeze({
97
101
  px: 0,
98
102
  grow: 0
99
- }), x = new y(b, b);
100
- function S(e) {
103
+ }), S = new x(me, me);
104
+ function C(e) {
101
105
  return !e.px && !e.grow && !e.minPx;
102
106
  }
103
- function pe(e, t) {
107
+ function he(e, t) {
104
108
  return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
105
109
  }
106
- function C(e) {
110
+ function w(e) {
107
111
  return e || 0;
108
112
  }
109
- function me(e) {
110
- return e && (s(e.px) || s(e.grow) || s(e.minPx) || s(e.maxPx));
113
+ function ge(e) {
114
+ return e && (f(e.px) || f(e.grow) || f(e.minPx) || f(e.maxPx));
111
115
  }
112
- function he(e) {
113
- if (J(e)) throw Error("parseSizeDef does not accept step-based sizes.");
114
- if (me(e)) return w(e), O(e);
115
- if (s(e)) return {
116
+ function _e(e) {
117
+ if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
118
+ if (ge(e)) return be(e), A(e);
119
+ if (f(e)) return {
116
120
  px: e,
117
121
  grow: 0
118
122
  };
@@ -122,80 +126,89 @@ function he(e) {
122
126
  };
123
127
  throw Error(`Invalid sizeDef: ${e}`);
124
128
  }
125
- function ge(e, t, n) {
129
+ function ve(e, t, n = 0) {
126
130
  let r = !1;
127
- for (let t of e) w(t), r ||= ve(t);
128
- if (!r) return _e(e, t, n);
131
+ for (let t of e) be(t), r ||= O(t);
132
+ if (!r) return ye(e, t, n);
129
133
  let i = Array(e.length).fill(0), a = [];
130
- for (let t = 0; t < e.length; t++) S(e[t]) || a.push(t);
134
+ for (let t = 0; t < e.length; t++) C(e[t]) || a.push(t);
131
135
  let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
132
136
  for (let t of a) {
133
137
  let n = e[t];
134
- C(n.grow) || (i[t] = T(C(n.px), n), c.add(t));
138
+ w(n.grow) || (i[t] = T(w(n.px), n), c.add(t));
135
139
  }
140
+ let l = 0;
136
141
  for (;;) {
137
142
  let t = 0, n = 0, r = 0;
138
- for (let o of a) c.has(o) ? r += i[o] : (t += C(e[o].px), n += C(e[o].grow));
143
+ for (let o of a) c.has(o) ? r += i[o] : (t += w(e[o].px), n += w(e[o].grow));
139
144
  if (!n) {
140
- for (let t of a) c.has(t) || (i[t] = T(C(e[t].px), e[t]), c.add(t));
145
+ for (let t of a) c.has(t) || (i[t] = T(w(e[t].px), e[t]), c.add(t));
141
146
  break;
142
147
  }
143
- let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
148
+ let o = Math.max(0, s - r - t);
149
+ l = o / n;
150
+ let u = 0, d = [], f = [];
144
151
  for (let t of a) {
145
152
  if (c.has(t)) continue;
146
- let r = e[t], a = C(r.px) + C(r.grow) / n * o, s = T(a, r);
153
+ let r = e[t], a = w(r.px) + w(r.grow) / n * o, s = T(a, r);
147
154
  i[t] = s;
148
- let f = s - a;
149
- l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
155
+ let l = s - a;
156
+ u += l, l > 0 ? d.push(t) : l < 0 && f.push(t);
150
157
  }
151
- if (!u.length && !d.length) break;
152
- if (l > 0) for (let e of u) c.add(e);
153
- else if (l < 0) for (let e of d) c.add(e);
158
+ if (!d.length && !f.length) break;
159
+ if (u > 0) for (let e of d) c.add(e);
160
+ else if (u < 0) for (let e of f) c.add(e);
154
161
  else for (let e of a) c.add(e);
155
162
  }
156
- return i;
163
+ return {
164
+ sizes: i,
165
+ growth: l
166
+ };
157
167
  }
158
- function _e(e, t, n) {
168
+ function ye(e, t, n) {
159
169
  let r = 0, i = 0;
160
- for (let t of e) r += C(t.px) + (S(t) ? 0 : n), i += C(t.grow);
170
+ for (let t of e) r += w(t.px) + (C(t) ? 0 : n), i += w(t.grow);
161
171
  r -= n;
162
172
  let a = Math.max(0, t - r), o = Array(e.length);
163
173
  for (let t = 0; t < e.length; t++) {
164
174
  let n = e[t];
165
- o[t] = S(n) ? 0 : C(n.px) + (i ? C(n.grow) / i * a : 0);
175
+ o[t] = C(n) ? 0 : w(n.px) + (i ? w(n.grow) / i * a : 0);
166
176
  }
167
- return o;
177
+ return {
178
+ sizes: o,
179
+ growth: i ? a / i : 0
180
+ };
168
181
  }
169
- function w(e) {
182
+ function be(e) {
170
183
  if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
171
184
  }
172
185
  function T(e, t) {
173
186
  return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
174
187
  }
175
188
  function E(e) {
176
- return T(C(e.px), e);
189
+ return T(w(e.px), e);
177
190
  }
178
191
  function D(e) {
179
- return e.maxPx ?? (C(e.grow) ? void 0 : E(e));
192
+ return e.maxPx ?? (w(e.grow) ? void 0 : E(e));
180
193
  }
181
- function ve(e) {
194
+ function O(e) {
182
195
  return e.minPx !== void 0 || e.maxPx !== void 0;
183
196
  }
184
- function ye(e, t) {
185
- return O({
197
+ function k(e, t) {
198
+ return A({
186
199
  px: (e.px ?? 0) + t,
187
200
  grow: e.grow,
188
201
  minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
189
202
  maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
190
203
  });
191
204
  }
192
- function O(e) {
193
- let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = ve(e);
194
- 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 > C(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (C(t.grow) || e.maxPx < C(e.px)) && (t.maxPx = e.maxPx), t;
205
+ function A(e) {
206
+ let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = O(e);
207
+ 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 > w(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (w(t.grow) || e.maxPx < w(e.px)) && (t.maxPx = e.maxPx), t;
195
208
  }
196
209
  //#endregion
197
210
  //#region ../core/src/view/layout/padding.js
198
- var k = class e {
211
+ var j = class e {
199
212
  constructor(e, t, n, r) {
200
213
  this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
201
214
  }
@@ -230,35 +243,35 @@ var k = class e {
230
243
  return this.top + this.bottom;
231
244
  }
232
245
  static createFromConfig(e) {
233
- return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : A;
246
+ return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : M;
234
247
  }
235
248
  static createFromRecord(t) {
236
249
  return new e(t.top, t.right, t.bottom, t.left);
237
250
  }
238
251
  static zero() {
239
- return A;
252
+ return M;
240
253
  }
241
254
  static createUniformPadding(t) {
242
255
  return new e(t, t, t, t);
243
256
  }
244
257
  };
245
- function be(e, t) {
246
- return t ? new k(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;
258
+ function xe(e, t, n = j.zero()) {
259
+ return t ? new j(t.top === !1 ? n.top : e.top, t.right === !1 ? n.right : e.right, t.bottom === !1 ? n.bottom : e.bottom, t.left === !1 ? n.left : e.left) : e;
247
260
  }
248
- var A = k.createUniformPadding(0);
249
- Object.freeze(A);
261
+ var M = j.createUniformPadding(0);
262
+ Object.freeze(M);
250
263
  //#endregion
251
264
  //#region ../core/src/utils/url.js
252
- var xe = /^([A-Za-z]+:)?\/\//;
253
- function j(e, t) {
254
- if (t && xe.test(t)) return t;
265
+ var Se = /^([A-Za-z]+:)?\/\//;
266
+ function N(e, t) {
267
+ if (t && Se.test(t)) return t;
255
268
  let n = typeof e == "function" ? e() : e;
256
269
  if (!n) return t;
257
270
  if (!t) return n;
258
271
  if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
259
- return M(n) + t;
272
+ return P(n) + t;
260
273
  }
261
- function Se(e, t, n = Ce()) {
274
+ function Ce(e, t, n = we()) {
262
275
  let r = typeof e == "function" ? e() : e;
263
276
  if (!t) return r;
264
277
  try {
@@ -268,19 +281,19 @@ function Se(e, t, n = Ce()) {
268
281
  }
269
282
  if (n) return new URL(t, n).href;
270
283
  } catch {}
271
- return j(r, t);
284
+ return N(r, t);
272
285
  }
273
- function M(e) {
286
+ function P(e) {
274
287
  let t = e.replace(/[^/]*$/, "");
275
288
  return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
276
289
  }
277
- function Ce() {
290
+ function we() {
278
291
  if (typeof document < "u" && document.baseURI) return document.baseURI;
279
292
  if (typeof window < "u" && window.location?.href) return window.location.href;
280
293
  }
281
294
  //#endregion
282
295
  //#region ../../node_modules/flatqueue/index.js
283
- var N = class {
296
+ var F = class {
284
297
  constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
285
298
  let r = e !== Infinity;
286
299
  this.ids = r ? new n(e) : [], this.values = r ? new t(e) : [], this.capacity = e, this.length = 0;
@@ -321,11 +334,11 @@ var N = class {
321
334
  shrink() {
322
335
  Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
323
336
  }
324
- }, P = Symbol("runtimeNode"), F = 1e6;
325
- function we(e) {
337
+ }, I = Symbol("runtimeNode"), L = 1e6;
338
+ function Te(e) {
326
339
  return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
327
340
  }
328
- function I(e, t, n = !0) {
341
+ function R(e, t, n = !0) {
329
342
  let r = {
330
343
  id: e.id,
331
344
  name: e.name,
@@ -340,7 +353,7 @@ function I(e, t, n = !0) {
340
353
  };
341
354
  }
342
355
  };
343
- return Object.defineProperty(r, P, {
356
+ return Object.defineProperty(r, I, {
344
357
  enumerable: !1,
345
358
  configurable: !1,
346
359
  writable: !1,
@@ -349,18 +362,18 @@ function I(e, t, n = !0) {
349
362
  t(e);
350
363
  } }) : r;
351
364
  }
352
- function Te(e) {
353
- let t = e[P];
365
+ function Ee(e) {
366
+ let t = e[I];
354
367
  if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
355
368
  return t;
356
369
  }
357
- function Ee(e) {
358
- return typeof e.rank == "number" ? e.rank : Te(e).rank;
359
- }
360
370
  function De(e) {
371
+ return typeof e.rank == "number" ? e.rank : Ee(e).rank;
372
+ }
373
+ function Oe(e) {
361
374
  for (let t of e) t();
362
375
  }
363
- var Oe = class {
376
+ var ke = class {
364
377
  #e = 1;
365
378
  #t = 1;
366
379
  #n = 0;
@@ -374,13 +387,13 @@ var Oe = class {
374
387
  #u = /* @__PURE__ */ new Map();
375
388
  #d = /* @__PURE__ */ new Set();
376
389
  #f = /* @__PURE__ */ new Set();
377
- #p = new N();
378
- #m = new N();
390
+ #p = new F();
391
+ #m = new F();
379
392
  #h = /* @__PURE__ */ new Set();
380
393
  #g;
381
394
  #_;
382
395
  constructor(e = {}) {
383
- this.#g = we(e.lifecycleRegistry), this.#_ = e.onError;
396
+ this.#g = Te(e.lifecycleRegistry), this.#_ = e.onError;
384
397
  }
385
398
  createWritable(e, t, n, r, i = {}) {
386
399
  let a = "n" + this.#e++, o = i.notify ?? !0, s = {
@@ -402,7 +415,7 @@ var Oe = class {
402
415
  }, l = () => {
403
416
  s.disposed = !0, s.listeners.clear(), u();
404
417
  }, u = this.#g(e, l);
405
- return Object.assign(I(s, c, o), { dispose: l });
418
+ return Object.assign(R(s, c, o), { dispose: l });
406
419
  }
407
420
  computed(e, t, n, r, i = {}) {
408
421
  return this.#v(e, t, n, r, i);
@@ -437,12 +450,12 @@ var Oe = class {
437
450
  })), l = c(), u = () => {
438
451
  s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
439
452
  }, d = this.#g(e, u);
440
- return Object.assign(I(s), {
453
+ return Object.assign(R(s), {
441
454
  dispose: u,
442
455
  rebind: (e, n) => {
443
456
  if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
444
457
  let r = /* @__PURE__ */ new Set(), i = (e) => {
445
- let n = e[P];
458
+ let n = e[I];
446
459
  if (n === s) throw Error("Reactive dependency cycle: " + t);
447
460
  if (!r.has(n)) {
448
461
  r.add(n);
@@ -543,7 +556,7 @@ var Oe = class {
543
556
  #y(e) {
544
557
  this.#s++;
545
558
  try {
546
- De(e);
559
+ Oe(e);
547
560
  } catch (e) {
548
561
  throw this.#c = !1, !this.#o && this.#s === 1 && this.#b(e), e;
549
562
  } finally {
@@ -587,7 +600,7 @@ var Oe = class {
587
600
  }
588
601
  #S(e) {
589
602
  let t = -1, n = 0;
590
- return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, Ee(t)), 0), t = this.#n), n);
603
+ return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, De(t)), 0), t = this.#n), n);
591
604
  }
592
605
  #C(e) {
593
606
  if (this.#d.has(e)) {
@@ -604,8 +617,8 @@ var Oe = class {
604
617
  this.#f.add(e), this.#m.push(e, this.#T(e.rank)), this.#E();
605
618
  }
606
619
  #T(e) {
607
- let t = this.#t % F;
608
- return this.#t += 1, e * F + t;
620
+ let t = this.#t % L;
621
+ return this.#t += 1, e * L + t;
609
622
  }
610
623
  #E() {
611
624
  this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
@@ -621,7 +634,7 @@ var Oe = class {
621
634
  this.#h.clear();
622
635
  }
623
636
  }
624
- }, ke = class {
637
+ }, Ae = class {
625
638
  #e = 1;
626
639
  #t = /* @__PURE__ */ new Map();
627
640
  createOwner(e, t) {
@@ -642,7 +655,7 @@ var Oe = class {
642
655
  t.clear(), this.#t.delete(e);
643
656
  }
644
657
  }
645
- }, Ae = class {
658
+ }, je = class {
646
659
  #e = 1;
647
660
  #t = /* @__PURE__ */ new Map();
648
661
  createRootScope(e) {
@@ -673,41 +686,41 @@ var Oe = class {
673
686
  if (!t) throw Error("Unknown scope: " + e);
674
687
  t.params.clear(), t.initializers.clear();
675
688
  }
676
- registerInitializer(e, n, r) {
677
- t(n);
689
+ registerInitializer(e, t, r) {
690
+ n(t);
678
691
  let i = this.#t.get(e);
679
692
  if (!i) throw Error("Unknown scope: " + e);
680
- if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
681
- i.initializers.set(n, {
693
+ if (i.params.has(t) || i.initializers.has(t)) throw Error(`Parameter "${t}" already exists in scope ${e}`);
694
+ i.initializers.set(t, {
682
695
  initialize: r,
683
696
  initializing: !1
684
697
  });
685
698
  }
686
- register(e, n, r) {
687
- t(n);
699
+ register(e, t, r) {
700
+ n(t);
688
701
  let i = this.#t.get(e);
689
702
  if (!i) throw Error("Unknown scope: " + e);
690
- if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
691
- return i.params.set(n, r), r;
703
+ if (i.params.has(t) || i.initializers.get(t)?.initializing === !1) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
704
+ return i.params.set(t, r), r;
692
705
  }
693
- resolve(e, n) {
694
- t(n);
706
+ resolve(e, t) {
707
+ n(t);
695
708
  let r = e;
696
709
  for (; r;) {
697
710
  let e = this.#t.get(r);
698
711
  if (!e) throw Error("Unknown scope: " + r);
699
- let t = e.initializers.get(n);
700
- if (t) {
701
- if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
702
- t.initializing = !0;
712
+ let n = e.initializers.get(t);
713
+ if (n) {
714
+ if (n.initializing) throw Error(`Parameter dependency cycle while initializing "${t}" in ${r}.`);
715
+ n.initializing = !0;
703
716
  try {
704
- if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
705
- e.initializers.delete(n);
717
+ if (n.initialize(), !e.params.has(t)) throw Error(`Initializer did not register parameter "${t}".`);
718
+ e.initializers.delete(t);
706
719
  } finally {
707
- t.initializing = !1;
720
+ n.initializing = !1;
708
721
  }
709
722
  }
710
- let i = e.params.get(n);
723
+ let i = e.params.get(t);
711
724
  if (i) return i;
712
725
  r = e.parentScope;
713
726
  }
@@ -715,60 +728,64 @@ var Oe = class {
715
728
  };
716
729
  //#endregion
717
730
  //#region ../core/src/paramRuntime/expressionCompiler.js
718
- function je(e, t = {}, n = {}) {
719
- return p(e, t, n);
731
+ function Me(e, t = {}, n = {}) {
732
+ return ne(e, t, n);
720
733
  }
721
734
  //#endregion
722
735
  //#region ../core/src/paramRuntime/expressionRef.js
723
- function Me(e, t, n = {}) {
724
- let r = {}, i = je(e, r, n), a = /* @__PURE__ */ new Map();
725
- for (let n of i.globals) {
726
- if (a.has(n)) continue;
727
- let i = t(n);
728
- if (!i) throw Error("Unknown variable \"" + n + "\" in expression: " + e);
729
- a.set(n, i), Object.defineProperty(r, n, {
730
- enumerable: !0,
731
- get() {
732
- return i.get();
733
- }
734
- });
736
+ function z(t, n, r = {}) {
737
+ let i = {}, a = Me(t, i, r), o = /* @__PURE__ */ new Map();
738
+ try {
739
+ for (let e of a.globals) {
740
+ if (o.has(e)) continue;
741
+ let r = n(e);
742
+ if (!r) throw Error("Unknown variable \"" + e + "\" in expression: " + t);
743
+ o.set(e, r), Object.defineProperty(i, e, {
744
+ enumerable: !0,
745
+ get() {
746
+ return r.get();
747
+ }
748
+ });
749
+ }
750
+ } catch (t) {
751
+ throw e(t, r.specLocation);
735
752
  }
736
- let o = /* @__PURE__ */ new Set();
737
- return i.subscribe = (e) => {
753
+ let s = /* @__PURE__ */ new Set();
754
+ return a.subscribe = (e) => {
738
755
  let t = [];
739
- for (let n of a.values()) t.push(n.subscribe(e));
740
- for (let n of i.scaleDependencies ?? []) t.push(n.subscribe(e));
756
+ for (let n of o.values()) t.push(n.subscribe(e));
757
+ for (let n of a.scaleDependencies ?? []) t.push(n.subscribe(e));
741
758
  let n = !0, r = () => {
742
- n && (n = !1, o.delete(r), t.forEach((e) => e()));
759
+ n && (n = !1, s.delete(r), t.forEach((e) => e()));
743
760
  };
744
- return o.add(r), r;
745
- }, i.invalidate = () => {
746
- for (let e of o) e();
747
- o.clear();
748
- }, i.createSnapshotEvaluator = () => {
761
+ return s.add(r), r;
762
+ }, a.invalidate = () => {
763
+ for (let e of s) e();
764
+ s.clear();
765
+ }, a.createSnapshotEvaluator = () => {
749
766
  let e = {};
750
- for (let t of Object.keys(r)) a.has(t) || (e[t] = r[t]);
751
- for (let [t, n] of a) n.batchStable || Object.defineProperty(e, t, {
767
+ for (let t of Object.keys(i)) o.has(t) || (e[t] = i[t]);
768
+ for (let [t, n] of o) n.batchStable || Object.defineProperty(e, t, {
752
769
  enumerable: !0,
753
770
  get: () => n.get()
754
771
  });
755
- let t = Object.assign(i.createEvaluator(e), { refresh() {
756
- for (let [t, n] of a) n.batchStable && (e[t] = n.get());
772
+ let t = Object.assign(a.createEvaluator(e), { refresh() {
773
+ for (let [t, n] of o) n.batchStable && (e[t] = n.get());
757
774
  } });
758
775
  return t.refresh(), t;
759
- }, 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 ?? []), {
760
- expression: i,
761
- dependencies: i.dependencies
776
+ }, a.identifier = () => a.code + "|" + Array.from(o.values()).map((e) => e.id).concat((a.scaleDependencies ?? []).map((e) => e.id)).join(","), a.dependencies = Array.from(o.values()).concat(a.scaleDependencies ?? []), {
777
+ expression: a,
778
+ dependencies: a.dependencies
762
779
  };
763
780
  }
764
781
  //#endregion
765
782
  //#region ../core/src/paramRuntime/paramRuntime.js
766
783
  var Ne = class {
767
- #e = new ke();
784
+ #e = new Ae();
768
785
  #t;
769
- #n = new Ae();
786
+ #n = new je();
770
787
  constructor(e = {}) {
771
- this.#t = new Oe({
788
+ this.#t = new ke({
772
789
  lifecycleRegistry: this.#e,
773
790
  onError: e.onError
774
791
  });
@@ -797,11 +814,11 @@ var Ne = class {
797
814
  return this.#n.register(e, t, a);
798
815
  }
799
816
  registerDerived(e, t, n, r) {
800
- let { expression: i, dependencies: a } = Me(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
817
+ let { expression: i, dependencies: a } = z(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
801
818
  return this.#n.register(e, t, s);
802
819
  }
803
820
  createExpression(e, t, n) {
804
- let { expression: r } = Me(t, (t) => this.resolve(e, t), n);
821
+ let { expression: r } = z(t, (t) => this.resolve(e, t), n);
805
822
  return r;
806
823
  }
807
824
  resolve(e, t) {
@@ -925,7 +942,7 @@ function ze() {
925
942
  }
926
943
  //#endregion
927
944
  //#region ../core/src/paramRuntime/viewParamRuntime.js
928
- var Be = class {
945
+ var B = class {
929
946
  #e;
930
947
  #t;
931
948
  #n = /* @__PURE__ */ new Map();
@@ -941,9 +958,10 @@ var Be = class {
941
958
  #f;
942
959
  #p;
943
960
  #m;
944
- #h = !1;
961
+ #h;
962
+ #g = !1;
945
963
  constructor(e, t, n, r = {}) {
946
- this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
964
+ this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#h = r.getSpecOrigin, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
947
965
  let i = this.#d();
948
966
  i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new Ne({ onError: r.onError }), this.#t = this.#e.createScope());
949
967
  }
@@ -964,38 +982,46 @@ var Be = class {
964
982
  if (o) throw Error(`Conflicting selection declarations for "${e}" in "${i.location}" and "${o.location}".`);
965
983
  return i;
966
984
  }
967
- #g(e) {
985
+ #_(e) {
968
986
  if (!("select" in e)) return;
969
- let t = i(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", r = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
970
- kind: n,
971
- components: r,
987
+ let n = t(e.select), r = n.type === "interval" ? "interval" : n.toggle ? "multi" : "single", i = n.type === "interval" ? Array.from(new Set(n.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
988
+ kind: r,
989
+ components: i,
972
990
  source: this.#s
973
991
  }, s = a.#c.get(e.name) ?? /* @__PURE__ */ new Set(), c = s.values().next().value;
974
- if (c && (c.kind !== n || JSON.stringify(c.components) !== JSON.stringify(r))) throw Error(`Conflicting selection declarations for "${e.name}" in "${c.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
992
+ if (c && (c.kind !== r || JSON.stringify(c.components) !== JSON.stringify(i))) throw Error(`Conflicting selection declarations for "${e.name}" in "${c.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
975
993
  s.add(o), a.#c.set(e.name, s), this.#e.addScopeDisposer(this.#t, () => {
976
994
  s.delete(o);
977
995
  });
978
996
  }
979
- get #_() {
980
- return { resolveScaleResolution: this.#f };
981
- }
982
- registerParam(e, n = {}) {
983
- let r = e.name;
984
- if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
985
- if (He(e), n.defer) {
986
- if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
987
- return this.#e.registerInitializer(this.#t, r, () => {
988
- this.#v(e);
989
- }), this.#i.set(r, e), () => {
990
- throw Error("Cannot set derived parameter \"" + r + "\".");
997
+ #v(e) {
998
+ return {
999
+ resolveScaleResolution: this.#f,
1000
+ specLocation: this.getSpecLocation(e, ["expr"])
1001
+ };
1002
+ }
1003
+ registerParam(t, r = {}) {
1004
+ let i = t.name;
1005
+ try {
1006
+ n(i);
1007
+ } catch (n) {
1008
+ throw e(n, this.getSpecLocation(t, ["name"]));
1009
+ }
1010
+ if (this.#i.has(i) || this.#a.has(i)) throw e(/* @__PURE__ */ Error("Parameter \"" + i + "\" already registered in this scope."), this.getSpecLocation(t, ["name"]));
1011
+ if (Ve(t), r.defer) {
1012
+ if (!("expr" in t)) throw Error("Only expression parameters can be deferred.");
1013
+ return this.#e.registerInitializer(this.#t, i, () => {
1014
+ this.#y(t);
1015
+ }), this.#i.set(i, t), () => {
1016
+ throw Error("Cannot set derived parameter \"" + i + "\".");
991
1017
  };
992
1018
  }
993
- return this.#v(e);
1019
+ return this.#y(t);
994
1020
  }
995
1021
  registerLazyExpression(e, t, n) {
996
1022
  this.#e.registerInitializer(this.#t, e, () => {
997
1023
  n?.();
998
- let r = this.#e.registerDerived(this.#t, e, t, this.#_);
1024
+ let r = this.#e.registerDerived(this.#t, e, t, this.#v());
999
1025
  this.#r.set(e, r);
1000
1026
  }), this.#a.add(e);
1001
1027
  }
@@ -1005,7 +1031,7 @@ var Be = class {
1005
1031
  this.#e.registerInitializer(this.#t, e, () => {
1006
1032
  let r = this.#e.registerDerived(this.#t, e, t, {
1007
1033
  expressionScope: n.#t,
1008
- ...n.#_
1034
+ ...n.#v()
1009
1035
  });
1010
1036
  this.#r.set(e, r);
1011
1037
  }), this.#i.set(e, {
@@ -1013,65 +1039,65 @@ var Be = class {
1013
1039
  expr: t
1014
1040
  });
1015
1041
  }
1016
- #v(e) {
1017
- let t = e.name, n, r;
1018
- if (e.push == "outer") {
1019
- let i = this.findRuntimeForParam(t);
1020
- if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
1021
- let a = i.paramConfigs.get(t);
1022
- if (!a) throw Error(`Outer parameter "${t}" exists as a value but has no registered config.`);
1023
- if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
1024
- n = (e) => {
1025
- i.setValue(t, e);
1026
- }, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
1027
- } else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#b(t, r, e.transition) : this.#y(t, r);
1028
- else if ("expr" in e) {
1029
- if ("transition" in e) this.#x(t, e.expr, e.transition);
1030
- else if ("debounce" in e) this.#S(t, e.expr, e.debounce);
1042
+ #y(t) {
1043
+ let n = t.name, r, i;
1044
+ if (t.push == "outer") {
1045
+ let a = this.findRuntimeForParam(n);
1046
+ if (!a) throw e(/* @__PURE__ */ Error(`Parameter "${n}" not found in outer scope!`), this.getSpecLocation(t, ["name"]));
1047
+ let s = a.paramConfigs.get(n);
1048
+ if (!s) throw Error(`Outer parameter "${n}" exists as a value but has no registered config.`);
1049
+ if ("expr" in s || "select" in s || "ruler" in s) throw Error(`The outer parameter "${n}" must not have expr, select, or ruler properties!`);
1050
+ r = (e) => {
1051
+ a.setValue(n, e);
1052
+ }, this.#n.set(n, r), "ruler" in t && (i = o(t, this), r(i));
1053
+ } else if ("value" in t) i = o(t, this), r = "transition" in t ? this.#x(n, i, t.transition) : this.#b(n, i);
1054
+ else if (l(t)) {
1055
+ if ("transition" in t) this.#S(n, t, t.transition);
1056
+ else if ("debounce" in t) this.#C(n, t, t.debounce);
1031
1057
  else {
1032
- let n = this.#e.registerDerived(this.#t, t, e.expr, this.#_);
1033
- this.#r.set(t, n);
1058
+ let e = this.#e.registerDerived(this.#t, n, t.expr, this.#v(t));
1059
+ this.#r.set(n, e);
1034
1060
  }
1035
- n = () => {
1036
- throw Error("Cannot set derived parameter \"" + t + "\".");
1061
+ r = () => {
1062
+ throw Error("Cannot set derived parameter \"" + n + "\".");
1037
1063
  };
1038
- } else r = h(e, this), n = this.#y(t, r);
1039
- if ("select" in e) {
1040
- if (r ??= h(e, this), !this.#n.has(t)) {
1041
- let e = this.#e.registerSelection(this.#t, t, r);
1042
- this.#r.set(t, e), this.#n.set(t, (t) => {
1064
+ } else i = o(t, this), r = this.#b(n, i);
1065
+ if ("select" in t) {
1066
+ if (i ??= o(t, this), !this.#n.has(n)) {
1067
+ let e = this.#e.registerSelection(this.#t, n, i);
1068
+ this.#r.set(n, e), this.#n.set(n, (t) => {
1043
1069
  e.set(t), this.#e.flushNow();
1044
- }), n = this.#n.get(t);
1070
+ }), r = this.#n.get(n);
1045
1071
  }
1046
- n(r);
1072
+ r(i);
1047
1073
  }
1048
- return this.#i.set(t, e), this.#g(e), n;
1074
+ return this.#i.set(n, t), this.#_(t), r;
1049
1075
  }
1050
- allocateSetter(e, n, r = !1) {
1051
- if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
1052
- let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
1076
+ allocateSetter(e, t, r = !1) {
1077
+ if (n(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
1078
+ let i = this.#e.registerBase(this.#t, e, t, { notify: !r });
1053
1079
  this.#r.set(e, i);
1054
1080
  let a = (e) => {
1055
1081
  i.set(e), this.#e.flushNow();
1056
1082
  };
1057
1083
  return this.#n.set(e, a), a;
1058
1084
  }
1059
- setValue(e, n, r) {
1060
- t(e);
1085
+ setValue(e, t, r) {
1086
+ n(e);
1061
1087
  let i = this.#n.get(e);
1062
1088
  if (!i) throw Error("Writable parameter not found in this scope: " + e);
1063
- i(n, r);
1089
+ i(t, r);
1064
1090
  }
1065
1091
  getValue(e) {
1066
1092
  return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
1067
1093
  }
1068
1094
  getParamRef(e) {
1069
- t(e);
1070
- let n = this.findRuntimeForParam(e);
1071
- if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
1095
+ n(e);
1096
+ let t = this.findRuntimeForParam(e);
1097
+ if (t) return t.#r.has(e) || t.#e.resolve(t.#t, e), t.#r.get(e);
1072
1098
  }
1073
1099
  getTargetValue(e) {
1074
- return t(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
1100
+ return n(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
1075
1101
  }
1076
1102
  subscribe(e, t) {
1077
1103
  let n = this.getParamRef(e);
@@ -1088,16 +1114,16 @@ var Be = class {
1088
1114
  return this.#i;
1089
1115
  }
1090
1116
  hasLocalParam(e) {
1091
- t(e);
1092
- let n = this.#i.get(e);
1093
- return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
1117
+ n(e);
1118
+ let t = this.#i.get(e);
1119
+ return this.#r.has(e) || this.#a.has(e) || t !== void 0 && "expr" in t;
1094
1120
  }
1095
1121
  isPendingParam(e) {
1096
1122
  let t = this.findRuntimeForParam(e);
1097
1123
  return t !== void 0 && !t.#r.has(e);
1098
1124
  }
1099
1125
  hasConfiguredParamInScopeChain(e) {
1100
- return t(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
1126
+ return n(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
1101
1127
  }
1102
1128
  findRuntimeForParam(e) {
1103
1129
  return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
@@ -1128,7 +1154,7 @@ var Be = class {
1128
1154
  let r = this.#i.get(t);
1129
1155
  e.push({
1130
1156
  name: t,
1131
- kind: Ve(r),
1157
+ kind: Be(r),
1132
1158
  value: n.get(),
1133
1159
  writable: this.#n.has(t),
1134
1160
  configured: !!r,
@@ -1138,12 +1164,15 @@ var Be = class {
1138
1164
  }
1139
1165
  return {
1140
1166
  scopeId: this.#t,
1141
- disposed: this.#h,
1167
+ disposed: this.#g,
1142
1168
  params: e
1143
1169
  };
1144
1170
  }
1171
+ getSpecLocation(e, t) {
1172
+ return ee(e, this.#h, t);
1173
+ }
1145
1174
  createExpression(e) {
1146
- return this.#e.createExpression(this.#t, e, this.#_);
1175
+ return this.#e.createExpression(this.#t, typeof e == "string" ? e : e.expr, this.#v(typeof e == "string" ? void 0 : e));
1147
1176
  }
1148
1177
  watchExpression(e, t, n = {}) {
1149
1178
  let r = this.createExpression(e), i = r.subscribe(t);
@@ -1170,7 +1199,7 @@ var Be = class {
1170
1199
  cancelUpdate(e) {
1171
1200
  this.#e.cancelUpdate(e);
1172
1201
  }
1173
- #y(e, t) {
1202
+ #b(e, t) {
1174
1203
  let n = this.#e.registerBase(this.#t, e, t);
1175
1204
  this.#r.set(e, n);
1176
1205
  let r = (e) => {
@@ -1178,19 +1207,19 @@ var Be = class {
1178
1207
  };
1179
1208
  return this.#n.set(e, r), r;
1180
1209
  }
1181
- #b(e, t, n) {
1182
- let r = this.#C(e, t, n), i = (t, n) => {
1183
- this.#w(e, r, t, n);
1210
+ #x(e, t, n) {
1211
+ let r = this.#w(e, t, n), i = (t, n) => {
1212
+ this.#T(e, r, t, n);
1184
1213
  };
1185
1214
  return this.#n.set(e, i), i;
1186
1215
  }
1187
- #x(e, t, n) {
1188
- let r = this.createExpression(t), i = this.#C(e, r(null), n), a = r.subscribe(() => {
1189
- this.#w(e, i, r(null), { animate: !this.#m });
1216
+ #S(e, t, n) {
1217
+ let r = this.createExpression(t), i = this.#w(e, r(null), n), a = r.subscribe(() => {
1218
+ this.#T(e, i, r(null), { animate: !this.#m });
1190
1219
  });
1191
1220
  this.#e.addScopeDisposer(this.#t, a);
1192
1221
  }
1193
- #S(e, t, n) {
1222
+ #C(e, t, n) {
1194
1223
  let r = this.createExpression(t), i = r(null), a = this.#e.registerBase(this.#t, e, i);
1195
1224
  this.#r.set(e, a);
1196
1225
  let o = {
@@ -1205,8 +1234,8 @@ var Be = class {
1205
1234
  clearTimeout(o.timeout), c(), this.#u.delete(e);
1206
1235
  });
1207
1236
  }
1208
- #C(e, t, n) {
1209
- let r = Ue(e, t), i = this.#e.registerBase(this.#t, e, r);
1237
+ #w(e, t, n) {
1238
+ let r = He(e, t), i = this.#e.registerBase(this.#t, e, r);
1210
1239
  this.#r.set(e, i);
1211
1240
  let a = this.#p;
1212
1241
  if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
@@ -1221,8 +1250,8 @@ var Be = class {
1221
1250
  };
1222
1251
  return this.#l.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
1223
1252
  }
1224
- #w(e, t, n, r = {}) {
1225
- let i = Ue(e, n);
1253
+ #T(e, t, n, r = {}) {
1254
+ let i = He(e, n);
1226
1255
  t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
1227
1256
  }
1228
1257
  evaluateAndGet(e) {
@@ -1241,22 +1270,17 @@ var Be = class {
1241
1270
  this.#m = !1;
1242
1271
  }
1243
1272
  dispose() {
1244
- 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());
1245
- }
1246
- hasPointSelections() {
1247
- for (let e of this.#i.values()) if (ne(e)) {
1248
- let t = e.select;
1249
- if (te(t)) {
1250
- if (t == "point") return !0;
1251
- } else if (t.type == "point") return !0;
1252
- }
1273
+ this.#g || (this.#g = !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());
1274
+ }
1275
+ hasPointSelections({ inherited: e = !1 } = {}) {
1276
+ for (let t = this; t; t = e ? t.#d() : void 0) for (let n of t.#i.values()) if (i(n) && (n.select === "point" || typeof n.select == "object" && n.select.type === "point") && (!e || this.findConfiguredParam(n.name).config === n)) return !0;
1253
1277
  return !1;
1254
1278
  }
1255
1279
  };
1256
- function Ve(e) {
1280
+ function Be(e) {
1257
1281
  return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
1258
1282
  }
1259
- function He(e) {
1283
+ function Ve(e) {
1260
1284
  let t = e.name;
1261
1285
  if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
1262
1286
  if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
@@ -1274,62 +1298,62 @@ function He(e) {
1274
1298
  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.`);
1275
1299
  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.`);
1276
1300
  }
1277
- function Ue(e, t) {
1301
+ function He(e, t) {
1278
1302
  if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
1279
1303
  return t;
1280
1304
  }
1281
1305
  //#endregion
1282
1306
  //#region ../core/src/utils/addBaseUrl.js
1283
- function We(e, t) {
1307
+ function Ue(e, t) {
1284
1308
  return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
1285
1309
  }
1286
- function Ge(e) {
1310
+ function We(e) {
1287
1311
  if (!e) return e;
1288
1312
  if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
1289
1313
  return e.endsWith("/") ? e : e + "/";
1290
1314
  }
1291
1315
  //#endregion
1292
1316
  //#region ../core/src/config/mergeConfig.js
1293
- function L(e) {
1294
- return d(e) && !Array.isArray(e);
1317
+ function V(e) {
1318
+ return ie(e) && !Array.isArray(e) && !("expr" in e && typeof e.expr == "string");
1295
1319
  }
1296
- function Ke(e) {
1320
+ function Ge(e) {
1297
1321
  let t = {};
1298
- for (let [n, r] of Object.entries(e)) t[n] = R(r);
1322
+ for (let [n, r] of Object.entries(e)) t[n] = H(r);
1299
1323
  return t;
1300
1324
  }
1301
- function R(e) {
1302
- return Array.isArray(e) ? e.map(R) : L(e) ? Ke(e) : e;
1325
+ function H(e) {
1326
+ return Array.isArray(e) ? e.map(H) : V(e) ? Ge(e) : e;
1303
1327
  }
1304
- function z(e, t) {
1328
+ function Ke(e, t) {
1305
1329
  for (let [n, r] of Object.entries(t)) {
1306
1330
  if (r === void 0) continue;
1307
1331
  let t = e[n];
1308
- L(r) && L(t) ? z(t, r) : e[n] = R(r);
1332
+ V(r) && V(t) ? Ke(t, r) : e[n] = H(r);
1309
1333
  }
1310
1334
  return e;
1311
1335
  }
1312
- function B(e) {
1336
+ function qe(e) {
1313
1337
  let t = {};
1314
- for (let n of e) n && z(t, n);
1338
+ for (let n of e) n && Ke(t, n);
1315
1339
  return t;
1316
1340
  }
1317
1341
  //#endregion
1318
1342
  //#region ../core/src/view/viewChrome.js
1319
- var V = /* @__PURE__ */ new WeakMap();
1320
- function qe(e, t) {
1321
- V.set(e, t);
1343
+ var U = /* @__PURE__ */ new WeakMap();
1344
+ function Je(e, t) {
1345
+ U.set(e, t);
1322
1346
  }
1323
- function Je(e) {
1324
- return V.get(e);
1347
+ function Ye(e) {
1348
+ return U.get(e);
1325
1349
  }
1326
- function H(e) {
1327
- return V.has(e);
1350
+ function Xe(e) {
1351
+ return U.has(e);
1328
1352
  }
1329
- function U(e) {
1353
+ function Ze(e) {
1330
1354
  let t = e;
1331
1355
  for (; t;) {
1332
- let n = V.get(t);
1356
+ let n = U.get(t);
1333
1357
  if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
1334
1358
  t = t.layoutParent;
1335
1359
  }
@@ -1337,16 +1361,16 @@ function U(e) {
1337
1361
  }
1338
1362
  //#endregion
1339
1363
  //#region ../core/src/view/postScaleParams.js
1340
- var W = /* @__PURE__ */ new WeakMap();
1341
- function Ye(e, t) {
1342
- W.set(e, t);
1364
+ var Qe = /* @__PURE__ */ new WeakMap();
1365
+ function $e(e, t) {
1366
+ Qe.set(e, t);
1343
1367
  }
1344
- function Xe(e) {
1345
- return W.get(e);
1368
+ function et(e) {
1369
+ return Qe.get(e);
1346
1370
  }
1347
1371
  //#endregion
1348
1372
  //#region ../core/src/data/namedDataScope.js
1349
- var Ze = class {
1373
+ var tt = class {
1350
1374
  name;
1351
1375
  owner;
1352
1376
  getDefaultData;
@@ -1384,13 +1408,13 @@ var Ze = class {
1384
1408
  dispose() {
1385
1409
  this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
1386
1410
  }
1387
- }, Qe = class {
1411
+ }, nt = class {
1388
1412
  view;
1389
1413
  #e = /* @__PURE__ */ new Map();
1390
1414
  #t = /* @__PURE__ */ new Map();
1391
1415
  constructor(e) {
1392
1416
  this.view = e;
1393
- for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ze(t, e, () => n));
1417
+ for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new tt(t, e, () => n));
1394
1418
  }
1395
1419
  getLocalBinding(e) {
1396
1420
  return this.#e.get(e);
@@ -1404,7 +1428,7 @@ var Ze = class {
1404
1428
  let n = this.view.dataParent?.namedDataScope;
1405
1429
  if (n) return n.resolve(e);
1406
1430
  let r = this.#t.get(e);
1407
- return r || (r = new Ze(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1431
+ return r || (r = new tt(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1408
1432
  }
1409
1433
  dispose() {
1410
1434
  for (let e of this.#e.values()) e.dispose();
@@ -1412,7 +1436,7 @@ var Ze = class {
1412
1436
  for (let e of this.#t.values()) e.dispose();
1413
1437
  this.#t.clear();
1414
1438
  }
1415
- }, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e, $e = class {
1439
+ }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, rt = class {
1416
1440
  spec;
1417
1441
  namedDataScope;
1418
1442
  #e;
@@ -1427,34 +1451,36 @@ var Ze = class {
1427
1451
  #l = void 0;
1428
1452
  #u = !1;
1429
1453
  #d = [];
1430
- opacityFunction = q;
1454
+ opacityFunction = K;
1431
1455
  #f = [];
1432
1456
  #p = "none";
1433
1457
  #m = /* @__PURE__ */ new Map();
1434
- facetCoords = new e([], JSON.stringify);
1458
+ facetCoords = new p([], JSON.stringify);
1459
+ layoutCoords;
1435
1460
  constructor(e, t, n, r, i, a = {}) {
1436
1461
  if (!e) throw Error("View spec must be defined!");
1437
- 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.");
1462
+ if (this.context = t, this.layoutParent = n, this.dataParent = r, a.chrome && Je(this, "excludeSubtree"), this.#t = i, this.spec = e, this.namedDataScope = new nt(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1438
1463
  let o = r ? r.getConfigScopes() : [t.getBaseConfig()], s = e.config;
1439
1464
  this.#e = [...o, s].filter((e) => !!e), this.resolutions = {
1440
1465
  scale: {},
1441
1466
  axis: {},
1442
1467
  legend: {}
1443
- }, ie(this), this.options = {
1468
+ }, oe(this), this.options = {
1444
1469
  inheritEncoding: !1,
1445
1470
  layoutSizeParams: "own",
1446
1471
  ...a
1447
1472
  }, this.flowHandle = void 0, this.needsAxes = {
1448
1473
  x: !1,
1449
1474
  y: !1
1450
- }, this.paramRuntime = new Be(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, {
1475
+ }, this.paramRuntime = new B(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, {
1451
1476
  settleTemporalUpdatesImmediately: !0,
1452
- onError: t.reportError
1453
- }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => se("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1454
- let l = [...e.params ?? [], ...Xe(e) ?? []];
1455
- for (let e of l) {
1477
+ onError: t.reportError,
1478
+ getSpecOrigin: t.getSpecOrigin
1479
+ }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ce("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1480
+ let c = [...e.params ?? [], ...et(e) ?? []];
1481
+ for (let e of c) {
1456
1482
  if ("expr" in e) {
1457
- let { usesScaleHelper: t, globals: n } = c(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1483
+ let { usesScaleHelper: t, globals: n } = m(e.expr, this.paramRuntime.getSpecLocation(e, ["expr"])), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1458
1484
  if (t || r) {
1459
1485
  this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
1460
1486
  continue;
@@ -1480,18 +1506,18 @@ var Ze = class {
1480
1506
  return this.#t;
1481
1507
  }
1482
1508
  getConfig() {
1483
- return B(this.#e);
1509
+ return qe(this.#e);
1484
1510
  }
1485
1511
  getCursorSpec() {
1486
1512
  return this.spec.cursor;
1487
1513
  }
1488
1514
  getCursor() {
1489
1515
  let e = this.getCursorSpec();
1490
- return n(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1516
+ return l(e) ? this.paramRuntime.evaluateAndGet(e) : e;
1491
1517
  }
1492
1518
  watchCursor(e, t) {
1493
- let r = this.getCursorSpec();
1494
- n(r) && this.paramRuntime.watchExpression(r.expr, e, {
1519
+ let n = this.getCursorSpec();
1520
+ l(n) && this.paramRuntime.watchExpression(n, e, {
1495
1521
  scopeOwned: !1,
1496
1522
  registerDisposer: t
1497
1523
  });
@@ -1503,45 +1529,73 @@ var Ze = class {
1503
1529
  return this.facetCoords.values().next().value;
1504
1530
  }
1505
1531
  getPadding() {
1506
- return this._cache("size/padding", () => k.createFromConfig(this.spec.padding));
1532
+ return this._cache("size/padding", () => j.createFromConfig(this.spec.padding));
1507
1533
  }
1508
1534
  getOverhang() {
1509
- return k.zero();
1535
+ return j.zero();
1536
+ }
1537
+ getStructuralOverhang() {
1538
+ return j.zero();
1539
+ }
1540
+ getStructuralSizeDefs(e) {
1541
+ let t = this.getStructuralOverhang();
1542
+ return {
1543
+ before: { px: t[e === "x" ? "left" : "top"] },
1544
+ after: { px: t[e === "x" ? "right" : "bottom"] }
1545
+ };
1546
+ }
1547
+ getAlignment(e) {
1548
+ let t = e === "x" ? "width" : "height";
1549
+ return {
1550
+ size: this.getViewportSize().subtractPadding(this.getOverhang())[t],
1551
+ before: 0,
1552
+ after: 0
1553
+ };
1554
+ }
1555
+ getAlignmentCoords(e) {
1556
+ return this.coords.shrink(this.getOverhang());
1557
+ }
1558
+ getLayoutFootprints() {
1559
+ return [{
1560
+ view: this,
1561
+ coords: this.coords.shrink(this.getOverhang()),
1562
+ chrome: !1
1563
+ }];
1510
1564
  }
1511
1565
  isScrollable() {
1512
1566
  return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
1513
1567
  }
1514
1568
  getSize() {
1515
- return this._cache("size/size", () => this.isConfiguredVisible() ? new y(this.#g("width"), this.#g("height")) : x);
1569
+ return this._cache("size/size", () => this.isConfiguredVisible() ? new x(this.#g("width"), this.#g("height")) : S);
1516
1570
  }
1517
1571
  getViewportSize() {
1518
1572
  if (!this.isScrollable()) return this.getSize();
1519
- if (!this.isConfiguredVisible()) return x;
1573
+ if (!this.isConfiguredVisible()) return S;
1520
1574
  let e = this.getSize();
1521
- return new y(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1575
+ return new x(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1522
1576
  }
1523
1577
  #g(e) {
1524
- let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = J(r), a = e == "viewportWidth" || e == "viewportHeight";
1525
- if (i) {
1526
- if (a) throw new _(`Cannot use step-based size with "${e}"!`, this);
1527
- let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1528
- if (i) {
1578
+ let { value: t, implicit: n } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
1579
+ if (a) {
1580
+ if (o) throw new _(`Cannot use step-based size with "${e}"!`, this);
1581
+ let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1582
+ if (a) {
1529
1583
  let n;
1530
- if (v(i.type)) n = i.domain().length;
1531
- else if (["locus", "index"].includes(i.type)) {
1532
- let e = i.domain();
1533
- n = ee(e) - e[0];
1534
- } else throw new _(`Cannot use step-based size with "${i.type}" scale!`, this);
1535
- let a = i;
1536
- n = oe(n, a.paddingInner(), a.paddingOuter());
1537
- let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && v(s.type) ? "offset" : "position"), l = t;
1538
- if (c == "offset") {
1539
- if (!s || !v(s.type)) throw new _(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
1540
- let t = s, n = oe(s.domain().length, t.paddingInner(), t.paddingOuter());
1541
- l *= n / (1 - a.paddingInner());
1584
+ if (y(a.type)) n = a.domain().length;
1585
+ else if (["locus", "index"].includes(a.type)) {
1586
+ let e = a.domain();
1587
+ n = r(e) - e[0];
1588
+ } else throw new _(`Cannot use step-based size with "${a.type}" scale!`, this);
1589
+ let o = a;
1590
+ n = v(n, o.paddingInner(), o.paddingOuter());
1591
+ let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && y(c.type) ? "offset" : "position"), u = t;
1592
+ if (l == "offset") {
1593
+ if (!c || !y(c.type)) throw new _(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
1594
+ let t = c, n = v(c.domain().length, t.paddingInner(), t.paddingOuter());
1595
+ u *= n / (1 - o.paddingInner());
1542
1596
  }
1543
1597
  return {
1544
- px: n * l,
1598
+ px: n * u,
1545
1599
  grow: 0
1546
1600
  };
1547
1601
  }
@@ -1551,7 +1605,7 @@ var Ze = class {
1551
1605
  };
1552
1606
  throw new _(`Cannot use step-based size with "${e}"!`, this);
1553
1607
  }
1554
- return (r && he(r)) ?? (a ? void 0 : {
1608
+ return (i && _e(i)) ?? (o ? void 0 : {
1555
1609
  px: 0,
1556
1610
  grow: 1
1557
1611
  });
@@ -1567,16 +1621,16 @@ var Ze = class {
1567
1621
  };
1568
1622
  }
1569
1623
  #v(e) {
1570
- if (U(this)) return;
1624
+ if (Ze(this)) return;
1571
1625
  let t = this.getConfig().view;
1572
1626
  if (!t) return;
1573
1627
  let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
1574
- 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 });
1628
+ return r && !y(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
1575
1629
  }
1576
1630
  resolveSizeValue(e, t) {
1577
- if (!n(t)) return t;
1578
- let r = this.#C(e)();
1579
- if (it(r) || r === "container") return r;
1631
+ if (!l(t)) return t;
1632
+ let n = this.#C(e)();
1633
+ if (ct(n) || n === "container") return n;
1580
1634
  throw new _(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1581
1635
  }
1582
1636
  registerSizeInvalidation() {
@@ -1584,7 +1638,7 @@ var Ze = class {
1584
1638
  }
1585
1639
  #y(e, t) {
1586
1640
  let { value: n, implicit: r } = this.#_(e);
1587
- if (!J(n)) return;
1641
+ if (!q(n)) return;
1588
1642
  let i = this.getScaleResolution(t);
1589
1643
  if (!i) {
1590
1644
  if (r) return;
@@ -1594,20 +1648,20 @@ var Ze = class {
1594
1648
  let t = this.getSize()[e];
1595
1649
  this.invalidateSizeCache();
1596
1650
  let n = this.getSize()[e];
1597
- pe(t, n) || this.context.requestLayoutReflow();
1651
+ he(t, n) || this.context.requestLayoutReflow();
1598
1652
  };
1599
1653
  if (i.addEventListener("domain", a), this.registerDisposer(() => i.removeEventListener("domain", a)), n.for != "position") {
1600
1654
  let t = e == "width" ? "xOffset" : "yOffset", n = this.getScaleResolution(t);
1601
- n && v(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
1655
+ n && y(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
1602
1656
  }
1603
1657
  }
1604
1658
  #b(e) {
1605
1659
  let { value: t } = this.#_(e);
1606
- n(t) ? this.#S(e, t.expr) : J(t) && n(t.step) && this.#S(e + ".step", t.step.expr);
1660
+ l(t) ? this.#S(e, t) : q(t) && l(t.step) && this.#S(e + ".step", t.step);
1607
1661
  }
1608
1662
  #x(e, t) {
1609
- let r = n(t.step) ? this.#C(e + ".step")() : t.step;
1610
- if (it(r)) return r;
1663
+ let n = l(t.step) ? this.#C(e + ".step")() : t.step;
1664
+ if (ct(n)) return n;
1611
1665
  throw new _(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1612
1666
  }
1613
1667
  #S(e, t) {
@@ -1653,7 +1707,7 @@ var Ze = class {
1653
1707
  return this.opacityFunction(1);
1654
1708
  }
1655
1709
  hasLocalOpacity() {
1656
- return this.opacityFunction !== q;
1710
+ return this.opacityFunction !== K;
1657
1711
  }
1658
1712
  getPathString() {
1659
1713
  return this.getLayoutAncestors().map((e) => e.name).reverse().join("/");
@@ -1684,7 +1738,7 @@ var Ze = class {
1684
1738
  };
1685
1739
  }
1686
1740
  handleInteraction(e, t) {
1687
- t && e.type === "mousemove" && e.pointedViews.add(this);
1741
+ t && e.type === "mousemove" && e.pointedViews.set(this, e.facetId);
1688
1742
  let n = t ? this.#r : this.#i;
1689
1743
  for (let t of n[e.type] || []) t(e);
1690
1744
  }
@@ -1717,7 +1771,7 @@ var Ze = class {
1717
1771
  for (let e of this.#f) e();
1718
1772
  this.#f.length = 0;
1719
1773
  let e = this.flowHandle;
1720
- e?.collector && (this.context.dataFlow.pruneCollectorBranch(e.collector), this.context.dataFlow.removeCollector(e.collector)), e?.dataSource && e.dataSource.view === this && !e.dataSource.shareKey && this.context.dataFlow.removeDataSource(e.dataSource), this.paramRuntime.dispose(), this.namedDataScope.dispose(), this.context.dataFlow.loadingStatusRegistry.delete(this), this.flowHandle = void 0;
1774
+ e?.collector && (this.context.dataFlow.pruneCollectorBranch(e.collector), this.context.dataFlow.removeCollector(e.collector)), e?.dataSource && e.dataSource.view === this && !e.dataSource.shareKey && this.context.dataFlow.removeDataSource(e.dataSource), this.paramRuntime.dispose(), this.namedDataScope.dispose(), this.flowHandle = void 0, this.context.dataFlow.loadingStatusRegistry.delete(this);
1721
1775
  }
1722
1776
  registerDisposer(e) {
1723
1777
  this.#f.push(e);
@@ -1741,7 +1795,7 @@ var Ze = class {
1741
1795
  }
1742
1796
  }
1743
1797
  configureViewOpacity() {
1744
- (!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction = tt(this));
1798
+ (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = at(this));
1745
1799
  }
1746
1800
  finalizeParamRuntimeInitialization() {
1747
1801
  this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
@@ -1753,8 +1807,10 @@ var Ze = class {
1753
1807
  return this.#s;
1754
1808
  }
1755
1809
  arrange(e, t, n = {}) {
1756
- if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
1757
- let e = this.getOverhang(), n = this.layoutParent ? k.zero() : this.getPadding();
1810
+ if (this.layoutParent || this.visit((e) => {
1811
+ e.layoutCoords = void 0;
1812
+ }), this.layoutCoords = t, n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, re(t, te(n))), this.#a || this.#o) {
1813
+ let e = this.getOverhang(), n = this.layoutParent ? j.zero() : this.getPadding();
1758
1814
  this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
1759
1815
  }
1760
1816
  this.#c = !0, this.#T();
@@ -1775,7 +1831,7 @@ var Ze = class {
1775
1831
  }
1776
1832
  getFacetFields(e) {
1777
1833
  let t = this.getEncoding().sample;
1778
- return u(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1834
+ return s(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1779
1835
  }
1780
1836
  usesSampleFacetRendering() {
1781
1837
  return this.layoutParent?.usesSampleFacetRendering() ?? !1;
@@ -1787,15 +1843,23 @@ var Ze = class {
1787
1843
  };
1788
1844
  }
1789
1845
  getScaleResolution(e) {
1790
- let t = o(e);
1791
- return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
1846
+ return this.#E(e, "scale");
1792
1847
  }
1793
1848
  getAxisResolution(e) {
1794
- let t = o(e);
1795
- return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
1849
+ return this.#E(e, "axis");
1850
+ }
1851
+ #E(e, t) {
1852
+ let n = h(e);
1853
+ for (let e of this.getDataAncestors()) {
1854
+ let r = e.resolutions[t][n];
1855
+ if (r || e.isResolutionBoundary(n)) return r;
1856
+ }
1857
+ }
1858
+ isResolutionBoundary(e) {
1859
+ return this.options.resolutionBoundaryChannels?.some((t) => t === h(e)) ?? !1;
1796
1860
  }
1797
1861
  getLegendResolution(e) {
1798
- let t = o(e);
1862
+ let t = h(e);
1799
1863
  return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
1800
1864
  }
1801
1865
  getConfiguredResolution(e, t) {
@@ -1808,17 +1872,17 @@ var Ze = class {
1808
1872
  return "independent";
1809
1873
  }
1810
1874
  getBaseUrl() {
1811
- return j(() => this.dataParent?.getBaseUrl(), Ge(this.spec.baseUrl));
1875
+ return N(() => this.dataParent?.getBaseUrl(), We(this.spec.baseUrl));
1812
1876
  }
1813
1877
  isPickingSupported() {
1814
1878
  return !0;
1815
1879
  }
1816
1880
  getTitleText() {
1817
1881
  let e = this.spec.title;
1818
- if (e) return te(e) ? e : n(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1882
+ if (e) return u(e) ? e : l(e.text) ? this.paramRuntime.evaluateAndGet(e.text) : e.text;
1819
1883
  }
1820
1884
  _cache(e, t) {
1821
- return re(this, e, t);
1885
+ return ae(this, e, t);
1822
1886
  }
1823
1887
  _invalidateCacheByPrefix(e, t = "self") {
1824
1888
  switch (t) {
@@ -1836,15 +1900,15 @@ var Ze = class {
1836
1900
  }
1837
1901
  propagateInteraction(e) {}
1838
1902
  };
1839
- function et(e) {
1903
+ function it(e) {
1840
1904
  return "unitsPerPixel" in e;
1841
1905
  }
1842
- function tt(e) {
1906
+ function at(e) {
1843
1907
  let t = "opacity" in e.spec ? e.spec.opacity : void 0;
1844
1908
  if (t !== void 0) {
1845
- if (s(t)) return (e) => e * t;
1846
- if (et(t)) {
1847
- let r = (t) => {
1909
+ if (f(t)) return (e) => e * t;
1910
+ if (it(t)) {
1911
+ let n = (t) => {
1848
1912
  let n = e.getScaleResolution(t), r = n?.getScale();
1849
1913
  if ([
1850
1914
  "linear",
@@ -1854,46 +1918,46 @@ function tt(e) {
1854
1918
  scale: r,
1855
1919
  scaleResolution: n
1856
1920
  };
1857
- }, i = rt(t.values, "opacity.values", e);
1858
- if (!a(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
1859
- let o = () => 1, s = [], c = () => {
1860
- let t = nt(rt(s.map((e) => e()), "opacity.unitsPerPixel", e), i, e), n = ae().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1861
- o = (e) => n(e);
1921
+ }, r = st(t.values, "opacity.values", e);
1922
+ if (!d(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
1923
+ let i = () => 1, a = [], o = () => {
1924
+ let t = ot(st(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = se().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1925
+ i = (e) => n(e);
1862
1926
  };
1863
- s = t.unitsPerPixel.map((t) => {
1864
- if (n(t)) {
1865
- let n = e.paramRuntime.watchExpression(t.expr, () => {
1866
- c(), e.context.animator.requestRender();
1927
+ a = t.unitsPerPixel.map((t) => {
1928
+ if (l(t)) {
1929
+ let n = e.paramRuntime.watchExpression(t, () => {
1930
+ o(), e.context.animator.requestRender();
1867
1931
  });
1868
1932
  return () => n(null);
1869
1933
  }
1870
1934
  return () => t;
1871
- }), c();
1872
- let u = (e) => {
1935
+ }), o();
1936
+ let s = (e) => {
1873
1937
  let t = e.scaleResolution.getAxisLength() || 1e3;
1874
- return l(e.scale.domain()) / t;
1875
- }, d;
1938
+ return c(e.scale.domain()) / t;
1939
+ }, u;
1876
1940
  if (t.channel === "auto") {
1877
- let t = r("x"), n = r("y");
1878
- if (t && n) d = () => (u(t) + u(n)) / 2;
1879
- else if (t) d = () => u(t);
1880
- else if (n) d = () => u(n);
1941
+ let t = n("x"), r = n("y");
1942
+ if (t && r) u = () => (s(t) + s(r)) / 2;
1943
+ else if (t) u = () => s(t);
1944
+ else if (r) u = () => s(r);
1881
1945
  else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
1882
1946
  } else {
1883
- let n = t.channel ? r(t.channel) : r("x") ?? r("y");
1884
- if (!n) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1885
- d = () => u(n);
1947
+ let r = t.channel ? n(t.channel) : n("x") ?? n("y");
1948
+ if (!r) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1949
+ u = () => s(r);
1886
1950
  }
1887
- return (e) => o(d()) * e;
1951
+ return (e) => i(u()) * e;
1888
1952
  }
1889
- if (n(t)) {
1890
- let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
1953
+ if (l(t)) {
1954
+ let n = e.paramRuntime.watchExpression(t, () => e.context.animator.requestRender());
1891
1955
  return (e) => n(null) * e;
1892
1956
  }
1893
1957
  }
1894
- return q;
1958
+ return K;
1895
1959
  }
1896
- function nt(e, t, n) {
1960
+ function ot(e, t, n) {
1897
1961
  if (!e.length) throw new _("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1898
1962
  if (e.length !== t.length) throw new _("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1899
1963
  e.forEach((e, t) => {
@@ -1911,155 +1975,155 @@ function nt(e, t, n) {
1911
1975
  values: a
1912
1976
  };
1913
1977
  }
1914
- function rt(e, t, n) {
1915
- if (!a(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
1978
+ function st(e, t, n) {
1979
+ if (!d(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
1916
1980
  return e.map((e, r) => {
1917
- if (!s(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1981
+ if (!f(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1918
1982
  return e;
1919
1983
  });
1920
1984
  }
1921
- var J = (e) => !!e && typeof e == "object" && "step" in e;
1922
- function it(e) {
1985
+ var q = (e) => !!e && typeof e == "object" && "step" in e;
1986
+ function ct(e) {
1923
1987
  return typeof e == "number" && Number.isFinite(e);
1924
1988
  }
1925
- var Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap();
1926
- function at(e, t) {
1927
- st(e, t, "Import");
1989
+ var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
1990
+ function lt(e, t) {
1991
+ dt(e, t, "Import");
1928
1992
  }
1929
- function ot(e, t) {
1930
- st(e, t, "View");
1993
+ function ut(e, t) {
1994
+ dt(e, t, "View");
1931
1995
  }
1932
- function st(e, t, n) {
1996
+ function dt(e, t, n) {
1933
1997
  if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
1934
- Y.set(e, { name: t });
1998
+ J.set(e, { name: t });
1935
1999
  }
1936
- function ct(e) {
1937
- return Y.get(e);
2000
+ function ft(e) {
2001
+ return J.get(e);
1938
2002
  }
1939
- function lt(e, t = {}) {
2003
+ function pt(e, t = {}) {
1940
2004
  let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
1941
- X.set(e, n);
2005
+ Y.set(e, n);
1942
2006
  }
1943
- function ut(e, t = {}) {
1944
- qe(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
2007
+ function mt(e, t = {}) {
2008
+ Je(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1945
2009
  }
1946
- function dt(e) {
1947
- return e.getLayoutAncestors().some(H);
2010
+ function ht(e) {
2011
+ return e.getLayoutAncestors().some(Xe);
1948
2012
  }
1949
- function Z(e) {
2013
+ function X(e) {
1950
2014
  let t = e.getDataAncestors(), n = [];
1951
2015
  for (let e = t.length - 1; e >= 0; --e) {
1952
- let r = Y.get(t[e]);
2016
+ let r = J.get(t[e]);
1953
2017
  r && typeof r.name == "string" && n.push(r.name);
1954
2018
  }
1955
2019
  return n;
1956
2020
  }
1957
- function ft(e) {
2021
+ function gt(e) {
1958
2022
  let t = e.explicitName;
1959
2023
  if (!t) throw Error("Cannot build a selector for a view without a name.");
1960
2024
  return {
1961
- scope: Z(e),
2025
+ scope: X(e),
1962
2026
  view: t
1963
2027
  };
1964
2028
  }
1965
- function pt(e, t) {
2029
+ function _t(e, t) {
1966
2030
  if (!t) throw Error("Cannot build a selector for a parameter without a name.");
1967
2031
  return {
1968
- scope: Z(e),
2032
+ scope: X(e),
1969
2033
  param: t
1970
2034
  };
1971
2035
  }
1972
- function mt(e) {
1973
- return St(e), "p:" + JSON.stringify({
2036
+ function vt(e) {
2037
+ return Et(e), "p:" + JSON.stringify({
1974
2038
  scope: e.scope,
1975
2039
  param: e.param
1976
2040
  });
1977
2041
  }
1978
- function ht(e, t) {
2042
+ function yt(e, t) {
1979
2043
  e.visit((e) => {
1980
- let n = Je(e);
1981
- if (n === "excludeSubtree") return G;
2044
+ let n = Ye(e);
2045
+ if (n === "excludeSubtree") return W;
1982
2046
  if (n !== "exclude") return t(e);
1983
2047
  });
1984
2048
  }
1985
- function gt(e, t) {
2049
+ function bt(e, t) {
1986
2050
  e.visit((e) => {
1987
- let n = X.get(e);
1988
- if (n === "excludeSubtree") return G;
2051
+ let n = Y.get(e);
2052
+ if (n === "excludeSubtree") return W;
1989
2053
  if (n !== "exclude") return t(e);
1990
2054
  });
1991
2055
  }
1992
- function _t(e, t) {
1993
- if (Ct(t), !jt(e, t.scope)) return;
2056
+ function xt(e, t) {
2057
+ if (Dt(t), !Ft(e, t.scope)) return;
1994
2058
  let n = [];
1995
- if ($(e, t.scope, (e) => {
2059
+ if (Q(e, t.scope, (e) => {
1996
2060
  e.explicitName === t.view && n.push(e);
1997
2061
  }, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
1998
2062
  if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
1999
2063
  }
2000
- function vt(e, t) {
2001
- if (St(t), !jt(e, t.scope)) return;
2064
+ function St(e, t) {
2065
+ if (Et(t), !Ft(e, t.scope)) return;
2002
2066
  let n = [];
2003
- if ($(e, t.scope, (e) => {
2004
- for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
2067
+ if (Q(e, t.scope, (e) => {
2068
+ for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
2005
2069
  view: e,
2006
2070
  param: i
2007
2071
  });
2008
2072
  }), n.length === 1) return n[0];
2009
2073
  if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
2010
2074
  }
2011
- function yt(e, t) {
2075
+ function Ct(e, t) {
2012
2076
  e.visit((e) => {
2013
- let n = X.get(e);
2014
- if (n === "excludeSubtree") return G;
2015
- if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
2077
+ let n = Y.get(e);
2078
+ if (n === "excludeSubtree") return W;
2079
+ if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
2016
2080
  view: e,
2017
2081
  param: r,
2018
- selector: pt(e, n)
2082
+ selector: _t(e, n)
2019
2083
  });
2020
2084
  });
2021
2085
  }
2022
- function bt(e) {
2086
+ function wt(e) {
2023
2087
  let t = [];
2024
- return yt(e, (e) => t.push(e)), t;
2088
+ return Ct(e, (e) => t.push(e)), t;
2025
2089
  }
2026
- function xt(e) {
2090
+ function Tt(e) {
2027
2091
  let t = [];
2028
- for (let n of wt(e)) {
2029
- let r = Tt(n);
2030
- Dt(e, r, t), Ot(e, r, t);
2092
+ for (let n of Ot(e)) {
2093
+ let r = kt(n);
2094
+ jt(e, r, t), Mt(e, r, t);
2031
2095
  }
2032
2096
  return t;
2033
2097
  }
2034
- function St(e) {
2098
+ function Et(e) {
2035
2099
  if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
2036
2100
  if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
2037
2101
  }
2038
- function Ct(e) {
2102
+ function Dt(e) {
2039
2103
  if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
2040
2104
  if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
2041
2105
  }
2042
- function Q(e) {
2043
- return e.persist === !1 ? !1 : ne(e) ? !0 : r(e) ? !!e.bind : !1;
2106
+ function Z(e) {
2107
+ return e.persist === !1 ? !1 : i(e) ? !0 : a(e) ? !!e.bind : !1;
2044
2108
  }
2045
- function wt(e) {
2109
+ function Ot(e) {
2046
2110
  let t = /* @__PURE__ */ new Set([e]);
2047
2111
  return e.visit((e) => {
2048
- let n = Y.get(e);
2112
+ let n = J.get(e);
2049
2113
  n && typeof n.name == "string" && t.add(e);
2050
2114
  }), Array.from(t);
2051
2115
  }
2052
- function Tt(e) {
2053
- return Z(e);
2116
+ function kt(e) {
2117
+ return X(e);
2054
2118
  }
2055
- function Et(e) {
2119
+ function At(e) {
2056
2120
  return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
2057
2121
  }
2058
- function Dt(e, t, n) {
2122
+ function jt(e, t, n) {
2059
2123
  let r = /* @__PURE__ */ new Map();
2060
- $(e, t, (e) => {
2124
+ Q(e, t, (e) => {
2061
2125
  for (let [t, n] of e.paramRuntime.paramConfigs) {
2062
- if (!Q(n)) continue;
2126
+ if (!Z(n)) continue;
2063
2127
  let i = r.get(t);
2064
2128
  i ? i.push(e) : r.set(t, [e]);
2065
2129
  }
@@ -2068,53 +2132,53 @@ function Dt(e, t, n) {
2068
2132
  if (i.length <= 1) continue;
2069
2133
  let r = i.map((e) => e.getPathString()).join(", ");
2070
2134
  n.push({
2071
- message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Et(t) + ". Found in: " + r + ".",
2135
+ message: "Bookmarkable parameter \"" + e + "\" is not unique within " + At(t) + ". Found in: " + r + ".",
2072
2136
  scope: t
2073
2137
  });
2074
2138
  }
2075
2139
  }
2076
- function Ot(e, t, n) {
2077
- let r = kt(e, t);
2140
+ function Mt(e, t, n) {
2141
+ let r = Nt(e, t);
2078
2142
  if (!r.length) return;
2079
- let i = r.filter((e) => At(e));
2143
+ let i = r.filter((e) => Pt(e));
2080
2144
  if (i.length <= 1) return;
2081
2145
  let a = /* @__PURE__ */ new Map();
2082
2146
  for (let e of i) {
2083
- let t = Y.get(e), n = t ? t.name : void 0;
2147
+ let t = J.get(e), n = t ? t.name : void 0;
2084
2148
  typeof n == "string" && n.length && a.set(n, (a.get(n) ?? 0) + 1);
2085
2149
  }
2086
2150
  for (let [e, r] of a) r > 1 && n.push({
2087
- message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
2151
+ message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + At(t) + ".",
2088
2152
  scope: t
2089
2153
  });
2090
2154
  }
2091
- function kt(e, t) {
2155
+ function Nt(e, t) {
2092
2156
  let n = [];
2093
- return $(e, t, (e) => {
2094
- if (Z(e).length !== t.length + 1) return;
2095
- let r = Y.get(e);
2157
+ return Q(e, t, (e) => {
2158
+ if (X(e).length !== t.length + 1) return;
2159
+ let r = J.get(e);
2096
2160
  r && typeof r.name == "string" && n.push(e);
2097
2161
  }, { includeNamedImportRoots: !0 }), n;
2098
2162
  }
2099
- function At(e) {
2163
+ function Pt(e) {
2100
2164
  let t = !1;
2101
2165
  return e.visit((e) => {
2102
- let n = X.get(e);
2103
- if (n === "excludeSubtree") return G;
2166
+ let n = Y.get(e);
2167
+ if (n === "excludeSubtree") return W;
2104
2168
  if (n !== "exclude") {
2105
- for (let n of e.paramRuntime.paramConfigs.values()) if (Q(n)) return t = !0, K;
2169
+ for (let n of e.paramRuntime.paramConfigs.values()) if (Z(n)) return t = !0, G;
2106
2170
  }
2107
2171
  }), t;
2108
2172
  }
2109
- function jt(e, t) {
2173
+ function Ft(e, t) {
2110
2174
  let n = e, r = [];
2111
2175
  for (let i of t) {
2112
2176
  if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
2113
2177
  let t, a = !1;
2114
- if ($(e, r, (e) => {
2115
- let n = Y.get(e);
2116
- if (n && n.name === i && Z(e).length === r.length + 1) {
2117
- if (t) return a = !0, K;
2178
+ if (Q(e, r, (e) => {
2179
+ let n = J.get(e);
2180
+ if (n && n.name === i && X(e).length === r.length + 1) {
2181
+ if (t) return a = !0, G;
2118
2182
  t = e;
2119
2183
  }
2120
2184
  }, { includeNamedImportRoots: !0 }), a) throw Error("Multiple import instances named \"" + i + "\" in scope.");
@@ -2123,25 +2187,25 @@ function jt(e, t) {
2123
2187
  }
2124
2188
  return n;
2125
2189
  }
2126
- function $(e, t, n, r = {}) {
2190
+ function Q(e, t, n, r = {}) {
2127
2191
  let i = r.includeNamedImportRoots ?? !1;
2128
2192
  e.visit((e) => {
2129
- let r = Y.get(e), a = X.get(e);
2130
- if (a === "excludeSubtree") return G;
2131
- if (a !== "exclude" && Mt(e, t, r, i)) return n(e);
2193
+ let r = J.get(e), a = Y.get(e);
2194
+ if (a === "excludeSubtree") return W;
2195
+ if (a !== "exclude" && It(e, t, r, i)) return n(e);
2132
2196
  });
2133
2197
  }
2134
- function Mt(e, t, n, r) {
2135
- let i = Z(e);
2136
- return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Pt(t, i);
2198
+ function It(e, t, n, r) {
2199
+ let i = X(e);
2200
+ return Lt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : $(t, i);
2137
2201
  }
2138
- function Nt(e, t) {
2139
- return e.length === t.length && Pt(e, t);
2202
+ function Lt(e, t) {
2203
+ return e.length === t.length && $(e, t);
2140
2204
  }
2141
- function Pt(e, t) {
2205
+ function $(e, t) {
2142
2206
  if (e.length > t.length) return !1;
2143
2207
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
2144
2208
  return !0;
2145
2209
  }
2146
2210
  //#endregion
2147
- export { M as A, ce as B, We as C, Fe as D, Re as E, b as F, fe as H, de as I, le as L, k as M, be as N, N as O, y as P, D as R, B as S, Le as T, ue as U, he as V, K as _, dt as a, H as b, lt as c, vt as d, _t as f, G as g, ht as h, ft as i, Se as j, j as k, at as l, gt as m, ct as n, mt as o, xt as p, Z as r, ut as s, bt as t, ot as u, $e as v, Be as w, U as x, Ye as y, E as z };
2211
+ export { P as A, D as B, Ue as C, Fe as D, Re as E, S as F, ve as G, le as H, k as I, pe as K, T as L, j as M, xe as N, F as O, x as P, fe as R, qe as S, Le as T, _e as U, E as V, b as W, G as _, ht as a, Xe as b, pt as c, St as d, xt as f, W as g, yt as h, gt as i, Ce as j, N as k, lt as l, bt as m, ft as n, vt as o, Tt as p, de as q, X as r, mt as s, wt as t, ut as u, rt as v, B as w, Ze as x, $e as y, ue as z };