higlass 1.12.4 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +3 -3
  2. package/app/globals.d.ts +11 -0
  3. package/app/missing-types.d.ts +21 -0
  4. package/app/scripts/CenterTrack.jsx +0 -1
  5. package/app/scripts/DraggableDiv.jsx +0 -1
  6. package/app/scripts/GenomePositionSearchBox.jsx +0 -1
  7. package/app/scripts/TrackRenderer.jsx +405 -89
  8. package/app/scripts/VerticalTiledPlot.jsx +0 -1
  9. package/app/scripts/configs/default-tracks-for-datatype.js +3 -2
  10. package/app/scripts/configs/primitives.js +3 -2
  11. package/app/scripts/configs/tracks-info-by-type.js +4 -1
  12. package/app/scripts/configs/tracks-info.js +25 -1
  13. package/app/scripts/types.ts +79 -0
  14. package/app/scripts/utils/abs-to-chr.js +16 -1
  15. package/app/scripts/utils/accessor-transposition.js +5 -4
  16. package/app/scripts/utils/add-arrays.js +9 -7
  17. package/app/scripts/utils/add-class.js +4 -2
  18. package/app/scripts/utils/add-event-listener-once.js +9 -3
  19. package/app/scripts/utils/background-task-scheduler.js +58 -2
  20. package/app/scripts/utils/base64-to-canvas.js +12 -5
  21. package/app/scripts/utils/chr-to-abs.js +10 -0
  22. package/app/scripts/utils/chrom-info-bisector.js +4 -1
  23. package/app/scripts/utils/clone-event.js +11 -4
  24. package/app/scripts/utils/color-to-hex.js +8 -0
  25. package/app/scripts/utils/color-to-rgba.js +8 -0
  26. package/app/scripts/utils/data-to-genomic-loci.js +13 -1
  27. package/app/scripts/utils/debounce.js +16 -11
  28. package/app/scripts/utils/dec-to-hex-str.js +7 -0
  29. package/app/scripts/utils/dict-from-tuples.js +11 -3
  30. package/app/scripts/utils/dict-items.js +15 -0
  31. package/app/scripts/utils/dict-keys.js +11 -1
  32. package/app/scripts/utils/dict-values.js +7 -0
  33. package/app/scripts/utils/download.js +14 -11
  34. package/app/scripts/utils/flatten.js +5 -2
  35. package/app/scripts/utils/for-each.js +7 -5
  36. package/app/scripts/utils/forward-event.js +3 -2
  37. package/app/scripts/utils/genome-loci-to-pixels.js +8 -0
  38. package/app/scripts/utils/genomic-range-to-chromosome-chunks.js +13 -6
  39. package/app/scripts/utils/get-aggregation-function.js +10 -2
  40. package/app/scripts/utils/get-element-dim.js +6 -0
  41. package/app/scripts/utils/gradient.js +14 -0
  42. package/app/scripts/utils/has-class.js +6 -4
  43. package/app/scripts/utils/hex-string-to-int.js +11 -4
  44. package/app/scripts/utils/index.js +1 -0
  45. package/app/scripts/utils/into-the-void.js +2 -1
  46. package/app/scripts/utils/is-track-or-child-track.js +6 -0
  47. package/app/scripts/utils/is-track-range-selectable.js +10 -1
  48. package/app/scripts/utils/is-within.js +9 -7
  49. package/app/scripts/utils/lat-to-y.js +6 -3
  50. package/app/scripts/utils/lng-to-x.js +4 -3
  51. package/app/scripts/utils/map.js +5 -2
  52. package/app/scripts/utils/max-non-zero.js +6 -0
  53. package/app/scripts/utils/max.js +4 -3
  54. package/app/scripts/utils/min-non-zero.js +6 -0
  55. package/app/scripts/utils/min.js +4 -3
  56. package/app/scripts/utils/mod.js +4 -3
  57. package/app/scripts/utils/numericify-version.js +5 -0
  58. package/app/scripts/utils/obj-vals.js +3 -2
  59. package/app/scripts/utils/or.js +4 -3
  60. package/app/scripts/utils/parse-chromsizes-rows.js +26 -5
  61. package/app/scripts/utils/q.js +3 -2
  62. package/app/scripts/utils/rad-to-deg.js +3 -2
  63. package/app/scripts/utils/reduce.js +2 -2
  64. package/app/scripts/utils/rel-to-abs-chrom-pos.js +10 -0
  65. package/app/scripts/utils/remove-class.js +3 -2
  66. package/app/scripts/utils/reset-d3-brush-style.js +7 -2
  67. package/app/scripts/utils/rgb-to-hex.js +9 -0
  68. package/app/scripts/utils/scales-center-and-k.js +5 -3
  69. package/app/scripts/utils/scales-to-genome-loci.js +10 -0
  70. package/app/scripts/utils/selected-items-to-cum-weights.js +12 -4
  71. package/app/scripts/utils/selected-items-to-size.js +5 -2
  72. package/app/scripts/utils/show-mouse-position.js +62 -19
  73. package/app/scripts/utils/some.js +6 -4
  74. package/app/scripts/utils/sum.js +4 -3
  75. package/app/scripts/utils/throttle-and-debounce.js +15 -6
  76. package/app/scripts/utils/tile-to-canvas.js +8 -4
  77. package/app/scripts/utils/timeout.js +2 -0
  78. package/app/scripts/utils/to-void.js +2 -0
  79. package/app/scripts/utils/total-track-pixel-height.js +11 -12
  80. package/app/scripts/utils/trim-trailing-slash.js +3 -2
  81. package/app/scripts/utils/type-guards.js +17 -0
  82. package/app/scripts/utils/value-to-color.js +7 -6
  83. package/app/scripts/utils/visit-positioned-tracks.js +16 -11
  84. package/app/scripts/utils/visit-tracks.js +12 -13
  85. package/dist/hglib.js +204 -131
  86. package/dist/hglib.min.js +70 -70
  87. package/package.json +16 -5
package/dist/hglib.js CHANGED
@@ -2160,23 +2160,23 @@ function _toPrimitive2(input, hint) {
2160
2160
  function keyof(value2) {
2161
2161
  return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
2162
2162
  }
2163
- function identity$9(x) {
2163
+ function identity$a(x) {
2164
2164
  return x;
2165
2165
  }
2166
2166
  function group(values, ...keys2) {
2167
- return nest(values, identity$9, identity$9, keys2);
2167
+ return nest(values, identity$a, identity$a, keys2);
2168
2168
  }
2169
2169
  function groups(values, ...keys2) {
2170
- return nest(values, Array.from, identity$9, keys2);
2170
+ return nest(values, Array.from, identity$a, keys2);
2171
2171
  }
2172
2172
  function rollup(values, reduce2, ...keys2) {
2173
- return nest(values, identity$9, reduce2, keys2);
2173
+ return nest(values, identity$a, reduce2, keys2);
2174
2174
  }
2175
2175
  function rollups(values, reduce2, ...keys2) {
2176
2176
  return nest(values, Array.from, reduce2, keys2);
2177
2177
  }
2178
2178
  function index$2(values, ...keys2) {
2179
- return nest(values, identity$9, unique$1, keys2);
2179
+ return nest(values, identity$a, unique$1, keys2);
2180
2180
  }
2181
2181
  function indexes(values, ...keys2) {
2182
2182
  return nest(values, Array.from, unique$1, keys2);
@@ -2312,7 +2312,7 @@ function _toPrimitive2(input, hint) {
2312
2312
  return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;
2313
2313
  }
2314
2314
  function bin() {
2315
- var value2 = identity$9, domain2 = extent$1, threshold2 = sturges;
2315
+ var value2 = identity$a, domain2 = extent$1, threshold2 = sturges;
2316
2316
  function histogram(data2) {
2317
2317
  if (!Array.isArray(data2))
2318
2318
  data2 = Array.from(data2);
@@ -3287,7 +3287,7 @@ function _toPrimitive2(input, hint) {
3287
3287
  };
3288
3288
  }
3289
3289
  function date$2(a, b) {
3290
- var d = new Date();
3290
+ var d = /* @__PURE__ */ new Date();
3291
3291
  return a = +a, b = +b, function(t) {
3292
3292
  return d.setTime(a * (1 - t) + b * t), d;
3293
3293
  };
@@ -3372,7 +3372,7 @@ function _toPrimitive2(input, hint) {
3372
3372
  };
3373
3373
  }
3374
3374
  var degrees$1 = 180 / Math.PI;
3375
- var identity$8 = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 };
3375
+ var identity$9 = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 };
3376
3376
  function decompose(a, b, c2, d, e, f2) {
3377
3377
  var scaleX, scaleY, skewX;
3378
3378
  if (scaleX = Math.sqrt(a * a + b * b))
@@ -3388,16 +3388,16 @@ function _toPrimitive2(input, hint) {
3388
3388
  var svgNode;
3389
3389
  function parseCss(value2) {
3390
3390
  const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value2 + "");
3391
- return m.isIdentity ? identity$8 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
3391
+ return m.isIdentity ? identity$9 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
3392
3392
  }
3393
3393
  function parseSvg(value2) {
3394
3394
  if (value2 == null)
3395
- return identity$8;
3395
+ return identity$9;
3396
3396
  if (!svgNode)
3397
3397
  svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
3398
3398
  svgNode.setAttribute("transform", value2);
3399
3399
  if (!(value2 = svgNode.transform.baseVal.consolidate()))
3400
- return identity$8;
3400
+ return identity$9;
3401
3401
  value2 = value2.matrix;
3402
3402
  return decompose(value2.a, value2.b, value2.c, value2.d, value2.e, value2.f);
3403
3403
  }
@@ -3512,7 +3512,7 @@ function _toPrimitive2(input, hint) {
3512
3512
  return +x;
3513
3513
  }
3514
3514
  var unit = [0, 1];
3515
- function identity$7(x) {
3515
+ function identity$8(x) {
3516
3516
  return x;
3517
3517
  }
3518
3518
  function normalize(a, b) {
@@ -3557,10 +3557,10 @@ function _toPrimitive2(input, hint) {
3557
3557
  return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
3558
3558
  }
3559
3559
  function transformer$3() {
3560
- var domain2 = unit, range2 = unit, interpolate2 = interpolate$3, transform2, untransform, unknown, clamp = identity$7, piecewise2, output, input;
3560
+ var domain2 = unit, range2 = unit, interpolate2 = interpolate$3, transform2, untransform, unknown, clamp = identity$8, piecewise2, output, input;
3561
3561
  function rescale() {
3562
3562
  var n = Math.min(domain2.length, range2.length);
3563
- if (clamp !== identity$7)
3563
+ if (clamp !== identity$8)
3564
3564
  clamp = clamper(domain2[0], domain2[n - 1]);
3565
3565
  piecewise2 = n > 2 ? polymap : bimap;
3566
3566
  output = input = null;
@@ -3582,7 +3582,7 @@ function _toPrimitive2(input, hint) {
3582
3582
  return range2 = Array.from(_), interpolate2 = interpolateRound, rescale();
3583
3583
  };
3584
3584
  scale.clamp = function(_) {
3585
- return arguments.length ? (clamp = _ ? true : identity$7, rescale()) : clamp !== identity$7;
3585
+ return arguments.length ? (clamp = _ ? true : identity$8, rescale()) : clamp !== identity$8;
3586
3586
  };
3587
3587
  scale.interpolate = function(_) {
3588
3588
  return arguments.length ? (interpolate2 = _, rescale()) : interpolate2;
@@ -3596,7 +3596,7 @@ function _toPrimitive2(input, hint) {
3596
3596
  };
3597
3597
  }
3598
3598
  function continuous() {
3599
- return transformer$3()(identity$7, identity$7);
3599
+ return transformer$3()(identity$8, identity$8);
3600
3600
  }
3601
3601
  function formatDecimal(x) {
3602
3602
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
@@ -3692,12 +3692,12 @@ function _toPrimitive2(input, hint) {
3692
3692
  return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0");
3693
3693
  }
3694
3694
  const formatTypes = { "%": (x, p) => (x * 100).toFixed(p), "b": (x) => Math.round(x).toString(2), "c": (x) => x + "", "d": formatDecimal, "e": (x, p) => x.toExponential(p), "f": (x, p) => x.toFixed(p), "g": (x, p) => x.toPrecision(p), "o": (x) => Math.round(x).toString(8), "p": (x, p) => formatRounded(x * 100, p), "r": formatRounded, "s": formatPrefixAuto, "X": (x) => Math.round(x).toString(16).toUpperCase(), "x": (x) => Math.round(x).toString(16) };
3695
- function identity$6(x) {
3695
+ function identity$7(x) {
3696
3696
  return x;
3697
3697
  }
3698
3698
  var map$6 = Array.prototype.map, prefixes$1 = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
3699
3699
  function formatLocale$1(locale2) {
3700
- var group2 = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity$6 : formatGroup(map$6.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity$6 : formatNumerals(map$6.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "\u2212" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
3700
+ var group2 = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity$7 : formatGroup(map$6.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity$7 : formatNumerals(map$6.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "\u2212" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
3701
3701
  function newFormat(specifier) {
3702
3702
  specifier = formatSpecifier(specifier);
3703
3703
  var fill = specifier.fill, align = specifier.align, sign2 = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type2 = specifier.type;
@@ -3877,7 +3877,7 @@ function _toPrimitive2(input, hint) {
3877
3877
  initRange.apply(scale, arguments);
3878
3878
  return linearish(scale);
3879
3879
  }
3880
- function identity$5(domain2) {
3880
+ function identity$6(domain2) {
3881
3881
  var unknown;
3882
3882
  function scale(x) {
3883
3883
  return x == null || isNaN(x = +x) ? unknown : x;
@@ -3890,7 +3890,7 @@ function _toPrimitive2(input, hint) {
3890
3890
  return arguments.length ? (unknown = _, scale) : unknown;
3891
3891
  };
3892
3892
  scale.copy = function() {
3893
- return identity$5(domain2).unknown(unknown);
3893
+ return identity$6(domain2).unknown(unknown);
3894
3894
  };
3895
3895
  domain2 = arguments.length ? Array.from(domain2, number$2) : [0, 1];
3896
3896
  return linearish(scale);
@@ -4063,9 +4063,9 @@ function _toPrimitive2(input, hint) {
4063
4063
  return x < 0 ? -x * x : x * x;
4064
4064
  }
4065
4065
  function powish(transform2) {
4066
- var scale = transform2(identity$7, identity$7), exponent2 = 1;
4066
+ var scale = transform2(identity$8, identity$8), exponent2 = 1;
4067
4067
  function rescale() {
4068
- return exponent2 === 1 ? transform2(identity$7, identity$7) : exponent2 === 0.5 ? transform2(transformSqrt, transformSquare) : transform2(transformPow(exponent2), transformPow(1 / exponent2));
4068
+ return exponent2 === 1 ? transform2(identity$8, identity$8) : exponent2 === 0.5 ? transform2(transformSqrt, transformSquare) : transform2(transformPow(exponent2), transformPow(1 / exponent2));
4069
4069
  }
4070
4070
  scale.exponent = function(_) {
4071
4071
  return arguments.length ? (exponent2 = +_, rescale()) : exponent2;
@@ -4218,13 +4218,13 @@ function _toPrimitive2(input, hint) {
4218
4218
  };
4219
4219
  return initRange.apply(scale, arguments);
4220
4220
  }
4221
- const t0 = new Date(), t1 = new Date();
4221
+ const t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
4222
4222
  function timeInterval(floori, offseti, count2, field) {
4223
4223
  function interval2(date2) {
4224
- return floori(date2 = arguments.length === 0 ? new Date() : new Date(+date2)), date2;
4224
+ return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
4225
4225
  }
4226
4226
  interval2.floor = (date2) => {
4227
- return floori(date2 = new Date(+date2)), date2;
4227
+ return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
4228
4228
  };
4229
4229
  interval2.ceil = (date2) => {
4230
4230
  return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
@@ -4234,7 +4234,7 @@ function _toPrimitive2(input, hint) {
4234
4234
  return date2 - d0 < d1 - date2 ? d0 : d1;
4235
4235
  };
4236
4236
  interval2.offset = (date2, step) => {
4237
- return offseti(date2 = new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
4237
+ return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
4238
4238
  };
4239
4239
  interval2.range = (start2, stop, step) => {
4240
4240
  const range2 = [];
@@ -4244,7 +4244,7 @@ function _toPrimitive2(input, hint) {
4244
4244
  return range2;
4245
4245
  let previous;
4246
4246
  do
4247
- range2.push(previous = new Date(+start2)), offseti(start2, step), floori(start2);
4247
+ range2.push(previous = /* @__PURE__ */ new Date(+start2)), offseti(start2, step), floori(start2);
4248
4248
  while (previous < start2 && start2 < stop);
4249
4249
  return range2;
4250
4250
  };
@@ -4550,7 +4550,7 @@ function _toPrimitive2(input, hint) {
4550
4550
  return function(date2) {
4551
4551
  var string = [], i2 = -1, j = 0, n = specifier.length, c2, pad3, format2;
4552
4552
  if (!(date2 instanceof Date))
4553
- date2 = new Date(+date2);
4553
+ date2 = /* @__PURE__ */ new Date(+date2);
4554
4554
  while (++i2 < n) {
4555
4555
  if (specifier.charCodeAt(i2) === 37) {
4556
4556
  string.push(specifier.slice(j, i2));
@@ -4978,7 +4978,7 @@ function _toPrimitive2(input, hint) {
4978
4978
  return new Date(t);
4979
4979
  }
4980
4980
  function number$1(t) {
4981
- return t instanceof Date ? +t : +new Date(+t);
4981
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
4982
4982
  }
4983
4983
  function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2) {
4984
4984
  var scale = continuous(), invert = scale.invert, domain2 = scale.domain;
@@ -5017,7 +5017,7 @@ function _toPrimitive2(input, hint) {
5017
5017
  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, utcFormat).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
5018
5018
  }
5019
5019
  function transformer$2() {
5020
- var x02 = 0, x12 = 1, t02, t12, k10, transform2, interpolator = identity$7, clamp = false, unknown;
5020
+ var x02 = 0, x12 = 1, t02, t12, k10, transform2, interpolator = identity$8, clamp = false, unknown;
5021
5021
  function scale(x) {
5022
5022
  return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform2(x) - t02) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));
5023
5023
  }
@@ -5050,7 +5050,7 @@ function _toPrimitive2(input, hint) {
5050
5050
  return target.domain(source.domain()).interpolator(source.interpolator()).clamp(source.clamp()).unknown(source.unknown());
5051
5051
  }
5052
5052
  function sequential() {
5053
- var scale = linearish(transformer$2()(identity$7));
5053
+ var scale = linearish(transformer$2()(identity$8));
5054
5054
  scale.copy = function() {
5055
5055
  return copy$1(scale, sequential());
5056
5056
  };
@@ -5081,7 +5081,7 @@ function _toPrimitive2(input, hint) {
5081
5081
  return sequentialPow.apply(null, arguments).exponent(0.5);
5082
5082
  }
5083
5083
  function sequentialQuantile() {
5084
- var domain2 = [], interpolator = identity$7;
5084
+ var domain2 = [], interpolator = identity$8;
5085
5085
  function scale(x) {
5086
5086
  if (x != null && !isNaN(x = +x))
5087
5087
  return interpolator((bisect(domain2, x, 1) - 1) / (domain2.length - 1));
@@ -5111,7 +5111,7 @@ function _toPrimitive2(input, hint) {
5111
5111
  return initInterpolator.apply(scale, arguments);
5112
5112
  }
5113
5113
  function transformer$1() {
5114
- var x02 = 0, x12 = 0.5, x2 = 1, s = 1, t02, t12, t22, k10, k21, interpolator = identity$7, transform2, clamp = false, unknown;
5114
+ var x02 = 0, x12 = 0.5, x2 = 1, s = 1, t02, t12, t22, k10, k21, interpolator = identity$8, transform2, clamp = false, unknown;
5115
5115
  function scale(x) {
5116
5116
  return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform2(x)) - t12) * (s * x < s * t12 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));
5117
5117
  }
@@ -5141,7 +5141,7 @@ function _toPrimitive2(input, hint) {
5141
5141
  };
5142
5142
  }
5143
5143
  function diverging() {
5144
- var scale = linearish(transformer$1()(identity$7));
5144
+ var scale = linearish(transformer$1()(identity$8));
5145
5145
  scale.copy = function() {
5146
5146
  return copy$1(scale, diverging());
5147
5147
  };
@@ -5171,7 +5171,7 @@ function _toPrimitive2(input, hint) {
5171
5171
  function divergingSqrt() {
5172
5172
  return divergingPow.apply(null, arguments).exponent(0.5);
5173
5173
  }
5174
- const d3Scale = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, scaleBand: band, scalePoint: point, scaleIdentity: identity$5, scaleLinear: linear, scaleLog: log$4, scaleSymlog: symlog, scaleOrdinal: ordinal, scaleImplicit: implicit, scalePow: pow$1, scaleSqrt: sqrt$1, scaleRadial: radial, scaleQuantile: quantile, scaleQuantize: quantize, scaleThreshold: threshold, scaleTime: time$1, scaleUtc: utcTime, scaleSequential: sequential, scaleSequentialLog: sequentialLog, scaleSequentialPow: sequentialPow, scaleSequentialSqrt: sequentialSqrt, scaleSequentialSymlog: sequentialSymlog, scaleSequentialQuantile: sequentialQuantile, scaleDiverging: diverging, scaleDivergingLog: divergingLog, scaleDivergingPow: divergingPow, scaleDivergingSqrt: divergingSqrt, scaleDivergingSymlog: divergingSymlog, tickFormat }, Symbol.toStringTag, { value: "Module" }));
5174
+ const d3Scale = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, scaleBand: band, scalePoint: point, scaleIdentity: identity$6, scaleLinear: linear, scaleLog: log$4, scaleSymlog: symlog, scaleOrdinal: ordinal, scaleImplicit: implicit, scalePow: pow$1, scaleSqrt: sqrt$1, scaleRadial: radial, scaleQuantile: quantile, scaleQuantize: quantize, scaleThreshold: threshold, scaleTime: time$1, scaleUtc: utcTime, scaleSequential: sequential, scaleSequentialLog: sequentialLog, scaleSequentialPow: sequentialPow, scaleSequentialSqrt: sequentialSqrt, scaleSequentialSymlog: sequentialSymlog, scaleSequentialQuantile: sequentialQuantile, scaleDiverging: diverging, scaleDivergingLog: divergingLog, scaleDivergingPow: divergingPow, scaleDivergingSqrt: divergingSqrt, scaleDivergingSymlog: divergingSymlog, tickFormat }, Symbol.toStringTag, { value: "Module" }));
5175
5175
  var slugid$2 = { exports: {} };
5176
5176
  var slugid$1 = {};
5177
5177
  var getRandomValues;
@@ -13951,7 +13951,9 @@ function _toPrimitive2(input, hint) {
13951
13951
  let insertPoint = chromInfoBisector(chromInfo.cumPositions, absPosition);
13952
13952
  const lastChr = chromInfo.cumPositions[chromInfo.cumPositions.length - 1].chr;
13953
13953
  const lastLength = chromInfo.chromLengths[lastChr];
13954
- insertPoint -= insertPoint > 0 && 1;
13954
+ if (insertPoint > 0) {
13955
+ insertPoint -= 1;
13956
+ }
13955
13957
  let chrPosition = Math.floor(absPosition - chromInfo.cumPositions[insertPoint].pos);
13956
13958
  let offset = 0;
13957
13959
  if (chrPosition < 0) {
@@ -13965,13 +13967,13 @@ function _toPrimitive2(input, hint) {
13965
13967
  return [chromInfo.cumPositions[insertPoint].chr, chrPosition, offset, insertPoint];
13966
13968
  };
13967
13969
  const accessorTransposition = (x, y) => (i2) => i2 % x * y + Math.floor(i2 / x);
13968
- const STD_ACC = (i2) => i2;
13969
- const addArrays = (a1, a2, accessor = STD_ACC) => a1.map((val2, i2) => val2 + a2[accessor(i2)]);
13970
+ const identity$5 = (i2) => i2;
13971
+ const addArrays = (a1, a2, accessor = identity$5) => a1.map((val2, i2) => val2 + a2[accessor(i2)]);
13970
13972
  const XMLNS$2 = "http://www.w3.org/2000/svg";
13971
13973
  const hasClass$1 = (el, className2) => {
13972
13974
  if (el.namespaceURI === XMLNS$2) {
13973
13975
  const _class = el.getAttribute("class");
13974
- return _class && !!_class.match(new RegExp(`(\\s|^)${className2}(\\s|$)`));
13976
+ return !!_class && !!_class.match(new RegExp(`(\\s|^)${className2}(\\s|$)`));
13975
13977
  }
13976
13978
  if (el.classList)
13977
13979
  return el.classList.contains(className2);
@@ -13997,7 +13999,12 @@ function _toPrimitive2(input, hint) {
13997
13999
  img.onload = () => {
13998
14000
  canvas.width = width || img.width;
13999
14001
  canvas.height = height || img.height;
14000
- canvas.getContext("2d").drawImage(img, 0, 0);
14002
+ const context = canvas.getContext("2d");
14003
+ if (!context) {
14004
+ reject(new Error("Could not get canvas context"));
14005
+ return;
14006
+ }
14007
+ context.drawImage(img, 0, 0);
14001
14008
  resolve2(canvas);
14002
14009
  };
14003
14010
  img.onerror = () => {
@@ -14008,6 +14015,9 @@ function _toPrimitive2(input, hint) {
14008
14015
  };
14009
14016
  const chrToAbs = (chrom, chromPos, chromInfo) => chromInfo.chrPositions[chrom].pos + chromPos;
14010
14017
  const cloneEvent = (event) => {
14018
+ if (!(event instanceof Event)) {
14019
+ throw new Error("Event must be an instance of Event");
14020
+ }
14011
14021
  const newEvent = new event.constructor(event.type, event);
14012
14022
  newEvent.sourceUid = event.sourceUid;
14013
14023
  newEvent.forwarded = event.forwarded;
@@ -14244,7 +14254,7 @@ function _toPrimitive2(input, hint) {
14244
14254
  }
14245
14255
  const osm = { type: "osm-tiles", datatype: ["map-tiles"], local: true, orientation: "2d", hidden: true, name: "OSM Tiles", thumbnail: svgGeoMapIcon, availableOptions: ["minPos", "maxPos", "maxZoom", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { minPos: -180, maxPos: 180, maxZoom: 19, labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } };
14246
14256
  const mapbox = { type: "mapbox-tiles", datatype: ["map-tiles"], local: true, orientation: "2d", hidden: true, name: "Mapbox Tiles", thumbnail: svgGeoMapIcon, availableOptions: ["style", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { style: "mapbox.streets", labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } };
14247
- const TRACKS_INFO = [osm, { ...osm, type: "osm" }, mapbox, { ...mapbox, type: "mapbox" }, { type: "left-axis", datatype: ["axis"], local: true, orientation: "1d-vertical", name: "Left Axis", thumbnail: svgVertical1DAxisIcon, availableOptions: ["minWidth"], defaultOptions: { minWidth: 100 } }, { type: "top-axis", datatype: ["axis"], local: true, orientation: "1d-horizontal", name: "Top Axis", thumbnail: svg1DAxisIcon, defaultOptions: {} }, { type: "horizontal-rule", datatype: ["x-coord"], local: true, orientation: "whole", name: "Horizontal Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "vertical-rule", datatype: ["y-coord"], local: true, orientation: "whole", name: "Vertical Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "cross-rule", datatype: ["xy-coord"], local: true, orientation: "whole", name: "Cross Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "simple-svg", datatype: [], local: false, orientation: "2d", exportable: true, availableOptions: ["minWidth", "minHeight"], defaultOptions: { minWidth: 100, minHeight: 100 } }, { type: "heatmap", datatype: ["matrix"], local: false, orientation: "2d", thumbnail: svg2DHeatmapIcon, exportable: true, availableOptions: ["backgroundColor", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "colorbarBackgroundColor", "maxZoom", "minWidth", "minHeight", "dataTransform", "colorbarPosition", "trackBorderWidth", "trackBorderColor", "heatmapValueScaling", "showMousePosition", "mousePositionColor", "showTooltip", "extent", "zeroValueColor"], defaultOptions: { backgroundColor: "#eeeeee", labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], colorbarBackgroundColor: "#ffffff", maxZoom: null, minWidth: 100, minHeight: 100, colorbarPosition: "topRight", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log", showMousePosition: false, mousePositionColor: "#000000", showTooltip: false, extent: "full", zeroValueColor: null }, defaultOptionsByTheme: { [THEME_DARK]: { backgroundColor: "#000000", colorRange: ["black", "rgba(208,2,27,1.0)", "rgba(245,166,35,1.0)", "white"], colorbarBackgroundColor: "#000000", labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff" } } }, { type: "linear-heatmap", aliases: ["horizontal-heatmap", "vertical-heatmap"], datatype: ["matrix"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svg2DHeatmapIcon, defaultOptions: { backgroundColor: "#eeeeee", labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, labelColor: "black", colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], maxZoom: null, minWidth: 100, minHeight: 40, trackBorderWidth: 0, trackBorderColor: "black" }, availableOptions: ["backgroundColor", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "maxZoom", "minWidth", "minHeight", "dataTransform", "oneDHeatmapFlipped", "colorbarPosition", "trackBorderWidth", "trackBorderColor", "heatmapValueScaling"] }, { type: "line", aliases: ["horizontal-line", "vertical-line"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svgHorizontalLineIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundColor", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "lineStrokeWidth", "lineStrokeColor", "valueScaling", "valueScaleMin", "valueScaleMax", "trackBorderWidth", "trackBorderColor", "trackType", "showMousePosition", "showTooltip", "mousePositionColor", "aggregationMode", "minHeight"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelBackgroundColor: "white", labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", lineStrokeColor: "blue", lineStrokeWidth: 1, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, showMousePosition: false, minHeight: 20, mousePositionColor: "#000000", showTooltip: false }, defaultOptionsByTheme: { [THEME_DARK]: { labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff" } } }, { type: "1d-heatmap", aliases: ["horizontal-1d-heatmap", "vertical-1d-heatmap"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svgHorizontal1dHeatmap, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisPositionHorizontal", "axisMargin", "colorRange", "valueScaling", "trackBorderWidth", "trackBorderColor", "trackType", "showMousePosition", "showTooltip", "mousePositionColor", "aggregationMode"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisPositionHorizontal: "right", colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, showMousePosition: false, mousePositionColor: "#000000", showTooltip: false } }, { type: "vector-heatmap", aliases: ["horizontal-vector-heatmap", "vertical-vector-heatmap"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, minHeight: 1, thumbnail: null, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "valueScaling", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "trackBorderWidth", "trackBorderColor", "trackType", "heatmapValueScaling"], defaultOptions: { labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, labelColor: "black", labelTextOpacity: 0.4, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log" } }, { type: "multivec", aliases: ["horizontal-multivec", "vertical-multivec"], datatype: ["multivec"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: null, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "minHeight", "valueScaling", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "trackBorderWidth", "trackBorderColor", "trackType", "heatmapValueScaling", "selectRows", "selectRowsAggregationMode", "selectRowsAggregationWithRelativeHeight", "selectRowsAggregationMethod", "colorbarBackgroundColor", "colorbarPosition", "zeroValueColor"], defaultOptions: { labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, labelColor: "black", labelTextOpacity: 0.4, minHeight: 100, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log", selectRows: null, selectRowsAggregationMode: "mean", selectRowsAggregationWithRelativeHeight: true, selectRowsAggregationMethod: "client", colorbarBackgroundColor: "#ffffff", colorbarPosition: "topRight", zeroValueColor: null }, defaultOptionsByTheme: { [THEME_DARK]: { colorbarBackgroundColor: "#000000" } } }, { type: "point", aliases: ["horizontal-point", "vertical-point"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "pointColor", "pointSize", "valueScaling", "trackBorderWidth", "trackBorderColor"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", pointColor: "red", pointSize: 3, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4 } }, { type: "divergent-bar", aliases: ["horizontal-divergent-bar", "vertical-divergent-bar"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "barFillColorTop", "barFillColorBottom", "valueScaling", "trackBorderWidth", "trackBorderColor", "barOpacity"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisPositionHorizontal: "right", axisLabelFormatting: "scientific", barFillColorBottom: "red", barFillColorTop: "green", valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, barOpacity: 1 } }, { type: "bar", aliases: ["horizontal-bar", "vertical-bar"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["align", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "barFillColor", "colorRange", "colorRangeGradient", "valueScaling", "valueScaleMin", "valueScaleMax", "trackBorderWidth", "trackBorderColor", "barOpacity", "showMousePosition", "showTooltip", "aggregationMode", "zeroLineVisible", "zeroLineColor", "zeroLineOpacity"], defaultOptions: { align: "bottom", labelColor: "[glyph-color]", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", barFillColor: "darkgreen", valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, barOpacity: 1 } }, { type: "2d-tiles", datatype: ["matrix"], local: false, orientation: "2d", name: "2D Tile Outlines", thumbnail: svg2DTilesIcon }, { type: "1d-value-interval", aliases: ["horizontal-1d-value-interval", "vertical-1d-value-interval"], datatype: ["bed-value"], local: false, orientation: ["1d-horizontal"], rotatable: true, name: "1D Rectangles", availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisPositionHorizontal", "axisMargin"], defaultOptions: { labelColor: "black", labelPosition: "bottomLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, axisPositionHorizontal: "left", lineStrokeColor: "blue", valueScaling: "linear" } }, { type: "stacked-interval", aliases: ["top-stacked-interval", "left-stacked-interval"], datatype: ["stacked-interval"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: "horizontal-stacked-interval.png", availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity"] }, { type: "viewport-projection-vertical", datatype: ["1d-projection"], local: true, hidden: true, projection: true, orientation: "1d-vertical", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "viewport-projection-horizontal", datatype: ["1d-projection"], local: true, hidden: true, projection: true, orientation: "1d-horizontal", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "viewport-projection-center", datatype: ["2d-projection"], local: true, hidden: true, projection: true, orientation: "2d", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "gene-annotations", aliases: ["horizontal-gene-annotations", "vertical-gene-annotations"], datatype: ["gene-annotation"], local: false, defaultHeight: 90, defaultWidth: 90, rotatable: true, orientation: "1d-horizontal", name: "Gene Annotations", thumbnail: svgGeneAnnotationsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundColor", "labelBackgroundOpacity", "minHeight", "plusStrandColor", "minusStrandColor", "trackBorderWidth", "trackBorderColor", "showMousePosition", "mousePositionColor", "fontSize", "geneAnnotationHeight", "geneLabelPosition", "geneStrandSpacing"], defaultOptions: { fontSize: 10, labelColor: "black", labelBackgroundColor: "#ffffff", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, minHeight: 24, plusStrandColor: "blue", minusStrandColor: "red", trackBorderWidth: 0, trackBorderColor: "black", showMousePosition: false, mousePositionColor: "#000000", geneAnnotationHeight: 16, geneLabelPosition: "outside", geneStrandSpacing: 4 }, defaultOptionsByTheme: { [THEME_DARK]: { labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff", plusStrandColor: "#40a0ff" } } }, { type: "arrowhead-domains", datatype: ["arrowhead-domains"], local: false, orientation: "2d", name: "Arrowhead Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black" } }, { type: "linear-2d-rectangle-domains", aliases: ["horizontal-2d-rectangle-domains", "vertical-2d-rectangle-domains"], datatype: ["2d-rectangle-domains"], local: false, orientation: "1d-horizontal", rotatable: true, name: "Horizontal 2D Rectangle Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize"], defaultOptions: { labelColor: "black", labelPosition: "bottomLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none" } }, { type: "2d-rectangle-domains", datatype: ["2d-rectangle-domains"], local: false, orientation: "2d", name: "2D Rectangle Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["flipDiagonal", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainFillOpacity", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize"], defaultOptions: { flipDiagonal: "none", labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainFillOpacity: 0.4, rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none" } }, { type: "horizontal-1d-annotations", datatype: ["nothing"], local: false, orientation: "1d-horizontal", name: "Horizontal 1D Annotations", thumbnail: null, availableOptions: ["fill", "fillOpacity", "stroke", "strokeOpacity", "strokeWidth", "strokePos", "regions"], defaultOptions: { fill: "red", fillOpacity: 0.2, stroke: "red", strokeOpacity: 0, strokeWidth: 1, regions: [], strokePos: [] } }, { type: "vertical-1d-annotations", datatype: ["nothing"], local: false, orientation: "1d-vertical", name: "Vertical 1D Annotations", thumbnail: null, availableOptions: ["fill", "fillOpacity", "stroke", "strokeOpacity", "regions"], defaultOptions: { fill: "red", fillOpacity: "0.2", stroke: "red", strokeOpacity: "0", regions: [] } }, { type: "2d-annotations", datatype: ["2d-annotations"], local: false, orientation: "2d", name: "2D Annotations", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize", "isClickable", "hoverColor", "selectColor", "exclude", "trackBorderBgWidth", "trackBorderBgColor", "trackBorderBgAlpha"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none", isClickable: false, hoverColor: "orange", selectColor: "fuchsia", exclude: [], trackBorderBgWidth: 0, trackBorderBgColor: "black", trackBorderBgAlpha: 0.33 } }, { type: "square-markers", datatype: ["bedpe"], local: false, orientation: "2d", name: "Square Markers", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black" } }, { type: "combined", datatype: "any", local: true, orientation: "any" }, { type: "horizontal-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "1d-horizontal", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor", "showMousePosition"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey", showMousePosition: false } }, { type: "vertical-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "1d-vertical", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor", "showMousePosition"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey", showMousePosition: false } }, { type: "2d-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "2d", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey" } }, { type: "2d-chromosome-annotations", datatype: ["chromsizes"], local: true, orientation: "2d", name: "2D Chromosome Annotations", thumbnail: null, hidden: true }, { type: "2d-chromosome-labels", datatype: ["chromsizes"], local: true, orientation: "2d", name: "Pairwise Chromosome Labels", thumbnail: null }, { type: "chromosome-labels", aliases: ["horizontal-chromosome-labels", "vertical-chromosome-labels"], datatype: ["chromsizes"], orientation: "1d-horizontal", rotatable: true, minHeight: 35, defaultHeight: 30, name: "Chromosome Axis", thumbnail: null, availableOptions: ["color", "stroke", "fontSize", "fontIsLeftAligned", "showMousePosition", "mousePositionColor", "tickPositions", "tickFormat", "reverseOrientation"], defaultOptions: { color: "#808080", stroke: "#ffffff", fontSize: 12, fontIsLeftAligned: false, showMousePosition: false, mousePositionColor: "#000000", reverseOrientation: false }, defaultOptionsByTheme: { [THEME_DARK]: { color: "#808080", stroke: "#000000", mousePositionColor: "#ffffff" } } }, { type: "vertical-1d-tiles", datatype: ["1d-tiles"], local: false, orientation: "1d-vertical", name: "Vertical 1D Tile Outlines", thumbnail: svgVertical1DTilesIcon }, { type: "horizontal-1d-tiles", datatype: ["vector", "stacked-interval", "gene-annotation"], local: false, orientation: "1d-horizontal", name: "Horizontal 1D Tile Outlines", thumbnail: svg1DTilesIcon }, { type: "osm-2d-tile-ids", datatype: ["map-tiles"], local: false, orientation: "2d", name: "OSM Tile Outlines", thumbnail: svg2DTilesIcon, availableOptions: ["minPos", "maxPos", "maxZoom", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { minPos: -180, maxPos: 180, maxZoom: 19, labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } }, { type: "raster-tiles", datatype: ["map-tiles"], local: true, orientation: "2d", hidden: true, name: "Raster Tiles", thumbnail: svgGeoMapIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } }, { type: "image-tiles", datatype: ["image-tiles"], local: true, orientation: "2d", hidden: true, name: "Image Tiles", thumbnail: null }, { type: "bedlike", datatype: ["bedlike"], aliases: ["vertical-bedlike"], local: false, orientation: "1d-horizontal", rotatable: true, name: "BED-like track", thumbnail: null, availableOptions: ["alternating", "annotationHeight", "annotationStyle", "fillColor", "fillOpacity", "fontColor", "fontSize", "minusStrandColor", "plusStrandColor", "labelBottomMargin", "labelColor", "labelLeftMargin", "labelPosition", "labelRightMargin", "labelTopMargin", "labelTextOpacity", "labelBackgroundOpacity", "maxAnnotationHeight", "minHeight", "trackBorderWidth", "trackBorderColor", "valueColumn", "colorEncoding", "colorRange", "colorEncodingRange", "separatePlusMinusStrands", "showTexts", "axisPositionHorizontal", "axisMargin"], defaultOptions: { alternating: false, annotationStyle: "box", fillColor: "blue", fillOpacity: 0.3, fontSize: "10", axisPositionHorizontal: "right", labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, minHeight: 20, maxAnnotationHeight: null, trackBorderWidth: 0, trackBorderColor: "black", valueColumn: null, colorEncoding: "itemRgb", showTexts: false, colorRange: ["#000000", "#652537", "#bf5458", "#fba273", "#ffffe0"], colorEncodingRange: false, separatePlusMinusStrands: true, annotationHeight: 16 } }, { type: "empty", datatype: [], orientation: "1d-horizontal", name: "Empty track", thumbnail: null, availableOptions: [], defaultOptions: {} }];
14257
+ const TRACKS_INFO = [osm, { ...osm, type: "osm" }, mapbox, { ...mapbox, type: "mapbox" }, { type: "left-axis", datatype: ["axis"], local: true, orientation: "1d-vertical", name: "Left Axis", thumbnail: svgVertical1DAxisIcon, availableOptions: ["minWidth"], defaultOptions: { minWidth: 100 } }, { type: "top-axis", datatype: ["axis"], local: true, orientation: "1d-horizontal", name: "Top Axis", thumbnail: svg1DAxisIcon, defaultOptions: {} }, { type: "horizontal-rule", datatype: ["x-coord"], local: true, orientation: "whole", name: "Horizontal Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "vertical-rule", datatype: ["y-coord"], local: true, orientation: "whole", name: "Vertical Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "cross-rule", datatype: ["xy-coord"], local: true, orientation: "whole", name: "Cross Rule", thumbnail: null, availableOptions: ["color"], defaultOptions: { color: "black" } }, { type: "simple-svg", datatype: [], local: false, orientation: "2d", exportable: true, availableOptions: ["minWidth", "minHeight"], defaultOptions: { minWidth: 100, minHeight: 100 } }, { type: "heatmap", datatype: ["matrix"], local: false, orientation: "2d", thumbnail: svg2DHeatmapIcon, exportable: true, availableOptions: ["backgroundColor", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "colorbarBackgroundColor", "maxZoom", "minWidth", "minHeight", "dataTransform", "colorbarPosition", "trackBorderWidth", "trackBorderColor", "heatmapValueScaling", "showMousePosition", "mousePositionColor", "showTooltip", "extent", "zeroValueColor"], defaultOptions: { backgroundColor: "#eeeeee", labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], colorbarBackgroundColor: "#ffffff", maxZoom: null, minWidth: 100, minHeight: 100, colorbarPosition: "topRight", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log", showMousePosition: false, mousePositionColor: "#000000", showTooltip: false, extent: "full", zeroValueColor: null }, defaultOptionsByTheme: { [THEME_DARK]: { backgroundColor: "#000000", colorRange: ["black", "rgba(208,2,27,1.0)", "rgba(245,166,35,1.0)", "white"], colorbarBackgroundColor: "#000000", labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff" } } }, { type: "linear-heatmap", aliases: ["horizontal-heatmap", "vertical-heatmap"], datatype: ["matrix"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svg2DHeatmapIcon, defaultOptions: { backgroundColor: "#eeeeee", labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, labelColor: "black", colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], maxZoom: null, minWidth: 100, minHeight: 40, trackBorderWidth: 0, trackBorderColor: "black" }, availableOptions: ["backgroundColor", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "maxZoom", "minWidth", "minHeight", "dataTransform", "oneDHeatmapFlipped", "colorbarPosition", "trackBorderWidth", "trackBorderColor", "heatmapValueScaling"] }, { type: "line", aliases: ["horizontal-line", "vertical-line"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svgHorizontalLineIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundColor", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "lineStrokeWidth", "lineStrokeColor", "valueScaling", "valueScaleMin", "valueScaleMax", "trackBorderWidth", "trackBorderColor", "trackType", "showMousePosition", "showTooltip", "mousePositionColor", "aggregationMode", "minHeight"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelBackgroundColor: "white", labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", lineStrokeColor: "blue", lineStrokeWidth: 1, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, showMousePosition: false, minHeight: 20, mousePositionColor: "#000000", showTooltip: false }, defaultOptionsByTheme: { [THEME_DARK]: { labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff" } } }, { type: "1d-heatmap", aliases: ["horizontal-1d-heatmap", "vertical-1d-heatmap"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: svgHorizontal1dHeatmap, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisPositionHorizontal", "axisMargin", "colorRange", "valueScaling", "trackBorderWidth", "trackBorderColor", "trackType", "showMousePosition", "showTooltip", "mousePositionColor", "aggregationMode"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisPositionHorizontal: "right", colorRange: ["white", "rgba(245,166,35,1.0)", "rgba(208,2,27,1.0)", "black"], valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, showMousePosition: false, mousePositionColor: "#000000", showTooltip: false } }, { type: "vector-heatmap", aliases: ["horizontal-vector-heatmap", "vertical-vector-heatmap"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, minHeight: 1, thumbnail: null, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "valueScaling", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "trackBorderWidth", "trackBorderColor", "trackType", "heatmapValueScaling"], defaultOptions: { labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, labelColor: "black", labelTextOpacity: 0.4, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log" } }, { type: "multivec", aliases: ["horizontal-multivec", "vertical-multivec"], datatype: ["multivec"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: null, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "minHeight", "valueScaling", "labelTextOpacity", "labelBackgroundOpacity", "colorRange", "trackBorderWidth", "trackBorderColor", "trackType", "heatmapValueScaling", "selectRows", "selectRowsAggregationMode", "selectRowsAggregationWithRelativeHeight", "selectRowsAggregationMethod", "colorbarBackgroundColor", "colorbarPosition", "zeroValueColor"], defaultOptions: { labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: true, labelShowAssembly: true, labelColor: "black", labelTextOpacity: 0.4, minHeight: 100, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", heatmapValueScaling: "log", selectRows: null, selectRowsAggregationMode: "mean", selectRowsAggregationWithRelativeHeight: true, selectRowsAggregationMethod: "client", colorbarBackgroundColor: "#ffffff", colorbarPosition: "topRight", zeroValueColor: null }, defaultOptionsByTheme: { [THEME_DARK]: { colorbarBackgroundColor: "#000000" } } }, { type: "point", aliases: ["horizontal-point", "vertical-point"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "pointColor", "pointSize", "valueScaling", "trackBorderWidth", "trackBorderColor"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", pointColor: "red", pointSize: 3, valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4 } }, { type: "divergent-bar", aliases: ["horizontal-divergent-bar", "vertical-divergent-bar"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "barFillColorTop", "barFillColorBottom", "valueScaling", "trackBorderWidth", "trackBorderColor", "barOpacity"], defaultOptions: { labelColor: "black", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisPositionHorizontal: "right", axisLabelFormatting: "scientific", barFillColorBottom: "red", barFillColorTop: "green", valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, barOpacity: 1 } }, { type: "bar", aliases: ["horizontal-bar", "vertical-bar"], datatype: ["vector"], local: false, orientation: "1d-horizontal", rotatable: true, availableOptions: ["align", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelShowResolution", "labelShowAssembly", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisLabelFormatting", "axisPositionHorizontal", "axisMargin", "barFillColor", "colorRange", "colorRangeGradient", "valueScaling", "valueScaleMin", "valueScaleMax", "trackBorderWidth", "trackBorderColor", "barOpacity", "showMousePosition", "showTooltip", "aggregationMode", "zeroLineVisible", "zeroLineColor", "zeroLineOpacity"], defaultOptions: { align: "bottom", labelColor: "[glyph-color]", labelPosition: "topLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, labelShowResolution: false, labelShowAssembly: true, axisLabelFormatting: "scientific", axisPositionHorizontal: "right", barFillColor: "darkgreen", valueScaling: "linear", trackBorderWidth: 0, trackBorderColor: "black", labelTextOpacity: 0.4, barOpacity: 1 } }, { type: "2d-tiles", datatype: ["matrix"], local: false, orientation: "2d", name: "2D Tile Outlines", thumbnail: svg2DTilesIcon }, { type: "1d-value-interval", aliases: ["horizontal-1d-value-interval", "vertical-1d-value-interval"], datatype: ["bed-value"], local: false, orientation: "1d-horizontal", rotatable: true, name: "1D Rectangles", availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "axisPositionHorizontal", "axisMargin"], defaultOptions: { labelColor: "black", labelPosition: "bottomLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, axisPositionHorizontal: "left", lineStrokeColor: "blue", valueScaling: "linear" } }, { type: "stacked-interval", aliases: ["top-stacked-interval", "left-stacked-interval"], datatype: ["stacked-interval"], local: false, orientation: "1d-horizontal", rotatable: true, thumbnail: "horizontal-stacked-interval.png", availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity"] }, { type: "viewport-projection-vertical", datatype: ["1d-projection"], local: true, hidden: true, projection: true, orientation: "1d-vertical", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "viewport-projection-horizontal", datatype: ["1d-projection"], local: true, hidden: true, projection: true, orientation: "1d-horizontal", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "viewport-projection-center", datatype: ["2d-projection"], local: true, hidden: true, projection: true, orientation: "2d", name: "Viewport Projection", thumbnail: "viewport-projection-center.png", availableOptions: ["projectionFillColor", "projectionStrokeColor", "strokeWidth"], defaultOptions: { projectionFillColor: "#777", projectionStrokeColor: "#777", projectionFillOpacity: 0.3, projectionStrokeOpacity: 0.7, strokeWidth: 1 } }, { type: "gene-annotations", aliases: ["horizontal-gene-annotations", "vertical-gene-annotations"], datatype: ["gene-annotation"], local: false, defaultHeight: 90, defaultWidth: 90, rotatable: true, orientation: "1d-horizontal", name: "Gene Annotations", thumbnail: svgGeneAnnotationsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundColor", "labelBackgroundOpacity", "minHeight", "plusStrandColor", "minusStrandColor", "trackBorderWidth", "trackBorderColor", "showMousePosition", "mousePositionColor", "fontSize", "geneAnnotationHeight", "geneLabelPosition", "geneStrandSpacing"], defaultOptions: { fontSize: 10, labelColor: "black", labelBackgroundColor: "#ffffff", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, minHeight: 24, plusStrandColor: "blue", minusStrandColor: "red", trackBorderWidth: 0, trackBorderColor: "black", showMousePosition: false, mousePositionColor: "#000000", geneAnnotationHeight: 16, geneLabelPosition: "outside", geneStrandSpacing: 4 }, defaultOptionsByTheme: { [THEME_DARK]: { labelColor: "#ffffff", labelBackgroundColor: "#000000", trackBorderColor: "#ffffff", mousePositionColor: "#ffffff", plusStrandColor: "#40a0ff" } } }, { type: "arrowhead-domains", datatype: ["arrowhead-domains"], local: false, orientation: "2d", name: "Arrowhead Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black" } }, { type: "linear-2d-rectangle-domains", aliases: ["horizontal-2d-rectangle-domains", "vertical-2d-rectangle-domains"], datatype: ["2d-rectangle-domains"], local: false, orientation: "1d-horizontal", rotatable: true, name: "Horizontal 2D Rectangle Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize"], defaultOptions: { labelColor: "black", labelPosition: "bottomLeft", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none" } }, { type: "2d-rectangle-domains", datatype: ["2d-rectangle-domains"], local: false, orientation: "2d", name: "2D Rectangle Domains", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["flipDiagonal", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainFillOpacity", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize"], defaultOptions: { flipDiagonal: "none", labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainFillOpacity: 0.4, rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none" } }, { type: "horizontal-1d-annotations", datatype: ["nothing"], local: false, orientation: "1d-horizontal", name: "Horizontal 1D Annotations", thumbnail: null, availableOptions: ["fill", "fillOpacity", "stroke", "strokeOpacity", "strokeWidth", "strokePos", "regions"], defaultOptions: { fill: "red", fillOpacity: 0.2, stroke: "red", strokeOpacity: 0, strokeWidth: 1, regions: [], strokePos: [] } }, { type: "vertical-1d-annotations", datatype: ["nothing"], local: false, orientation: "1d-vertical", name: "Vertical 1D Annotations", thumbnail: null, availableOptions: ["fill", "fillOpacity", "stroke", "strokeOpacity", "regions"], defaultOptions: { fill: "red", fillOpacity: "0.2", stroke: "red", strokeOpacity: "0", regions: [] } }, { type: "2d-annotations", datatype: ["2d-annotations"], local: false, orientation: "2d", name: "2D Annotations", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor", "labelTextOpacity", "labelBackgroundOpacity", "trackBorderWidth", "trackBorderColor", "rectangleDomainFillColor", "rectangleDomainStrokeColor", "rectangleDomainOpacity", "minSquareSize", "isClickable", "hoverColor", "selectColor", "exclude", "trackBorderBgWidth", "trackBorderBgColor", "trackBorderBgAlpha"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black", rectangleDomainFillColor: "grey", rectangleDomainStrokeColor: "black", rectangleDomainOpacity: 0.6, minSquareSize: "none", isClickable: false, hoverColor: "orange", selectColor: "fuchsia", exclude: [], trackBorderBgWidth: 0, trackBorderBgColor: "black", trackBorderBgAlpha: 0.33 } }, { type: "square-markers", datatype: ["bedpe"], local: false, orientation: "2d", name: "Square Markers", thumbnail: svgArrowheadDomainsIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "labelColor"], defaultOptions: { labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, trackBorderWidth: 0, trackBorderColor: "black" } }, { type: "combined", datatype: "any", local: true, orientation: "any" }, { type: "horizontal-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "1d-horizontal", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor", "showMousePosition"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey", showMousePosition: false } }, { type: "vertical-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "1d-vertical", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor", "showMousePosition"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey", showMousePosition: false } }, { type: "2d-chromosome-grid", datatype: ["chromsizes"], local: false, orientation: "2d", name: "Chromosome Grid", chromInfoPath: "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv", thumbnail: null, availableOptions: ["lineStrokeWidth", "lineStrokeColor"], defaultOptions: { lineStrokeWidth: 1, lineStrokeColor: "grey" } }, { type: "2d-chromosome-annotations", datatype: ["chromsizes"], local: true, orientation: "2d", name: "2D Chromosome Annotations", thumbnail: null, hidden: true }, { type: "2d-chromosome-labels", datatype: ["chromsizes"], local: true, orientation: "2d", name: "Pairwise Chromosome Labels", thumbnail: null }, { type: "chromosome-labels", aliases: ["horizontal-chromosome-labels", "vertical-chromosome-labels"], datatype: ["chromsizes"], orientation: "1d-horizontal", rotatable: true, minHeight: 35, defaultHeight: 30, name: "Chromosome Axis", thumbnail: null, availableOptions: ["color", "stroke", "fontSize", "fontIsLeftAligned", "showMousePosition", "mousePositionColor", "tickPositions", "tickFormat", "reverseOrientation"], defaultOptions: { color: "#808080", stroke: "#ffffff", fontSize: 12, fontIsLeftAligned: false, showMousePosition: false, mousePositionColor: "#000000", reverseOrientation: false }, defaultOptionsByTheme: { [THEME_DARK]: { color: "#808080", stroke: "#000000", mousePositionColor: "#ffffff" } } }, { type: "vertical-1d-tiles", datatype: ["1d-tiles"], local: false, orientation: "1d-vertical", name: "Vertical 1D Tile Outlines", thumbnail: svgVertical1DTilesIcon }, { type: "horizontal-1d-tiles", datatype: ["vector", "stacked-interval", "gene-annotation"], local: false, orientation: "1d-horizontal", name: "Horizontal 1D Tile Outlines", thumbnail: svg1DTilesIcon }, { type: "osm-2d-tile-ids", datatype: ["map-tiles"], local: false, orientation: "2d", name: "OSM Tile Outlines", thumbnail: svg2DTilesIcon, availableOptions: ["minPos", "maxPos", "maxZoom", "labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { minPos: -180, maxPos: 180, maxZoom: 19, labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } }, { type: "raster-tiles", datatype: ["map-tiles"], local: true, orientation: "2d", hidden: true, name: "Raster Tiles", thumbnail: svgGeoMapIcon, availableOptions: ["labelPosition", "labelLeftMargin", "labelRightMargin", "labelTopMargin", "labelBottomMargin", "name"], defaultOptions: { labelPosition: "bottomRight", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0 } }, { type: "image-tiles", datatype: ["image-tiles"], local: true, orientation: "2d", hidden: true, name: "Image Tiles", thumbnail: null }, { type: "bedlike", datatype: ["bedlike"], aliases: ["vertical-bedlike"], local: false, orientation: "1d-horizontal", rotatable: true, name: "BED-like track", thumbnail: null, availableOptions: ["alternating", "annotationHeight", "annotationStyle", "fillColor", "fillOpacity", "fontColor", "fontSize", "minusStrandColor", "plusStrandColor", "labelBottomMargin", "labelColor", "labelLeftMargin", "labelPosition", "labelRightMargin", "labelTopMargin", "labelTextOpacity", "labelBackgroundOpacity", "maxAnnotationHeight", "minHeight", "trackBorderWidth", "trackBorderColor", "valueColumn", "colorEncoding", "colorRange", "colorEncodingRange", "separatePlusMinusStrands", "showTexts", "axisPositionHorizontal", "axisMargin"], defaultOptions: { alternating: false, annotationStyle: "box", fillColor: "blue", fillOpacity: 0.3, fontSize: "10", axisPositionHorizontal: "right", labelColor: "black", labelPosition: "hidden", labelLeftMargin: 0, labelRightMargin: 0, labelTopMargin: 0, labelBottomMargin: 0, minHeight: 20, maxAnnotationHeight: null, trackBorderWidth: 0, trackBorderColor: "black", valueColumn: null, colorEncoding: "itemRgb", showTexts: false, colorRange: ["#000000", "#652537", "#bf5458", "#fba273", "#ffffe0"], colorEncodingRange: false, separatePlusMinusStrands: true, annotationHeight: 16 } }, { type: "empty", datatype: [], orientation: "1d-horizontal", name: "Empty track", thumbnail: null, availableOptions: [], defaultOptions: {} }];
14248
14258
  const DATATYPE_TO_TRACK_TYPE = (orientation2) => {
14249
14259
  const localDatatypeToTrackType = {};
14250
14260
  const orientationMatches = (trackInfo2) => {
@@ -14321,13 +14331,16 @@ function _toPrimitive2(input, hint) {
14321
14331
  const dataToGenomicLoci = (x02, x12, chromInfo) => {
14322
14332
  const gX0 = absToChr(x02, chromInfo);
14323
14333
  const gX1 = absToChr(x12, chromInfo);
14334
+ if (!gX0 || !gX1) {
14335
+ throw new Error("Couldn't convert data to genomic coordinates");
14336
+ }
14324
14337
  return [gX0[0], Math.round(gX0[1]), gX1[0], Math.round(gX1[1])];
14325
14338
  };
14326
14339
  const debounce$1 = (func, wait, immediate) => {
14327
14340
  let timeout2;
14328
14341
  const debounced = (...args) => {
14329
14342
  const later = () => {
14330
- timeout2 = null;
14343
+ timeout2 = void 0;
14331
14344
  if (!immediate) {
14332
14345
  func(...args);
14333
14346
  }
@@ -14339,9 +14352,9 @@ function _toPrimitive2(input, hint) {
14339
14352
  func(...args);
14340
14353
  }
14341
14354
  };
14342
- debounce$1.cancel = () => {
14355
+ debounced.cancel = () => {
14343
14356
  clearTimeout(timeout2);
14344
- timeout2 = null;
14357
+ timeout2 = void 0;
14345
14358
  };
14346
14359
  return debounced;
14347
14360
  };
@@ -14382,17 +14395,13 @@ function _toPrimitive2(input, hint) {
14382
14395
  }
14383
14396
  function download(filename, stringOrBlob) {
14384
14397
  const blob = typeof stringOrBlob === "string" ? new Blob([stringOrBlob], { type: "application/octet-stream" }) : stringOrBlob;
14385
- if (window.navigator.msSaveOrOpenBlob) {
14386
- window.navigator.msSaveBlob(blob, filename);
14387
- } else {
14388
- const elem = window.document.createElement("a");
14389
- elem.href = window.URL.createObjectURL(blob);
14390
- elem.download = filename;
14391
- document.body.appendChild(elem);
14392
- elem.click();
14393
- document.body.removeChild(elem);
14394
- URL.revokeObjectURL(elem.href);
14395
- }
14398
+ const elem = window.document.createElement("a");
14399
+ elem.href = window.URL.createObjectURL(blob);
14400
+ elem.download = filename;
14401
+ document.body.appendChild(elem);
14402
+ elem.click();
14403
+ document.body.removeChild(elem);
14404
+ URL.revokeObjectURL(elem.href);
14396
14405
  }
14397
14406
  const fillInMinWidths = (tracks2) => {
14398
14407
  const horizontalLocations = ["top", "bottom", "gallery"];
@@ -14646,7 +14655,7 @@ function _toPrimitive2(input, hint) {
14646
14655
  }
14647
14656
  return object2;
14648
14657
  }
14649
- const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();
14658
+ const fixtz = (/* @__PURE__ */ new Date("2019-01-01T00:00")).getHours() || (/* @__PURE__ */ new Date("2019-07-01T00:00")).getHours();
14650
14659
  const d3Dsv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, dsvFormat: dsv$2, csvParse: csvParse$1, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse: tsvParse$1, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType }, Symbol.toStringTag, { value: "Module" }));
14651
14660
  const cache$1 = {};
14652
14661
  const getFromCache = (url, fallback) => cache$1[url] ? Promise.resolve(cache$1[url]) : fallback(url);
@@ -15264,21 +15273,25 @@ function _toPrimitive2(input, hint) {
15264
15273
  }
15265
15274
  return track;
15266
15275
  };
15267
- const visitTracks = (tracks2, visitor, inclCombinedTracks = true, position = null) => tracks2.forEach((track) => {
15268
- if (track.type === "combined") {
15269
- if (inclCombinedTracks) {
15270
- visitTracks(track.contents, visitor, inclCombinedTracks, position);
15271
- visitor(track, position);
15272
- }
15273
- } else {
15274
- visitor(track, position);
15276
+ function isCombinedTrackConfig(trackConfig) {
15277
+ return trackConfig.type === "combined";
15278
+ }
15279
+ function isWheelEvent(event) {
15280
+ return "deltaY" in event && "deltaMode" in event;
15281
+ }
15282
+ const visitTracks = (tracks2, visit, includeCombinedTracks = true, position = null) => tracks2.forEach((track) => {
15283
+ if (includeCombinedTracks && isCombinedTrackConfig(track)) {
15284
+ visitTracks(track.contents, visit, includeCombinedTracks, position);
15275
15285
  }
15286
+ visit(track, position);
15276
15287
  });
15277
15288
  const visitPositionedTracks = (positionedTracks, visitor, inclCombinedTracks = true) => {
15278
15289
  const allTracks = [];
15279
- Object.keys(positionedTracks).forEach((position) => {
15280
- visitTracks(positionedTracks[position], visitor, inclCombinedTracks, position);
15281
- });
15290
+ for (const [stringPosition, tracks2] of Object.entries(positionedTracks)) {
15291
+ const position = stringPosition;
15292
+ visitTracks(tracks2, visitor, inclCombinedTracks, position);
15293
+ allTracks.push(...tracks2);
15294
+ }
15282
15295
  return allTracks;
15283
15296
  };
15284
15297
  const getTrackPositionByUid = (positionedTracks, uid) => {
@@ -15291,12 +15304,15 @@ function _toPrimitive2(input, hint) {
15291
15304
  return position;
15292
15305
  };
15293
15306
  const map$5 = (f2) => (x) => Array.prototype.map.call(x, f2);
15294
- const getXylofon = () => [window, map$5((c2) => c2.charCodeAt(0))("1.12.4").map((number3) => number3 <= 999 ? `00${number3}`.slice(-3) : number3).join("")];
15307
+ const getXylofon = () => [window, map$5((c2) => c2.charCodeAt(0))("1.13.0").map((number3) => number3 <= 999 ? `00${number3}`.slice(-3) : number3).join("")];
15295
15308
  const gradient = (steps, width = 1, height = 100, fromX = 0, fromY = 0, toX = 0, toY = 100) => {
15296
15309
  const canvas = document.createElement("canvas");
15297
15310
  canvas.width = width;
15298
15311
  canvas.height = height;
15299
15312
  const ctx = canvas.getContext("2d");
15313
+ if (!ctx) {
15314
+ throw new Error("Could not get canvas context");
15315
+ }
15300
15316
  const grd = ctx.createLinearGradient(fromX, fromY, toX, toY);
15301
15317
  steps.forEach((step) => {
15302
15318
  grd.addColorStop(step.from, step.color);
@@ -15957,6 +15973,9 @@ function _toPrimitive2(input, hint) {
15957
15973
  };
15958
15974
  const setupShowMousePosition = (context, is2d = false, isGlobal = false) => {
15959
15975
  const scene = is2d ? context.pMasked : context.pForeground || context.pMain;
15976
+ if (!scene) {
15977
+ throw new Error("setupShowMousePosition: No scene found. Please make sure to call this method after the scene has been initialized.");
15978
+ }
15960
15979
  const getScales = () => [context.xScale(), context.yScale()];
15961
15980
  const graphics = showMousePosition(context.pubSub, context.pubSubs, context.options, getScales, context.getPosition.bind(context), context.getDimensions.bind(context), context.getProp("flipText"), is2d, isGlobal);
15962
15981
  scene.addChild(graphics);
@@ -15984,7 +16003,7 @@ function _toPrimitive2(input, hint) {
15984
16003
  let timeout2;
15985
16004
  let blockedCalls = 0;
15986
16005
  const reset2 = () => {
15987
- timeout2 = null;
16006
+ timeout2 = void 0;
15988
16007
  };
15989
16008
  const debounced = (...args) => {
15990
16009
  const later = () => {
@@ -16004,7 +16023,7 @@ function _toPrimitive2(input, hint) {
16004
16023
  func(...args);
16005
16024
  };
16006
16025
  let wait = false;
16007
- const throttled = (request2, ...args) => {
16026
+ const throttled = (_request, ...args) => {
16008
16027
  if (!wait) {
16009
16028
  func(...args);
16010
16029
  debounced(...args);
@@ -16024,6 +16043,9 @@ function _toPrimitive2(input, hint) {
16024
16043
  canvas.width = w;
16025
16044
  canvas.height = h;
16026
16045
  const ctx = canvas.getContext("2d");
16046
+ if (!ctx) {
16047
+ throw new Error("Could not get canvas context");
16048
+ }
16027
16049
  ctx.fillStyle = "transparent";
16028
16050
  ctx.fillRect(0, 0, canvas.width, canvas.height);
16029
16051
  const pix = new ImageData(pixData, canvas.width, canvas.height);
@@ -16540,7 +16562,8 @@ function _toPrimitive2(input, hint) {
16540
16562
  case "horizontal-multivec":
16541
16563
  return true;
16542
16564
  case "combined": {
16543
- return track.contents.map((t) => IS_TRACK_RANGE_SELECTABLE(t)).reduce(or, false);
16565
+ const contents2 = track.contents;
16566
+ return contents2.map((t) => IS_TRACK_RANGE_SELECTABLE(t)).reduce(or, false);
16544
16567
  }
16545
16568
  default:
16546
16569
  return false;
@@ -50127,7 +50150,7 @@ function _toPrimitive2(input, hint) {
50127
50150
  seq.circular = circular;
50128
50151
  seq.moleculeType = moleculeType;
50129
50152
  const dateMatch = dateStr.match(/^(\d{2})-(.{3})-(\d{4})$/);
50130
- const date2 = new Date();
50153
+ const date2 = /* @__PURE__ */ new Date();
50131
50154
  date2.setFullYear(+dateMatch[3]);
50132
50155
  date2.setUTCMonth(MONTHS.indexOf(dateMatch[2].toUpperCase()));
50133
50156
  date2.setDate(+dateMatch[1]);
@@ -50481,6 +50504,9 @@ function _toPrimitive2(input, hint) {
50481
50504
  } }]);
50482
50505
  return LocalTileDataFetcher2;
50483
50506
  }();
50507
+ function isNullDataTask(task) {
50508
+ return task.data === null;
50509
+ }
50484
50510
  let BackgroundTaskScheduler = /* @__PURE__ */ function() {
50485
50511
  function BackgroundTaskScheduler2() {
50486
50512
  _classCallCheck3(this, BackgroundTaskScheduler2);
@@ -50501,9 +50527,9 @@ function _toPrimitive2(input, hint) {
50501
50527
  } }, { key: "runTaskQueue", value: function runTaskQueue(deadline) {
50502
50528
  while ((deadline.timeRemaining() > 0 || deadline.didTimeout) && this.taskList.length) {
50503
50529
  const task = this.taskList.shift();
50504
- if (task.data === null) {
50530
+ if (task && isNullDataTask(task)) {
50505
50531
  task.handler();
50506
- } else {
50532
+ } else if (task) {
50507
50533
  task.handler(task.data);
50508
50534
  }
50509
50535
  }
@@ -64863,7 +64889,7 @@ function _toPrimitive2(input, hint) {
64863
64889
  return s;
64864
64890
  }
64865
64891
  Object.assign(LruCache.prototype, { put, get: get$2, find, keys: keys$1, set, shift, remove, removeAll, forEach: forEach$1, toJSON, toString: toString$1 });
64866
- const version = "1.12.4";
64892
+ const version = "1.13.0";
64867
64893
  const button = "_button_1wnjn_1";
64868
64894
  const classes$7 = { button, "button-shortcut": "_button-shortcut_1wnjn_35" };
64869
64895
  const Button = React__default.default.forwardRef((props, ref2) => {
@@ -69050,6 +69076,8 @@ function _toPrimitive2(input, hint) {
69050
69076
  _this84 = _super65.call(this, props);
69051
69077
  _this84.dragging = false;
69052
69078
  _this84.element = null;
69079
+ _this84.eventTracker = null;
69080
+ _this84.eventTrackerOld = null;
69053
69081
  _this84.closing = false;
69054
69082
  _this84.yPositionOffset = 0;
69055
69083
  _this84.xPositionOffset = 0;
@@ -69094,9 +69122,9 @@ function _toPrimitive2(input, hint) {
69094
69122
  _this84.metaTracks = {};
69095
69123
  _this84.pubSubs = [];
69096
69124
  if (window.higlassTracksByType) {
69097
- Object.keys(window.higlassTracksByType).forEach((pluginTrackType) => {
69125
+ for (const pluginTrackType in window.higlassTracksByType) {
69098
69126
  TRACKS_INFO_BY_TYPE[pluginTrackType] = window.higlassTracksByType[pluginTrackType].config;
69099
- });
69127
+ }
69100
69128
  }
69101
69129
  _this84.boundForwardEvent = _this84.forwardEvent.bind(_assertThisInitialized3(_this84));
69102
69130
  _this84.boundScrollEvent = _this84.scrollEvent.bind(_assertThisInitialized3(_this84));
@@ -69104,18 +69132,32 @@ function _toPrimitive2(input, hint) {
69104
69132
  _this84.dispatchEventBound = _this84.dispatchEvent.bind(_assertThisInitialized3(_this84));
69105
69133
  _this84.zoomToDataPosHandlerBound = _this84.zoomToDataPosHandler.bind(_assertThisInitialized3(_this84));
69106
69134
  _this84.onScrollHandlerBound = _this84.onScrollHandler.bind(_assertThisInitialized3(_this84));
69135
+ _this84.elementPos = { height: 0, width: 0, left: 0, top: 0 };
69136
+ _this84.elementSelection = null;
69107
69137
  return _this84;
69108
69138
  }
69109
- _createClass3(TrackRenderer2, [{ key: "UNSAFE_componentWillMount", value: function UNSAFE_componentWillMount() {
69139
+ _createClass3(TrackRenderer2, [{ key: "xScale", get: function() {
69140
+ if (!this._xScale) {
69141
+ throw new Error("xScale is not defined");
69142
+ }
69143
+ return this._xScale;
69144
+ } }, { key: "yScale", get: function() {
69145
+ if (!this._yScale) {
69146
+ throw new Error("yScale is not defined");
69147
+ }
69148
+ return this._yScale;
69149
+ } }, { key: "UNSAFE_componentWillMount", value: function UNSAFE_componentWillMount() {
69110
69150
  this.pubSubs = [];
69111
69151
  this.pubSubs.push(this.props.pubSub.subscribe("scroll", this.windowScrolledBound));
69112
69152
  this.pubSubs.push(this.props.pubSub.subscribe("app.event", this.dispatchEventBound));
69113
69153
  this.pubSubs.push(this.props.pubSub.subscribe("zoomToDataPos", this.zoomToDataPosHandlerBound));
69114
69154
  this.pubSubs.push(this.props.pubSub.subscribe("app.scroll", this.onScrollHandlerBound));
69115
69155
  } }, { key: "componentDidMount", value: function componentDidMount() {
69156
+ if (!this.element) {
69157
+ throw new Error("Component did not mount, this.element is not defined.");
69158
+ }
69116
69159
  this.elementPos = this.element.getBoundingClientRect();
69117
69160
  this.elementSelection = select$1(this.element);
69118
- this.svgTrackAreaSelection = select$1(this.svgTrackArea);
69119
69161
  this.pStage = new GLOBALS.PIXI.Graphics();
69120
69162
  this.pMask = new GLOBALS.PIXI.Graphics();
69121
69163
  this.pOutline = new GLOBALS.PIXI.Graphics();
@@ -69167,7 +69209,7 @@ function _toPrimitive2(input, hint) {
69167
69209
  const options2 = track.track.options;
69168
69210
  const trackObject = this.trackDefObjects[track.track.uid].trackObject;
69169
69211
  trackObject.rerender(options2);
69170
- if (track.track.hasOwnProperty("contents")) {
69212
+ if (isCombinedTrackConfig(track.track)) {
69171
69213
  const ctDefs = {};
69172
69214
  for (const ct of track.track.contents) {
69173
69215
  ctDefs[ct.uid] = ct;
@@ -69185,7 +69227,8 @@ function _toPrimitive2(input, hint) {
69185
69227
  }
69186
69228
  } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) {
69187
69229
  if (this.props.initialXDomain[0] !== prevProps.initialXDomain[0] || this.props.initialXDomain[1] !== prevProps.initialXDomain[1] || this.props.initialYDomain[0] !== prevProps.initialYDomain[0] || this.props.initialYDomain[1] !== prevProps.initialYDomain[1]) {
69188
- this.element.__zoom = identity$4;
69230
+ if (this.element)
69231
+ this.element.__zoom = identity$4;
69189
69232
  }
69190
69233
  if (prevProps.isRangeSelection !== this.props.isRangeSelection) {
69191
69234
  if (this.props.isRangeSelection) {
@@ -69203,28 +69246,29 @@ function _toPrimitive2(input, hint) {
69203
69246
  }
69204
69247
  this.addEventTracker();
69205
69248
  } }, { key: "componentWillUnmount", value: function componentWillUnmount() {
69249
+ var _a, _b;
69206
69250
  this.mounted = false;
69207
69251
  this.removeTracks(Object.keys(this.trackDefObjects));
69208
69252
  this.removeMetaTracks(Object.keys(this.metaTracks));
69209
69253
  this.currentProps.removeDraggingChangedListener(this.draggingChanged);
69210
- this.currentProps.pixiStage.removeChild(this.pStage);
69211
- this.pMask.destroy(true);
69212
- this.pStage.destroy(true);
69254
+ if (this.pStage)
69255
+ this.currentProps.pixiStage.removeChild(this.pStage);
69256
+ (_a = this.pMask) == null ? void 0 : _a.destroy(true);
69257
+ (_b = this.pStage) == null ? void 0 : _b.destroy(true);
69213
69258
  this.pubSubs.forEach((subscription) => this.props.pubSub.unsubscribe(subscription));
69214
69259
  this.pubSubs = [];
69215
69260
  this.removeEventTracker();
69216
- } }, { key: "dispatchEvent", value: function dispatchEvent2(e) {
69217
- if (e.sourceUid === this.uid && e.type !== "contextmenu") {
69218
- forwardEvent(e, this.element);
69261
+ } }, { key: "dispatchEvent", value: function dispatchEvent2(event) {
69262
+ if (event.sourceUid === this.uid && event.type !== "contextmenu") {
69263
+ if (this.element)
69264
+ forwardEvent(event, this.element);
69219
69265
  }
69220
69266
  } }, { key: "isWithin", value: function isWithin(x, y) {
69221
- if (!this.element)
69222
- return false;
69223
69267
  const withinX = x >= this.elementPos.left && x <= this.elementPos.width + this.elementPos.left;
69224
69268
  const withinY = y >= this.elementPos.top && y <= this.elementPos.height + this.elementPos.top;
69225
69269
  return withinX && withinY;
69226
- } }, { key: "zoomToDataPosHandler", value: function zoomToDataPosHandler({ pos, animateTime, isMercator }) {
69227
- this.zoomToDataPos(...pos, animateTime, isMercator);
69270
+ } }, { key: "zoomToDataPosHandler", value: function zoomToDataPosHandler({ pos, animateTime }) {
69271
+ this.zoomToDataPos(...pos, animateTime);
69228
69272
  } }, { key: "addZoom", value: function addZoom() {
69229
69273
  if (!this.elementSelection || !this.currentProps.zoomable)
69230
69274
  return;
@@ -69236,17 +69280,19 @@ function _toPrimitive2(input, hint) {
69236
69280
  this.elementSelection.on(".zoom", null);
69237
69281
  }
69238
69282
  } }, { key: "setMask", value: function setMask() {
69239
- this.pMask.clear();
69240
- this.pMask.beginFill();
69241
- this.pMask.drawRect(this.xPositionOffset, this.yPositionOffset, this.currentProps.width, this.currentProps.height);
69242
- this.pMask.endFill();
69283
+ var _a, _b, _c, _d;
69284
+ (_a = this.pMask) == null ? void 0 : _a.clear();
69285
+ (_b = this.pMask) == null ? void 0 : _b.beginFill();
69286
+ (_c = this.pMask) == null ? void 0 : _c.drawRect(this.xPositionOffset, this.yPositionOffset, this.currentProps.width, this.currentProps.height);
69287
+ (_d = this.pMask) == null ? void 0 : _d.endFill();
69243
69288
  } }, { key: "setBackground", value: function setBackground() {
69289
+ var _a, _b, _c, _d, _e, _f;
69244
69290
  const defBgColor = this.props.theme === THEME_DARK ? "black" : "white";
69245
- const bgColor = colorToHex(this.currentProps.viewOptions && this.currentProps.viewOptions.backgroundColor || defBgColor);
69246
- this.pBackground.clear();
69247
- this.pBackground.beginFill(bgColor);
69248
- this.pBackground.drawRect(this.xPositionOffset, this.yPositionOffset, this.currentProps.width, this.currentProps.height);
69249
- this.pBackground.endFill();
69291
+ const bgColor = colorToHex((_b = (_a = this.currentProps.viewOptions) == null ? void 0 : _a.backgroundColor) != null ? _b : defBgColor);
69292
+ (_c = this.pBackground) == null ? void 0 : _c.clear();
69293
+ (_d = this.pBackground) == null ? void 0 : _d.beginFill(bgColor);
69294
+ (_e = this.pBackground) == null ? void 0 : _e.drawRect(this.xPositionOffset, this.yPositionOffset, this.currentProps.width, this.currentProps.height);
69295
+ (_f = this.pBackground) == null ? void 0 : _f.endFill();
69250
69296
  } }, { key: "windowScrolled", value: function windowScrolled() {
69251
69297
  this.removeZoom();
69252
69298
  if (this.scrollTimeout) {
@@ -69294,6 +69340,9 @@ function _toPrimitive2(input, hint) {
69294
69340
  } }, { key: "setUpScales", value: function setUpScales(notify = false) {
69295
69341
  const currentCenterX = this.currentProps.paddingLeft + this.currentProps.leftWidth + this.currentProps.centerWidth / 2;
69296
69342
  const currentCenterY = this.currentProps.paddingTop + this.currentProps.topHeight + this.currentProps.centerHeight / 2;
69343
+ if (!this.drawableToDomainX || !this.drawableToDomainY) {
69344
+ return;
69345
+ }
69297
69346
  const centerDomainXOffset = (this.drawableToDomainX(currentCenterX) - this.drawableToDomainX(this.prevCenterX)) / this.zoomTransform.k;
69298
69347
  const centerDomainYOffset = (this.drawableToDomainY(currentCenterY) - this.drawableToDomainY(this.prevCenterY)) / this.zoomTransform.k;
69299
69348
  this.cumCenterYOffset += centerDomainYOffset;
@@ -69302,8 +69351,8 @@ function _toPrimitive2(input, hint) {
69302
69351
  this.prevCenterX = currentCenterX;
69303
69352
  const visibleXDomain = [this.drawableToDomainX(0) - this.cumCenterXOffset, this.drawableToDomainX(this.currentProps.width) - this.cumCenterXOffset];
69304
69353
  const visibleYDomain = [this.drawableToDomainY(0) - this.cumCenterYOffset, this.drawableToDomainY(this.currentProps.height) - this.cumCenterYOffset];
69305
- this.xScale = linear().domain(visibleXDomain).range([0, this.currentProps.width]);
69306
- this.yScale = linear().domain(visibleYDomain).range([0, this.currentProps.height]);
69354
+ this._xScale = linear().domain(visibleXDomain).range([0, this.currentProps.width]);
69355
+ this._yScale = linear().domain(visibleYDomain).range([0, this.currentProps.height]);
69307
69356
  for (const uid in this.trackDefObjects) {
69308
69357
  const track = this.trackDefObjects[uid].trackObject;
69309
69358
  track.refScalesChanged(this.xScale, this.yScale);
@@ -69315,7 +69364,7 @@ function _toPrimitive2(input, hint) {
69315
69364
  if (trackObject === trackObjectIn) {
69316
69365
  return trackDef.track;
69317
69366
  }
69318
- if (trackDef.track.contents) {
69367
+ if (isCombinedTrackConfig(trackDef.track)) {
69319
69368
  for (const subTrackDef of trackDef.track.contents) {
69320
69369
  if (trackObject.createdTracks[subTrackDef.uid] === trackObjectIn) {
69321
69370
  return subTrackDef;
@@ -69399,12 +69448,13 @@ function _toPrimitive2(input, hint) {
69399
69448
  newTrackObj.zoomed(zoomedXScale, zoomedYScale);
69400
69449
  }
69401
69450
  this.applyZoomTransform(false);
69402
- } }, { key: "updateMetaTracks", value: function updateMetaTracks() {
69451
+ } }, { key: "updateMetaTracks", value: function updateMetaTracks(_unused) {
69403
69452
  } }, { key: "updateExistingTrackDefs", value: function updateExistingTrackDefs(newTrackDefs) {
69404
- for (let i2 = 0; i2 < newTrackDefs.length; i2++) {
69405
- this.trackDefObjects[newTrackDefs[i2].track.uid].trackDef = newTrackDefs[i2];
69406
- if (newTrackDefs[i2].track.type === "combined") {
69407
- this.trackDefObjects[newTrackDefs[i2].track.uid].trackObject.updateContents(newTrackDefs[i2].track.contents, this.createTrackObject.bind(this)).refScalesChanged(this.xScale, this.yScale);
69453
+ for (const trackDef of newTrackDefs) {
69454
+ const ref2 = this.trackDefObjects[trackDef.track.uid];
69455
+ ref2.trackDef = trackDef;
69456
+ if (isCombinedTrackConfig(trackDef.track)) {
69457
+ ref2.trackObject.updateContents(trackDef.track.contents, this.createTrackObject.bind(this)).refScalesChanged(this.xScale, this.yScale);
69408
69458
  }
69409
69459
  }
69410
69460
  const updated = this.updateTrackPositions();
@@ -69452,10 +69502,12 @@ function _toPrimitive2(input, hint) {
69452
69502
  const setZoom = () => {
69453
69503
  const newTransform = identity$4.translate(translateX2, translateY2).scale(k);
69454
69504
  this.zoomTransform = newTransform;
69455
- this.emptyZoomBehavior.transform(this.elementSelection, newTransform);
69505
+ if (this.elementSelection) {
69506
+ this.emptyZoomBehavior.transform(this.elementSelection, newTransform);
69507
+ }
69456
69508
  last2 = this.applyZoomTransform(notify);
69457
69509
  };
69458
- if (animateTime) {
69510
+ if (animateTime && this.elementSelection) {
69459
69511
  let selection2 = this.elementSelection;
69460
69512
  this.activeTransitions += 1;
69461
69513
  if (!document.hidden) {
@@ -69470,11 +69522,18 @@ function _toPrimitive2(input, hint) {
69470
69522
  }
69471
69523
  return last2;
69472
69524
  } }, { key: "valueScaleMove", value: function valueScaleMove(movement) {
69525
+ if (!this.zoomStartPos) {
69526
+ return;
69527
+ }
69473
69528
  for (const track of this.getTracksAtPosition(...this.zoomStartPos)) {
69474
69529
  track.movedY(movement);
69475
69530
  }
69476
- this.zoomTransform = this.zoomStartTransform;
69531
+ if (this.zoomStartTransform)
69532
+ this.zoomTransform = this.zoomStartTransform;
69477
69533
  } }, { key: "valueScaleZoom", value: function valueScaleZoom(event, orientation2) {
69534
+ if (!isWheelEvent(event.sourceEvent)) {
69535
+ return;
69536
+ }
69478
69537
  const mdy = event.sourceEvent.deltaY;
69479
69538
  const mdm = event.sourceEvent.deltaMode;
69480
69539
  const myWheelDelta = (dy, dm) => dy * (dm ? 120 : 1) / 500;
@@ -69484,15 +69543,20 @@ function _toPrimitive2(input, hint) {
69484
69543
  const yPos = orientation2 === "1d-horizontal" ? cp[1] - track.position[1] : cp[0] - track.position[0];
69485
69544
  track.zoomedY(yPos, 2 ** mwd);
69486
69545
  }
69487
- this.zoomTransform = this.zoomStartTransform;
69546
+ if (this.zoomStartTransform)
69547
+ this.zoomTransform = this.zoomStartTransform;
69488
69548
  } }, { key: "zoomed", value: function zoomed(event) {
69549
+ var _a;
69489
69550
  let trackOrientation = null;
69490
69551
  if (this.zoomStartPos) {
69491
69552
  const tracksAtZoomStart = this.getTracksAtPosition(...this.zoomStartPos);
69492
69553
  if (tracksAtZoomStart.length) {
69493
69554
  const trackAtZoomStart = tracksAtZoomStart[0];
69494
69555
  const trackDef = this.getTrackDef(trackAtZoomStart);
69495
- if (TRACKS_INFO_BY_TYPE[trackDef.type]) {
69556
+ if (!trackDef) {
69557
+ return;
69558
+ }
69559
+ if ((_a = TRACKS_INFO_BY_TYPE[trackDef.type]) == null ? void 0 : _a.orientation) {
69496
69560
  trackOrientation = TRACKS_INFO_BY_TYPE[trackDef.type].orientation;
69497
69561
  }
69498
69562
  if (trackAtZoomStart instanceof LeftTrackModifier) {
@@ -69526,7 +69590,8 @@ function _toPrimitive2(input, hint) {
69526
69590
  } else if (trackOrientation === "1d-vertical") {
69527
69591
  this.zoomTransform = identity$4.translate(this.prevZoomTransform.x, this.zoomTransform.y).scale(this.zoomTransform.k);
69528
69592
  }
69529
- this.element.__zoom = this.zoomTransform;
69593
+ if (this.element)
69594
+ this.element.__zoom = this.zoomTransform;
69530
69595
  }
69531
69596
  this.applyZoomTransform(true);
69532
69597
  this.prevZoomTransform = this.zoomTransform;
@@ -69569,13 +69634,17 @@ function _toPrimitive2(input, hint) {
69569
69634
  this.zoomStartPos = null;
69570
69635
  if (this.valueScaleZooming) {
69571
69636
  this.valueScaleZooming = false;
69572
- this.element.__zoom = this.zoomStartTransform;
69637
+ if (this.element)
69638
+ this.element.__zoom = this.zoomStartTransform;
69573
69639
  }
69574
69640
  this.props.pubSub.publish("app.zoomEnd");
69575
69641
  } }, { key: "applyZoomTransform", value: function applyZoomTransform(notify = true) {
69576
69642
  const props = this.currentProps;
69577
69643
  const paddingleft = props.paddingLeft + props.leftWidth;
69578
69644
  const paddingTop = props.paddingTop + props.topHeight;
69645
+ if (!this.xScale || !this.yScale) {
69646
+ return void 0;
69647
+ }
69579
69648
  this.zoomedXScale = this.zoomTransform.rescaleX(this.xScale);
69580
69649
  this.zoomedYScale = this.zoomTransform.rescaleY(this.yScale);
69581
69650
  const newXScale = linear().domain([paddingleft, paddingleft + props.centerWidth].map(this.zoomedXScale.invert)).range([0, props.centerWidth]);
@@ -69611,7 +69680,7 @@ function _toPrimitive2(input, hint) {
69611
69680
  switch (track.type) {
69612
69681
  default: {
69613
69682
  const pluginTrack = this.props.pluginTracks[track.type];
69614
- if (pluginTrack && pluginTrack.isMetaTrack) {
69683
+ if (pluginTrack == null ? void 0 : pluginTrack.isMetaTrack) {
69615
69684
  const context = { getTrackObject: this.getTrackObject.bind(this), onNewTilesLoaded: () => {
69616
69685
  this.currentProps.onNewTilesLoaded(track.uid);
69617
69686
  }, definition: track };
@@ -69622,7 +69691,7 @@ function _toPrimitive2(input, hint) {
69622
69691
  }
69623
69692
  }
69624
69693
  console.warn(`Unknown meta track of type: ${track.type}`);
69625
- return new UnknownPixiTrack(this.pStage, { name: "Unknown Track Type", type: track.type }, () => this.currentProps.onNewTilesLoaded(track.uid));
69694
+ return new UnknownPixiTrack(this.pStage, { name: "Unknown Track Type", type: track.type });
69626
69695
  }
69627
69696
  }
69628
69697
  } }, { key: "createTrackObject", value: function createTrackObject(track) {
@@ -69634,9 +69703,6 @@ function _toPrimitive2(input, hint) {
69634
69703
  }
69635
69704
  return trackObject;
69636
69705
  } }, { key: "createLocationAgnosticTrackObject", value: function createLocationAgnosticTrackObject(track) {
69637
- const handleTilesetInfoReceived = (x) => {
69638
- this.currentProps.onTilesetInfoReceived(track.uid, x);
69639
- };
69640
69706
  let dataConfig = track.data;
69641
69707
  if (!dataConfig) {
69642
69708
  dataConfig = { server: trimTrailingSlash(track.server), tilesetUid: track.tilesetUid };
@@ -69645,7 +69711,12 @@ function _toPrimitive2(input, hint) {
69645
69711
  dataConfig.coordSystem = track.coordSystem;
69646
69712
  }
69647
69713
  const dataFetcher = getDataFetcher(dataConfig, this.props.pubSub, this.props.pluginDataFetchers, this.availableForPlugins);
69648
- const context = { id: track.uid, trackUid: track.uid, trackType: track.type, viewUid: this.viewUid, pubSub: this.props.pubSub, scene: this.pStage, dataConfig, dataFetcher, getLockGroupExtrema: () => this.currentProps.getLockGroupExtrema(track.uid), handleTilesetInfoReceived, animate: () => {
69714
+ if (!this.pStage || !this.svgElement) {
69715
+ throw new Error("No PIXI stage or svg element");
69716
+ }
69717
+ const context = { id: track.uid, trackUid: track.uid, trackType: track.type, viewUid: this.viewUid, pubSub: this.props.pubSub, scene: this.pStage, dataConfig, dataFetcher, getLockGroupExtrema: () => this.currentProps.getLockGroupExtrema(track.uid), handleTilesetInfoReceived: (tilesetInfo) => {
69718
+ this.currentProps.onTilesetInfoReceived(track.uid, tilesetInfo);
69719
+ }, animate: () => {
69649
69720
  this.currentProps.onNewTilesLoaded(track.uid);
69650
69721
  }, svgElement: this.svgElement, isValueScaleLocked: () => this.currentProps.isValueScaleLocked(track.uid), onValueScaleChanged: () => {
69651
69722
  this.currentProps.onValueScaleChanged(track.uid);
@@ -69716,7 +69787,7 @@ function _toPrimitive2(input, hint) {
69716
69787
  context.setDomainsCallback = track.setDomainsCallback;
69717
69788
  return new ViewportTracker2D$1(context, options2);
69718
69789
  }
69719
- return new Track(context, options2);
69790
+ return new Track(context);
69720
69791
  case "viewport-projection-horizontal":
69721
69792
  if (track.registerViewportChanged && track.removeViewportChanged && track.setDomainsCallback) {
69722
69793
  context.registerViewportChanged = track.registerViewportChanged;
@@ -69724,7 +69795,7 @@ function _toPrimitive2(input, hint) {
69724
69795
  context.setDomainsCallback = track.setDomainsCallback;
69725
69796
  return new ViewportTrackerHorizontal(context, options2);
69726
69797
  }
69727
- return new Track(context, options2);
69798
+ return new Track(context);
69728
69799
  case "viewport-projection-vertical":
69729
69800
  if (track.registerViewportChanged && track.removeViewportChanged && track.setDomainsCallback) {
69730
69801
  context.registerViewportChanged = track.registerViewportChanged;
@@ -69732,7 +69803,7 @@ function _toPrimitive2(input, hint) {
69732
69803
  context.setDomainsCallback = track.setDomainsCallback;
69733
69804
  return new ViewportTrackerVertical(context, options2);
69734
69805
  }
69735
- return new Track(context, options2);
69806
+ return new Track(context);
69736
69807
  case "gene-annotations":
69737
69808
  case "horizontal-gene-annotations":
69738
69809
  case "vertical-gene-annotations":
@@ -69755,7 +69826,7 @@ function _toPrimitive2(input, hint) {
69755
69826
  case "combined":
69756
69827
  context.tracks = track.contents;
69757
69828
  context.createTrackObject = this.createTrackObject.bind(this);
69758
- return new CombinedTrack(context, options2);
69829
+ return new CombinedTrack(context);
69759
69830
  case "2d-chromosome-labels":
69760
69831
  return new Chromosome2DLabels(context, options2);
69761
69832
  case "horizontal-chromosome-grid":
@@ -69899,11 +69970,13 @@ function _toPrimitive2(input, hint) {
69899
69970
  this.eventTracker.removeEventListener("pointerleave", this.boundForwardEvent);
69900
69971
  window.removeEventListener("scroll", this.boundScrollEvent);
69901
69972
  } }, { key: "scrollEvent", value: function scrollEvent() {
69973
+ if (!this.element)
69974
+ return;
69902
69975
  this.elementPos = this.element.getBoundingClientRect();
69903
- } }, { key: "forwardEvent", value: function forwardEvent2(e) {
69904
- e.sourceUid = this.uid;
69905
- e.forwarded = true;
69906
- this.props.pubSub.publish("app.event", e);
69976
+ } }, { key: "forwardEvent", value: function forwardEvent2(event) {
69977
+ event.sourceUid = this.uid;
69978
+ event.forwarded = true;
69979
+ this.props.pubSub.publish("app.event", event);
69907
69980
  } }, { key: "onScrollHandler", value: function onScrollHandler(scrollTop) {
69908
69981
  this.scrollTop = scrollTop;
69909
69982
  } }, { key: "render", value: function render2() {
@@ -69918,7 +69991,7 @@ function _toPrimitive2(input, hint) {
69918
69991
  return TrackRenderer2;
69919
69992
  }(React__default.default.Component);
69920
69993
  TrackRenderer.defaultProps = { pluginDataFetchers: {}, pluginTracks: {}, canvasElement: null, centerHeight: 0, centerWidth: 0, children: [], galleryDim: 0, height: 0, initialXDomain: [], initialYDomain: [], isShowGlobalMousePosition: false, isRangeSelection: false, leftWidth: 0, leftWidthNoGallery: 0, paddingLeft: 0, paddingTop: 0, positionedTracks: [], topHeight: 0, topHeightNoGallery: 0, width: 0, metaTracks: [] };
69921
- TrackRenderer.propTypes = { canvasElement: propTypes$3.exports.object, centerHeight: propTypes$3.exports.number, centerWidth: propTypes$3.exports.number, children: propTypes$3.exports.array, disableTrackMenu: propTypes$3.exports.bool, galleryDim: propTypes$3.exports.number, height: propTypes$3.exports.number, initialXDomain: propTypes$3.exports.array, initialYDomain: propTypes$3.exports.array, isShowGlobalMousePosition: propTypes$3.exports.bool, isRangeSelection: propTypes$3.exports.bool, leftWidth: propTypes$3.exports.number, leftWidthNoGallery: propTypes$3.exports.number, paddingLeft: propTypes$3.exports.number, paddingTop: propTypes$3.exports.number, metaTracks: propTypes$3.exports.array, onMouseMoveZoom: propTypes$3.exports.func, onNewTilesLoaded: propTypes$3.exports.func.isRequired, onScalesChanged: propTypes$3.exports.func.isRequired, pixiRenderer: propTypes$3.exports.object.isRequired, pixiStage: propTypes$3.exports.object.isRequired, pluginDataFetchers: propTypes$3.exports.object, pluginTracks: propTypes$3.exports.object, positionedTracks: propTypes$3.exports.array, pubSub: propTypes$3.exports.object.isRequired, setCentersFunction: propTypes$3.exports.func, svgElement: propTypes$3.exports.object.isRequired, theme: propTypes$3.exports.symbol.isRequired, topHeight: propTypes$3.exports.number, topHeightNoGallery: propTypes$3.exports.number, viewOptions: propTypes$3.exports.object, width: propTypes$3.exports.number, xDomainLimits: propTypes$3.exports.array, yDomainLimits: propTypes$3.exports.array, valueScaleZoom: propTypes$3.exports.bool, zoomable: propTypes$3.exports.bool.isRequired, zoomDomain: propTypes$3.exports.array };
69994
+ TrackRenderer.propTypes = { canvasElement: propTypes$3.exports.object, centerHeight: propTypes$3.exports.number, centerWidth: propTypes$3.exports.number, children: propTypes$3.exports.array, disableTrackMenu: propTypes$3.exports.bool, galleryDim: propTypes$3.exports.number, height: propTypes$3.exports.number, initialXDomain: propTypes$3.exports.array, initialYDomain: propTypes$3.exports.array, isShowGlobalMousePosition: propTypes$3.exports.bool, isRangeSelection: propTypes$3.exports.bool, leftWidth: propTypes$3.exports.number, leftWidthNoGallery: propTypes$3.exports.number, paddingLeft: propTypes$3.exports.number, paddingTop: propTypes$3.exports.number, metaTracks: propTypes$3.exports.array, onMouseMoveZoom: propTypes$3.exports.func, onNewTilesLoaded: propTypes$3.exports.func.isRequired, onScalesChanged: propTypes$3.exports.func.isRequired, pixiRenderer: propTypes$3.exports.object.isRequired, pixiStage: propTypes$3.exports.object.isRequired, pluginDataFetchers: propTypes$3.exports.object, pluginTracks: propTypes$3.exports.object, positionedTracks: propTypes$3.exports.array, pubSub: propTypes$3.exports.object.isRequired, setCentersFunction: propTypes$3.exports.func, svgElement: propTypes$3.exports.object.isRequired, theme: propTypes$3.exports.symbol.isRequired, topHeight: propTypes$3.exports.number, topHeightNoGallery: propTypes$3.exports.number, viewOptions: propTypes$3.exports.object, width: propTypes$3.exports.number, xDomainLimits: propTypes$3.exports.array, yDomainLimits: propTypes$3.exports.array, valueScaleZoom: propTypes$3.exports.bool, zoomable: propTypes$3.exports.bool.isRequired, zoomDomain: propTypes$3.exports.array, uid: propTypes$3.exports.string, zoomLimits: propTypes$3.exports.array };
69922
69995
  const TrackRenderer$1 = withPubSub(withTheme(TrackRenderer));
69923
69996
  var index_browser = { exports: {} };
69924
69997
  /*! react-checkbox-tree - v1.8.0 | 2022 */
@@ -78148,7 +78221,7 @@ function _toPrimitive2(input, hint) {
78148
78221
  $it.schema = $schema2;
78149
78222
  $it.schemaPath = $schemaPath;
78150
78223
  $it.errSchemaPath = $errSchemaPath;
78151
- out += " for (var " + $idx + " = " + 0 + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { ";
78224
+ out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { ";
78152
78225
  $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
78153
78226
  var $passData = $data + "[" + $idx + "]";
78154
78227
  $it.dataPathArr[$dataNxt] = $idx;