@cosmos.gl/graph 2.3.0 → 2.3.1-beta.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.
package/dist/index.js CHANGED
@@ -35,8 +35,8 @@ function Ws(t) {
35
35
  function pm(t) {
36
36
  typeof t != "function" && (t = Ws(t));
37
37
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
38
- for (var o = e[i], s = o.length, f = r[i] = new Array(s), u, l, v = 0; v < s; ++v)
39
- (u = o[v]) && (l = t.call(u, u.__data__, v, o)) && ("__data__" in u && (l.__data__ = u.__data__), f[v] = l);
38
+ for (var o = e[i], s = o.length, f = r[i] = new Array(s), u, l, p = 0; p < s; ++p)
39
+ (u = o[p]) && (l = t.call(u, u.__data__, p, o)) && ("__data__" in u && (l.__data__ = u.__data__), f[p] = l);
40
40
  return new tn(r, this._parents);
41
41
  }
42
42
  function vm(t) {
@@ -139,12 +139,12 @@ function Fm(t, e, n, r, i, o) {
139
139
  (f = e[s]) && (i[s] = f);
140
140
  }
141
141
  function Rm(t, e, n, r, i, o, s) {
142
- var f, u, l = /* @__PURE__ */ new Map(), v = e.length, b = o.length, S = new Array(v), D;
143
- for (f = 0; f < v; ++f)
142
+ var f, u, l = /* @__PURE__ */ new Map(), p = e.length, x = o.length, S = new Array(p), D;
143
+ for (f = 0; f < p; ++f)
144
144
  (u = e[f]) && (S[f] = D = s.call(u, u.__data__, f, e) + "", l.has(D) ? i[f] = u : l.set(D, u));
145
- for (f = 0; f < b; ++f)
145
+ for (f = 0; f < x; ++f)
146
146
  D = s.call(t, o[f], f, o) + "", (u = l.get(D)) ? (r[f] = u, u.__data__ = o[f], l.delete(D)) : n[f] = new na(t, o[f]);
147
- for (f = 0; f < v; ++f)
147
+ for (f = 0; f < p; ++f)
148
148
  (u = e[f]) && l.get(S[f]) === u && (i[f] = u);
149
149
  }
150
150
  function Im(t) {
@@ -155,8 +155,8 @@ function Dm(t, e) {
155
155
  var n = e ? Rm : Fm, r = this._parents, i = this._groups;
156
156
  typeof t != "function" && (t = Lm(t));
157
157
  for (var o = i.length, s = new Array(o), f = new Array(o), u = new Array(o), l = 0; l < o; ++l) {
158
- var v = r[l], b = i[l], S = b.length, D = zm(t.call(v, v && v.__data__, l, r)), Y = D.length, Ee = f[l] = new Array(Y), Te = s[l] = new Array(Y), se = u[l] = new Array(S);
159
- n(v, b, Ee, Te, se, D, e);
158
+ var p = r[l], x = i[l], S = x.length, D = zm(t.call(p, p && p.__data__, l, r)), Y = D.length, Ee = f[l] = new Array(Y), Te = s[l] = new Array(Y), se = u[l] = new Array(S);
159
+ n(p, x, Ee, Te, se, D, e);
160
160
  for (var Ue = 0, He = 0, H, fe; Ue < Y; ++Ue)
161
161
  if (H = Ee[Ue]) {
162
162
  for (Ue >= He && (He = Ue + 1); !(fe = Te[He]) && ++He < Y; ) ;
@@ -177,8 +177,8 @@ function Mm(t, e, n) {
177
177
  }
178
178
  function Nm(t) {
179
179
  for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, o = r.length, s = Math.min(i, o), f = new Array(i), u = 0; u < s; ++u)
180
- for (var l = n[u], v = r[u], b = l.length, S = f[u] = new Array(b), D, Y = 0; Y < b; ++Y)
181
- (D = l[Y] || v[Y]) && (S[Y] = D);
180
+ for (var l = n[u], p = r[u], x = l.length, S = f[u] = new Array(x), D, Y = 0; Y < x; ++Y)
181
+ (D = l[Y] || p[Y]) && (S[Y] = D);
182
182
  for (; u < i; ++u)
183
183
  f[u] = n[u];
184
184
  return new tn(f, this._parents);
@@ -191,12 +191,12 @@ function Gm() {
191
191
  }
192
192
  function Bm(t) {
193
193
  t || (t = Um);
194
- function e(b, S) {
195
- return b && S ? t(b.__data__, S.__data__) : !b - !S;
194
+ function e(x, S) {
195
+ return x && S ? t(x.__data__, S.__data__) : !x - !S;
196
196
  }
197
197
  for (var n = this._groups, r = n.length, i = new Array(r), o = 0; o < r; ++o) {
198
- for (var s = n[o], f = s.length, u = i[o] = new Array(f), l, v = 0; v < f; ++v)
199
- (l = s[v]) && (u[v] = l);
198
+ for (var s = n[o], f = s.length, u = i[o] = new Array(f), l, p = 0; p < f; ++p)
199
+ (l = s[p]) && (u[p] = l);
200
200
  u.sort(e);
201
201
  }
202
202
  return new tn(i, this._parents).order();
@@ -489,10 +489,10 @@ function Np(t, e, n) {
489
489
  if (arguments.length < 2) {
490
490
  var f = this.node().__on;
491
491
  if (f) {
492
- for (var u = 0, l = f.length, v; u < l; ++u)
493
- for (i = 0, v = f[u]; i < o; ++i)
494
- if ((s = r[i]).type === v.type && s.name === v.name)
495
- return v.value;
492
+ for (var u = 0, l = f.length, p; u < l; ++u)
493
+ for (i = 0, p = f[u]; i < o; ++i)
494
+ if ((s = r[i]).type === p.type && s.name === p.name)
495
+ return p.value;
496
496
  }
497
497
  return;
498
498
  }
@@ -757,24 +757,24 @@ function e0(t, e, n) {
757
757
  n.state = Ju, n.timer.restart(s, n.delay, n.time), n.delay <= l && s(l - n.delay);
758
758
  }
759
759
  function s(l) {
760
- var v, b, S, D;
760
+ var p, x, S, D;
761
761
  if (n.state !== Ju) return u();
762
- for (v in r)
763
- if (D = r[v], D.name === n.name) {
762
+ for (p in r)
763
+ if (D = r[p], D.name === n.name) {
764
764
  if (D.state === Vo) return Ku(s);
765
- D.state === el ? (D.state = $o, D.timer.stop(), D.on.call("interrupt", t, t.__data__, D.index, D.group), delete r[v]) : +v < e && (D.state = $o, D.timer.stop(), D.on.call("cancel", t, t.__data__, D.index, D.group), delete r[v]);
765
+ D.state === el ? (D.state = $o, D.timer.stop(), D.on.call("interrupt", t, t.__data__, D.index, D.group), delete r[p]) : +p < e && (D.state = $o, D.timer.stop(), D.on.call("cancel", t, t.__data__, D.index, D.group), delete r[p]);
766
766
  }
767
767
  if (Ku(function() {
768
768
  n.state === Vo && (n.state = el, n.timer.restart(f, n.delay, n.time), f(l));
769
769
  }), n.state = Ls, n.on.call("start", t, t.__data__, n.index, n.group), n.state === Ls) {
770
- for (n.state = Vo, i = new Array(S = n.tween.length), v = 0, b = -1; v < S; ++v)
771
- (D = n.tween[v].value.call(t, t.__data__, n.index, n.group)) && (i[++b] = D);
772
- i.length = b + 1;
770
+ for (n.state = Vo, i = new Array(S = n.tween.length), p = 0, x = -1; p < S; ++p)
771
+ (D = n.tween[p].value.call(t, t.__data__, n.index, n.group)) && (i[++x] = D);
772
+ i.length = x + 1;
773
773
  }
774
774
  }
775
775
  function f(l) {
776
- for (var v = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(u), n.state = Fs, 1), b = -1, S = i.length; ++b < S; )
777
- i[b].call(t, v);
776
+ for (var p = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(u), n.state = Fs, 1), x = -1, S = i.length; ++x < S; )
777
+ i[x].call(t, p);
778
778
  n.state === Fs && (n.on.call("end", t, t.__data__, n.index, n.group), u());
779
779
  }
780
780
  function u() {
@@ -1127,8 +1127,8 @@ const fa = function t(e) {
1127
1127
  var n = v0(e);
1128
1128
  function r(i, o) {
1129
1129
  var s = n((i = Rs(i)).r, (o = Rs(o)).r), f = n(i.g, o.g), u = n(i.b, o.b), l = lc(i.opacity, o.opacity);
1130
- return function(v) {
1131
- return i.r = s(v), i.g = f(v), i.b = u(v), i.opacity = l(v), i + "";
1130
+ return function(p) {
1131
+ return i.r = s(p), i.g = f(p), i.b = u(p), i.opacity = l(p), i + "";
1132
1132
  };
1133
1133
  }
1134
1134
  return r.gamma = t, r;
@@ -1190,7 +1190,7 @@ function cc(t, e) {
1190
1190
  for (t = t + "", e = e + ""; (r = Is.exec(t)) && (i = ys.exec(e)); )
1191
1191
  (o = i.index) > n && (o = e.slice(n, o), f[s] ? f[s] += o : f[++s] = o), (r = r[0]) === (i = i[0]) ? f[s] ? f[s] += i : f[++s] = i : (f[++s] = null, u.push({ i: s, x: mn(r, i) })), n = ys.lastIndex;
1192
1192
  return n < e.length && (o = e.slice(n), f[s] ? f[s] += o : f[++s] = o), f.length < 2 ? u[0] ? T0(u[0].x) : S0(e) : (e = u.length, function(l) {
1193
- for (var v = 0, b; v < e; ++v) f[(b = u[v]).i] = b.x(l);
1193
+ for (var p = 0, x; p < e; ++p) f[(x = u[p]).i] = x.x(l);
1194
1194
  return f.join("");
1195
1195
  });
1196
1196
  }
@@ -1234,29 +1234,29 @@ function dc(t, e, n, r) {
1234
1234
  function i(l) {
1235
1235
  return l.length ? l.pop() + " " : "";
1236
1236
  }
1237
- function o(l, v, b, S, D, Y) {
1238
- if (l !== b || v !== S) {
1237
+ function o(l, p, x, S, D, Y) {
1238
+ if (l !== x || p !== S) {
1239
1239
  var Ee = D.push("translate(", null, e, null, n);
1240
- Y.push({ i: Ee - 4, x: mn(l, b) }, { i: Ee - 2, x: mn(v, S) });
1241
- } else (b || S) && D.push("translate(" + b + e + S + n);
1240
+ Y.push({ i: Ee - 4, x: mn(l, x) }, { i: Ee - 2, x: mn(p, S) });
1241
+ } else (x || S) && D.push("translate(" + x + e + S + n);
1242
1242
  }
1243
- function s(l, v, b, S) {
1244
- l !== v ? (l - v > 180 ? v += 360 : v - l > 180 && (l += 360), S.push({ i: b.push(i(b) + "rotate(", null, r) - 2, x: mn(l, v) })) : v && b.push(i(b) + "rotate(" + v + r);
1243
+ function s(l, p, x, S) {
1244
+ l !== p ? (l - p > 180 ? p += 360 : p - l > 180 && (l += 360), S.push({ i: x.push(i(x) + "rotate(", null, r) - 2, x: mn(l, p) })) : p && x.push(i(x) + "rotate(" + p + r);
1245
1245
  }
1246
- function f(l, v, b, S) {
1247
- l !== v ? S.push({ i: b.push(i(b) + "skewX(", null, r) - 2, x: mn(l, v) }) : v && b.push(i(b) + "skewX(" + v + r);
1246
+ function f(l, p, x, S) {
1247
+ l !== p ? S.push({ i: x.push(i(x) + "skewX(", null, r) - 2, x: mn(l, p) }) : p && x.push(i(x) + "skewX(" + p + r);
1248
1248
  }
1249
- function u(l, v, b, S, D, Y) {
1250
- if (l !== b || v !== S) {
1249
+ function u(l, p, x, S, D, Y) {
1250
+ if (l !== x || p !== S) {
1251
1251
  var Ee = D.push(i(D) + "scale(", null, ",", null, ")");
1252
- Y.push({ i: Ee - 4, x: mn(l, b) }, { i: Ee - 2, x: mn(v, S) });
1253
- } else (b !== 1 || S !== 1) && D.push(i(D) + "scale(" + b + "," + S + ")");
1254
- }
1255
- return function(l, v) {
1256
- var b = [], S = [];
1257
- return l = t(l), v = t(v), o(l.translateX, l.translateY, v.translateX, v.translateY, b, S), s(l.rotate, v.rotate, b, S), f(l.skewX, v.skewX, b, S), u(l.scaleX, l.scaleY, v.scaleX, v.scaleY, b, S), l = v = null, function(D) {
1258
- for (var Y = -1, Ee = S.length, Te; ++Y < Ee; ) b[(Te = S[Y]).i] = Te.x(D);
1259
- return b.join("");
1252
+ Y.push({ i: Ee - 4, x: mn(l, x) }, { i: Ee - 2, x: mn(p, S) });
1253
+ } else (x !== 1 || S !== 1) && D.push(i(D) + "scale(" + x + "," + S + ")");
1254
+ }
1255
+ return function(l, p) {
1256
+ var x = [], S = [];
1257
+ return l = t(l), p = t(p), o(l.translateX, l.translateY, p.translateX, p.translateY, x, S), s(l.rotate, p.rotate, x, S), f(l.skewX, p.skewX, x, S), u(l.scaleX, l.scaleY, p.scaleX, p.scaleY, x, S), l = p = null, function(D) {
1258
+ for (var Y = -1, Ee = S.length, Te; ++Y < Ee; ) x[(Te = S[Y]).i] = Te.x(D);
1259
+ return x.join("");
1260
1260
  };
1261
1261
  };
1262
1262
  }
@@ -1272,7 +1272,7 @@ function F0(t) {
1272
1272
  }
1273
1273
  const R0 = function t(e, n, r) {
1274
1274
  function i(o, s) {
1275
- var f = o[0], u = o[1], l = o[2], v = s[0], b = s[1], S = s[2], D = v - f, Y = b - u, Ee = D * D + Y * Y, Te, se;
1275
+ var f = o[0], u = o[1], l = o[2], p = s[0], x = s[1], S = s[2], D = p - f, Y = x - u, Ee = D * D + Y * Y, Te, se;
1276
1276
  if (Ee < k0)
1277
1277
  se = Math.log(S / l) / e, Te = function(Ge) {
1278
1278
  return [
@@ -1489,8 +1489,8 @@ function iv(t) {
1489
1489
  function ov(t) {
1490
1490
  if (t._id !== this._id) throw new Error();
1491
1491
  for (var e = this._groups, n = t._groups, r = e.length, i = n.length, o = Math.min(r, i), s = new Array(r), f = 0; f < o; ++f)
1492
- for (var u = e[f], l = n[f], v = u.length, b = s[f] = new Array(v), S, D = 0; D < v; ++D)
1493
- (S = u[D] || l[D]) && (b[D] = S);
1492
+ for (var u = e[f], l = n[f], p = u.length, x = s[f] = new Array(p), S, D = 0; D < p; ++D)
1493
+ (S = u[D] || l[D]) && (x[D] = S);
1494
1494
  for (; f < r; ++f)
1495
1495
  s[f] = e[f];
1496
1496
  return new Nn(s, this._parents, this._name, this._id);
@@ -1526,19 +1526,19 @@ function cv(t) {
1526
1526
  var e = this._name, n = this._id;
1527
1527
  typeof t != "function" && (t = Ws(t));
1528
1528
  for (var r = this._groups, i = r.length, o = new Array(i), s = 0; s < i; ++s)
1529
- for (var f = r[s], u = f.length, l = o[s] = new Array(u), v, b, S = 0; S < u; ++S)
1530
- (v = f[S]) && (b = t.call(v, v.__data__, S, f)) && ("__data__" in v && (b.__data__ = v.__data__), l[S] = b, ma(l[S], e, n, S, l, gn(v, n)));
1529
+ for (var f = r[s], u = f.length, l = o[s] = new Array(u), p, x, S = 0; S < u; ++S)
1530
+ (p = f[S]) && (x = t.call(p, p.__data__, S, f)) && ("__data__" in p && (x.__data__ = p.__data__), l[S] = x, ma(l[S], e, n, S, l, gn(p, n)));
1531
1531
  return new Nn(o, this._parents, e, n);
1532
1532
  }
1533
1533
  function hv(t) {
1534
1534
  var e = this._name, n = this._id;
1535
1535
  typeof t != "function" && (t = Wl(t));
1536
1536
  for (var r = this._groups, i = r.length, o = [], s = [], f = 0; f < i; ++f)
1537
- for (var u = r[f], l = u.length, v, b = 0; b < l; ++b)
1538
- if (v = u[b]) {
1539
- for (var S = t.call(v, v.__data__, b, u), D, Y = gn(v, n), Ee = 0, Te = S.length; Ee < Te; ++Ee)
1537
+ for (var u = r[f], l = u.length, p, x = 0; x < l; ++x)
1538
+ if (p = u[x]) {
1539
+ for (var S = t.call(p, p.__data__, x, u), D, Y = gn(p, n), Ee = 0, Te = S.length; Ee < Te; ++Ee)
1540
1540
  (D = S[Ee]) && ma(D, e, n, Ee, S, Y);
1541
- o.push(S), s.push(v);
1541
+ o.push(S), s.push(p);
1542
1542
  }
1543
1543
  return new Nn(o, s, e, n);
1544
1544
  }
@@ -1575,8 +1575,8 @@ function gv(t, e, n) {
1575
1575
  function yv(t, e) {
1576
1576
  var n, r, i, o = "style." + e, s = "end." + o, f;
1577
1577
  return function() {
1578
- var u = Pn(this, t), l = u.on, v = u.value[o] == null ? f || (f = pc(e)) : void 0;
1579
- (l !== n || i !== v) && (r = (n = l).copy()).on(s, i = v), u.on = r;
1578
+ var u = Pn(this, t), l = u.on, p = u.value[o] == null ? f || (f = pc(e)) : void 0;
1579
+ (l !== n || i !== p) && (r = (n = l).copy()).on(s, i = p), u.on = r;
1580
1580
  };
1581
1581
  }
1582
1582
  function xv(t, e, n) {
@@ -1641,12 +1641,12 @@ function kv() {
1641
1641
  for (var t = this._name, e = this._id, n = vc(), r = this._groups, i = r.length, o = 0; o < i; ++o)
1642
1642
  for (var s = r[o], f = s.length, u, l = 0; l < f; ++l)
1643
1643
  if (u = s[l]) {
1644
- var v = gn(u, e);
1644
+ var p = gn(u, e);
1645
1645
  ma(u, t, n, l, s, {
1646
- time: v.time + v.delay + v.duration,
1646
+ time: p.time + p.delay + p.duration,
1647
1647
  delay: 0,
1648
- duration: v.duration,
1649
- ease: v.ease
1648
+ duration: p.duration,
1649
+ ease: p.ease
1650
1650
  });
1651
1651
  }
1652
1652
  return new Nn(r, this._parents, t, n);
@@ -1658,8 +1658,8 @@ function Lv() {
1658
1658
  --i === 0 && o();
1659
1659
  } };
1660
1660
  n.each(function() {
1661
- var l = Pn(this, r), v = l.on;
1662
- v !== t && (e = (t = v).copy(), e._.cancel.push(f), e._.interrupt.push(f), e._.end.push(u)), l.on = e;
1661
+ var l = Pn(this, r), p = l.on;
1662
+ p !== t && (e = (t = p).copy(), e._.cancel.push(f), e._.interrupt.push(f), e._.end.push(u)), l.on = e;
1663
1663
  }), i === 0 && o();
1664
1664
  });
1665
1665
  }
@@ -1790,12 +1790,12 @@ function Uv() {
1790
1790
  function l(a, h, _) {
1791
1791
  a in h || s("unknown parameter (" + a + ")" + u(_) + ". possible values: " + Object.keys(h).join());
1792
1792
  }
1793
- function v(a, h) {
1793
+ function p(a, h) {
1794
1794
  n(a) || s(
1795
1795
  "invalid parameter type" + u(h) + ". must be a typed array"
1796
1796
  );
1797
1797
  }
1798
- function b(a, h) {
1798
+ function x(a, h) {
1799
1799
  switch (h) {
1800
1800
  case "number":
1801
1801
  return typeof a == "number";
@@ -1814,7 +1814,7 @@ function Uv() {
1814
1814
  }
1815
1815
  }
1816
1816
  function S(a, h, _) {
1817
- b(a, h) || s(
1817
+ x(a, h) || s(
1818
1818
  "invalid parameter type" + u(_) + ". expected " + h + ", got " + typeof a
1819
1819
  );
1820
1820
  }
@@ -2005,7 +2005,7 @@ function Uv() {
2005
2005
  );
2006
2006
  }
2007
2007
  function ke(a, h, _, O) {
2008
- b(a, h) || N(
2008
+ x(a, h) || N(
2009
2009
  "invalid parameter type" + u(_) + ". expected " + h + ", got " + typeof a,
2010
2010
  O || fe()
2011
2011
  );
@@ -2133,7 +2133,7 @@ function Uv() {
2133
2133
  constructor: Te,
2134
2134
  type: S,
2135
2135
  commandType: ke,
2136
- isTypedArray: v,
2136
+ isTypedArray: p,
2137
2137
  nni: D,
2138
2138
  oneOf: Y,
2139
2139
  shaderError: ut,
@@ -3200,8 +3200,8 @@ function Uv() {
3200
3200
  else if (cn(I)) {
3201
3201
  var m = I.data;
3202
3202
  !Array.isArray(m) && y.type === Mr && (y.type = Uf(m));
3203
- var c = I.shape, T = I.stride, P, L, A, w, E, p;
3204
- c.length === 3 ? (A = c[2], p = T[2]) : (d(c.length === 2, "invalid ndarray pixel data, must be 2 or 3D"), A = 1, p = 1), P = c[0], L = c[1], w = T[0], E = T[1], y.alignment = 1, y.width = P, y.height = L, y.channels = A, y.format = y.internalformat = uo[A], y.needsFree = !0, td(y, m, w, E, p, I.offset);
3203
+ var c = I.shape, T = I.stride, P, L, A, w, E, v;
3204
+ c.length === 3 ? (A = c[2], v = T[2]) : (d(c.length === 2, "invalid ndarray pixel data, must be 2 or 3D"), A = 1, v = 1), P = c[0], L = c[1], w = T[0], E = T[1], y.alignment = 1, y.width = P, y.height = L, y.channels = A, y.format = y.internalformat = uo[A], y.needsFree = !0, td(y, m, w, E, v, I.offset);
3205
3205
  } else if (Gf(I) || Bf(I) || Zh(I))
3206
3206
  Gf(I) || Bf(I) ? y.element = I : y.element = I.canvas, y.width = y.element.width, y.height = y.element.height, y.channels = 4;
3207
3207
  else if (Qh(I))
@@ -3211,12 +3211,12 @@ function Uv() {
3211
3211
  else if (Jh(I))
3212
3212
  y.element = I, y.width = I.videoWidth, y.height = I.videoHeight, y.channels = 4;
3213
3213
  else if (Nf(I)) {
3214
- var x = y.width || I[0].length, g = y.height || I.length, R = y.channels;
3214
+ var b = y.width || I[0].length, g = y.height || I.length, R = y.channels;
3215
3215
  pt(I[0][0]) ? R = R || I[0][0].length : R = R || 1;
3216
3216
  for (var F = to.shape(I), V = 1, W = 0; W < F.length; ++W)
3217
3217
  V *= F[W];
3218
3218
  var ue = Vf(y, V);
3219
- to.flatten(I, F, "", ue), $f(y, ue), y.alignment = 1, y.width = x, y.height = g, y.channels = R, y.format = y.internalformat = uo[R], y.needsFree = !0;
3219
+ to.flatten(I, F, "", ue), $f(y, ue), y.alignment = 1, y.width = b, y.height = g, y.channels = R, y.format = y.internalformat = uo[R], y.needsFree = !0;
3220
3220
  }
3221
3221
  y.type === fi ? d(
3222
3222
  _.extensions.indexOf("oes_texture_float") >= 0,
@@ -3449,20 +3449,20 @@ function Uv() {
3449
3449
  }
3450
3450
  function Ke(c, T, P, L) {
3451
3451
  d(!!c, "must specify image data");
3452
- var A = T | 0, w = P | 0, E = L | 0, p = pe();
3453
- return $(p, I), p.width = 0, p.height = 0, he(p, c), p.width = p.width || (I.width >> E) - A, p.height = p.height || (I.height >> E) - w, d(
3454
- I.type === p.type && I.format === p.format && I.internalformat === p.internalformat,
3452
+ var A = T | 0, w = P | 0, E = L | 0, v = pe();
3453
+ return $(v, I), v.width = 0, v.height = 0, he(v, c), v.width = v.width || (I.width >> E) - A, v.height = v.height || (I.height >> E) - w, d(
3454
+ I.type === v.type && I.format === v.format && I.internalformat === v.internalformat,
3455
3455
  "incompatible format for texture.subimage"
3456
3456
  ), d(
3457
- A >= 0 && w >= 0 && A + p.width <= I.width && w + p.height <= I.height,
3457
+ A >= 0 && w >= 0 && A + v.width <= I.width && w + v.height <= I.height,
3458
3458
  "texture.subimage write out of bounds"
3459
3459
  ), d(
3460
3460
  I.mipmask & 1 << E,
3461
3461
  "missing mipmap data"
3462
3462
  ), d(
3463
- p.data || p.element || p.needsCopy,
3463
+ v.data || v.element || v.needsCopy,
3464
3464
  "missing image data"
3465
- ), Gt(I), Ve(p, bn, A, w, E), ot(), ye(p), _e;
3465
+ ), Gt(I), Ve(v, bn, A, w, E), ot(), ye(v), _e;
3466
3466
  }
3467
3467
  function m(c, T) {
3468
3468
  var P = c | 0, L = T | 0 || P;
@@ -3501,7 +3501,7 @@ function Uv() {
3501
3501
  var c = new qe(Ca);
3502
3502
  It[c.id] = c, z.cubeCount++;
3503
3503
  var T = new Array(6);
3504
- function P(w, E, p, x, g, R) {
3504
+ function P(w, E, v, b, g, R) {
3505
3505
  var F, V = c.texInfo;
3506
3506
  for (ht.call(V), F = 0; F < 6; ++F)
3507
3507
  T[F] = tt();
@@ -3511,7 +3511,7 @@ function Uv() {
3511
3511
  $e(T[F], W, W);
3512
3512
  } else if (typeof w == "object")
3513
3513
  if (E)
3514
- Je(T[0], w), Je(T[1], E), Je(T[2], p), Je(T[3], x), Je(T[4], g), Je(T[5], R);
3514
+ Je(T[0], w), Je(T[1], E), Je(T[2], v), Je(T[3], b), Je(T[4], g), Je(T[5], R);
3515
3515
  else if (Tt(V, w), Se(c, w), "faces" in w) {
3516
3516
  var ue = w.faces;
3517
3517
  for (d(
@@ -3542,9 +3542,9 @@ function Uv() {
3542
3542
  At(T[F]);
3543
3543
  return P;
3544
3544
  }
3545
- function L(w, E, p, x, g) {
3545
+ function L(w, E, v, b, g) {
3546
3546
  d(!!E, "must specify image data"), d(typeof w == "number" && w === (w | 0) && w >= 0 && w < 6, "invalid face");
3547
- var R = p | 0, F = x | 0, V = g | 0, W = pe();
3547
+ var R = v | 0, F = b | 0, V = g | 0, W = pe();
3548
3548
  return $(W, c), W.width = 0, W.height = 0, he(W, E), W.width = W.width || (c.width >> V) - R, W.height = W.height || (c.height >> V) - F, d(
3549
3549
  c.type === W.type && c.format === W.format && c.internalformat === W.internalformat,
3550
3550
  "incompatible format for texture.subimage"
@@ -3563,14 +3563,14 @@ function Uv() {
3563
3563
  var E = w | 0;
3564
3564
  if (E !== c.width) {
3565
3565
  P.width = c.width = E, P.height = c.height = E, Gt(c);
3566
- for (var p = 0; p < 6; ++p)
3567
- for (var x = 0; c.mipmask >> x; ++x)
3566
+ for (var v = 0; v < 6; ++v)
3567
+ for (var b = 0; c.mipmask >> b; ++b)
3568
3568
  a.texImage2D(
3569
- io + p,
3570
- x,
3569
+ io + v,
3570
+ b,
3571
3571
  c.format,
3572
- E >> x,
3573
- E >> x,
3572
+ E >> b,
3573
+ E >> b,
3574
3574
  0,
3575
3575
  c.format,
3576
3576
  c.type,
@@ -4862,11 +4862,11 @@ function Uv() {
4862
4862
  var P = c(he), L = m.shared = {
4863
4863
  props: "a0"
4864
4864
  };
4865
- Object.keys(he).forEach(function(x) {
4866
- L[x] = T.def(P, ".", x);
4865
+ Object.keys(he).forEach(function(b) {
4866
+ L[b] = T.def(P, ".", b);
4867
4867
  }), d.optional(function() {
4868
- m.CHECK = c(d), m.commandStr = d.guessCommand(), m.command = c(m.commandStr), m.assert = function(x, g, R) {
4869
- x(
4868
+ m.CHECK = c(d), m.commandStr = d.guessCommand(), m.command = c(m.commandStr), m.assert = function(b, g, R) {
4869
+ b(
4870
4870
  "if(!(",
4871
4871
  g,
4872
4872
  "))",
@@ -4880,13 +4880,13 @@ function Uv() {
4880
4880
  }, de.invalidBlendCombinations = Nu;
4881
4881
  });
4882
4882
  var A = m.next = {}, w = m.current = {};
4883
- Object.keys($).forEach(function(x) {
4884
- Array.isArray(ge[x]) && (A[x] = T.def(L.next, ".", x), w[x] = T.def(L.current, ".", x));
4883
+ Object.keys($).forEach(function(b) {
4884
+ Array.isArray(ge[b]) && (A[b] = T.def(L.next, ".", b), w[b] = T.def(L.current, ".", b));
4885
4885
  });
4886
4886
  var E = m.constants = {};
4887
- Object.keys(de).forEach(function(x) {
4888
- E[x] = T.def(JSON.stringify(de[x]));
4889
- }), m.invoke = function(x, g) {
4887
+ Object.keys(de).forEach(function(b) {
4888
+ E[b] = T.def(JSON.stringify(de[b]));
4889
+ }), m.invoke = function(b, g) {
4890
4890
  switch (g.type) {
4891
4891
  case Ya:
4892
4892
  var R = [
@@ -4895,36 +4895,36 @@ function Uv() {
4895
4895
  L.props,
4896
4896
  m.batchId
4897
4897
  ];
4898
- return x.def(
4898
+ return b.def(
4899
4899
  c(g.data),
4900
4900
  ".call(",
4901
4901
  R.slice(0, Math.max(g.data.length + 1, 4)),
4902
4902
  ")"
4903
4903
  );
4904
4904
  case Za:
4905
- return x.def(L.props, g.data);
4905
+ return b.def(L.props, g.data);
4906
4906
  case Qa:
4907
- return x.def(L.context, g.data);
4907
+ return b.def(L.context, g.data);
4908
4908
  case Ka:
4909
- return x.def("this", g.data);
4909
+ return b.def("this", g.data);
4910
4910
  case go:
4911
- return g.data.append(m, x), g.data.ref;
4911
+ return g.data.append(m, b), g.data.ref;
4912
4912
  case hu:
4913
4913
  return g.data.toString();
4914
4914
  case du:
4915
4915
  return g.data.map(function(F) {
4916
- return m.invoke(x, F);
4916
+ return m.invoke(b, F);
4917
4917
  });
4918
4918
  }
4919
4919
  }, m.attribCache = {};
4920
- var p = {};
4921
- return m.scopeAttrib = function(x) {
4922
- var g = h.id(x);
4923
- if (g in p)
4924
- return p[g];
4920
+ var v = {};
4921
+ return m.scopeAttrib = function(b) {
4922
+ var g = h.id(b);
4923
+ if (g in v)
4924
+ return v[g];
4925
4925
  var R = ie.scope[g];
4926
4926
  R || (R = ie.scope[g] = new k());
4927
- var F = p[g] = c(R);
4927
+ var F = v[g] = c(R);
4928
4928
  return F;
4929
4929
  }, m;
4930
4930
  }
@@ -4948,53 +4948,53 @@ function Uv() {
4948
4948
  if (cr in T) {
4949
4949
  var L = T[cr];
4950
4950
  return L ? (L = K.getFramebuffer(L), d.command(L, "invalid framebuffer object"), St(function(w, E) {
4951
- var p = w.link(L), x = w.shared;
4951
+ var v = w.link(L), b = w.shared;
4952
4952
  E.set(
4953
- x.framebuffer,
4953
+ b.framebuffer,
4954
4954
  ".next",
4955
- p
4955
+ v
4956
4956
  );
4957
- var g = x.context;
4957
+ var g = b.context;
4958
4958
  return E.set(
4959
4959
  g,
4960
4960
  "." + Xr,
4961
- p + ".width"
4961
+ v + ".width"
4962
4962
  ), E.set(
4963
4963
  g,
4964
4964
  "." + jr,
4965
- p + ".height"
4966
- ), p;
4965
+ v + ".height"
4966
+ ), v;
4967
4967
  })) : St(function(w, E) {
4968
- var p = w.shared;
4968
+ var v = w.shared;
4969
4969
  E.set(
4970
- p.framebuffer,
4970
+ v.framebuffer,
4971
4971
  ".next",
4972
4972
  "null"
4973
4973
  );
4974
- var x = p.context;
4974
+ var b = v.context;
4975
4975
  return E.set(
4976
- x,
4976
+ b,
4977
4977
  "." + Xr,
4978
- x + "." + Lu
4978
+ b + "." + Lu
4979
4979
  ), E.set(
4980
- x,
4980
+ b,
4981
4981
  "." + jr,
4982
- x + "." + Fu
4982
+ b + "." + Fu
4983
4983
  ), "null";
4984
4984
  });
4985
4985
  } else if (cr in P) {
4986
4986
  var A = P[cr];
4987
4987
  return Zt(A, function(w, E) {
4988
- var p = w.invoke(E, A), x = w.shared, g = x.framebuffer, R = E.def(
4988
+ var v = w.invoke(E, A), b = w.shared, g = b.framebuffer, R = E.def(
4989
4989
  g,
4990
4990
  ".getFramebuffer(",
4991
- p,
4991
+ v,
4992
4992
  ")"
4993
4993
  );
4994
4994
  d.optional(function() {
4995
4995
  w.assert(
4996
4996
  E,
4997
- "!" + p + "||" + R,
4997
+ "!" + v + "||" + R,
4998
4998
  "invalid framebuffer object"
4999
4999
  );
5000
5000
  }), E.set(
@@ -5002,7 +5002,7 @@ function Uv() {
5002
5002
  ".next",
5003
5003
  R
5004
5004
  );
5005
- var F = x.context;
5005
+ var F = b.context;
5006
5006
  return E.set(
5007
5007
  F,
5008
5008
  "." + Xr,
@@ -5018,30 +5018,30 @@ function Uv() {
5018
5018
  }
5019
5019
  function ze(m, c, T) {
5020
5020
  var P = m.static, L = m.dynamic;
5021
- function A(p) {
5022
- if (p in P) {
5023
- var x = P[p];
5024
- d.commandType(x, "object", "invalid " + p, T.commandStr);
5025
- var g = !0, R = x.x | 0, F = x.y | 0, V, W;
5026
- return "width" in x ? (V = x.width | 0, d.command(V >= 0, "invalid " + p, T.commandStr)) : g = !1, "height" in x ? (W = x.height | 0, d.command(W >= 0, "invalid " + p, T.commandStr)) : g = !1, new Ft(
5021
+ function A(v) {
5022
+ if (v in P) {
5023
+ var b = P[v];
5024
+ d.commandType(b, "object", "invalid " + v, T.commandStr);
5025
+ var g = !0, R = b.x | 0, F = b.y | 0, V, W;
5026
+ return "width" in b ? (V = b.width | 0, d.command(V >= 0, "invalid " + v, T.commandStr)) : g = !1, "height" in b ? (W = b.height | 0, d.command(W >= 0, "invalid " + v, T.commandStr)) : g = !1, new Ft(
5027
5027
  !g && c && c.thisDep,
5028
5028
  !g && c && c.contextDep,
5029
5029
  !g && c && c.propDep,
5030
5030
  function(Le, be) {
5031
5031
  var q = Le.shared.context, U = V;
5032
- "width" in x || (U = be.def(q, ".", Xr, "-", R));
5032
+ "width" in b || (U = be.def(q, ".", Xr, "-", R));
5033
5033
  var Pe = W;
5034
- return "height" in x || (Pe = be.def(q, ".", jr, "-", F)), [R, F, U, Pe];
5034
+ return "height" in b || (Pe = be.def(q, ".", jr, "-", F)), [R, F, U, Pe];
5035
5035
  }
5036
5036
  );
5037
- } else if (p in L) {
5038
- var ue = L[p], Me = Zt(ue, function(Le, be) {
5037
+ } else if (v in L) {
5038
+ var ue = L[v], Me = Zt(ue, function(Le, be) {
5039
5039
  var q = Le.invoke(be, ue);
5040
5040
  d.optional(function() {
5041
5041
  Le.assert(
5042
5042
  be,
5043
5043
  q + "&&typeof " + q + '==="object"',
5044
- "invalid " + p
5044
+ "invalid " + v
5045
5045
  );
5046
5046
  });
5047
5047
  var U = Le.shared.context, Pe = be.def(q, ".x|0"), we = be.def(q, ".y|0"), Oe = be.def(
@@ -5075,7 +5075,7 @@ function Uv() {
5075
5075
  Le.assert(
5076
5076
  be,
5077
5077
  Oe + ">=0&&" + ft + ">=0",
5078
- "invalid " + p
5078
+ "invalid " + v
5079
5079
  );
5080
5080
  }), [Pe, we, Oe, ft];
5081
5081
  });
@@ -5102,13 +5102,13 @@ function Uv() {
5102
5102
  w.thisDep,
5103
5103
  w.contextDep,
5104
5104
  w.propDep,
5105
- function(p, x) {
5106
- var g = E.append(p, x), R = p.shared.context;
5107
- return x.set(
5105
+ function(v, b) {
5106
+ var g = E.append(v, b), R = v.shared.context;
5107
+ return b.set(
5108
5108
  R,
5109
5109
  "." + Dd,
5110
5110
  g[2]
5111
- ), x.set(
5111
+ ), b.set(
5112
5112
  R,
5113
5113
  "." + zd,
5114
5114
  g[3]
@@ -5167,10 +5167,10 @@ function Uv() {
5167
5167
  }
5168
5168
  return null;
5169
5169
  }
5170
- var w = A(mi), E = A(di), p = null, x;
5171
- return Zn(w) && Zn(E) ? (p = ae.program(E.id, w.id, null, T), x = St(function(g, R) {
5172
- return g.link(p);
5173
- })) : x = new Ft(
5170
+ var w = A(mi), E = A(di), v = null, b;
5171
+ return Zn(w) && Zn(E) ? (v = ae.program(E.id, w.id, null, T), b = St(function(g, R) {
5172
+ return g.link(v);
5173
+ })) : b = new Ft(
5174
5174
  w && w.thisDep || E && E.thisDep,
5175
5175
  w && w.contextDep || E && E.contextDep,
5176
5176
  w && w.propDep || E && E.propDep,
@@ -5187,8 +5187,8 @@ function Uv() {
5187
5187
  ), {
5188
5188
  frag: w,
5189
5189
  vert: E,
5190
- progVar: x,
5191
- program: p
5190
+ progVar: b,
5191
+ program: v
5192
5192
  };
5193
5193
  }
5194
5194
  function vt(m, c) {
@@ -5210,14 +5210,14 @@ function Uv() {
5210
5210
  }
5211
5211
  return null;
5212
5212
  }
5213
- var E = w(), p = !1;
5214
- function x() {
5213
+ var E = w(), v = !1;
5214
+ function b() {
5215
5215
  if (hr in T) {
5216
5216
  var be = T[hr];
5217
5217
  if (L.elements = be, Lo(be)) {
5218
5218
  var q = L.elements = z.create(be, !0);
5219
- be = z.getElements(q), p = !0;
5220
- } else be && (be = z.getElements(be), p = !0, d.command(be, "invalid elements", c.commandStr));
5219
+ be = z.getElements(q), v = !0;
5220
+ } else be && (be = z.getElements(be), v = !0, d.command(be, "invalid elements", c.commandStr));
5221
5221
  var U = St(function(we, Oe) {
5222
5222
  if (be) {
5223
5223
  var ft = we.link(be);
@@ -5227,7 +5227,7 @@ function Uv() {
5227
5227
  });
5228
5228
  return U.value = be, U;
5229
5229
  } else if (hr in P) {
5230
- p = !0;
5230
+ v = !0;
5231
5231
  var Pe = P[hr];
5232
5232
  return Zt(Pe, function(we, Oe) {
5233
5233
  var ft = we.shared, Bt = ft.isBufferArgs, gr = ft.elements, In = we.invoke(Oe, Pe), Tn = Oe.def("null"), Qn = Oe.def(Bt, "(", In, ")"), yr = we.cond(Qn).then(Tn, "=", gr, ".createStream(", In, ");").else(Tn, "=", gr, ".getElements(", In, ");");
@@ -5252,7 +5252,7 @@ function Uv() {
5252
5252
  );
5253
5253
  return null;
5254
5254
  }
5255
- var g = x();
5255
+ var g = b();
5256
5256
  function R() {
5257
5257
  if (dr in T) {
5258
5258
  var be = T[dr];
@@ -5272,7 +5272,7 @@ function Uv() {
5272
5272
  }), Pe.def(we, "[", Oe, "]");
5273
5273
  });
5274
5274
  } else {
5275
- if (p)
5275
+ if (v)
5276
5276
  return Zn(g) ? g.value ? St(function(U, Pe) {
5277
5277
  return Pe.def(U.ELEMENTS, ".primType");
5278
5278
  }) : St(function() {
@@ -5317,7 +5317,7 @@ function Uv() {
5317
5317
  })), ft;
5318
5318
  });
5319
5319
  } else if (q) {
5320
- if (p)
5320
+ if (v)
5321
5321
  return St(function(we, Oe) {
5322
5322
  return we.OFFSET = 0, 0;
5323
5323
  });
@@ -5364,7 +5364,7 @@ function Uv() {
5364
5364
  );
5365
5365
  }), Bt;
5366
5366
  });
5367
- } else if (p)
5367
+ } else if (v)
5368
5368
  if (Zn(g)) {
5369
5369
  if (g)
5370
5370
  return V ? new Ft(
@@ -5437,7 +5437,7 @@ function Uv() {
5437
5437
  offset: V,
5438
5438
  vao: E,
5439
5439
  vaoActive: A,
5440
- elementsActive: p,
5440
+ elementsActive: v,
5441
5441
  // static draw props
5442
5442
  static: L
5443
5443
  };
@@ -5446,16 +5446,16 @@ function Uv() {
5446
5446
  var T = m.static, P = m.dynamic, L = {};
5447
5447
  return Fe.forEach(function(A) {
5448
5448
  var w = Se(A);
5449
- function E(p, x) {
5449
+ function E(v, b) {
5450
5450
  if (A in T) {
5451
- var g = p(T[A]);
5451
+ var g = v(T[A]);
5452
5452
  L[w] = St(function() {
5453
5453
  return g;
5454
5454
  });
5455
5455
  } else if (A in P) {
5456
5456
  var R = P[A];
5457
5457
  L[w] = Zt(R, function(F, V) {
5458
- return x(F, V, F.invoke(V, R));
5458
+ return b(F, V, F.invoke(V, R));
5459
5459
  });
5460
5460
  }
5461
5461
  }
@@ -5471,84 +5471,84 @@ function Uv() {
5471
5471
  case Au:
5472
5472
  case bu:
5473
5473
  return E(
5474
- function(p) {
5475
- return d.commandType(p, "boolean", A, c.commandStr), p;
5474
+ function(v) {
5475
+ return d.commandType(v, "boolean", A, c.commandStr), v;
5476
5476
  },
5477
- function(p, x, g) {
5477
+ function(v, b, g) {
5478
5478
  return d.optional(function() {
5479
- p.assert(
5480
- x,
5479
+ v.assert(
5480
+ b,
5481
5481
  "typeof " + g + '==="boolean"',
5482
5482
  "invalid flag " + A,
5483
- p.commandStr
5483
+ v.commandStr
5484
5484
  );
5485
5485
  }), g;
5486
5486
  }
5487
5487
  );
5488
5488
  case yu:
5489
5489
  return E(
5490
- function(p) {
5491
- return d.commandParameter(p, qr, "invalid " + A, c.commandStr), qr[p];
5490
+ function(v) {
5491
+ return d.commandParameter(v, qr, "invalid " + A, c.commandStr), qr[v];
5492
5492
  },
5493
- function(p, x, g) {
5494
- var R = p.constants.compareFuncs;
5493
+ function(v, b, g) {
5494
+ var R = v.constants.compareFuncs;
5495
5495
  return d.optional(function() {
5496
- p.assert(
5497
- x,
5496
+ v.assert(
5497
+ b,
5498
5498
  g + " in " + R,
5499
5499
  "invalid " + A + ", must be one of " + Object.keys(qr)
5500
5500
  );
5501
- }), x.def(R, "[", g, "]");
5501
+ }), b.def(R, "[", g, "]");
5502
5502
  }
5503
5503
  );
5504
5504
  case xu:
5505
5505
  return E(
5506
- function(p) {
5506
+ function(v) {
5507
5507
  return d.command(
5508
- pt(p) && p.length === 2 && typeof p[0] == "number" && typeof p[1] == "number" && p[0] <= p[1],
5508
+ pt(v) && v.length === 2 && typeof v[0] == "number" && typeof v[1] == "number" && v[0] <= v[1],
5509
5509
  "depth range is 2d array",
5510
5510
  c.commandStr
5511
- ), p;
5511
+ ), v;
5512
5512
  },
5513
- function(p, x, g) {
5513
+ function(v, b, g) {
5514
5514
  d.optional(function() {
5515
- p.assert(
5516
- x,
5517
- p.shared.isArrayLike + "(" + g + ")&&" + g + ".length===2&&typeof " + g + '[0]==="number"&&typeof ' + g + '[1]==="number"&&' + g + "[0]<=" + g + "[1]",
5515
+ v.assert(
5516
+ b,
5517
+ v.shared.isArrayLike + "(" + g + ")&&" + g + ".length===2&&typeof " + g + '[0]==="number"&&typeof ' + g + '[1]==="number"&&' + g + "[0]<=" + g + "[1]",
5518
5518
  "depth range must be a 2d array"
5519
5519
  );
5520
5520
  });
5521
- var R = x.def("+", g, "[0]"), F = x.def("+", g, "[1]");
5521
+ var R = b.def("+", g, "[0]"), F = b.def("+", g, "[1]");
5522
5522
  return [R, F];
5523
5523
  }
5524
5524
  );
5525
5525
  case es:
5526
5526
  return E(
5527
- function(p) {
5528
- d.commandType(p, "object", "blend.func", c.commandStr);
5529
- var x = "srcRGB" in p ? p.srcRGB : p.src, g = "srcAlpha" in p ? p.srcAlpha : p.src, R = "dstRGB" in p ? p.dstRGB : p.dst, F = "dstAlpha" in p ? p.dstAlpha : p.dst;
5530
- return d.commandParameter(x, _n, w + ".srcRGB", c.commandStr), d.commandParameter(g, _n, w + ".srcAlpha", c.commandStr), d.commandParameter(R, _n, w + ".dstRGB", c.commandStr), d.commandParameter(F, _n, w + ".dstAlpha", c.commandStr), d.command(
5531
- Nu.indexOf(x + ", " + R) === -1,
5532
- "unallowed blending combination (srcRGB, dstRGB) = (" + x + ", " + R + ")",
5527
+ function(v) {
5528
+ d.commandType(v, "object", "blend.func", c.commandStr);
5529
+ var b = "srcRGB" in v ? v.srcRGB : v.src, g = "srcAlpha" in v ? v.srcAlpha : v.src, R = "dstRGB" in v ? v.dstRGB : v.dst, F = "dstAlpha" in v ? v.dstAlpha : v.dst;
5530
+ return d.commandParameter(b, _n, w + ".srcRGB", c.commandStr), d.commandParameter(g, _n, w + ".srcAlpha", c.commandStr), d.commandParameter(R, _n, w + ".dstRGB", c.commandStr), d.commandParameter(F, _n, w + ".dstAlpha", c.commandStr), d.command(
5531
+ Nu.indexOf(b + ", " + R) === -1,
5532
+ "unallowed blending combination (srcRGB, dstRGB) = (" + b + ", " + R + ")",
5533
5533
  c.commandStr
5534
5534
  ), [
5535
- _n[x],
5535
+ _n[b],
5536
5536
  _n[R],
5537
5537
  _n[g],
5538
5538
  _n[F]
5539
5539
  ];
5540
5540
  },
5541
- function(p, x, g) {
5542
- var R = p.constants.blendFuncs;
5541
+ function(v, b, g) {
5542
+ var R = v.constants.blendFuncs;
5543
5543
  d.optional(function() {
5544
- p.assert(
5545
- x,
5544
+ v.assert(
5545
+ b,
5546
5546
  g + "&&typeof " + g + '==="object"',
5547
5547
  "invalid blend func, must be an object"
5548
5548
  );
5549
5549
  });
5550
5550
  function F(q, U) {
5551
- var Pe = x.def(
5551
+ var Pe = b.def(
5552
5552
  '"',
5553
5553
  q,
5554
5554
  U,
@@ -5565,8 +5565,8 @@ function Uv() {
5565
5565
  q
5566
5566
  );
5567
5567
  return d.optional(function() {
5568
- p.assert(
5569
- x,
5568
+ v.assert(
5569
+ b,
5570
5570
  Pe + " in " + R,
5571
5571
  "invalid " + A + "." + q + U + ", must be one of " + Object.keys(_n)
5572
5572
  );
@@ -5574,53 +5574,53 @@ function Uv() {
5574
5574
  }
5575
5575
  var V = F("src", "RGB"), W = F("dst", "RGB");
5576
5576
  d.optional(function() {
5577
- var q = p.constants.invalidBlendCombinations;
5578
- p.assert(
5579
- x,
5577
+ var q = v.constants.invalidBlendCombinations;
5578
+ v.assert(
5579
+ b,
5580
5580
  q + ".indexOf(" + V + '+", "+' + W + ") === -1 ",
5581
5581
  "unallowed blending combination for (srcRGB, dstRGB)"
5582
5582
  );
5583
5583
  });
5584
- var ue = x.def(R, "[", V, "]"), Me = x.def(R, "[", F("src", "Alpha"), "]"), Le = x.def(R, "[", W, "]"), be = x.def(R, "[", F("dst", "Alpha"), "]");
5584
+ var ue = b.def(R, "[", V, "]"), Me = b.def(R, "[", F("src", "Alpha"), "]"), Le = b.def(R, "[", W, "]"), be = b.def(R, "[", F("dst", "Alpha"), "]");
5585
5585
  return [ue, Le, Me, be];
5586
5586
  }
5587
5587
  );
5588
5588
  case Ja:
5589
5589
  return E(
5590
- function(p) {
5591
- if (typeof p == "string")
5592
- return d.commandParameter(p, G, "invalid " + A, c.commandStr), [
5593
- G[p],
5594
- G[p]
5590
+ function(v) {
5591
+ if (typeof v == "string")
5592
+ return d.commandParameter(v, G, "invalid " + A, c.commandStr), [
5593
+ G[v],
5594
+ G[v]
5595
5595
  ];
5596
- if (typeof p == "object")
5596
+ if (typeof v == "object")
5597
5597
  return d.commandParameter(
5598
- p.rgb,
5598
+ v.rgb,
5599
5599
  G,
5600
5600
  A + ".rgb",
5601
5601
  c.commandStr
5602
5602
  ), d.commandParameter(
5603
- p.alpha,
5603
+ v.alpha,
5604
5604
  G,
5605
5605
  A + ".alpha",
5606
5606
  c.commandStr
5607
5607
  ), [
5608
- G[p.rgb],
5609
- G[p.alpha]
5608
+ G[v.rgb],
5609
+ G[v.alpha]
5610
5610
  ];
5611
5611
  d.commandRaise("invalid blend.equation", c.commandStr);
5612
5612
  },
5613
- function(p, x, g) {
5614
- var R = p.constants.blendEquations, F = x.def(), V = x.def(), W = p.cond("typeof ", g, '==="string"');
5613
+ function(v, b, g) {
5614
+ var R = v.constants.blendEquations, F = b.def(), V = b.def(), W = v.cond("typeof ", g, '==="string"');
5615
5615
  return d.optional(function() {
5616
5616
  function ue(Me, Le, be) {
5617
- p.assert(
5617
+ v.assert(
5618
5618
  Me,
5619
5619
  be + " in " + R,
5620
5620
  "invalid " + Le + ", must be one of " + Object.keys(G)
5621
5621
  );
5622
5622
  }
5623
- ue(W.then, A, g), p.assert(
5623
+ ue(W.then, A, g), v.assert(
5624
5624
  W.else,
5625
5625
  g + "&&typeof " + g + '==="object"',
5626
5626
  "invalid " + A
@@ -5647,64 +5647,64 @@ function Uv() {
5647
5647
  "[",
5648
5648
  g,
5649
5649
  ".alpha];"
5650
- ), x(W), [F, V];
5650
+ ), b(W), [F, V];
5651
5651
  }
5652
5652
  );
5653
5653
  case vu:
5654
5654
  return E(
5655
- function(p) {
5655
+ function(v) {
5656
5656
  return d.command(
5657
- pt(p) && p.length === 4,
5657
+ pt(v) && v.length === 4,
5658
5658
  "blend.color must be a 4d array",
5659
5659
  c.commandStr
5660
- ), Xt(4, function(x) {
5661
- return +p[x];
5660
+ ), Xt(4, function(b) {
5661
+ return +v[b];
5662
5662
  });
5663
5663
  },
5664
- function(p, x, g) {
5664
+ function(v, b, g) {
5665
5665
  return d.optional(function() {
5666
- p.assert(
5667
- x,
5668
- p.shared.isArrayLike + "(" + g + ")&&" + g + ".length===4",
5666
+ v.assert(
5667
+ b,
5668
+ v.shared.isArrayLike + "(" + g + ")&&" + g + ".length===4",
5669
5669
  "blend.color must be a 4d array"
5670
5670
  );
5671
5671
  }), Xt(4, function(R) {
5672
- return x.def("+", g, "[", R, "]");
5672
+ return b.def("+", g, "[", R, "]");
5673
5673
  });
5674
5674
  }
5675
5675
  );
5676
5676
  case Pu:
5677
5677
  return E(
5678
- function(p) {
5679
- return d.commandType(p, "number", w, c.commandStr), p | 0;
5678
+ function(v) {
5679
+ return d.commandType(v, "number", w, c.commandStr), v | 0;
5680
5680
  },
5681
- function(p, x, g) {
5681
+ function(v, b, g) {
5682
5682
  return d.optional(function() {
5683
- p.assert(
5684
- x,
5683
+ v.assert(
5684
+ b,
5685
5685
  "typeof " + g + '==="number"',
5686
5686
  "invalid stencil.mask"
5687
5687
  );
5688
- }), x.def(g, "|0");
5688
+ }), b.def(g, "|0");
5689
5689
  }
5690
5690
  );
5691
5691
  case as:
5692
5692
  return E(
5693
- function(p) {
5694
- d.commandType(p, "object", w, c.commandStr);
5695
- var x = p.cmp || "keep", g = p.ref || 0, R = "mask" in p ? p.mask : -1;
5696
- return d.commandParameter(x, qr, A + ".cmp", c.commandStr), d.commandType(g, "number", A + ".ref", c.commandStr), d.commandType(R, "number", A + ".mask", c.commandStr), [
5697
- qr[x],
5693
+ function(v) {
5694
+ d.commandType(v, "object", w, c.commandStr);
5695
+ var b = v.cmp || "keep", g = v.ref || 0, R = "mask" in v ? v.mask : -1;
5696
+ return d.commandParameter(b, qr, A + ".cmp", c.commandStr), d.commandType(g, "number", A + ".ref", c.commandStr), d.commandType(R, "number", A + ".mask", c.commandStr), [
5697
+ qr[b],
5698
5698
  g,
5699
5699
  R
5700
5700
  ];
5701
5701
  },
5702
- function(p, x, g) {
5703
- var R = p.constants.compareFuncs;
5702
+ function(v, b, g) {
5703
+ var R = v.constants.compareFuncs;
5704
5704
  d.optional(function() {
5705
5705
  function ue() {
5706
- p.assert(
5707
- x,
5706
+ v.assert(
5707
+ b,
5708
5708
  Array.prototype.join.call(arguments, ""),
5709
5709
  "invalid stencil.func"
5710
5710
  );
@@ -5719,7 +5719,7 @@ function Uv() {
5719
5719
  ")"
5720
5720
  );
5721
5721
  });
5722
- var F = x.def(
5722
+ var F = b.def(
5723
5723
  '"cmp" in ',
5724
5724
  g,
5725
5725
  "?",
@@ -5729,7 +5729,7 @@ function Uv() {
5729
5729
  ".cmp]",
5730
5730
  ":",
5731
5731
  qn
5732
- ), V = x.def(g, ".ref|0"), W = x.def(
5732
+ ), V = b.def(g, ".ref|0"), W = b.def(
5733
5733
  '"mask" in ',
5734
5734
  g,
5735
5735
  "?",
@@ -5742,33 +5742,33 @@ function Uv() {
5742
5742
  case ss:
5743
5743
  case ci:
5744
5744
  return E(
5745
- function(p) {
5746
- d.commandType(p, "object", w, c.commandStr);
5747
- var x = p.fail || "keep", g = p.zfail || "keep", R = p.zpass || "keep";
5748
- return d.commandParameter(x, Yn, A + ".fail", c.commandStr), d.commandParameter(g, Yn, A + ".zfail", c.commandStr), d.commandParameter(R, Yn, A + ".zpass", c.commandStr), [
5745
+ function(v) {
5746
+ d.commandType(v, "object", w, c.commandStr);
5747
+ var b = v.fail || "keep", g = v.zfail || "keep", R = v.zpass || "keep";
5748
+ return d.commandParameter(b, Yn, A + ".fail", c.commandStr), d.commandParameter(g, Yn, A + ".zfail", c.commandStr), d.commandParameter(R, Yn, A + ".zpass", c.commandStr), [
5749
5749
  A === ci ? pr : _i,
5750
- Yn[x],
5750
+ Yn[b],
5751
5751
  Yn[g],
5752
5752
  Yn[R]
5753
5753
  ];
5754
5754
  },
5755
- function(p, x, g) {
5756
- var R = p.constants.stencilOps;
5755
+ function(v, b, g) {
5756
+ var R = v.constants.stencilOps;
5757
5757
  d.optional(function() {
5758
- p.assert(
5759
- x,
5758
+ v.assert(
5759
+ b,
5760
5760
  g + "&&typeof " + g + '==="object"',
5761
5761
  "invalid " + A
5762
5762
  );
5763
5763
  });
5764
5764
  function F(V) {
5765
5765
  return d.optional(function() {
5766
- p.assert(
5767
- x,
5766
+ v.assert(
5767
+ b,
5768
5768
  '!("' + V + '" in ' + g + ")||(" + g + "." + V + " in " + R + ")",
5769
5769
  "invalid " + A + "." + V + ", must be one of " + Object.keys(Yn)
5770
5770
  );
5771
- }), x.def(
5771
+ }), b.def(
5772
5772
  '"',
5773
5773
  V,
5774
5774
  '" in ',
@@ -5793,52 +5793,52 @@ function Uv() {
5793
5793
  );
5794
5794
  case is:
5795
5795
  return E(
5796
- function(p) {
5797
- d.commandType(p, "object", w, c.commandStr);
5798
- var x = p.factor | 0, g = p.units | 0;
5799
- return d.commandType(x, "number", w + ".factor", c.commandStr), d.commandType(g, "number", w + ".units", c.commandStr), [x, g];
5796
+ function(v) {
5797
+ d.commandType(v, "object", w, c.commandStr);
5798
+ var b = v.factor | 0, g = v.units | 0;
5799
+ return d.commandType(b, "number", w + ".factor", c.commandStr), d.commandType(g, "number", w + ".units", c.commandStr), [b, g];
5800
5800
  },
5801
- function(p, x, g) {
5801
+ function(v, b, g) {
5802
5802
  d.optional(function() {
5803
- p.assert(
5804
- x,
5803
+ v.assert(
5804
+ b,
5805
5805
  g + "&&typeof " + g + '==="object"',
5806
5806
  "invalid " + A
5807
5807
  );
5808
5808
  });
5809
- var R = x.def(g, ".factor|0"), F = x.def(g, ".units|0");
5809
+ var R = b.def(g, ".factor|0"), F = b.def(g, ".units|0");
5810
5810
  return [R, F];
5811
5811
  }
5812
5812
  );
5813
5813
  case Su:
5814
5814
  return E(
5815
- function(p) {
5816
- var x = 0;
5817
- return p === "front" ? x = _i : p === "back" && (x = pr), d.command(!!x, w, c.commandStr), x;
5815
+ function(v) {
5816
+ var b = 0;
5817
+ return v === "front" ? b = _i : v === "back" && (b = pr), d.command(!!b, w, c.commandStr), b;
5818
5818
  },
5819
- function(p, x, g) {
5819
+ function(v, b, g) {
5820
5820
  return d.optional(function() {
5821
- p.assert(
5822
- x,
5821
+ v.assert(
5822
+ b,
5823
5823
  g + '==="front"||' + g + '==="back"',
5824
5824
  "invalid cull.face"
5825
5825
  );
5826
- }), x.def(g, '==="front"?', _i, ":", pr);
5826
+ }), b.def(g, '==="front"?', _i, ":", pr);
5827
5827
  }
5828
5828
  );
5829
5829
  case rs:
5830
5830
  return E(
5831
- function(p) {
5831
+ function(v) {
5832
5832
  return d.command(
5833
- typeof p == "number" && p >= O.lineWidthDims[0] && p <= O.lineWidthDims[1],
5833
+ typeof v == "number" && v >= O.lineWidthDims[0] && v <= O.lineWidthDims[1],
5834
5834
  "invalid line width, must be a positive number between " + O.lineWidthDims[0] + " and " + O.lineWidthDims[1],
5835
5835
  c.commandStr
5836
- ), p;
5836
+ ), v;
5837
5837
  },
5838
- function(p, x, g) {
5838
+ function(v, b, g) {
5839
5839
  return d.optional(function() {
5840
- p.assert(
5841
- x,
5840
+ v.assert(
5841
+ b,
5842
5842
  "typeof " + g + '==="number"&&' + g + ">=" + O.lineWidthDims[0] + "&&" + g + "<=" + O.lineWidthDims[1],
5843
5843
  "invalid line width"
5844
5844
  );
@@ -5847,35 +5847,35 @@ function Uv() {
5847
5847
  );
5848
5848
  case ns:
5849
5849
  return E(
5850
- function(p) {
5851
- return d.commandParameter(p, vs, w, c.commandStr), vs[p];
5850
+ function(v) {
5851
+ return d.commandParameter(v, vs, w, c.commandStr), vs[v];
5852
5852
  },
5853
- function(p, x, g) {
5853
+ function(v, b, g) {
5854
5854
  return d.optional(function() {
5855
- p.assert(
5856
- x,
5855
+ v.assert(
5856
+ b,
5857
5857
  g + '==="cw"||' + g + '==="ccw"',
5858
5858
  "invalid frontFace, must be one of cw,ccw"
5859
5859
  );
5860
- }), x.def(g + '==="cw"?' + Iu + ":" + ps);
5860
+ }), b.def(g + '==="cw"?' + Iu + ":" + ps);
5861
5861
  }
5862
5862
  );
5863
5863
  case ts:
5864
5864
  return E(
5865
- function(p) {
5865
+ function(v) {
5866
5866
  return d.command(
5867
- pt(p) && p.length === 4,
5867
+ pt(v) && v.length === 4,
5868
5868
  "color.mask must be length 4 array",
5869
5869
  c.commandStr
5870
- ), p.map(function(x) {
5871
- return !!x;
5870
+ ), v.map(function(b) {
5871
+ return !!b;
5872
5872
  });
5873
5873
  },
5874
- function(p, x, g) {
5874
+ function(v, b, g) {
5875
5875
  return d.optional(function() {
5876
- p.assert(
5877
- x,
5878
- p.shared.isArrayLike + "(" + g + ")&&" + g + ".length===4",
5876
+ v.assert(
5877
+ b,
5878
+ v.shared.isArrayLike + "(" + g + ")&&" + g + ".length===4",
5879
5879
  "invalid color.mask"
5880
5880
  );
5881
5881
  }), Xt(4, function(R) {
@@ -5885,30 +5885,30 @@ function Uv() {
5885
5885
  );
5886
5886
  case os:
5887
5887
  return E(
5888
- function(p) {
5889
- d.command(typeof p == "object" && p, w, c.commandStr);
5890
- var x = "value" in p ? p.value : 1, g = !!p.invert;
5888
+ function(v) {
5889
+ d.command(typeof v == "object" && v, w, c.commandStr);
5890
+ var b = "value" in v ? v.value : 1, g = !!v.invert;
5891
5891
  return d.command(
5892
- typeof x == "number" && x >= 0 && x <= 1,
5892
+ typeof b == "number" && b >= 0 && b <= 1,
5893
5893
  "sample.coverage.value must be a number between 0 and 1",
5894
5894
  c.commandStr
5895
- ), [x, g];
5895
+ ), [b, g];
5896
5896
  },
5897
- function(p, x, g) {
5897
+ function(v, b, g) {
5898
5898
  d.optional(function() {
5899
- p.assert(
5900
- x,
5899
+ v.assert(
5900
+ b,
5901
5901
  g + "&&typeof " + g + '==="object"',
5902
5902
  "invalid sample.coverage"
5903
5903
  );
5904
5904
  });
5905
- var R = x.def(
5905
+ var R = b.def(
5906
5906
  '"value" in ',
5907
5907
  g,
5908
5908
  "?+",
5909
5909
  g,
5910
5910
  ".value:1"
5911
- ), F = x.def("!!", g, ".invert");
5911
+ ), F = b.def("!!", g, ".invert");
5912
5912
  return [R, F];
5913
5913
  }
5914
5914
  );
@@ -5924,24 +5924,24 @@ function Uv() {
5924
5924
  return w;
5925
5925
  });
5926
5926
  else if (typeof w == "function") {
5927
- var p = w._reglType;
5928
- p === "texture2d" || p === "textureCube" ? E = St(function(x) {
5929
- return x.link(w);
5930
- }) : p === "framebuffer" || p === "framebufferCube" ? (d.command(
5927
+ var v = w._reglType;
5928
+ v === "texture2d" || v === "textureCube" ? E = St(function(b) {
5929
+ return b.link(w);
5930
+ }) : v === "framebuffer" || v === "framebufferCube" ? (d.command(
5931
5931
  w.color.length > 0,
5932
5932
  'missing color attachment for framebuffer sent to uniform "' + A + '"',
5933
5933
  c.commandStr
5934
- ), E = St(function(x) {
5935
- return x.link(w.color[0]);
5934
+ ), E = St(function(b) {
5935
+ return b.link(w.color[0]);
5936
5936
  })) : d.commandRaise('invalid data for uniform "' + A + '"', c.commandStr);
5937
- } else pt(w) ? E = St(function(x) {
5938
- var g = x.global.def(
5937
+ } else pt(w) ? E = St(function(b) {
5938
+ var g = b.global.def(
5939
5939
  "[",
5940
5940
  Xt(w.length, function(R) {
5941
5941
  return d.command(
5942
5942
  typeof w[R] == "number" || typeof w[R] == "boolean",
5943
5943
  "invalid uniform " + A,
5944
- x.commandStr
5944
+ b.commandStr
5945
5945
  ), w[R];
5946
5946
  }),
5947
5947
  "]"
@@ -5951,40 +5951,40 @@ function Uv() {
5951
5951
  E.value = w, L[A] = E;
5952
5952
  }), Object.keys(P).forEach(function(A) {
5953
5953
  var w = P[A];
5954
- L[A] = Zt(w, function(E, p) {
5955
- return E.invoke(p, w);
5954
+ L[A] = Zt(w, function(E, v) {
5955
+ return E.invoke(v, w);
5956
5956
  });
5957
5957
  }), L;
5958
5958
  }
5959
5959
  function At(m, c) {
5960
5960
  var T = m.static, P = m.dynamic, L = {};
5961
5961
  return Object.keys(T).forEach(function(A) {
5962
- var w = T[A], E = h.id(A), p = new k();
5962
+ var w = T[A], E = h.id(A), v = new k();
5963
5963
  if (Lo(w))
5964
- p.state = Hr, p.buffer = X.getBuffer(
5964
+ v.state = Hr, v.buffer = X.getBuffer(
5965
5965
  X.create(w, Wr, !1, !0)
5966
- ), p.type = 0;
5966
+ ), v.type = 0;
5967
5967
  else {
5968
- var x = X.getBuffer(w);
5969
- if (x)
5970
- p.state = Hr, p.buffer = x, p.type = 0;
5968
+ var b = X.getBuffer(w);
5969
+ if (b)
5970
+ v.state = Hr, v.buffer = b, v.type = 0;
5971
5971
  else if (d.command(
5972
5972
  typeof w == "object" && w,
5973
5973
  "invalid data for attribute " + A,
5974
5974
  c.commandStr
5975
5975
  ), "constant" in w) {
5976
5976
  var g = w.constant;
5977
- p.buffer = "null", p.state = qa, typeof g == "number" ? p.x = g : (d.command(
5977
+ v.buffer = "null", v.state = qa, typeof g == "number" ? v.x = g : (d.command(
5978
5978
  pt(g) && g.length > 0 && g.length <= 4,
5979
5979
  "invalid constant for attribute " + A,
5980
5980
  c.commandStr
5981
5981
  ), $r.forEach(function(Le, be) {
5982
- be < g.length && (p[Le] = g[be]);
5982
+ be < g.length && (v[Le] = g[be]);
5983
5983
  }));
5984
5984
  } else {
5985
- Lo(w.buffer) ? x = X.getBuffer(
5985
+ Lo(w.buffer) ? b = X.getBuffer(
5986
5986
  X.create(w.buffer, Wr, !1, !0)
5987
- ) : x = X.getBuffer(w.buffer), d.command(!!x, 'missing buffer for attribute "' + A + '"', c.commandStr);
5987
+ ) : b = X.getBuffer(w.buffer), d.command(!!b, 'missing buffer for attribute "' + A + '"', c.commandStr);
5988
5988
  var R = w.offset | 0;
5989
5989
  d.command(
5990
5990
  R >= 0,
@@ -6037,7 +6037,7 @@ function Uv() {
6037
6037
  Le
6038
6038
  );
6039
6039
  });
6040
- }), p.buffer = x, p.state = Hr, p.size = V, p.normalized = W, p.type = ue || x.dtype, p.offset = R, p.stride = F, p.divisor = Me;
6040
+ }), v.buffer = b, v.state = Hr, v.size = V, v.normalized = W, v.type = ue || b.dtype, v.offset = R, v.stride = F, v.divisor = Me;
6041
6041
  }
6042
6042
  }
6043
6043
  L[A] = St(function(Le, be) {
@@ -6047,29 +6047,29 @@ function Uv() {
6047
6047
  var U = {
6048
6048
  isStream: !1
6049
6049
  };
6050
- return Object.keys(p).forEach(function(Pe) {
6051
- U[Pe] = p[Pe];
6052
- }), p.buffer && (U.buffer = Le.link(p.buffer), U.type = U.type || U.buffer + ".dtype"), q[E] = U, U;
6050
+ return Object.keys(v).forEach(function(Pe) {
6051
+ U[Pe] = v[Pe];
6052
+ }), v.buffer && (U.buffer = Le.link(v.buffer), U.type = U.type || U.buffer + ".dtype"), q[E] = U, U;
6053
6053
  });
6054
6054
  }), Object.keys(P).forEach(function(A) {
6055
6055
  var w = P[A];
6056
- function E(p, x) {
6057
- var g = p.invoke(x, w), R = p.shared, F = p.constants, V = R.isBufferArgs, W = R.buffer;
6056
+ function E(v, b) {
6057
+ var g = v.invoke(b, w), R = v.shared, F = v.constants, V = R.isBufferArgs, W = R.buffer;
6058
6058
  d.optional(function() {
6059
- p.assert(
6060
- x,
6059
+ v.assert(
6060
+ b,
6061
6061
  g + "&&(typeof " + g + '==="object"||typeof ' + g + '==="function")&&(' + V + "(" + g + ")||" + W + ".getBuffer(" + g + ")||" + W + ".getBuffer(" + g + ".buffer)||" + V + "(" + g + '.buffer)||("constant" in ' + g + "&&(typeof " + g + '.constant==="number"||' + R.isArrayLike + "(" + g + ".constant))))",
6062
6062
  'invalid dynamic attribute "' + A + '"'
6063
6063
  );
6064
6064
  });
6065
6065
  var ue = {
6066
- isStream: x.def(!1)
6066
+ isStream: b.def(!1)
6067
6067
  }, Me = new k();
6068
6068
  Me.state = Hr, Object.keys(Me).forEach(function(U) {
6069
- ue[U] = x.def("" + Me[U]);
6069
+ ue[U] = b.def("" + Me[U]);
6070
6070
  });
6071
6071
  var Le = ue.buffer, be = ue.type;
6072
- x(
6072
+ b(
6073
6073
  "if(",
6074
6074
  V,
6075
6075
  "(",
@@ -6161,9 +6161,9 @@ function Uv() {
6161
6161
  ".normalized;"
6162
6162
  );
6163
6163
  function q(U) {
6164
- x(ue[U], "=", g, ".", U, "|0;");
6164
+ b(ue[U], "=", g, ".", U, "|0;");
6165
6165
  }
6166
- return q("size"), q("offset"), q("stride"), q("divisor"), x("}}"), x.exit(
6166
+ return q("size"), q("offset"), q("stride"), q("divisor"), b("}}"), b.exit(
6167
6167
  "if(",
6168
6168
  ue.isStream,
6169
6169
  "){",
@@ -6217,14 +6217,14 @@ function Uv() {
6217
6217
  }
6218
6218
  U(A), U(w);
6219
6219
  });
6220
- var E = $e(m, c), p = ye(m), x = ze(m, p, L), g = vt(m, L), R = yt(m, L), F = Je(m, L, E);
6220
+ var E = $e(m, c), v = ye(m), b = ze(m, v, L), g = vt(m, L), R = yt(m, L), F = Je(m, L, E);
6221
6221
  function V(q) {
6222
- var U = x[q];
6222
+ var U = b[q];
6223
6223
  U && (R[q] = U);
6224
6224
  }
6225
6225
  V(Rn), V(Se(yo));
6226
6226
  var W = Object.keys(R).length > 0, ue = {
6227
- framebuffer: p,
6227
+ framebuffer: v,
6228
6228
  draw: g,
6229
6229
  shader: F,
6230
6230
  state: R,
@@ -6255,14 +6255,14 @@ function Uv() {
6255
6255
  var P = m.shared, L = P.context, A = m.scope();
6256
6256
  Object.keys(T).forEach(function(w) {
6257
6257
  c.save(L, "." + w);
6258
- var E = T[w], p = E.append(m, c);
6259
- Array.isArray(p) ? A(L, ".", w, "=[", p.join(), "];") : A(L, ".", w, "=", p, ";");
6258
+ var E = T[w], v = E.append(m, c);
6259
+ Array.isArray(v) ? A(L, ".", w, "=[", v.join(), "];") : A(L, ".", w, "=", v, ";");
6260
6260
  }), c(A);
6261
6261
  }
6262
6262
  function Pt(m, c, T, P) {
6263
6263
  var L = m.shared, A = L.gl, w = L.framebuffer, E;
6264
6264
  xe && (E = c.def(L.extensions, ".webgl_draw_buffers"));
6265
- var p = m.constants, x = p.drawBuffer, g = p.backBuffer, R;
6265
+ var v = m.constants, b = v.drawBuffer, g = v.backBuffer, R;
6266
6266
  T ? R = T.append(m, c) : R = c.def(w, ".next"), P || c("if(", R, "!==", w, ".cur){"), c(
6267
6267
  "if(",
6268
6268
  R,
@@ -6276,7 +6276,7 @@ function Uv() {
6276
6276
  ), xe && c(
6277
6277
  E,
6278
6278
  ".drawBuffersWEBGL(",
6279
- x,
6279
+ b,
6280
6280
  "[",
6281
6281
  R,
6282
6282
  ".colorAttachments.length]);"
@@ -6295,7 +6295,7 @@ function Uv() {
6295
6295
  ), P || c("}");
6296
6296
  }
6297
6297
  function It(m, c, T) {
6298
- var P = m.shared, L = P.gl, A = m.current, w = m.next, E = P.current, p = P.next, x = m.cond(E, ".dirty");
6298
+ var P = m.shared, L = P.gl, A = m.current, w = m.next, E = P.current, v = P.next, b = m.cond(E, ".dirty");
6299
6299
  Fe.forEach(function(g) {
6300
6300
  var R = Se(g);
6301
6301
  if (!(R in T.state)) {
@@ -6303,9 +6303,9 @@ function Uv() {
6303
6303
  if (R in w) {
6304
6304
  F = w[R], V = A[R];
6305
6305
  var W = Xt(ge[R].length, function(Me) {
6306
- return x.def(F, "[", Me, "]");
6306
+ return b.def(F, "[", Me, "]");
6307
6307
  });
6308
- x(m.cond(W.map(function(Me, Le) {
6308
+ b(m.cond(W.map(function(Me, Le) {
6309
6309
  return Me + "!==" + V + "[" + Le + "]";
6310
6310
  }).join("||")).then(
6311
6311
  L,
@@ -6320,9 +6320,9 @@ function Uv() {
6320
6320
  ";"
6321
6321
  ));
6322
6322
  } else {
6323
- F = x.def(p, ".", R);
6323
+ F = b.def(v, ".", R);
6324
6324
  var ue = m.cond(F, "!==", E, ".", R);
6325
- x(ue), R in j ? ue(
6325
+ b(ue), R in j ? ue(
6326
6326
  m.cond(F).then(L, ".enable(", j[R], ");").else(L, ".disable(", j[R], ");"),
6327
6327
  E,
6328
6328
  ".",
@@ -6346,23 +6346,23 @@ function Uv() {
6346
6346
  );
6347
6347
  }
6348
6348
  }
6349
- }), Object.keys(T.state).length === 0 && x(E, ".dirty=false;"), c(x);
6349
+ }), Object.keys(T.state).length === 0 && b(E, ".dirty=false;"), c(b);
6350
6350
  }
6351
6351
  function Nt(m, c, T, P) {
6352
6352
  var L = m.shared, A = m.current, w = L.current, E = L.gl;
6353
- Bu(Object.keys(T)).forEach(function(p) {
6354
- var x = T[p];
6355
- if (!(P && !P(x))) {
6356
- var g = x.append(m, c);
6357
- if (j[p]) {
6358
- var R = j[p];
6359
- Zn(x) ? g ? c(E, ".enable(", R, ");") : c(E, ".disable(", R, ");") : c(m.cond(g).then(E, ".enable(", R, ");").else(E, ".disable(", R, ");")), c(w, ".", p, "=", g, ";");
6353
+ Bu(Object.keys(T)).forEach(function(v) {
6354
+ var b = T[v];
6355
+ if (!(P && !P(b))) {
6356
+ var g = b.append(m, c);
6357
+ if (j[v]) {
6358
+ var R = j[v];
6359
+ Zn(b) ? g ? c(E, ".enable(", R, ");") : c(E, ".disable(", R, ");") : c(m.cond(g).then(E, ".enable(", R, ");").else(E, ".disable(", R, ");")), c(w, ".", v, "=", g, ";");
6360
6360
  } else if (pt(g)) {
6361
- var F = A[p];
6361
+ var F = A[v];
6362
6362
  c(
6363
6363
  E,
6364
6364
  ".",
6365
- $[p],
6365
+ $[v],
6366
6366
  "(",
6367
6367
  g,
6368
6368
  ");",
@@ -6375,13 +6375,13 @@ function Uv() {
6375
6375
  c(
6376
6376
  E,
6377
6377
  ".",
6378
- $[p],
6378
+ $[v],
6379
6379
  "(",
6380
6380
  g,
6381
6381
  ");",
6382
6382
  w,
6383
6383
  ".",
6384
- p,
6384
+ v,
6385
6385
  "=",
6386
6386
  g,
6387
6387
  ";"
@@ -6396,37 +6396,37 @@ function Uv() {
6396
6396
  ));
6397
6397
  }
6398
6398
  function qe(m, c, T, P, L) {
6399
- var A = m.shared, w = m.stats, E = A.current, p = A.timer, x = T.profile;
6399
+ var A = m.shared, w = m.stats, E = A.current, v = A.timer, b = T.profile;
6400
6400
  function g() {
6401
6401
  return typeof performance > "u" ? "Date.now()" : "performance.now()";
6402
6402
  }
6403
6403
  var R, F;
6404
6404
  function V(q) {
6405
- R = c.def(), q(R, "=", g(), ";"), typeof L == "string" ? q(w, ".count+=", L, ";") : q(w, ".count++;"), J && (P ? (F = c.def(), q(F, "=", p, ".getNumPendingQueries();")) : q(p, ".beginQuery(", w, ");"));
6405
+ R = c.def(), q(R, "=", g(), ";"), typeof L == "string" ? q(w, ".count+=", L, ";") : q(w, ".count++;"), J && (P ? (F = c.def(), q(F, "=", v, ".getNumPendingQueries();")) : q(v, ".beginQuery(", w, ");"));
6406
6406
  }
6407
6407
  function W(q) {
6408
6408
  q(w, ".cpuTime+=", g(), "-", R, ";"), J && (P ? q(
6409
- p,
6409
+ v,
6410
6410
  ".pushScopeStats(",
6411
6411
  F,
6412
6412
  ",",
6413
- p,
6413
+ v,
6414
6414
  ".getNumPendingQueries(),",
6415
6415
  w,
6416
6416
  ");"
6417
- ) : q(p, ".endQuery();"));
6417
+ ) : q(v, ".endQuery();"));
6418
6418
  }
6419
6419
  function ue(q) {
6420
6420
  var U = c.def(E, ".profile");
6421
6421
  c(E, ".profile=", q, ";"), c.exit(E, ".profile=", U, ";");
6422
6422
  }
6423
6423
  var Me;
6424
- if (x) {
6425
- if (Zn(x)) {
6426
- x.enable ? (V(c), W(c.exit), ue("true")) : ue("false");
6424
+ if (b) {
6425
+ if (Zn(b)) {
6426
+ b.enable ? (V(c), W(c.exit), ue("true")) : ue("false");
6427
6427
  return;
6428
6428
  }
6429
- Me = x.append(m, c), ue(Me);
6429
+ Me = b.append(m, c), ue(Me);
6430
6430
  } else
6431
6431
  Me = c.def(E, ".profile");
6432
6432
  var Le = m.block();
@@ -6436,8 +6436,8 @@ function Uv() {
6436
6436
  }
6437
6437
  function Gt(m, c, T, P, L) {
6438
6438
  var A = m.shared;
6439
- function w(p) {
6440
- switch (p) {
6439
+ function w(v) {
6440
+ switch (v) {
6441
6441
  case _o:
6442
6442
  case wo:
6443
6443
  case Po:
@@ -6454,8 +6454,8 @@ function Uv() {
6454
6454
  return 1;
6455
6455
  }
6456
6456
  }
6457
- function E(p, x, g) {
6458
- var R = A.gl, F = c.def(p, ".location"), V = c.def(A.attributes, "[", F, "]"), W = g.state, ue = g.buffer, Me = [
6457
+ function E(v, b, g) {
6458
+ var R = A.gl, F = c.def(v, ".location"), V = c.def(A.attributes, "[", F, "]"), W = g.state, ue = g.buffer, Me = [
6459
6459
  g.x,
6460
6460
  g.y,
6461
6461
  g.z,
@@ -6477,7 +6477,7 @@ function Uv() {
6477
6477
  ");}"
6478
6478
  );
6479
6479
  var U = g.type, Pe;
6480
- if (g.size ? Pe = c.def(g.size, "||", x) : Pe = x, c(
6480
+ if (g.size ? Pe = c.def(g.size, "||", b) : Pe = b, c(
6481
6481
  "if(",
6482
6482
  V,
6483
6483
  ".type!==",
@@ -6569,8 +6569,8 @@ function Uv() {
6569
6569
  }
6570
6570
  W === Hr ? be() : W === qa ? q() : (c("if(", W, "===", Hr, "){"), be(), c("}else{"), q(), c("}"));
6571
6571
  }
6572
- P.forEach(function(p) {
6573
- var x = p.name, g = T.attributes[x], R;
6572
+ P.forEach(function(v) {
6573
+ var b = v.name, g = T.attributes[b], R;
6574
6574
  if (g) {
6575
6575
  if (!L(g))
6576
6576
  return;
@@ -6578,34 +6578,34 @@ function Uv() {
6578
6578
  } else {
6579
6579
  if (!L(Uu))
6580
6580
  return;
6581
- var F = m.scopeAttrib(x);
6581
+ var F = m.scopeAttrib(b);
6582
6582
  d.optional(function() {
6583
6583
  m.assert(
6584
6584
  c,
6585
6585
  F + ".state",
6586
- "missing attribute " + x
6586
+ "missing attribute " + b
6587
6587
  );
6588
6588
  }), R = {}, Object.keys(new k()).forEach(function(V) {
6589
6589
  R[V] = c.def(F, ".", V);
6590
6590
  });
6591
6591
  }
6592
6592
  E(
6593
- m.link(p),
6594
- w(p.info.type),
6593
+ m.link(v),
6594
+ w(v.info.type),
6595
6595
  R
6596
6596
  );
6597
6597
  });
6598
6598
  }
6599
6599
  function ot(m, c, T, P, L, A) {
6600
- for (var w = m.shared, E = w.gl, p = {}, x, g = 0; g < P.length; ++g) {
6600
+ for (var w = m.shared, E = w.gl, v = {}, b, g = 0; g < P.length; ++g) {
6601
6601
  var R = P[g], F = R.name, V = R.info.type, W = R.info.size, ue = T.uniforms[F];
6602
6602
  if (W > 1) {
6603
6603
  if (!ue)
6604
6604
  continue;
6605
6605
  var Me = F.replace("[0]", "");
6606
- if (p[Me])
6606
+ if (v[Me])
6607
6607
  continue;
6608
- p[Me] = 1;
6608
+ v[Me] = 1;
6609
6609
  }
6610
6610
  var Le = m.link(R), be = Le + ".location", q;
6611
6611
  if (ue) {
@@ -6655,90 +6655,90 @@ function Uv() {
6655
6655
  pt(U) && U.length === W,
6656
6656
  "uniform " + F,
6657
6657
  m.commandStr
6658
- ), x = "1f";
6658
+ ), b = "1f";
6659
6659
  break;
6660
6660
  case _o:
6661
6661
  d.command(
6662
6662
  pt(U) && U.length && U.length % 2 === 0 && U.length <= W * 2,
6663
6663
  "uniform " + F,
6664
6664
  m.commandStr
6665
- ), x = "2f";
6665
+ ), b = "2f";
6666
6666
  break;
6667
6667
  case So:
6668
6668
  d.command(
6669
6669
  pt(U) && U.length && U.length % 3 === 0 && U.length <= W * 3,
6670
6670
  "uniform " + F,
6671
6671
  m.commandStr
6672
- ), x = "3f";
6672
+ ), b = "3f";
6673
6673
  break;
6674
6674
  case To:
6675
6675
  d.command(
6676
6676
  pt(U) && U.length && U.length % 4 === 0 && U.length <= W * 4,
6677
6677
  "uniform " + F,
6678
6678
  m.commandStr
6679
- ), x = "4f";
6679
+ ), b = "4f";
6680
6680
  break;
6681
6681
  case ds:
6682
6682
  W === 1 ? d.commandType(U, "boolean", "uniform " + F, m.commandStr) : d.command(
6683
6683
  pt(U) && U.length === W,
6684
6684
  "uniform " + F,
6685
6685
  m.commandStr
6686
- ), x = "1i";
6686
+ ), b = "1i";
6687
6687
  break;
6688
6688
  case hs:
6689
6689
  W === 1 ? d.commandType(U, "number", "uniform " + F, m.commandStr) : d.command(
6690
6690
  pt(U) && U.length === W,
6691
6691
  "uniform " + F,
6692
6692
  m.commandStr
6693
- ), x = "1i";
6693
+ ), b = "1i";
6694
6694
  break;
6695
6695
  case Po:
6696
6696
  d.command(
6697
6697
  pt(U) && U.length && U.length % 2 === 0 && U.length <= W * 2,
6698
6698
  "uniform " + F,
6699
6699
  m.commandStr
6700
- ), x = "2i";
6700
+ ), b = "2i";
6701
6701
  break;
6702
6702
  case wo:
6703
6703
  d.command(
6704
6704
  pt(U) && U.length && U.length % 2 === 0 && U.length <= W * 2,
6705
6705
  "uniform " + F,
6706
6706
  m.commandStr
6707
- ), x = "2i";
6707
+ ), b = "2i";
6708
6708
  break;
6709
6709
  case Co:
6710
6710
  d.command(
6711
6711
  pt(U) && U.length && U.length % 3 === 0 && U.length <= W * 3,
6712
6712
  "uniform " + F,
6713
6713
  m.commandStr
6714
- ), x = "3i";
6714
+ ), b = "3i";
6715
6715
  break;
6716
6716
  case Ao:
6717
6717
  d.command(
6718
6718
  pt(U) && U.length && U.length % 3 === 0 && U.length <= W * 3,
6719
6719
  "uniform " + F,
6720
6720
  m.commandStr
6721
- ), x = "3i";
6721
+ ), b = "3i";
6722
6722
  break;
6723
6723
  case ko:
6724
6724
  d.command(
6725
6725
  pt(U) && U.length && U.length % 4 === 0 && U.length <= W * 4,
6726
6726
  "uniform " + F,
6727
6727
  m.commandStr
6728
- ), x = "4i";
6728
+ ), b = "4i";
6729
6729
  break;
6730
6730
  case Eo:
6731
6731
  d.command(
6732
6732
  pt(U) && U.length && U.length % 4 === 0 && U.length <= W * 4,
6733
6733
  "uniform " + F,
6734
6734
  m.commandStr
6735
- ), x = "4i";
6735
+ ), b = "4i";
6736
6736
  break;
6737
6737
  }
6738
- W > 1 ? (x += "v", U = m.global.def("[" + Array.prototype.slice.call(U) + "]")) : U = pt(U) ? Array.prototype.slice.call(U) : U, c(
6738
+ W > 1 ? (b += "v", U = m.global.def("[" + Array.prototype.slice.call(U) + "]")) : U = pt(U) ? Array.prototype.slice.call(U) : U, c(
6739
6739
  E,
6740
6740
  ".uniform",
6741
- x,
6741
+ b,
6742
6742
  "(",
6743
6743
  be,
6744
6744
  ",",
@@ -6867,44 +6867,44 @@ function Uv() {
6867
6867
  continue;
6868
6868
  case hs:
6869
6869
  case ds:
6870
- x = "1i";
6870
+ b = "1i";
6871
6871
  break;
6872
6872
  case wo:
6873
6873
  case Po:
6874
- x = "2i", ft = 2;
6874
+ b = "2i", ft = 2;
6875
6875
  break;
6876
6876
  case Ao:
6877
6877
  case Co:
6878
- x = "3i", ft = 3;
6878
+ b = "3i", ft = 3;
6879
6879
  break;
6880
6880
  case Eo:
6881
6881
  case ko:
6882
- x = "4i", ft = 4;
6882
+ b = "4i", ft = 4;
6883
6883
  break;
6884
6884
  case cs:
6885
- x = "1f";
6885
+ b = "1f";
6886
6886
  break;
6887
6887
  case _o:
6888
- x = "2f", ft = 2;
6888
+ b = "2f", ft = 2;
6889
6889
  break;
6890
6890
  case So:
6891
- x = "3f", ft = 3;
6891
+ b = "3f", ft = 3;
6892
6892
  break;
6893
6893
  case To:
6894
- x = "4f", ft = 4;
6894
+ b = "4f", ft = 4;
6895
6895
  break;
6896
6896
  case vi:
6897
- x = "Matrix2fv";
6897
+ b = "Matrix2fv";
6898
6898
  break;
6899
6899
  case gi:
6900
- x = "Matrix3fv";
6900
+ b = "Matrix3fv";
6901
6901
  break;
6902
6902
  case yi:
6903
- x = "Matrix4fv";
6903
+ b = "Matrix4fv";
6904
6904
  break;
6905
6905
  }
6906
- if (x.indexOf("Matrix") === -1 && W > 1 && (x += "v", ft = 1), x.charAt(0) === "M") {
6907
- c(E, ".uniform", x, "(", be, ",");
6906
+ if (b.indexOf("Matrix") === -1 && W > 1 && (b += "v", ft = 1), b.charAt(0) === "M") {
6907
+ c(E, ".uniform", b, "(", be, ",");
6908
6908
  var gr = Math.pow(V - vi + 2, 2), In = m.global.def("new Float32Array(", gr, ")");
6909
6909
  Array.isArray(q) ? c(
6910
6910
  "false,(",
@@ -6936,7 +6936,7 @@ function Uv() {
6936
6936
  return en + "!==" + Qn[xr];
6937
6937
  }).join("||"), "){", Tn.map(function(en, xr) {
6938
6938
  return en + "=" + Qn[xr] + ";";
6939
- }).join("")), c(E, ".uniform", x, "(", be, ",", Qn.join(","), ");"), A && c("}");
6939
+ }).join("")), c(E, ".uniform", b, "(", be, ",", Qn.join(","), ");"), A && c("}");
6940
6940
  } else {
6941
6941
  if (d(!Array.isArray(q), "uniform value must not be an array"), A) {
6942
6942
  var Wu = c.def();
@@ -6954,13 +6954,13 @@ function Uv() {
6954
6954
  ";"
6955
6955
  );
6956
6956
  }
6957
- c(E, ".uniform", x, "(", be, ",", q, ");"), A && c("}");
6957
+ c(E, ".uniform", b, "(", be, ",", q, ");"), A && c("}");
6958
6958
  }
6959
6959
  }
6960
6960
  }
6961
6961
  function Ie(m, c, T, P) {
6962
6962
  var L = m.shared, A = L.gl, w = L.draw, E = P.draw;
6963
- function p() {
6963
+ function v() {
6964
6964
  var Pe = E.elements, we, Oe = c;
6965
6965
  return Pe ? ((Pe.contextDep && P.contextDynamic || Pe.propDep) && (Oe = T), we = Pe.append(m, Oe), E.elementsActive && Oe(
6966
6966
  "if(" + we + ")" + A + ".bindBuffer(" + ls + "," + we + ".buffer.buffer);"
@@ -6991,7 +6991,7 @@ function Uv() {
6991
6991
  "}"
6992
6992
  )), we;
6993
6993
  }
6994
- function x() {
6994
+ function b() {
6995
6995
  var Pe = E.count, we, Oe = c;
6996
6996
  return Pe ? ((Pe.contextDep && P.contextDynamic || Pe.propDep) && (Oe = T), we = Pe.append(m, Oe), d.optional(function() {
6997
6997
  Pe.MISSING && m.assert(c, "false", "missing vertex count"), Pe.DYNAMIC && m.assert(Oe, we + ">=0", "missing vertex count");
@@ -6999,12 +6999,12 @@ function Uv() {
6999
6999
  m.assert(Oe, we + ">=0", "missing vertex count");
7000
7000
  })), we;
7001
7001
  }
7002
- var g = p();
7002
+ var g = v();
7003
7003
  function R(Pe) {
7004
7004
  var we = E[Pe];
7005
7005
  return we ? we.contextDep && P.contextDynamic || we.propDep ? we.append(m, T) : we.append(m, c) : c.def(w, ".", Pe);
7006
7006
  }
7007
- var F = R(dr), V = R(xo), W = x();
7007
+ var F = R(dr), V = R(xo), W = b();
7008
7008
  if (typeof W == "number") {
7009
7009
  if (W === 0)
7010
7010
  return;
@@ -7104,11 +7104,11 @@ function Uv() {
7104
7104
  }
7105
7105
  function vr(m, c, T, P) {
7106
7106
  xt(m, c);
7107
- var L = T.contextDep, A = c.def(), w = "a0", E = "a1", p = c.def();
7108
- m.shared.props = p, m.batchId = A;
7109
- var x = m.scope(), g = m.scope();
7107
+ var L = T.contextDep, A = c.def(), w = "a0", E = "a1", v = c.def();
7108
+ m.shared.props = v, m.batchId = A;
7109
+ var b = m.scope(), g = m.scope();
7110
7110
  c(
7111
- x.entry,
7111
+ b.entry,
7112
7112
  "for(",
7113
7113
  A,
7114
7114
  "=0;",
@@ -7118,7 +7118,7 @@ function Uv() {
7118
7118
  ";++",
7119
7119
  A,
7120
7120
  "){",
7121
- p,
7121
+ v,
7122
7122
  "=",
7123
7123
  w,
7124
7124
  "[",
@@ -7126,7 +7126,7 @@ function Uv() {
7126
7126
  "];",
7127
7127
  g,
7128
7128
  "}",
7129
- x.exit
7129
+ b.exit
7130
7130
  );
7131
7131
  function R(Le) {
7132
7132
  return Le.contextDep && L || Le.propDep;
@@ -7135,7 +7135,7 @@ function Uv() {
7135
7135
  return !R(Le);
7136
7136
  }
7137
7137
  if (T.needsContext && Et(m, g, T.context), T.needsFramebuffer && Pt(m, g, T.framebuffer), Nt(m, g, T.state, R), T.profile && R(T.profile) && qe(m, g, T, !1, !0), P)
7138
- T.useVAO ? T.drawVAO ? R(T.drawVAO) ? g(m.shared.vao, ".setVAO(", T.drawVAO.append(m, g), ");") : x(m.shared.vao, ".setVAO(", T.drawVAO.append(m, x), ");") : x(m.shared.vao, ".setVAO(", m.shared.vao, ".targetVAO);") : (x(m.shared.vao, ".setVAO(null);"), Gt(m, x, T, P.attributes, F), Gt(m, g, T, P.attributes, R)), ot(m, x, T, P.uniforms, F, !1), ot(m, g, T, P.uniforms, R, !0), Ie(m, x, g, T);
7138
+ T.useVAO ? T.drawVAO ? R(T.drawVAO) ? g(m.shared.vao, ".setVAO(", T.drawVAO.append(m, g), ");") : b(m.shared.vao, ".setVAO(", T.drawVAO.append(m, b), ");") : b(m.shared.vao, ".setVAO(", m.shared.vao, ".targetVAO);") : (b(m.shared.vao, ".setVAO(null);"), Gt(m, b, T, P.attributes, F), Gt(m, g, T, P.attributes, R)), ot(m, b, T, P.uniforms, F, !1), ot(m, g, T, P.uniforms, R, !0), Ie(m, b, g, T);
7139
7139
  else {
7140
7140
  var V = m.global.def("{}"), W = T.shader.progVar.append(m, g), ue = g.def(W, ".id"), Me = g.def(V, "[", ue, "]");
7141
7141
  g(
@@ -7188,8 +7188,8 @@ function Uv() {
7188
7188
  It(m, T, c), Nt(m, T, c.state, function(V) {
7189
7189
  return !E(V);
7190
7190
  }), (!c.profile || !E(c.profile)) && qe(m, T, c, !1, "a1"), c.contextDep = P, c.needsContext = L, c.needsFramebuffer = w;
7191
- var p = c.shader.progVar;
7192
- if (p.contextDep && P || p.propDep)
7191
+ var v = c.shader.progVar;
7192
+ if (v.contextDep && P || v.propDep)
7193
7193
  vr(
7194
7194
  m,
7195
7195
  T,
@@ -7197,8 +7197,8 @@ function Uv() {
7197
7197
  null
7198
7198
  );
7199
7199
  else {
7200
- var x = p.append(m, T);
7201
- if (T(m.shared.gl, ".useProgram(", x, ".program);"), c.shader.program)
7200
+ var b = v.append(m, T);
7201
+ if (T(m.shared.gl, ".useProgram(", b, ".program);"), c.shader.program)
7202
7202
  vr(
7203
7203
  m,
7204
7204
  T,
@@ -7207,7 +7207,7 @@ function Uv() {
7207
7207
  );
7208
7208
  else {
7209
7209
  T(m.shared.vao, ".setVAO(null);");
7210
- var g = m.global.def("{}"), R = T.def(x, ".id"), F = T.def(g, "[", R, "]");
7210
+ var g = m.global.def("{}"), R = T.def(b, ".id"), F = T.def(g, "[", R, "]");
7211
7211
  T(
7212
7212
  m.cond(F).then(F, ".call(this,a0,a1);").else(
7213
7213
  F,
@@ -7220,7 +7220,7 @@ function Uv() {
7220
7220
  return et(vr, m, c, V, 2);
7221
7221
  }),
7222
7222
  "(",
7223
- x,
7223
+ b,
7224
7224
  ");",
7225
7225
  F,
7226
7226
  ".call(this,a0,a1);"
@@ -7235,10 +7235,10 @@ function Uv() {
7235
7235
  m.batchId = "a2";
7236
7236
  var P = m.shared, L = P.current;
7237
7237
  Et(m, T, c.context), c.framebuffer && c.framebuffer.append(m, T), Bu(Object.keys(c.state)).forEach(function(w) {
7238
- var E = c.state[w], p = E.append(m, T);
7239
- pt(p) ? p.forEach(function(x, g) {
7240
- T.set(m.next[w], "[" + g + "]", x);
7241
- }) : T.set(P.next, "." + w, p);
7238
+ var E = c.state[w], v = E.append(m, T);
7239
+ pt(v) ? v.forEach(function(b, g) {
7240
+ T.set(m.next[w], "[" + g + "]", b);
7241
+ }) : T.set(P.next, "." + w, v);
7242
7242
  }), qe(m, T, c, !0, !0), [hr, xo, mr, bo, dr].forEach(
7243
7243
  function(w) {
7244
7244
  var E = c.draw[w];
@@ -7252,9 +7252,9 @@ function Uv() {
7252
7252
  E
7253
7253
  );
7254
7254
  }), Object.keys(c.attributes).forEach(function(w) {
7255
- var E = c.attributes[w].append(m, T), p = m.scopeAttrib(w);
7256
- Object.keys(new k()).forEach(function(x) {
7257
- T.set(p, "." + x, E[x]);
7255
+ var E = c.attributes[w].append(m, T), v = m.scopeAttrib(w);
7256
+ Object.keys(new k()).forEach(function(b) {
7257
+ T.set(v, "." + b, E[b]);
7258
7258
  });
7259
7259
  }), c.scopeVAO && T.set(P.vao, ".targetVAO", c.scopeVAO.append(m, T));
7260
7260
  function A(w) {
@@ -7275,15 +7275,15 @@ function Uv() {
7275
7275
  var P = c.static[T];
7276
7276
  if (!P || !I(P))
7277
7277
  return;
7278
- var L = m.global, A = Object.keys(P), w = !1, E = !1, p = !1, x = m.global.def("{}");
7278
+ var L = m.global, A = Object.keys(P), w = !1, E = !1, v = !1, b = m.global.def("{}");
7279
7279
  A.forEach(function(R) {
7280
7280
  var F = P[R];
7281
7281
  if (kt.isDynamic(F)) {
7282
7282
  typeof F == "function" && (F = P[R] = kt.unbox(F));
7283
7283
  var V = Zt(F, null);
7284
- w = w || V.thisDep, p = p || V.propDep, E = E || V.contextDep;
7284
+ w = w || V.thisDep, v = v || V.propDep, E = E || V.contextDep;
7285
7285
  } else {
7286
- switch (L(x, ".", R, "="), typeof F) {
7286
+ switch (L(b, ".", R, "="), typeof F) {
7287
7287
  case "number":
7288
7288
  L(F);
7289
7289
  break;
@@ -7305,15 +7305,15 @@ function Uv() {
7305
7305
  var W = P[V];
7306
7306
  if (kt.isDynamic(W)) {
7307
7307
  var ue = R.invoke(F, W);
7308
- F(x, ".", V, "=", ue, ";");
7308
+ F(b, ".", V, "=", ue, ";");
7309
7309
  }
7310
7310
  });
7311
7311
  }
7312
7312
  c.dynamic[T] = new kt.DynamicVariable(go, {
7313
7313
  thisDep: w,
7314
7314
  contextDep: E,
7315
- propDep: p,
7316
- ref: x,
7315
+ propDep: v,
7316
+ ref: b,
7317
7317
  append: g
7318
7318
  }), delete c.static[T];
7319
7319
  }
@@ -7339,14 +7339,14 @@ function Uv() {
7339
7339
  c(P), T(P);
7340
7340
  var L = m.shared, A = L.gl, w = L.next, E = L.current;
7341
7341
  P(E, ".dirty=false;"), Pt(m, c), Pt(m, T, null, !0);
7342
- var p;
7343
- te && (p = m.link(te)), _.oes_vertex_array_object && T(m.link(_.oes_vertex_array_object), ".bindVertexArrayOES(null);");
7344
- for (var x = 0; x < O.maxAttributes; ++x) {
7345
- var g = T.def(L.attributes, "[", x, "]"), R = m.cond(g, ".buffer");
7342
+ var v;
7343
+ te && (v = m.link(te)), _.oes_vertex_array_object && T(m.link(_.oes_vertex_array_object), ".bindVertexArrayOES(null);");
7344
+ for (var b = 0; b < O.maxAttributes; ++b) {
7345
+ var g = T.def(L.attributes, "[", b, "]"), R = m.cond(g, ".buffer");
7346
7346
  R.then(
7347
7347
  A,
7348
7348
  ".enableVertexAttribArray(",
7349
- x,
7349
+ b,
7350
7350
  ");",
7351
7351
  A,
7352
7352
  ".bindBuffer(",
@@ -7356,7 +7356,7 @@ function Uv() {
7356
7356
  ".buffer.buffer);",
7357
7357
  A,
7358
7358
  ".vertexAttribPointer(",
7359
- x,
7359
+ b,
7360
7360
  ",",
7361
7361
  g,
7362
7362
  ".size,",
@@ -7371,11 +7371,11 @@ function Uv() {
7371
7371
  ).else(
7372
7372
  A,
7373
7373
  ".disableVertexAttribArray(",
7374
- x,
7374
+ b,
7375
7375
  ");",
7376
7376
  A,
7377
7377
  ".vertexAttrib4f(",
7378
- x,
7378
+ b,
7379
7379
  ",",
7380
7380
  g,
7381
7381
  ".x,",
@@ -7388,9 +7388,9 @@ function Uv() {
7388
7388
  g,
7389
7389
  ".buffer=null;"
7390
7390
  ), T(R), te && T(
7391
- p,
7391
+ v,
7392
7392
  ".vertexAttribDivisorANGLE(",
7393
- x,
7393
+ b,
7394
7394
  ",",
7395
7395
  g,
7396
7396
  ".divisor);"
@@ -7694,9 +7694,9 @@ function Uv() {
7694
7694
  delete A.uniforms, delete A.attributes, delete A.context, delete A.vao, "stencil" in A && A.stencil.op && (A.stencil.opBack = A.stencil.opFront = A.stencil.op, delete A.stencil.op);
7695
7695
  function w(E) {
7696
7696
  if (E in A) {
7697
- var p = A[E];
7698
- delete A[E], Object.keys(p).forEach(function(x) {
7699
- A[E + "." + x] = p[x];
7697
+ var v = A[E];
7698
+ delete A[E], Object.keys(v).forEach(function(b) {
7699
+ A[E + "." + b] = v[b];
7700
7700
  });
7701
7701
  }
7702
7702
  }
@@ -7704,19 +7704,19 @@ function Uv() {
7704
7704
  }
7705
7705
  function nt(L, A) {
7706
7706
  var w = {}, E = {};
7707
- return Object.keys(L).forEach(function(p) {
7708
- var x = L[p];
7709
- if (kt.isDynamic(x)) {
7710
- E[p] = kt.unbox(x, p);
7707
+ return Object.keys(L).forEach(function(v) {
7708
+ var b = L[v];
7709
+ if (kt.isDynamic(b)) {
7710
+ E[v] = kt.unbox(b, v);
7711
7711
  return;
7712
- } else if (A && Array.isArray(x)) {
7713
- for (var g = 0; g < x.length; ++g)
7714
- if (kt.isDynamic(x[g])) {
7715
- E[p] = kt.unbox(x, p);
7712
+ } else if (A && Array.isArray(b)) {
7713
+ for (var g = 0; g < b.length; ++g)
7714
+ if (kt.isDynamic(b[g])) {
7715
+ E[v] = kt.unbox(b, v);
7716
7716
  return;
7717
7717
  }
7718
7718
  }
7719
- w[p] = x;
7719
+ w[v] = b;
7720
7720
  }), {
7721
7721
  dynamic: E,
7722
7722
  static: w
@@ -8106,8 +8106,8 @@ function _c() {
8106
8106
  Node: f,
8107
8107
  Element: u,
8108
8108
  NodeFilter: l,
8109
- NamedNodeMap: v = t.NamedNodeMap || t.MozNamedAttrMap,
8110
- HTMLFormElement: b,
8109
+ NamedNodeMap: p = t.NamedNodeMap || t.MozNamedAttrMap,
8110
+ HTMLFormElement: x,
8111
8111
  DOMParser: S,
8112
8112
  trustedTypes: D
8113
8113
  } = t, Y = u.prototype, Ee = Ei(Y, "cloneNode"), Te = Ei(Y, "remove"), se = Ei(Y, "nextSibling"), Ue = Ei(Y, "childNodes"), He = Ei(Y, "parentNode");
@@ -8265,7 +8265,7 @@ function _c() {
8265
8265
  null
8266
8266
  );
8267
8267
  }, Ir = function(C) {
8268
- return C instanceof b && (typeof C.nodeName != "string" || typeof C.textContent != "string" || typeof C.removeChild != "function" || !(C.attributes instanceof v) || typeof C.removeAttribute != "function" || typeof C.setAttribute != "function" || typeof C.namespaceURI != "string" || typeof C.insertBefore != "function" || typeof C.hasChildNodes != "function");
8268
+ return C instanceof x && (typeof C.nodeName != "string" || typeof C.textContent != "string" || typeof C.removeChild != "function" || !(C.attributes instanceof p) || typeof C.removeAttribute != "function" || typeof C.setAttribute != "function" || typeof C.namespaceURI != "string" || typeof C.insertBefore != "function" || typeof C.hasChildNodes != "function");
8269
8269
  }, gt = function(C) {
8270
8270
  return typeof f == "function" && C instanceof f;
8271
8271
  };
@@ -8824,14 +8824,14 @@ class Sl extends Gn {
8824
8824
  const s = new Float32Array(i * i * 4), f = new Float32Array(i * i * 4), u = e === "incoming" ? o.sourceIndexToTargetIndices : o.targetIndexToSourceIndices;
8825
8825
  this.maxPointDegree = 0;
8826
8826
  let l = 0;
8827
- u == null || u.forEach((v, b) => {
8828
- v && (this.linkFirstIndicesAndAmount[b * 4 + 0] = l % i, this.linkFirstIndicesAndAmount[b * 4 + 1] = Math.floor(l / i), this.linkFirstIndicesAndAmount[b * 4 + 2] = v.length ?? 0, v.forEach(([S, D]) => {
8827
+ u == null || u.forEach((p, x) => {
8828
+ p && (this.linkFirstIndicesAndAmount[x * 4 + 0] = l % i, this.linkFirstIndicesAndAmount[x * 4 + 1] = Math.floor(l / i), this.linkFirstIndicesAndAmount[x * 4 + 2] = p.length ?? 0, p.forEach(([S, D]) => {
8829
8829
  var H, fe, Re;
8830
8830
  this.indices[l * 4 + 0] = S % r, this.indices[l * 4 + 1] = Math.floor(S / r);
8831
- const Y = ((H = o.degree) == null ? void 0 : H[S]) ?? 0, Ee = ((fe = o.degree) == null ? void 0 : fe[b]) ?? 0, Te = Y + Ee, se = Te !== 0 ? Y / Te : 0.5, Ue = Math.min(Y, Ee);
8831
+ const Y = ((H = o.degree) == null ? void 0 : H[S]) ?? 0, Ee = ((fe = o.degree) == null ? void 0 : fe[x]) ?? 0, Te = Y + Ee, se = Te !== 0 ? Y / Te : 0.5, Ue = Math.min(Y, Ee);
8832
8832
  let He = ((Re = o.linkStrength) == null ? void 0 : Re[D]) ?? 1 / Math.max(Ue, 1);
8833
8833
  He = Math.sqrt(He), s[l * 4 + 0] = se, s[l * 4 + 1] = He, f[l * 4] = this.store.getRandomFloat(0, 1), l += 1;
8834
- }), this.maxPointDegree = Math.max(this.maxPointDegree, v.length ?? 0));
8834
+ }), this.maxPointDegree = Math.max(this.maxPointDegree, p.length ?? 0));
8835
8835
  }), this.linkFirstIndicesAndAmountTexture || (this.linkFirstIndicesAndAmountTexture = n.texture()), this.linkFirstIndicesAndAmountTexture({
8836
8836
  data: this.linkFirstIndicesAndAmount,
8837
8837
  shape: [r, r, 4],
@@ -9274,7 +9274,7 @@ function Vg(t, e) {
9274
9274
  if (o >= e)
9275
9275
  return r;
9276
9276
  {
9277
- const s = Math.pow(2, o + 1), f = new Array(o + 1 - n).fill(0).map((l, v) => `pow(2.0, ${o - (v + n)}.0) * i${v + n}`).join("+"), u = new Array(o + 1 - n).fill(0).map((l, v) => `pow(2.0, ${o - (v + n)}.0) * j${v + n}`).join("+");
9277
+ const s = Math.pow(2, o + 1), f = new Array(o + 1 - n).fill(0).map((l, p) => `pow(2.0, ${o - (p + n)}.0) * i${p + n}`).join("+"), u = new Array(o + 1 - n).fill(0).map((l, p) => `pow(2.0, ${o - (p + n)}.0) * j${p + n}`).join("+");
9278
9278
  return `
9279
9279
  for (float ij${o} = 0.0; ij${o} < 4.0; ij${o} += 1.0) {
9280
9280
  float i${o} = 0.0;
@@ -9578,14 +9578,14 @@ class Yg extends Gn {
9578
9578
  var u;
9579
9579
  const { reglInstance: e, store: n, data: r } = this, { pointsTextureSize: i } = n;
9580
9580
  if (r.pointsNumber === void 0 || !r.pointClusters && !r.clusterPositions) return;
9581
- this.clusterCount = (r.pointClusters ?? []).reduce((l, v) => v === void 0 || v < 0 ? l : Math.max(l, v), 0) + 1, this.clustersTextureSize = Math.ceil(Math.sqrt(this.clusterCount));
9581
+ this.clusterCount = (r.pointClusters ?? []).reduce((l, p) => p === void 0 || p < 0 ? l : Math.max(l, p), 0) + 1, this.clustersTextureSize = Math.ceil(Math.sqrt(this.clusterCount));
9582
9582
  const o = new Float32Array(i * i * 4), s = new Float32Array(this.clustersTextureSize * this.clustersTextureSize * 4).fill(-1), f = new Float32Array(i * i * 4).fill(1);
9583
9583
  if (r.clusterPositions)
9584
9584
  for (let l = 0; l < this.clusterCount; ++l)
9585
9585
  s[l * 4 + 0] = r.clusterPositions[l * 2 + 0] ?? -1, s[l * 4 + 1] = r.clusterPositions[l * 2 + 1] ?? -1;
9586
9586
  for (let l = 0; l < r.pointsNumber; ++l) {
9587
- const v = (u = r.pointClusters) == null ? void 0 : u[l];
9588
- v === void 0 ? (o[l * 4 + 0] = -1, o[l * 4 + 1] = -1) : (o[l * 4 + 0] = v % this.clustersTextureSize, o[l * 4 + 1] = Math.floor(v / this.clustersTextureSize)), r.clusterStrength && (f[l * 4 + 0] = r.clusterStrength[l] ?? 1);
9587
+ const p = (u = r.pointClusters) == null ? void 0 : u[l];
9588
+ p === void 0 ? (o[l * 4 + 0] = -1, o[l * 4 + 1] = -1) : (o[l * 4 + 0] = p % this.clustersTextureSize, o[l * 4 + 1] = Math.floor(p / this.clustersTextureSize)), r.clusterStrength && (f[l * 4 + 0] = r.clusterStrength[l] ?? 1);
9589
9589
  }
9590
9590
  this.clusterTexture || (this.clusterTexture = e.texture()), this.clusterTexture({
9591
9591
  data: o,
@@ -9785,10 +9785,10 @@ function Qg() {
9785
9785
  S.style.display = this.trackGPU ? "inline" : "none";
9786
9786
  });
9787
9787
  }, Object.assign(this, f), this.detected = 0, this.finished = [], this.isFramebuffer = 0, this.frameId = 0;
9788
- let u, l = 0, v, b = (S) => {
9789
- ++l < 20 ? u = requestAnimationFrame(b) : (this.detected = Math.ceil(1e3 * l / (S - v) / 70), cancelAnimationFrame(u)), v || (v = S);
9788
+ let u, l = 0, p, x = (S) => {
9789
+ ++l < 20 ? u = requestAnimationFrame(x) : (this.detected = Math.ceil(1e3 * l / (S - p) / 70), cancelAnimationFrame(u)), p || (p = S);
9790
9790
  };
9791
- if (requestAnimationFrame(b), s) {
9791
+ if (requestAnimationFrame(x), s) {
9792
9792
  const S = async (Y, Ee) => Promise.resolve(setTimeout(() => {
9793
9793
  s.getError();
9794
9794
  const Te = this.now() - Y;
@@ -9857,11 +9857,11 @@ function Qg() {
9857
9857
  else {
9858
9858
  let u = f - this.paramTime;
9859
9859
  if (u >= 1e3) {
9860
- const l = this.frameId - this.paramFrame, v = l / u * 1e3;
9861
- for (let b = 0; b < this.names.length; b++) {
9862
- const S = this.cpuAccums[b] / u * 100, D = this.gpuAccums[b] / u * 100, Y = performance && performance.memory ? performance.memory.usedJSHeapSize / (1 << 20) : 0;
9863
- this.paramLogger(b, S, D, Y, v, u, l), this.cpuAccums[b] = 0, Promise.all(this.finished).then(() => {
9864
- this.gpuAccums[b] = 0, this.finished = [];
9860
+ const l = this.frameId - this.paramFrame, p = l / u * 1e3;
9861
+ for (let x = 0; x < this.names.length; x++) {
9862
+ const S = this.cpuAccums[x] / u * 100, D = this.gpuAccums[x] / u * 100, Y = performance && performance.memory ? performance.memory.usedJSHeapSize / (1 << 20) : 0;
9863
+ this.paramLogger(x, S, D, Y, p, u, l), this.cpuAccums[x] = 0, Promise.all(this.finished).then(() => {
9864
+ this.gpuAccums[x] = 0, this.finished = [];
9865
9865
  });
9866
9866
  }
9867
9867
  this.paramFrame = this.frameId, this.paramTime = f;
@@ -9872,8 +9872,8 @@ function Qg() {
9872
9872
  else {
9873
9873
  let u = f - this.chartTime, l = this.chartHz * u / 1e3;
9874
9874
  for (; --l > 0 && this.detected; ) {
9875
- const b = (this.frameId - this.chartFrame) / u * 1e3;
9876
- this.chart[this.circularId % this.chartLen] = b;
9875
+ const x = (this.frameId - this.chartFrame) / u * 1e3;
9876
+ this.chart[this.circularId % this.chartLen] = x;
9877
9877
  for (let S = 0; S < this.names.length; S++)
9878
9878
  this.chartLogger(S, this.chart, this.circularId);
9879
9879
  this.circularId++, this.chartFrame = this.frameId, this.chartTime = f;
@@ -9898,8 +9898,8 @@ function Qg() {
9898
9898
  let f = this.names.indexOf(s);
9899
9899
  f == -1 && (f = this.names.length, this.addUI(s));
9900
9900
  const u = this.now(), l = u - this.t0;
9901
- for (let v = 0; v < f + 1; v++)
9902
- this.activeAccums[v] && (this.cpuAccums[v] += l);
9901
+ for (let p = 0; p < f + 1; p++)
9902
+ this.activeAccums[p] && (this.cpuAccums[p] += l);
9903
9903
  this.activeAccums[f] = !this.activeAccums[f], this.t0 = u;
9904
9904
  }
9905
9905
  }
@@ -10214,7 +10214,11 @@ float calculateArrowWidth(float arrowWidth) {
10214
10214
  if (scaleLinksOnZoom) {
10215
10215
  return arrowWidth;
10216
10216
  } else {
10217
- return arrowWidth / transformationMatrix[0][0];
10217
+
10218
+ arrowWidth = arrowWidth / transformationMatrix[0][0];
10219
+
10220
+ arrowWidth *= min(5.0, max(1.0, transformationMatrix[0][0] * 0.01));
10221
+ return arrowWidth;
10218
10222
  }
10219
10223
  }
10220
10224
 
@@ -10251,7 +10255,8 @@ void main() {
10251
10255
  float arrowWidth = linkWidth * k;
10252
10256
  arrowWidth *= arrowSizeScale;
10253
10257
 
10254
- float arrowWidthDifference = arrowWidth - linkWidth;
10258
+
10259
+ float arrowWidthDifference = max(0.0, arrowWidth - linkWidth);
10255
10260
 
10256
10261
 
10257
10262
  float arrowWidthPx = calculateArrowWidth(arrowWidth);
@@ -10320,29 +10325,29 @@ function iy(t, e) {
10320
10325
  function Ac(t) {
10321
10326
  let e, n, r;
10322
10327
  t.length !== 2 ? (e = qo, n = (f, u) => qo(t(f), u), r = (f, u) => t(f) - u) : (e = t === qo || t === iy ? t : oy, n = t, r = t);
10323
- function i(f, u, l = 0, v = f.length) {
10324
- if (l < v) {
10325
- if (e(u, u) !== 0) return v;
10328
+ function i(f, u, l = 0, p = f.length) {
10329
+ if (l < p) {
10330
+ if (e(u, u) !== 0) return p;
10326
10331
  do {
10327
- const b = l + v >>> 1;
10328
- n(f[b], u) < 0 ? l = b + 1 : v = b;
10329
- } while (l < v);
10332
+ const x = l + p >>> 1;
10333
+ n(f[x], u) < 0 ? l = x + 1 : p = x;
10334
+ } while (l < p);
10330
10335
  }
10331
10336
  return l;
10332
10337
  }
10333
- function o(f, u, l = 0, v = f.length) {
10334
- if (l < v) {
10335
- if (e(u, u) !== 0) return v;
10338
+ function o(f, u, l = 0, p = f.length) {
10339
+ if (l < p) {
10340
+ if (e(u, u) !== 0) return p;
10336
10341
  do {
10337
- const b = l + v >>> 1;
10338
- n(f[b], u) <= 0 ? l = b + 1 : v = b;
10339
- } while (l < v);
10342
+ const x = l + p >>> 1;
10343
+ n(f[x], u) <= 0 ? l = x + 1 : p = x;
10344
+ } while (l < p);
10340
10345
  }
10341
10346
  return l;
10342
10347
  }
10343
- function s(f, u, l = 0, v = f.length) {
10344
- const b = i(f, u, l, v - 1);
10345
- return b > l && r(f[b - 1], u) > -r(f[b], u) ? b - 1 : b;
10348
+ function s(f, u, l = 0, p = f.length) {
10349
+ const x = i(f, u, l, p - 1);
10350
+ return x > l && r(f[x - 1], u) > -r(f[x], u) ? x - 1 : x;
10346
10351
  }
10347
10352
  return { left: i, center: s, right: o };
10348
10353
  }
@@ -10445,29 +10450,29 @@ function Cc(t, e) {
10445
10450
  }
10446
10451
  function kc() {
10447
10452
  var t = El, e = El, n = Js, r, i, o, s = An, f, u, l;
10448
- function v() {
10453
+ function p() {
10449
10454
  var S = Math.min(t.length, e.length);
10450
- return s !== An && (s = my(t[0], t[S - 1])), f = S > 2 ? vy : py, u = l = null, b;
10455
+ return s !== An && (s = my(t[0], t[S - 1])), f = S > 2 ? vy : py, u = l = null, x;
10451
10456
  }
10452
- function b(S) {
10457
+ function x(S) {
10453
10458
  return S == null || isNaN(S = +S) ? o : (u || (u = f(t.map(r), e, n)))(r(s(S)));
10454
10459
  }
10455
- return b.invert = function(S) {
10460
+ return x.invert = function(S) {
10456
10461
  return s(i((l || (l = f(e, t.map(r), mn)))(S)));
10457
- }, b.domain = function(S) {
10458
- return arguments.length ? (t = Array.from(S, dy), v()) : t.slice();
10459
- }, b.range = function(S) {
10460
- return arguments.length ? (e = Array.from(S), v()) : e.slice();
10461
- }, b.rangeRound = function(S) {
10462
- return e = Array.from(S), n = w0, v();
10463
- }, b.clamp = function(S) {
10464
- return arguments.length ? (s = S ? !0 : An, v()) : s !== An;
10465
- }, b.interpolate = function(S) {
10466
- return arguments.length ? (n = S, v()) : n;
10467
- }, b.unknown = function(S) {
10468
- return arguments.length ? (o = S, b) : o;
10462
+ }, x.domain = function(S) {
10463
+ return arguments.length ? (t = Array.from(S, dy), p()) : t.slice();
10464
+ }, x.range = function(S) {
10465
+ return arguments.length ? (e = Array.from(S), p()) : e.slice();
10466
+ }, x.rangeRound = function(S) {
10467
+ return e = Array.from(S), n = w0, p();
10468
+ }, x.clamp = function(S) {
10469
+ return arguments.length ? (s = S ? !0 : An, p()) : s !== An;
10470
+ }, x.interpolate = function(S) {
10471
+ return arguments.length ? (n = S, p()) : n;
10472
+ }, x.unknown = function(S) {
10473
+ return arguments.length ? (o = S, x) : o;
10469
10474
  }, function(S, D) {
10470
- return r = S, i = D, v();
10475
+ return r = S, i = D, p();
10471
10476
  };
10472
10477
  }
10473
10478
  function gy() {
@@ -10575,9 +10580,9 @@ function kl(t) {
10575
10580
  var Ll = Array.prototype.map, Fl = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
10576
10581
  function wy(t) {
10577
10582
  var e = t.grouping === void 0 || t.thousands === void 0 ? kl : xy(Ll.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", o = t.numerals === void 0 ? kl : by(Ll.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", f = t.minus === void 0 ? "−" : t.minus + "", u = t.nan === void 0 ? "NaN" : t.nan + "";
10578
- function l(b) {
10579
- b = la(b);
10580
- var S = b.fill, D = b.align, Y = b.sign, Ee = b.symbol, Te = b.zero, se = b.width, Ue = b.comma, He = b.precision, H = b.trim, fe = b.type;
10583
+ function l(x) {
10584
+ x = la(x);
10585
+ var S = x.fill, D = x.align, Y = x.sign, Ee = x.symbol, Te = x.zero, se = x.width, Ue = x.comma, He = x.precision, H = x.trim, fe = x.type;
10581
10586
  fe === "n" ? (Ue = !0, fe = "g") : Cl[fe] || (He === void 0 && (He = 12), H = !0, fe = "g"), (Te || S === "0" && D === "=") && (Te = !0, S = "0", D = "=");
10582
10587
  var Re = Ee === "$" ? n : Ee === "#" && /[boxX]/.test(fe) ? "0" + fe.toLowerCase() : "", Ge = Ee === "$" ? r : /[%p]/.test(fe) ? s : "", Ye = Cl[fe], at = /[defgprs%]/.test(fe);
10583
10588
  He = He === void 0 ? 6 : /[gprs]/.test(fe) ? Math.max(1, Math.min(21, He)) : Math.max(0, Math.min(20, He));
@@ -10615,18 +10620,18 @@ function wy(t) {
10615
10620
  return o(Ae);
10616
10621
  }
10617
10622
  return ut.toString = function() {
10618
- return b + "";
10623
+ return x + "";
10619
10624
  }, ut;
10620
10625
  }
10621
- function v(b, S) {
10622
- var D = l((b = la(b), b.type = "f", b)), Y = Math.max(-8, Math.min(8, Math.floor(Jr(S) / 3))) * 3, Ee = Math.pow(10, -Y), Te = Fl[8 + Y / 3];
10626
+ function p(x, S) {
10627
+ var D = l((x = la(x), x.type = "f", x)), Y = Math.max(-8, Math.min(8, Math.floor(Jr(S) / 3))) * 3, Ee = Math.pow(10, -Y), Te = Fl[8 + Y / 3];
10623
10628
  return function(se) {
10624
10629
  return D(Ee * se) + Te;
10625
10630
  };
10626
10631
  }
10627
10632
  return {
10628
10633
  format: l,
10629
- formatPrefix: v
10634
+ formatPrefix: p
10630
10635
  };
10631
10636
  }
10632
10637
  var No, Fc, Rc;
@@ -10680,8 +10685,8 @@ function Ic(t) {
10680
10685
  return ky(i[0], i[i.length - 1], n ?? 10, r);
10681
10686
  }, t.nice = function(n) {
10682
10687
  n == null && (n = 10);
10683
- var r = e(), i = 0, o = r.length - 1, s = r[i], f = r[o], u, l, v = 10;
10684
- for (f < s && (l = s, s = f, f = l, l = i, i = o, o = l); v-- > 0; ) {
10688
+ var r = e(), i = 0, o = r.length - 1, s = r[i], f = r[o], u, l, p = 10;
10689
+ for (f < s && (l = s, s = f, f = l, l = i, i = o, o = l); p-- > 0; ) {
10685
10690
  if (l = Ec(s, f, n), l === u)
10686
10691
  return r[i] = s, r[o] = f, e(r);
10687
10692
  if (l > 0)
@@ -10840,8 +10845,8 @@ class Dy extends Gn {
10840
10845
  if (n.linksNumber === void 0 || n.links === void 0) return;
10841
10846
  const i = new Float32Array(n.linksNumber * 4);
10842
10847
  for (let o = 0; o < n.linksNumber; o++) {
10843
- const s = n.links[o * 2], f = n.links[o * 2 + 1], u = s % r.pointsTextureSize, l = Math.floor(s / r.pointsTextureSize), v = f % r.pointsTextureSize, b = Math.floor(f / r.pointsTextureSize), S = o * 4;
10844
- i[S] = u, i[S + 1] = l, i[S + 2] = v, i[S + 3] = b;
10848
+ const s = n.links[o * 2], f = n.links[o * 2 + 1], u = s % r.pointsTextureSize, l = Math.floor(s / r.pointsTextureSize), p = f % r.pointsTextureSize, x = Math.floor(f / r.pointsTextureSize), S = o * 4;
10849
+ i[S] = u, i[S + 1] = l, i[S + 2] = p, i[S + 3] = x;
10845
10850
  }
10846
10851
  this.pointsBuffer || (this.pointsBuffer = e.buffer(0)), this.pointsBuffer(i);
10847
10852
  }
@@ -10906,6 +10911,8 @@ uniform vec4 backgroundColor;
10906
10911
  uniform bool scalePointsOnZoom;
10907
10912
  uniform float maxPointSize;
10908
10913
  uniform bool darkenGreyout;
10914
+ uniform bool renderOnlySelected;
10915
+ uniform bool renderOnlyUnselected;
10909
10916
 
10910
10917
  varying vec2 textureCoords;
10911
10918
  varying vec3 rgbColor;
@@ -10925,6 +10932,23 @@ float calculatePointSize(float size) {
10925
10932
  void main() {
10926
10933
  textureCoords = pointIndices;
10927
10934
 
10935
+
10936
+ vec4 greyoutStatus = texture2D(pointGreyoutStatus, (textureCoords + 0.5) / pointsTextureSize);
10937
+ bool isSelected = greyoutStatus.r == 0.0;
10938
+
10939
+
10940
+ if (renderOnlySelected && !isSelected) {
10941
+ gl_Position = vec4(2.0, 2.0, 2.0, 1.0);
10942
+ gl_PointSize = 0.0;
10943
+ return;
10944
+ }
10945
+ if (renderOnlyUnselected && isSelected) {
10946
+ gl_Position = vec4(2.0, 2.0, 2.0, 1.0);
10947
+ gl_PointSize = 0.0;
10948
+ return;
10949
+ }
10950
+
10951
+
10928
10952
  vec4 pointPosition = texture2D(positionsTexture, (textureCoords + 0.5) / pointsTextureSize);
10929
10953
  vec2 point = pointPosition.rg;
10930
10954
 
@@ -10940,7 +10964,6 @@ void main() {
10940
10964
  alpha = color.a * pointOpacity;
10941
10965
 
10942
10966
 
10943
- vec4 greyoutStatus = texture2D(pointGreyoutStatus, (textureCoords + 0.5) / pointsTextureSize);
10944
10967
  if (greyoutStatus.r > 0.0) {
10945
10968
  if (greyoutColor[0] != -1.0) {
10946
10969
  rgbColor = greyoutColor.rgb;
@@ -11444,7 +11467,9 @@ class qy extends Gn {
11444
11467
  backgroundColor: () => r.backgroundColor,
11445
11468
  darkenGreyout: () => r.darkenGreyout,
11446
11469
  scalePointsOnZoom: () => n.scalePointsOnZoom,
11447
- maxPointSize: () => r.maxPointSize
11470
+ maxPointSize: () => r.maxPointSize,
11471
+ renderOnlySelected: e.prop("renderOnlySelected"),
11472
+ renderOnlyUnselected: e.prop("renderOnlyUnselected")
11448
11473
  },
11449
11474
  blend: {
11450
11475
  enable: !0,
@@ -11685,18 +11710,18 @@ class qy extends Gn {
11685
11710
  (e = this.trackedIndices) != null && e.length && ((n = this.trackPointsCommand) == null || n.call(this));
11686
11711
  }
11687
11712
  draw() {
11688
- var o, s, f, u, l;
11713
+ var o, s, f, u, l, p, x;
11689
11714
  const { config: { renderHoveredPointRing: e, pointSize: n }, store: r, data: i } = this;
11690
- this.colorBuffer || this.updateColor(), this.sizeBuffer || this.updateSize(), (o = this.drawCommand) == null || o.call(this), e && r.hoveredPoint && ((f = this.drawHighlightedCommand) == null || f.call(this, {
11715
+ this.colorBuffer || this.updateColor(), this.sizeBuffer || this.updateSize(), r.selectedIndices && r.selectedIndices.length > 0 ? ((o = this.drawCommand) == null || o.call(this, { renderOnlySelected: !1, renderOnlyUnselected: !0 }), (s = this.drawCommand) == null || s.call(this, { renderOnlySelected: !0, renderOnlyUnselected: !1 })) : (f = this.drawCommand) == null || f.call(this, { renderOnlySelected: !1, renderOnlyUnselected: !1 }), e && r.hoveredPoint && ((l = this.drawHighlightedCommand) == null || l.call(this, {
11691
11716
  width: 0.85,
11692
11717
  color: r.hoveredPointRingColor,
11693
11718
  pointIndex: r.hoveredPoint.index,
11694
- size: ((s = i.pointSizes) == null ? void 0 : s[r.hoveredPoint.index]) ?? n
11695
- })), r.focusedPoint && ((l = this.drawHighlightedCommand) == null || l.call(this, {
11719
+ size: ((u = i.pointSizes) == null ? void 0 : u[r.hoveredPoint.index]) ?? n
11720
+ })), r.focusedPoint && ((x = this.drawHighlightedCommand) == null || x.call(this, {
11696
11721
  width: 0.75,
11697
11722
  color: r.focusedPointRingColor,
11698
11723
  pointIndex: r.focusedPoint.index,
11699
- size: ((u = i.pointSizes) == null ? void 0 : u[r.focusedPoint.index]) ?? n
11724
+ size: ((p = i.pointSizes) == null ? void 0 : p[r.focusedPoint.index]) ?? n
11700
11725
  }));
11701
11726
  }
11702
11727
  updatePosition() {
@@ -11792,8 +11817,8 @@ class qy extends Gn {
11792
11817
  (i = this.clearSampledPointsFboCommand) == null || i.call(this), (o = this.fillSampledPointsFboCommand) == null || o.call(this);
11793
11818
  const r = sn(this.reglInstance, this.sampledPointsFbo);
11794
11819
  for (let s = 0; s < r.length / 4; s++) {
11795
- const f = r[s * 4], u = !!r[s * 4 + 1], l = r[s * 4 + 2], v = r[s * 4 + 3];
11796
- u && f !== void 0 && l !== void 0 && v !== void 0 && (e.push(f), n.push(l, v));
11820
+ const f = r[s * 4], u = !!r[s * 4 + 1], l = r[s * 4 + 2], p = r[s * 4 + 3];
11821
+ u && f !== void 0 && l !== void 0 && p !== void 0 && (e.push(f), n.push(l, p));
11797
11822
  }
11798
11823
  return { indices: e, positions: n };
11799
11824
  }
@@ -11821,12 +11846,12 @@ class qy extends Gn {
11821
11846
  const se = n[Te], Ue = n[Te + 1];
11822
11847
  i = Math.min(i, se), o = Math.max(o, se), s = Math.min(s, Ue), f = Math.max(f, Ue);
11823
11848
  }
11824
- const u = o - i, l = f - s, v = Math.max(u, l);
11825
- if (v > e) {
11849
+ const u = o - i, l = f - s, p = Math.max(u, l);
11850
+ if (p > e) {
11826
11851
  this.scaleX = void 0, this.scaleY = void 0;
11827
11852
  return;
11828
11853
  }
11829
- const b = e * e * 1e-3, D = (r > b ? e * Math.max(1.2, Math.sqrt(r) / e) : e * 0.1) / v, Y = (v - u) / 2 * D, Ee = (v - l) / 2 * D;
11854
+ const x = e * e * 1e-3, D = (r > x ? e * Math.max(1.2, Math.sqrt(r) / e) : e * 0.1) / p, Y = (p - u) / 2 * D, Ee = (p - l) / 2 * D;
11830
11855
  this.scaleX = (Te) => (Te - i) * D + Y, this.scaleY = (Te) => (Te - s) * D + Ee;
11831
11856
  for (let Te = 0; Te < r; Te++)
11832
11857
  this.data.pointPositions[Te * 2] = this.scaleX(n[Te * 2]), this.data.pointPositions[Te * 2 + 1] = this.scaleY(n[Te * 2 + 1]);
@@ -11843,8 +11868,8 @@ function Yy() {
11843
11868
  return Il != Float32Array && (t[1] = 0, t[2] = 0, t[3] = 0, t[5] = 0, t[6] = 0, t[7] = 0), t[0] = 1, t[4] = 1, t[8] = 1, t;
11844
11869
  }
11845
11870
  function Dl(t, e, n) {
11846
- var r = e[0], i = e[1], o = e[2], s = e[3], f = e[4], u = e[5], l = e[6], v = e[7], b = e[8], S = n[0], D = n[1];
11847
- return t[0] = r, t[1] = i, t[2] = o, t[3] = s, t[4] = f, t[5] = u, t[6] = S * r + D * s + l, t[7] = S * i + D * f + v, t[8] = S * o + D * u + b, t;
11871
+ var r = e[0], i = e[1], o = e[2], s = e[3], f = e[4], u = e[5], l = e[6], p = e[7], x = e[8], S = n[0], D = n[1];
11872
+ return t[0] = r, t[1] = i, t[2] = o, t[3] = s, t[4] = f, t[5] = u, t[6] = S * r + D * s + l, t[7] = S * i + D * f + p, t[8] = S * o + D * u + x, t;
11848
11873
  }
11849
11874
  function ws(t, e, n) {
11850
11875
  var r = n[0], i = n[1];
@@ -11858,30 +11883,30 @@ function Ky() {
11858
11883
  return zl || (zl = 1, function(t) {
11859
11884
  (function(e, n, r) {
11860
11885
  function i(u) {
11861
- var l = this, v = f();
11886
+ var l = this, p = f();
11862
11887
  l.next = function() {
11863
- var b = 2091639 * l.s0 + l.c * 23283064365386963e-26;
11864
- return l.s0 = l.s1, l.s1 = l.s2, l.s2 = b - (l.c = b | 0);
11865
- }, l.c = 1, l.s0 = v(" "), l.s1 = v(" "), l.s2 = v(" "), l.s0 -= v(u), l.s0 < 0 && (l.s0 += 1), l.s1 -= v(u), l.s1 < 0 && (l.s1 += 1), l.s2 -= v(u), l.s2 < 0 && (l.s2 += 1), v = null;
11888
+ var x = 2091639 * l.s0 + l.c * 23283064365386963e-26;
11889
+ return l.s0 = l.s1, l.s1 = l.s2, l.s2 = x - (l.c = x | 0);
11890
+ }, l.c = 1, l.s0 = p(" "), l.s1 = p(" "), l.s2 = p(" "), l.s0 -= p(u), l.s0 < 0 && (l.s0 += 1), l.s1 -= p(u), l.s1 < 0 && (l.s1 += 1), l.s2 -= p(u), l.s2 < 0 && (l.s2 += 1), p = null;
11866
11891
  }
11867
11892
  function o(u, l) {
11868
11893
  return l.c = u.c, l.s0 = u.s0, l.s1 = u.s1, l.s2 = u.s2, l;
11869
11894
  }
11870
11895
  function s(u, l) {
11871
- var v = new i(u), b = l && l.state, S = v.next;
11896
+ var p = new i(u), x = l && l.state, S = p.next;
11872
11897
  return S.int32 = function() {
11873
- return v.next() * 4294967296 | 0;
11898
+ return p.next() * 4294967296 | 0;
11874
11899
  }, S.double = function() {
11875
11900
  return S() + (S() * 2097152 | 0) * 11102230246251565e-32;
11876
- }, S.quick = S, b && (typeof b == "object" && o(b, v), S.state = function() {
11877
- return o(v, {});
11901
+ }, S.quick = S, x && (typeof x == "object" && o(x, p), S.state = function() {
11902
+ return o(p, {});
11878
11903
  }), S;
11879
11904
  }
11880
11905
  function f() {
11881
- var u = 4022871197, l = function(v) {
11882
- v = String(v);
11883
- for (var b = 0; b < v.length; b++) {
11884
- u += v.charCodeAt(b);
11906
+ var u = 4022871197, l = function(p) {
11907
+ p = String(p);
11908
+ for (var x = 0; x < p.length; x++) {
11909
+ u += p.charCodeAt(x);
11885
11910
  var S = 0.02519603282416938 * u;
11886
11911
  u = S >>> 0, S -= u, S *= u, u = S >>> 0, S -= u, u += S * 4294967296;
11887
11912
  }
@@ -11903,27 +11928,27 @@ function ex() {
11903
11928
  function i(f) {
11904
11929
  var u = this, l = "";
11905
11930
  u.x = 0, u.y = 0, u.z = 0, u.w = 0, u.next = function() {
11906
- var b = u.x ^ u.x << 11;
11907
- return u.x = u.y, u.y = u.z, u.z = u.w, u.w ^= u.w >>> 19 ^ b ^ b >>> 8;
11931
+ var x = u.x ^ u.x << 11;
11932
+ return u.x = u.y, u.y = u.z, u.z = u.w, u.w ^= u.w >>> 19 ^ x ^ x >>> 8;
11908
11933
  }, f === (f | 0) ? u.x = f : l += f;
11909
- for (var v = 0; v < l.length + 64; v++)
11910
- u.x ^= l.charCodeAt(v) | 0, u.next();
11934
+ for (var p = 0; p < l.length + 64; p++)
11935
+ u.x ^= l.charCodeAt(p) | 0, u.next();
11911
11936
  }
11912
11937
  function o(f, u) {
11913
11938
  return u.x = f.x, u.y = f.y, u.z = f.z, u.w = f.w, u;
11914
11939
  }
11915
11940
  function s(f, u) {
11916
- var l = new i(f), v = u && u.state, b = function() {
11941
+ var l = new i(f), p = u && u.state, x = function() {
11917
11942
  return (l.next() >>> 0) / 4294967296;
11918
11943
  };
11919
- return b.double = function() {
11944
+ return x.double = function() {
11920
11945
  do
11921
11946
  var S = l.next() >>> 11, D = (l.next() >>> 0) / 4294967296, Y = (S + D) / (1 << 21);
11922
11947
  while (Y === 0);
11923
11948
  return Y;
11924
- }, b.int32 = l.next, b.quick = b, v && (typeof v == "object" && o(v, l), b.state = function() {
11949
+ }, x.int32 = l.next, x.quick = x, p && (typeof p == "object" && o(p, l), x.state = function() {
11925
11950
  return o(l, {});
11926
- }), b;
11951
+ }), x;
11927
11952
  }
11928
11953
  n && n.exports ? n.exports = s : this.xor128 = s;
11929
11954
  })(
@@ -11939,27 +11964,27 @@ function nx() {
11939
11964
  function i(f) {
11940
11965
  var u = this, l = "";
11941
11966
  u.next = function() {
11942
- var b = u.x ^ u.x >>> 2;
11943
- return u.x = u.y, u.y = u.z, u.z = u.w, u.w = u.v, (u.d = u.d + 362437 | 0) + (u.v = u.v ^ u.v << 4 ^ (b ^ b << 1)) | 0;
11967
+ var x = u.x ^ u.x >>> 2;
11968
+ return u.x = u.y, u.y = u.z, u.z = u.w, u.w = u.v, (u.d = u.d + 362437 | 0) + (u.v = u.v ^ u.v << 4 ^ (x ^ x << 1)) | 0;
11944
11969
  }, u.x = 0, u.y = 0, u.z = 0, u.w = 0, u.v = 0, f === (f | 0) ? u.x = f : l += f;
11945
- for (var v = 0; v < l.length + 64; v++)
11946
- u.x ^= l.charCodeAt(v) | 0, v == l.length && (u.d = u.x << 10 ^ u.x >>> 4), u.next();
11970
+ for (var p = 0; p < l.length + 64; p++)
11971
+ u.x ^= l.charCodeAt(p) | 0, p == l.length && (u.d = u.x << 10 ^ u.x >>> 4), u.next();
11947
11972
  }
11948
11973
  function o(f, u) {
11949
11974
  return u.x = f.x, u.y = f.y, u.z = f.z, u.w = f.w, u.v = f.v, u.d = f.d, u;
11950
11975
  }
11951
11976
  function s(f, u) {
11952
- var l = new i(f), v = u && u.state, b = function() {
11977
+ var l = new i(f), p = u && u.state, x = function() {
11953
11978
  return (l.next() >>> 0) / 4294967296;
11954
11979
  };
11955
- return b.double = function() {
11980
+ return x.double = function() {
11956
11981
  do
11957
11982
  var S = l.next() >>> 11, D = (l.next() >>> 0) / 4294967296, Y = (S + D) / (1 << 21);
11958
11983
  while (Y === 0);
11959
11984
  return Y;
11960
- }, b.int32 = l.next, b.quick = b, v && (typeof v == "object" && o(v, l), b.state = function() {
11985
+ }, x.int32 = l.next, x.quick = x, p && (typeof p == "object" && o(p, l), x.state = function() {
11961
11986
  return o(l, {});
11962
- }), b;
11987
+ }), x;
11963
11988
  }
11964
11989
  n && n.exports ? n.exports = s : this.xorwow = s;
11965
11990
  })(
@@ -11975,20 +12000,20 @@ function ix() {
11975
12000
  function i(f) {
11976
12001
  var u = this;
11977
12002
  u.next = function() {
11978
- var v = u.x, b = u.i, S, D;
11979
- return S = v[b], S ^= S >>> 7, D = S ^ S << 24, S = v[b + 1 & 7], D ^= S ^ S >>> 10, S = v[b + 3 & 7], D ^= S ^ S >>> 3, S = v[b + 4 & 7], D ^= S ^ S << 7, S = v[b + 7 & 7], S = S ^ S << 13, D ^= S ^ S << 9, v[b] = D, u.i = b + 1 & 7, D;
12003
+ var p = u.x, x = u.i, S, D;
12004
+ return S = p[x], S ^= S >>> 7, D = S ^ S << 24, S = p[x + 1 & 7], D ^= S ^ S >>> 10, S = p[x + 3 & 7], D ^= S ^ S >>> 3, S = p[x + 4 & 7], D ^= S ^ S << 7, S = p[x + 7 & 7], S = S ^ S << 13, D ^= S ^ S << 9, p[x] = D, u.i = x + 1 & 7, D;
11980
12005
  };
11981
- function l(v, b) {
12006
+ function l(p, x) {
11982
12007
  var S, D = [];
11983
- if (b === (b | 0))
11984
- D[0] = b;
12008
+ if (x === (x | 0))
12009
+ D[0] = x;
11985
12010
  else
11986
- for (b = "" + b, S = 0; S < b.length; ++S)
11987
- D[S & 7] = D[S & 7] << 15 ^ b.charCodeAt(S) + D[S + 1 & 7] << 13;
12011
+ for (x = "" + x, S = 0; S < x.length; ++S)
12012
+ D[S & 7] = D[S & 7] << 15 ^ x.charCodeAt(S) + D[S + 1 & 7] << 13;
11988
12013
  for (; D.length < 8; ) D.push(0);
11989
12014
  for (S = 0; S < 8 && D[S] === 0; ++S) ;
11990
- for (S == 8 ? D[7] = -1 : D[S], v.x = D, v.i = 0, S = 256; S > 0; --S)
11991
- v.next();
12015
+ for (S == 8 ? D[7] = -1 : D[S], p.x = D, p.i = 0, S = 256; S > 0; --S)
12016
+ p.next();
11992
12017
  }
11993
12018
  l(u, f);
11994
12019
  }
@@ -11997,17 +12022,17 @@ function ix() {
11997
12022
  }
11998
12023
  function s(f, u) {
11999
12024
  f == null && (f = +/* @__PURE__ */ new Date());
12000
- var l = new i(f), v = u && u.state, b = function() {
12025
+ var l = new i(f), p = u && u.state, x = function() {
12001
12026
  return (l.next() >>> 0) / 4294967296;
12002
12027
  };
12003
- return b.double = function() {
12028
+ return x.double = function() {
12004
12029
  do
12005
12030
  var S = l.next() >>> 11, D = (l.next() >>> 0) / 4294967296, Y = (S + D) / (1 << 21);
12006
12031
  while (Y === 0);
12007
12032
  return Y;
12008
- }, b.int32 = l.next, b.quick = b, v && (v.x && o(v, l), b.state = function() {
12033
+ }, x.int32 = l.next, x.quick = x, p && (p.x && o(p, l), x.state = function() {
12009
12034
  return o(l, {});
12010
- }), b;
12035
+ }), x;
12011
12036
  }
12012
12037
  n && n.exports ? n.exports = s : this.xorshift7 = s;
12013
12038
  })(
@@ -12023,16 +12048,16 @@ function ax() {
12023
12048
  function i(f) {
12024
12049
  var u = this;
12025
12050
  u.next = function() {
12026
- var v = u.w, b = u.X, S = u.i, D, Y;
12027
- return u.w = v = v + 1640531527 | 0, Y = b[S + 34 & 127], D = b[S = S + 1 & 127], Y ^= Y << 13, D ^= D << 17, Y ^= Y >>> 15, D ^= D >>> 12, Y = b[S] = Y ^ D, u.i = S, Y + (v ^ v >>> 16) | 0;
12051
+ var p = u.w, x = u.X, S = u.i, D, Y;
12052
+ return u.w = p = p + 1640531527 | 0, Y = x[S + 34 & 127], D = x[S = S + 1 & 127], Y ^= Y << 13, D ^= D << 17, Y ^= Y >>> 15, D ^= D >>> 12, Y = x[S] = Y ^ D, u.i = S, Y + (p ^ p >>> 16) | 0;
12028
12053
  };
12029
- function l(v, b) {
12054
+ function l(p, x) {
12030
12055
  var S, D, Y, Ee, Te, se = [], Ue = 128;
12031
- for (b === (b | 0) ? (D = b, b = null) : (b = b + "\0", D = 0, Ue = Math.max(Ue, b.length)), Y = 0, Ee = -32; Ee < Ue; ++Ee)
12032
- b && (D ^= b.charCodeAt((Ee + 32) % b.length)), Ee === 0 && (Te = D), D ^= D << 10, D ^= D >>> 15, D ^= D << 4, D ^= D >>> 13, Ee >= 0 && (Te = Te + 1640531527 | 0, S = se[Ee & 127] ^= D + Te, Y = S == 0 ? Y + 1 : 0);
12033
- for (Y >= 128 && (se[(b && b.length || 0) & 127] = -1), Y = 127, Ee = 4 * 128; Ee > 0; --Ee)
12056
+ for (x === (x | 0) ? (D = x, x = null) : (x = x + "\0", D = 0, Ue = Math.max(Ue, x.length)), Y = 0, Ee = -32; Ee < Ue; ++Ee)
12057
+ x && (D ^= x.charCodeAt((Ee + 32) % x.length)), Ee === 0 && (Te = D), D ^= D << 10, D ^= D >>> 15, D ^= D << 4, D ^= D >>> 13, Ee >= 0 && (Te = Te + 1640531527 | 0, S = se[Ee & 127] ^= D + Te, Y = S == 0 ? Y + 1 : 0);
12058
+ for (Y >= 128 && (se[(x && x.length || 0) & 127] = -1), Y = 127, Ee = 4 * 128; Ee > 0; --Ee)
12034
12059
  D = se[Y + 34 & 127], S = se[Y = Y + 1 & 127], D ^= D << 13, S ^= S << 17, D ^= D >>> 15, S ^= S >>> 12, se[Y] = D ^ S;
12035
- v.w = Te, v.X = se, v.i = Y;
12060
+ p.w = Te, p.X = se, p.i = Y;
12036
12061
  }
12037
12062
  l(u, f);
12038
12063
  }
@@ -12041,17 +12066,17 @@ function ax() {
12041
12066
  }
12042
12067
  function s(f, u) {
12043
12068
  f == null && (f = +/* @__PURE__ */ new Date());
12044
- var l = new i(f), v = u && u.state, b = function() {
12069
+ var l = new i(f), p = u && u.state, x = function() {
12045
12070
  return (l.next() >>> 0) / 4294967296;
12046
12071
  };
12047
- return b.double = function() {
12072
+ return x.double = function() {
12048
12073
  do
12049
12074
  var S = l.next() >>> 11, D = (l.next() >>> 0) / 4294967296, Y = (S + D) / (1 << 21);
12050
12075
  while (Y === 0);
12051
12076
  return Y;
12052
- }, b.int32 = l.next, b.quick = b, v && (v.X && o(v, l), b.state = function() {
12077
+ }, x.int32 = l.next, x.quick = x, p && (p.X && o(p, l), x.state = function() {
12053
12078
  return o(l, {});
12054
- }), b;
12079
+ }), x;
12055
12080
  }
12056
12081
  n && n.exports ? n.exports = s : this.xor4096 = s;
12057
12082
  })(
@@ -12068,27 +12093,27 @@ function fx() {
12068
12093
  function i(f) {
12069
12094
  var u = this, l = "";
12070
12095
  u.next = function() {
12071
- var b = u.b, S = u.c, D = u.d, Y = u.a;
12072
- return b = b << 25 ^ b >>> 7 ^ S, S = S - D | 0, D = D << 24 ^ D >>> 8 ^ Y, Y = Y - b | 0, u.b = b = b << 20 ^ b >>> 12 ^ S, u.c = S = S - D | 0, u.d = D << 16 ^ S >>> 16 ^ Y, u.a = Y - b | 0;
12096
+ var x = u.b, S = u.c, D = u.d, Y = u.a;
12097
+ return x = x << 25 ^ x >>> 7 ^ S, S = S - D | 0, D = D << 24 ^ D >>> 8 ^ Y, Y = Y - x | 0, u.b = x = x << 20 ^ x >>> 12 ^ S, u.c = S = S - D | 0, u.d = D << 16 ^ S >>> 16 ^ Y, u.a = Y - x | 0;
12073
12098
  }, u.a = 0, u.b = 0, u.c = -1640531527, u.d = 1367130551, f === Math.floor(f) ? (u.a = f / 4294967296 | 0, u.b = f | 0) : l += f;
12074
- for (var v = 0; v < l.length + 20; v++)
12075
- u.b ^= l.charCodeAt(v) | 0, u.next();
12099
+ for (var p = 0; p < l.length + 20; p++)
12100
+ u.b ^= l.charCodeAt(p) | 0, u.next();
12076
12101
  }
12077
12102
  function o(f, u) {
12078
12103
  return u.a = f.a, u.b = f.b, u.c = f.c, u.d = f.d, u;
12079
12104
  }
12080
12105
  function s(f, u) {
12081
- var l = new i(f), v = u && u.state, b = function() {
12106
+ var l = new i(f), p = u && u.state, x = function() {
12082
12107
  return (l.next() >>> 0) / 4294967296;
12083
12108
  };
12084
- return b.double = function() {
12109
+ return x.double = function() {
12085
12110
  do
12086
12111
  var S = l.next() >>> 11, D = (l.next() >>> 0) / 4294967296, Y = (S + D) / (1 << 21);
12087
12112
  while (Y === 0);
12088
12113
  return Y;
12089
- }, b.int32 = l.next, b.quick = b, v && (typeof v == "object" && o(v, l), b.state = function() {
12114
+ }, x.int32 = l.next, x.quick = x, p && (typeof p == "object" && o(p, l), x.state = function() {
12090
12115
  return o(l, {});
12091
- }), b;
12116
+ }), x;
12092
12117
  }
12093
12118
  n && n.exports ? n.exports = s : this.tychei = s;
12094
12119
  })(
@@ -12106,7 +12131,7 @@ var hx = ta.exports, Ul;
12106
12131
  function dx() {
12107
12132
  return Ul || (Ul = 1, function(t) {
12108
12133
  (function(e, n, r) {
12109
- var i = 256, o = 6, s = 52, f = "random", u = r.pow(i, o), l = r.pow(2, s), v = l * 2, b = i - 1, S;
12134
+ var i = 256, o = 6, s = 52, f = "random", u = r.pow(i, o), l = r.pow(2, s), p = l * 2, x = i - 1, S;
12110
12135
  function D(H, fe, Re) {
12111
12136
  var Ge = [];
12112
12137
  fe = fe == !0 ? { entropy: !0 } : fe || {};
@@ -12116,7 +12141,7 @@ function dx() {
12116
12141
  ), Ge), at = new Y(Ge), ut = function() {
12117
12142
  for (var Ae = at.g(o), lt = u, rt = 0; Ae < l; )
12118
12143
  Ae = (Ae + rt) * i, lt *= i, rt = at.g(1);
12119
- for (; Ae >= v; )
12144
+ for (; Ae >= p; )
12120
12145
  Ae /= 2, lt /= 2, rt >>>= 1;
12121
12146
  return (Ae + rt) / lt;
12122
12147
  };
@@ -12140,10 +12165,10 @@ function dx() {
12140
12165
  for (Re || (H = [Re++]); Ye < i; )
12141
12166
  ut[Ye] = Ye++;
12142
12167
  for (Ye = 0; Ye < i; Ye++)
12143
- ut[Ye] = ut[at = b & at + H[Ye % Re] + (fe = ut[Ye])], ut[at] = fe;
12168
+ ut[Ye] = ut[at = x & at + H[Ye % Re] + (fe = ut[Ye])], ut[at] = fe;
12144
12169
  (Ge.g = function(Ae) {
12145
12170
  for (var lt, rt = 0, N = Ge.i, Ce = Ge.j, re = Ge.S; Ae--; )
12146
- lt = re[N = b & N + 1], rt = rt * i + re[b & (re[N] = re[Ce = b & Ce + lt]) + (re[Ce] = lt)];
12171
+ lt = re[N = x & N + 1], rt = rt * i + re[x & (re[N] = re[Ce = x & Ce + lt]) + (re[Ce] = lt)];
12147
12172
  return Ge.i = N, Ge.j = Ce, rt;
12148
12173
  })(i);
12149
12174
  }
@@ -12162,7 +12187,7 @@ function dx() {
12162
12187
  }
12163
12188
  function se(H, fe) {
12164
12189
  for (var Re = H + "", Ge, Ye = 0; Ye < Re.length; )
12165
- fe[b & Ye] = b & (Ge ^= fe[b & Ye] * 19) + Re.charCodeAt(Ye++);
12190
+ fe[x & Ye] = x & (Ge ^= fe[x & Ye] * 19) + Re.charCodeAt(Ye++);
12166
12191
  return He(fe);
12167
12192
  }
12168
12193
  function Ue() {
@@ -12358,8 +12383,8 @@ var _x = function(e) {
12358
12383
  if (e === void 0 && (e = 1), vn(e).isPositive(), e < 10) {
12359
12384
  var n = Math.exp(-e);
12360
12385
  return function() {
12361
- for (var u = n, l = 0, v = t.next(); v > u; )
12362
- v = v - u, u = e * u / ++l;
12386
+ for (var u = n, l = 0, p = t.next(); p > u; )
12387
+ p = p - u, u = e * u / ++l;
12363
12388
  return l;
12364
12389
  };
12365
12390
  } else {
@@ -12370,17 +12395,17 @@ var _x = function(e) {
12370
12395
  if (l <= 0.86 * f)
12371
12396
  return u = l / f - 0.43, Math.floor((2 * o / (0.5 - Math.abs(u)) + i) * u + e + 0.445);
12372
12397
  l >= f ? u = t.next() - 0.5 : (u = l / f - 0.93, u = (u < 0 ? -0.5 : 0.5) - u, l = t.next() * f);
12373
- var v = 0.5 - Math.abs(u);
12374
- if (!(v < 0.013 && l > v)) {
12375
- var b = Math.floor((2 * o / v + i) * u + e + 0.445);
12376
- if (l = l * s / (o / (v * v) + i), b >= 10) {
12377
- var S = (b + 0.5) * Math.log(e / b) - e - Fx + b - (0.08333333333333333 - (0.002777777777777778 - 1 / (1260 * b * b)) / (b * b)) / b;
12398
+ var p = 0.5 - Math.abs(u);
12399
+ if (!(p < 0.013 && l > p)) {
12400
+ var x = Math.floor((2 * o / p + i) * u + e + 0.445);
12401
+ if (l = l * s / (o / (p * p) + i), x >= 10) {
12402
+ var S = (x + 0.5) * Math.log(e / x) - e - Fx + x - (0.08333333333333333 - (0.002777777777777778 - 1 / (1260 * x * x)) / (x * x)) / x;
12378
12403
  if (Math.log(l * r) <= S)
12379
- return b;
12380
- } else if (b >= 0) {
12381
- var D, Y = (D = Lx(b)) != null ? D : 0;
12382
- if (Math.log(l) <= b * Math.log(e) - e - Y)
12383
- return b;
12404
+ return x;
12405
+ } else if (x >= 0) {
12406
+ var D, Y = (D = Lx(x)) != null ? D : 0;
12407
+ if (Math.log(l) <= x * Math.log(e) - e - Y)
12408
+ return x;
12384
12409
  }
12385
12410
  }
12386
12411
  }
@@ -12590,7 +12615,7 @@ function js(t, {
12590
12615
  y: f,
12591
12616
  dx: u,
12592
12617
  dy: l,
12593
- dispatch: v
12618
+ dispatch: p
12594
12619
  }) {
12595
12620
  Object.defineProperties(this, {
12596
12621
  type: { value: t, enumerable: !0, configurable: !0 },
@@ -12603,7 +12628,7 @@ function js(t, {
12603
12628
  y: { value: f, enumerable: !0, configurable: !0 },
12604
12629
  dx: { value: u, enumerable: !0, configurable: !0 },
12605
12630
  dy: { value: l, enumerable: !0, configurable: !0 },
12606
- _: { value: v }
12631
+ _: { value: p }
12607
12632
  });
12608
12633
  }
12609
12634
  js.prototype.on = function() {
@@ -12623,12 +12648,12 @@ function $x() {
12623
12648
  return navigator.maxTouchPoints || "ontouchstart" in this;
12624
12649
  }
12625
12650
  function Hx() {
12626
- var t = Bx, e = Ux, n = Vx, r = $x, i = {}, o = ha("start", "drag", "end"), s = 0, f, u, l, v, b = 0;
12651
+ var t = Bx, e = Ux, n = Vx, r = $x, i = {}, o = ha("start", "drag", "end"), s = 0, f, u, l, p, x = 0;
12627
12652
  function S(H) {
12628
12653
  H.on("mousedown.drag", D).filter(r).on("touchstart.drag", Te).on("touchmove.drag", se, Gx).on("touchend.drag touchcancel.drag", Ue).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12629
12654
  }
12630
12655
  function D(H, fe) {
12631
- if (!(v || !t.call(this, H, fe))) {
12656
+ if (!(p || !t.call(this, H, fe))) {
12632
12657
  var Re = He(this, e.call(this, H, fe), H, fe, "mouse");
12633
12658
  Re && (Ut(H.view).on("mousemove.drag", Y, zi).on("mouseup.drag", Ee, zi), Mc(H.view), Es(H), l = !1, f = H.clientX, u = H.clientY, Re("start", H));
12634
12659
  }
@@ -12636,7 +12661,7 @@ function Hx() {
12636
12661
  function Y(H) {
12637
12662
  if (Zr(H), !l) {
12638
12663
  var fe = H.clientX - f, Re = H.clientY - u;
12639
- l = fe * fe + Re * Re > b;
12664
+ l = fe * fe + Re * Re > x;
12640
12665
  }
12641
12666
  i.mouse("drag", H);
12642
12667
  }
@@ -12657,8 +12682,8 @@ function Hx() {
12657
12682
  }
12658
12683
  function Ue(H) {
12659
12684
  var fe = H.changedTouches, Re = fe.length, Ge, Ye;
12660
- for (v && clearTimeout(v), v = setTimeout(function() {
12661
- v = null;
12685
+ for (p && clearTimeout(p), p = setTimeout(function() {
12686
+ p = null;
12662
12687
  }, 500), Ge = 0; Ge < Re; ++Ge)
12663
12688
  (Ye = i[fe[Ge].identifier]) && (Es(H), Ye("end", H, fe[Ge]));
12664
12689
  }
@@ -12719,7 +12744,7 @@ function Hx() {
12719
12744
  var H = o.on.apply(o, arguments);
12720
12745
  return H === o ? S : H;
12721
12746
  }, S.clickDistance = function(H) {
12722
- return arguments.length ? (b = (H = +H) * H, S) : Math.sqrt(b);
12747
+ return arguments.length ? (x = (H = +H) * H, S) : Math.sqrt(x);
12723
12748
  }, S;
12724
12749
  }
12725
12750
  const Bo = (t) => () => t;
@@ -12808,7 +12833,7 @@ function Zx(t, e, n) {
12808
12833
  );
12809
12834
  }
12810
12835
  function Qx() {
12811
- var t = jx, e = Wx, n = Zx, r = qx, i = Yx, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], f = 250, u = R0, l = ha("start", "zoom", "end"), v, b, S, D = 500, Y = 150, Ee = 0, Te = 10;
12836
+ var t = jx, e = Wx, n = Zx, r = qx, i = Yx, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], f = 250, u = R0, l = ha("start", "zoom", "end"), p, x, S, D = 500, Y = 150, Ee = 0, Te = 10;
12812
12837
  function se(N) {
12813
12838
  N.property("__zoom", Xl).on("wheel.zoom", Ye, { passive: !1 }).on("mousedown.zoom", at).on("dblclick.zoom", ut).filter(i).on("touchstart.zoom", Ae).on("touchmove.zoom", lt).on("touchend.zoom touchcancel.zoom", rt).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12814
12839
  }
@@ -12943,9 +12968,9 @@ function Qx() {
12943
12968
  if (t.apply(this, arguments)) {
12944
12969
  var re = N.touches, ke = re.length, je = Re(this, Ce, N.changedTouches.length === ke).event(N), Xe, Qe, Ze, dt;
12945
12970
  for (Ps(N), Qe = 0; Qe < ke; ++Qe)
12946
- Ze = re[Qe], dt = On(Ze, this), dt = [dt, this.__zoom.invert(dt), Ze.identifier], je.touch0 ? !je.touch1 && je.touch0[2] !== dt[2] && (je.touch1 = dt, je.taps = 0) : (je.touch0 = dt, Xe = !0, je.taps = 1 + !!v);
12947
- v && (v = clearTimeout(v)), Xe && (je.taps < 2 && (b = dt[0], v = setTimeout(function() {
12948
- v = null;
12971
+ Ze = re[Qe], dt = On(Ze, this), dt = [dt, this.__zoom.invert(dt), Ze.identifier], je.touch0 ? !je.touch1 && je.touch0[2] !== dt[2] && (je.touch1 = dt, je.taps = 0) : (je.touch0 = dt, Xe = !0, je.taps = 1 + !!p);
12972
+ p && (p = clearTimeout(p)), Xe && (je.taps < 2 && (x = dt[0], p = setTimeout(function() {
12973
+ p = null;
12949
12974
  }, D)), Ho(this), je.start());
12950
12975
  }
12951
12976
  }
@@ -12970,7 +12995,7 @@ function Qx() {
12970
12995
  }, D), Xe = 0; Xe < je; ++Xe)
12971
12996
  Qe = ke[Xe], re.touch0 && re.touch0[2] === Qe.identifier ? delete re.touch0 : re.touch1 && re.touch1[2] === Qe.identifier && delete re.touch1;
12972
12997
  if (re.touch1 && !re.touch0 && (re.touch0 = re.touch1, delete re.touch1), re.touch0) re.touch0[1] = this.__zoom.invert(re.touch0[0]);
12973
- else if (re.end(), re.taps === 2 && (Qe = On(Qe, this), Math.hypot(b[0] - Qe[0], b[1] - Qe[1]) < Te)) {
12998
+ else if (re.end(), re.taps === 2 && (Qe = On(Qe, this), Math.hypot(x[0] - Qe[0], x[1] - Qe[1]) < Te)) {
12974
12999
  var Ze = Ut(this).on("dblclick.zoom");
12975
13000
  Ze && Ze.apply(this, arguments);
12976
13001
  }
@@ -13013,11 +13038,11 @@ class Kx {
13013
13038
  }).on("zoom", (r) => {
13014
13039
  var S, D;
13015
13040
  this.eventTransform = r.transform;
13016
- const { eventTransform: { x: i, y: o, k: s }, store: { transform: f, screenSize: u } } = this, l = u[0], v = u[1];
13017
- if (!l || !v) return;
13018
- Zy(f, l, v), Dl(f, f, [i, o]), ws(f, f, [s, s]), Dl(f, f, [l / 2, v / 2]), ws(f, f, [l / 2, v / 2]), ws(f, f, [1, -1]);
13019
- const b = !!r.sourceEvent;
13020
- (D = (S = this.config) == null ? void 0 : S.onZoom) == null || D.call(S, r, b);
13041
+ const { eventTransform: { x: i, y: o, k: s }, store: { transform: f, screenSize: u } } = this, l = u[0], p = u[1];
13042
+ if (!l || !p) return;
13043
+ Zy(f, l, p), Dl(f, f, [i, o]), ws(f, f, [s, s]), Dl(f, f, [l / 2, p / 2]), ws(f, f, [l / 2, p / 2]), ws(f, f, [1, -1]);
13044
+ const x = !!r.sourceEvent;
13045
+ (D = (S = this.config) == null ? void 0 : S.onZoom) == null || D.call(S, r, x);
13021
13046
  }).on("end", (r) => {
13022
13047
  var o, s;
13023
13048
  this.isRunning = !1;
@@ -13036,20 +13061,20 @@ class Kx {
13036
13061
  if (e.length === 0) return this.eventTransform;
13037
13062
  const { store: { screenSize: i } } = this, o = i[0], s = i[1], f = Al(e.map((se) => se[0])), u = Al(e.map((se) => se[1]));
13038
13063
  f[0] = this.store.scaleX(f[0]), f[1] = this.store.scaleX(f[1]), u[0] = this.store.scaleY(u[0]), u[1] = this.store.scaleY(u[1]), f[0] === f[1] && (f[0] -= 0.5, f[1] += 0.5), u[0] === u[1] && (u[0] += 0.5, u[1] -= 0.5);
13039
- const l = o * (1 - r * 2) / (f[1] - f[0]), v = s * (1 - r * 2) / (u[0] - u[1]), b = kg(n ?? Math.min(l, v), ...this.behavior.scaleExtent()), S = (f[1] + f[0]) / 2, D = (u[1] + u[0]) / 2, Y = o / 2 - S * b, Ee = s / 2 - D * b;
13040
- return Fi.translate(Y, Ee).scale(b);
13064
+ const l = o * (1 - r * 2) / (f[1] - f[0]), p = s * (1 - r * 2) / (u[0] - u[1]), x = kg(n ?? Math.min(l, p), ...this.behavior.scaleExtent()), S = (f[1] + f[0]) / 2, D = (u[1] + u[0]) / 2, Y = o / 2 - S * x, Ee = s / 2 - D * x;
13065
+ return Fi.translate(Y, Ee).scale(x);
13041
13066
  }
13042
13067
  getDistanceToPoint(e) {
13043
13068
  const { x: n, y: r, k: i } = this.eventTransform, o = this.getTransform([e], i), s = n - o.x, f = r - o.y;
13044
13069
  return Math.sqrt(s * s + f * f);
13045
13070
  }
13046
13071
  getMiddlePointTransform(e) {
13047
- const { store: { screenSize: n }, eventTransform: { x: r, y: i, k: o } } = this, s = n[0], f = n[1], u = (s / 2 - r) / o, l = (f / 2 - i) / o, v = this.store.scaleX(e[0]), b = this.store.scaleY(e[1]), S = (u + v) / 2, D = (l + b) / 2, Y = 1, Ee = s / 2 - S * Y, Te = f / 2 - D * Y;
13072
+ const { store: { screenSize: n }, eventTransform: { x: r, y: i, k: o } } = this, s = n[0], f = n[1], u = (s / 2 - r) / o, l = (f / 2 - i) / o, p = this.store.scaleX(e[0]), x = this.store.scaleY(e[1]), S = (u + p) / 2, D = (l + x) / 2, Y = 1, Ee = s / 2 - S * Y, Te = f / 2 - D * Y;
13048
13073
  return Fi.translate(Ee, Te).scale(Y);
13049
13074
  }
13050
13075
  convertScreenToSpacePosition(e) {
13051
- const { eventTransform: { x: n, y: r, k: i }, store: { screenSize: o } } = this, s = o[0], f = o[1], u = (e[0] - n) / i, l = (e[1] - r) / i, v = [u, f - l];
13052
- return v[0] -= (s - this.store.adjustedSpaceSize) / 2, v[1] -= (f - this.store.adjustedSpaceSize) / 2, v;
13076
+ const { eventTransform: { x: n, y: r, k: i }, store: { screenSize: o } } = this, s = o[0], f = o[1], u = (e[0] - n) / i, l = (e[1] - r) / i, p = [u, f - l];
13077
+ return p[0] -= (s - this.store.adjustedSpaceSize) / 2, p[1] -= (f - this.store.adjustedSpaceSize) / 2, p;
13053
13078
  }
13054
13079
  convertSpaceToScreenPosition(e) {
13055
13080
  const n = this.eventTransform.applyX(this.store.scaleX(e[0])), r = this.eventTransform.applyY(this.store.scaleY(e[1]));
@@ -13360,12 +13385,12 @@ class tb {
13360
13385
  if (e === void 0) return;
13361
13386
  const f = s[e * 4 + 0], u = s[e * 4 + 1];
13362
13387
  if (f === void 0 || u === void 0) return;
13363
- const l = this.zoomInstance.getDistanceToPoint([f, u]), v = i ? r : Math.max(this.getZoomLevel(), r);
13388
+ const l = this.zoomInstance.getDistanceToPoint([f, u]), p = i ? r : Math.max(this.getZoomLevel(), r);
13364
13389
  if (l < Math.min(o[0], o[1]))
13365
- this.setZoomTransformByPointPositions([f, u], n, v);
13390
+ this.setZoomTransformByPointPositions([f, u], n, p);
13366
13391
  else {
13367
- const b = this.zoomInstance.getTransform([[f, u]], v), S = this.zoomInstance.getMiddlePointTransform([f, u]);
13368
- this.canvasD3Selection.transition().ease(Rv).duration(n / 2).call(this.zoomInstance.behavior.transform, S).transition().ease(Iv).duration(n / 2).call(this.zoomInstance.behavior.transform, b);
13392
+ const x = this.zoomInstance.getTransform([[f, u]], p), S = this.zoomInstance.getMiddlePointTransform([f, u]);
13393
+ this.canvasD3Selection.transition().ease(Rv).duration(n / 2).call(this.zoomInstance.behavior.transform, S).transition().ease(Iv).duration(n / 2).call(this.zoomInstance.behavior.transform, x);
13369
13394
  }
13370
13395
  }
13371
13396
  /**
@@ -13742,8 +13767,8 @@ class tb {
13742
13767
  frame() {
13743
13768
  const { config: { simulationGravity: e, simulationCenter: n, renderLinks: r, enableSimulation: i }, store: { alpha: o, isSimulationRunning: s } } = this;
13744
13769
  o < Hs && s && this.end(), this.store.pointsTextureSize && (this.requestAnimationFrameId = window.requestAnimationFrame((f) => {
13745
- var u, l, v, b, S, D, Y, Ee, Te, se, Ue, He, H, fe, Re, Ge, Ye, at, ut, Ae, lt, rt, N, Ce, re, ke;
13746
- (u = this.fpsMonitor) == null || u.begin(), this.resizeCanvas(), this.dragInstance.isActive || this.findHoveredPoint(), i && (this.isRightClickMouse && this.config.enableRightClickRepulsion && ((l = this.forceMouse) == null || l.run(), (v = this.points) == null || v.updatePosition()), s && !(this.zoomInstance.isRunning && !this.config.enableSimulationDuringZoom) && (e && ((b = this.forceGravity) == null || b.run(), (S = this.points) == null || S.updatePosition()), n && ((D = this.forceCenter) == null || D.run(), (Y = this.points) == null || Y.updatePosition()), (Ee = this.forceManyBody) == null || Ee.run(), (Te = this.points) == null || Te.updatePosition(), this.store.linksTextureSize && ((se = this.forceLinkIncoming) == null || se.run(), (Ue = this.points) == null || Ue.updatePosition(), (He = this.forceLinkOutgoing) == null || He.run(), (H = this.points) == null || H.updatePosition()), (this.graph.pointClusters || this.graph.clusterPositions) && ((fe = this.clusters) == null || fe.run(), (Re = this.points) == null || Re.updatePosition()), this.store.alpha += this.store.addAlpha(this.config.simulationDecay ?? We.simulation.decay), this.isRightClickMouse && this.config.enableRightClickRepulsion && (this.store.alpha = Math.max(this.store.alpha, 0.1)), this.store.simulationProgress = Math.sqrt(Math.min(1, Hs / this.store.alpha)), (ut = (at = this.config).onSimulationTick) == null || ut.call(
13770
+ var u, l, p, x, S, D, Y, Ee, Te, se, Ue, He, H, fe, Re, Ge, Ye, at, ut, Ae, lt, rt, N, Ce, re, ke;
13771
+ (u = this.fpsMonitor) == null || u.begin(), this.resizeCanvas(), this.dragInstance.isActive || this.findHoveredPoint(), i && (this.isRightClickMouse && this.config.enableRightClickRepulsion && ((l = this.forceMouse) == null || l.run(), (p = this.points) == null || p.updatePosition()), s && !(this.zoomInstance.isRunning && !this.config.enableSimulationDuringZoom) && (e && ((x = this.forceGravity) == null || x.run(), (S = this.points) == null || S.updatePosition()), n && ((D = this.forceCenter) == null || D.run(), (Y = this.points) == null || Y.updatePosition()), (Ee = this.forceManyBody) == null || Ee.run(), (Te = this.points) == null || Te.updatePosition(), this.store.linksTextureSize && ((se = this.forceLinkIncoming) == null || se.run(), (Ue = this.points) == null || Ue.updatePosition(), (He = this.forceLinkOutgoing) == null || He.run(), (H = this.points) == null || H.updatePosition()), (this.graph.pointClusters || this.graph.clusterPositions) && ((fe = this.clusters) == null || fe.run(), (Re = this.points) == null || Re.updatePosition()), this.store.alpha += this.store.addAlpha(this.config.simulationDecay ?? We.simulation.decay), this.isRightClickMouse && this.config.enableRightClickRepulsion && (this.store.alpha = Math.max(this.store.alpha, 0.1)), this.store.simulationProgress = Math.sqrt(Math.min(1, Hs / this.store.alpha)), (ut = (at = this.config).onSimulationTick) == null || ut.call(
13747
13772
  at,
13748
13773
  this.store.alpha,
13749
13774
  (Ge = this.store.hoveredPoint) == null ? void 0 : Ge.index,
@@ -13792,8 +13817,8 @@ class tb {
13792
13817
  var s, f, u;
13793
13818
  const n = this.canvas.width, r = this.canvas.height, i = this.canvas.clientWidth, o = this.canvas.clientHeight;
13794
13819
  if (e || n !== i * this.config.pixelRatio || r !== o * this.config.pixelRatio) {
13795
- const [l, v] = this.store.screenSize, { k: b } = this.zoomInstance.eventTransform, S = this.zoomInstance.convertScreenToSpacePosition([l / 2, v / 2]);
13796
- this.store.updateScreenSize(i, o), this.canvas.width = i * this.config.pixelRatio, this.canvas.height = o * this.config.pixelRatio, (s = this.reglInstance) == null || s.poll(), (f = this.canvasD3Selection) == null || f.call(this.zoomInstance.behavior.transform, this.zoomInstance.getTransform([S], b)), (u = this.points) == null || u.updateSampledPointsGrid();
13820
+ const [l, p] = this.store.screenSize, { k: x } = this.zoomInstance.eventTransform, S = this.zoomInstance.convertScreenToSpacePosition([l / 2, p / 2]);
13821
+ this.store.updateScreenSize(i, o), this.canvas.width = i * this.config.pixelRatio, this.canvas.height = o * this.config.pixelRatio, (s = this.reglInstance) == null || s.poll(), (f = this.canvasD3Selection) == null || f.call(this.zoomInstance.behavior.transform, this.zoomInstance.getTransform([S], x)), (u = this.points) == null || u.updateSampledPointsGrid();
13797
13822
  }
13798
13823
  }
13799
13824
  setZoomTransformByPointPositions(e, n = 250, r, i) {
@@ -13817,12 +13842,12 @@ class tb {
13817
13842
  let e = !1, n = !1;
13818
13843
  const r = sn(this.reglInstance, this.points.hoveredFbo);
13819
13844
  if (r[1]) {
13820
- const v = r[0];
13821
- ((o = this.store.hoveredPoint) == null ? void 0 : o.index) !== v && (e = !0);
13822
- const b = r[2], S = r[3];
13845
+ const p = r[0];
13846
+ ((o = this.store.hoveredPoint) == null ? void 0 : o.index) !== p && (e = !0);
13847
+ const x = r[2], S = r[3];
13823
13848
  this.store.hoveredPoint = {
13824
- index: v,
13825
- position: [b, S]
13849
+ index: p,
13850
+ position: [x, S]
13826
13851
  };
13827
13852
  } else
13828
13853
  this.store.hoveredPoint && (n = !0), this.store.hoveredPoint = void 0;