@vitessce/all 3.3.9 → 3.3.10

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.
@@ -10043,8 +10043,11 @@ const CoordinationType$1 = {
10043
10043
  PHOTOMETRIC_INTERPRETATION: "photometricInterpretation",
10044
10044
  // For 3D volume rendering
10045
10045
  SPATIAL_RENDERING_MODE: "spatialRenderingMode",
10046
+ // For whole spatial view
10046
10047
  VOLUMETRIC_RENDERING_ALGORITHM: "volumetricRenderingAlgorithm",
10048
+ // Could be per-image-layer
10047
10049
  SPATIAL_TARGET_RESOLUTION: "spatialTargetResolution",
10050
+ // Per-spatial-layer
10048
10051
  // For clipping plane sliders
10049
10052
  SPATIAL_SLICE_X: "spatialSliceX",
10050
10053
  SPATIAL_SLICE_Y: "spatialSliceY",
@@ -10053,10 +10056,12 @@ const CoordinationType$1 = {
10053
10056
  SPOT_LAYER: "spotLayer",
10054
10057
  POINT_LAYER: "pointLayer",
10055
10058
  SPATIAL_SPOT_RADIUS: "spatialSpotRadius",
10059
+ // In micrometers?
10056
10060
  SPATIAL_SPOT_FILLED: "spatialSpotFilled",
10057
10061
  SPATIAL_SPOT_STROKE_WIDTH: "spatialSpotStrokeWidth",
10058
10062
  SPATIAL_LAYER_COLOR: "spatialLayerColor",
10059
10063
  PIXEL_HIGHLIGHT: "pixelHighlight",
10064
+ // Per-image-layer
10060
10065
  TOOLTIP_CROSSHAIRS_VISIBLE: "tooltipCrosshairsVisible",
10061
10066
  LEGEND_VISIBLE: "legendVisible",
10062
10067
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
@@ -15849,7 +15854,7 @@ function getStylesCreator(stylesOrCreator) {
15849
15854
  }
15850
15855
  }
15851
15856
  return {
15852
- create: function create5(theme, name2) {
15857
+ create: function create6(theme, name2) {
15853
15858
  var styles35;
15854
15859
  try {
15855
15860
  styles35 = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;
@@ -24968,7 +24973,7 @@ var classCallCheck$1 = function(instance, Constructor) {
24968
24973
  }
24969
24974
  };
24970
24975
  var createClass$1 = function() {
24971
- function defineProperties3(target2, props2) {
24976
+ function defineProperties4(target2, props2) {
24972
24977
  for (var i2 = 0; i2 < props2.length; i2++) {
24973
24978
  var descriptor2 = props2[i2];
24974
24979
  descriptor2.enumerable = descriptor2.enumerable || false;
@@ -24980,9 +24985,9 @@ var createClass$1 = function() {
24980
24985
  }
24981
24986
  return function(Constructor, protoProps, staticProps) {
24982
24987
  if (protoProps)
24983
- defineProperties3(Constructor.prototype, protoProps);
24988
+ defineProperties4(Constructor.prototype, protoProps);
24984
24989
  if (staticProps)
24985
- defineProperties3(Constructor, staticProps);
24990
+ defineProperties4(Constructor, staticProps);
24986
24991
  return Constructor;
24987
24992
  };
24988
24993
  }();
@@ -39084,10 +39089,10 @@ var _propertyDesc = function(bitmap, value2) {
39084
39089
  value: value2
39085
39090
  };
39086
39091
  };
39087
- var dP$1 = require_objectDp();
39092
+ var dP$2 = require_objectDp();
39088
39093
  var createDesc$2 = _propertyDesc;
39089
39094
  var _hide = require_descriptors() ? function(object2, key2, value2) {
39090
- return dP$1.f(object2, key2, createDesc$2(1, value2));
39095
+ return dP$2.f(object2, key2, createDesc$2(1, value2));
39091
39096
  } : function(object2, key2, value2) {
39092
39097
  object2[key2] = value2;
39093
39098
  return object2;
@@ -39101,7 +39106,7 @@ var core$3 = _coreExports;
39101
39106
  var ctx = _ctx;
39102
39107
  var hide$2 = _hide;
39103
39108
  var has$a = _has$1;
39104
- var PROTOTYPE$1 = "prototype";
39109
+ var PROTOTYPE$2 = "prototype";
39105
39110
  var $export$6 = function(type2, name2, source2) {
39106
39111
  var IS_FORCED = type2 & $export$6.F;
39107
39112
  var IS_GLOBAL = type2 & $export$6.G;
@@ -39110,8 +39115,8 @@ var $export$6 = function(type2, name2, source2) {
39110
39115
  var IS_BIND = type2 & $export$6.B;
39111
39116
  var IS_WRAP = type2 & $export$6.W;
39112
39117
  var exports2 = IS_GLOBAL ? core$3 : core$3[name2] || (core$3[name2] = {});
39113
- var expProto = exports2[PROTOTYPE$1];
39114
- var target2 = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name2] : (global$5[name2] || {})[PROTOTYPE$1];
39118
+ var expProto = exports2[PROTOTYPE$2];
39119
+ var target2 = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name2] : (global$5[name2] || {})[PROTOTYPE$2];
39115
39120
  var key2, own, out;
39116
39121
  if (IS_GLOBAL)
39117
39122
  source2 = name2;
@@ -39135,7 +39140,7 @@ var $export$6 = function(type2, name2, source2) {
39135
39140
  }
39136
39141
  return C3.apply(this, arguments);
39137
39142
  };
39138
- F[PROTOTYPE$1] = C3[PROTOTYPE$1];
39143
+ F[PROTOTYPE$2] = C3[PROTOTYPE$2];
39139
39144
  return F;
39140
39145
  }(out) : IS_PROTO && typeof out == "function" ? ctx(Function.call, out) : out;
39141
39146
  if (IS_PROTO) {
@@ -39240,30 +39245,22 @@ var px$1 = Math.random();
39240
39245
  var _uid = function(key2) {
39241
39246
  return "Symbol(".concat(key2 === void 0 ? "" : key2, ")_", (++id$3 + px$1).toString(36));
39242
39247
  };
39243
- var _sharedKey;
39244
- var hasRequired_sharedKey;
39245
- function require_sharedKey() {
39246
- if (hasRequired_sharedKey)
39247
- return _sharedKey;
39248
- hasRequired_sharedKey = 1;
39249
- var shared2 = _sharedExports("keys");
39250
- var uid2 = _uid;
39251
- _sharedKey = function(key2) {
39252
- return shared2[key2] || (shared2[key2] = uid2(key2));
39253
- };
39254
- return _sharedKey;
39255
- }
39248
+ var shared$1 = _sharedExports("keys");
39249
+ var uid$3 = _uid;
39250
+ var _sharedKey = function(key2) {
39251
+ return shared$1[key2] || (shared$1[key2] = uid$3(key2));
39252
+ };
39256
39253
  var has$9 = _has$1;
39257
39254
  var toIObject$4 = _toIobject;
39258
39255
  var arrayIndexOf = _arrayIncludes(false);
39259
- var IE_PROTO$1 = require_sharedKey()("IE_PROTO");
39256
+ var IE_PROTO$2 = _sharedKey("IE_PROTO");
39260
39257
  var _objectKeysInternal = function(object2, names) {
39261
39258
  var O = toIObject$4(object2);
39262
39259
  var i2 = 0;
39263
39260
  var result = [];
39264
39261
  var key2;
39265
39262
  for (key2 in O)
39266
- if (key2 != IE_PROTO$1)
39263
+ if (key2 != IE_PROTO$2)
39267
39264
  has$9(O, key2) && result.push(key2);
39268
39265
  while (names.length > i2)
39269
39266
  if (has$9(O, key2 = names[i2++])) {
@@ -39273,9 +39270,9 @@ var _objectKeysInternal = function(object2, names) {
39273
39270
  };
39274
39271
  var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
39275
39272
  var $keys$2 = _objectKeysInternal;
39276
- var enumBugKeys = _enumBugKeys;
39273
+ var enumBugKeys$1 = _enumBugKeys;
39277
39274
  var _objectKeys$1 = Object.keys || function keys(O) {
39278
- return $keys$2(O, enumBugKeys);
39275
+ return $keys$2(O, enumBugKeys$1);
39279
39276
  };
39280
39277
  var _objectGops = {};
39281
39278
  _objectGops.f = Object.getOwnPropertySymbols;
@@ -39393,7 +39390,7 @@ function _interopRequireDefault$o(obj) {
39393
39390
  return obj && obj.__esModule ? obj : { default: obj };
39394
39391
  }
39395
39392
  var _default$5 = function() {
39396
- function defineProperties3(target2, props2) {
39393
+ function defineProperties4(target2, props2) {
39397
39394
  for (var i2 = 0; i2 < props2.length; i2++) {
39398
39395
  var descriptor2 = props2[i2];
39399
39396
  descriptor2.enumerable = descriptor2.enumerable || false;
@@ -39405,9 +39402,9 @@ var _default$5 = function() {
39405
39402
  }
39406
39403
  return function(Constructor, protoProps, staticProps) {
39407
39404
  if (protoProps)
39408
- defineProperties3(Constructor.prototype, protoProps);
39405
+ defineProperties4(Constructor.prototype, protoProps);
39409
39406
  if (staticProps)
39410
- defineProperties3(Constructor, staticProps);
39407
+ defineProperties4(Constructor, staticProps);
39411
39408
  return Constructor;
39412
39409
  };
39413
39410
  }();
@@ -39428,27 +39425,19 @@ var _stringAt = function(TO_STRING) {
39428
39425
  };
39429
39426
  var _redefine = _hide;
39430
39427
  var _iterators = {};
39431
- var _objectDps;
39432
- var hasRequired_objectDps;
39433
- function require_objectDps() {
39434
- if (hasRequired_objectDps)
39435
- return _objectDps;
39436
- hasRequired_objectDps = 1;
39437
- var dP2 = require_objectDp();
39438
- var anObject2 = _anObject;
39439
- var getKeys2 = _objectKeys$1;
39440
- _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties3(O, Properties) {
39441
- anObject2(O);
39442
- var keys4 = getKeys2(Properties);
39443
- var length2 = keys4.length;
39444
- var i2 = 0;
39445
- var P2;
39446
- while (length2 > i2)
39447
- dP2.f(O, P2 = keys4[i2++], Properties[P2]);
39448
- return O;
39449
- };
39450
- return _objectDps;
39451
- }
39428
+ var dP$1 = require_objectDp();
39429
+ var anObject$2 = _anObject;
39430
+ var getKeys$1 = _objectKeys$1;
39431
+ var _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
39432
+ anObject$2(O);
39433
+ var keys4 = getKeys$1(Properties);
39434
+ var length2 = keys4.length;
39435
+ var i2 = 0;
39436
+ var P2;
39437
+ while (length2 > i2)
39438
+ dP$1.f(O, P2 = keys4[i2++], Properties[P2]);
39439
+ return O;
39440
+ };
39452
39441
  var _html;
39453
39442
  var hasRequired_html;
39454
39443
  function require_html() {
@@ -39459,50 +39448,42 @@ function require_html() {
39459
39448
  _html = document2 && document2.documentElement;
39460
39449
  return _html;
39461
39450
  }
39462
- var _objectCreate;
39463
- var hasRequired_objectCreate;
39464
- function require_objectCreate() {
39465
- if (hasRequired_objectCreate)
39466
- return _objectCreate;
39467
- hasRequired_objectCreate = 1;
39468
- var anObject2 = _anObject;
39469
- var dPs = require_objectDps();
39470
- var enumBugKeys2 = _enumBugKeys;
39471
- var IE_PROTO2 = require_sharedKey()("IE_PROTO");
39472
- var Empty2 = function() {
39473
- };
39474
- var PROTOTYPE2 = "prototype";
39475
- var createDict = function() {
39476
- var iframe = require_domCreate()("iframe");
39477
- var i2 = enumBugKeys2.length;
39478
- var lt2 = "<";
39479
- var gt2 = ">";
39480
- var iframeDocument;
39481
- iframe.style.display = "none";
39482
- require_html().appendChild(iframe);
39483
- iframe.src = "javascript:";
39484
- iframeDocument = iframe.contentWindow.document;
39485
- iframeDocument.open();
39486
- iframeDocument.write(lt2 + "script" + gt2 + "document.F=Object" + lt2 + "/script" + gt2);
39487
- iframeDocument.close();
39488
- createDict = iframeDocument.F;
39489
- while (i2--)
39490
- delete createDict[PROTOTYPE2][enumBugKeys2[i2]];
39491
- return createDict();
39492
- };
39493
- _objectCreate = Object.create || function create5(O, Properties) {
39494
- var result;
39495
- if (O !== null) {
39496
- Empty2[PROTOTYPE2] = anObject2(O);
39497
- result = new Empty2();
39498
- Empty2[PROTOTYPE2] = null;
39499
- result[IE_PROTO2] = O;
39500
- } else
39501
- result = createDict();
39502
- return Properties === void 0 ? result : dPs(result, Properties);
39503
- };
39504
- return _objectCreate;
39505
- }
39451
+ var anObject$1 = _anObject;
39452
+ var dPs = _objectDps;
39453
+ var enumBugKeys = _enumBugKeys;
39454
+ var IE_PROTO$1 = _sharedKey("IE_PROTO");
39455
+ var Empty$2 = function() {
39456
+ };
39457
+ var PROTOTYPE$1 = "prototype";
39458
+ var createDict = function() {
39459
+ var iframe = require_domCreate()("iframe");
39460
+ var i2 = enumBugKeys.length;
39461
+ var lt2 = "<";
39462
+ var gt2 = ">";
39463
+ var iframeDocument;
39464
+ iframe.style.display = "none";
39465
+ require_html().appendChild(iframe);
39466
+ iframe.src = "javascript:";
39467
+ iframeDocument = iframe.contentWindow.document;
39468
+ iframeDocument.open();
39469
+ iframeDocument.write(lt2 + "script" + gt2 + "document.F=Object" + lt2 + "/script" + gt2);
39470
+ iframeDocument.close();
39471
+ createDict = iframeDocument.F;
39472
+ while (i2--)
39473
+ delete createDict[PROTOTYPE$1][enumBugKeys[i2]];
39474
+ return createDict();
39475
+ };
39476
+ var _objectCreate = Object.create || function create2(O, Properties) {
39477
+ var result;
39478
+ if (O !== null) {
39479
+ Empty$2[PROTOTYPE$1] = anObject$1(O);
39480
+ result = new Empty$2();
39481
+ Empty$2[PROTOTYPE$1] = null;
39482
+ result[IE_PROTO$1] = O;
39483
+ } else
39484
+ result = createDict();
39485
+ return Properties === void 0 ? result : dPs(result, Properties);
39486
+ };
39506
39487
  var _wks = { exports: {} };
39507
39488
  var store = _sharedExports("wks");
39508
39489
  var uid$2 = _uid;
@@ -39520,7 +39501,7 @@ var _setToStringTag = function(it, tag2, stat) {
39520
39501
  if (it && !has$8(it = stat ? it : it.prototype, TAG))
39521
39502
  def$1(it, TAG, { configurable: true, value: tag2 });
39522
39503
  };
39523
- var create$b = require_objectCreate();
39504
+ var create$b = _objectCreate;
39524
39505
  var descriptor = _propertyDesc;
39525
39506
  var setToStringTag$2 = _setToStringTag;
39526
39507
  var IteratorPrototype$2 = {};
@@ -39533,7 +39514,7 @@ var _iterCreate = function(Constructor, NAME2, next3) {
39533
39514
  };
39534
39515
  var has$7 = _has$1;
39535
39516
  var toObject$2 = _toObject;
39536
- var IE_PROTO = require_sharedKey()("IE_PROTO");
39517
+ var IE_PROTO = _sharedKey("IE_PROTO");
39537
39518
  var ObjectProto$1 = Object.prototype;
39538
39519
  var _objectGpo = Object.getPrototypeOf || function(O) {
39539
39520
  O = toObject$2(O);
@@ -39696,23 +39677,23 @@ var setMeta = function(it) {
39696
39677
  // weak collections IDs
39697
39678
  } });
39698
39679
  };
39699
- var fastKey = function(it, create5) {
39680
+ var fastKey = function(it, create6) {
39700
39681
  if (!isObject$h(it))
39701
39682
  return typeof it == "symbol" ? it : (typeof it == "string" ? "S" : "P") + it;
39702
39683
  if (!has$6(it, META$1)) {
39703
39684
  if (!isExtensible(it))
39704
39685
  return "F";
39705
- if (!create5)
39686
+ if (!create6)
39706
39687
  return "E";
39707
39688
  setMeta(it);
39708
39689
  }
39709
39690
  return it[META$1].i;
39710
39691
  };
39711
- var getWeak = function(it, create5) {
39692
+ var getWeak = function(it, create6) {
39712
39693
  if (!has$6(it, META$1)) {
39713
39694
  if (!isExtensible(it))
39714
39695
  return true;
39715
- if (!create5)
39696
+ if (!create6)
39716
39697
  return false;
39717
39698
  setMeta(it);
39718
39699
  }
@@ -39821,7 +39802,7 @@ var toObject$1 = _toObject;
39821
39802
  var toIObject = _toIobject;
39822
39803
  var toPrimitive = _toPrimitive;
39823
39804
  var createDesc = _propertyDesc;
39824
- var _create$1 = require_objectCreate();
39805
+ var _create$1 = _objectCreate;
39825
39806
  var gOPNExt = _objectGopnExt;
39826
39807
  var $GOPD = _objectGopd;
39827
39808
  var $GOPS = _objectGops;
@@ -39888,7 +39869,7 @@ var $defineProperty$1 = function defineProperty2(it, key2, D2) {
39888
39869
  }
39889
39870
  return dP(it, key2, D2);
39890
39871
  };
39891
- var $defineProperties = function defineProperties(it, P2) {
39872
+ var $defineProperties = function defineProperties2(it, P2) {
39892
39873
  anObject(it);
39893
39874
  var keys4 = enumKeys(P2 = toIObject(P2));
39894
39875
  var i2 = 0;
@@ -39898,7 +39879,7 @@ var $defineProperties = function defineProperties(it, P2) {
39898
39879
  $defineProperty$1(it, key2 = keys4[i2++], P2[key2]);
39899
39880
  return it;
39900
39881
  };
39901
- var $create = function create2(it, P2) {
39882
+ var $create = function create3(it, P2) {
39902
39883
  return P2 === void 0 ? _create$1(it) : $defineProperties(_create$1(it), P2);
39903
39884
  };
39904
39885
  var $propertyIsEnumerable = function propertyIsEnumerable(key2) {
@@ -40125,9 +40106,9 @@ $export$1($export$1.S, "Object", { setPrototypeOf: require_setProto().set });
40125
40106
  var setPrototypeOf$2 = _coreExports.Object.setPrototypeOf;
40126
40107
  var setPrototypeOf$1 = { "default": setPrototypeOf$2, __esModule: true };
40127
40108
  var $export = _export;
40128
- $export($export.S, "Object", { create: require_objectCreate() });
40109
+ $export($export.S, "Object", { create: _objectCreate });
40129
40110
  var $Object$1 = _coreExports.Object;
40130
- var create$a = function create3(P2, D2) {
40111
+ var create$a = function create4(P2, D2) {
40131
40112
  return $Object$1.create(P2, D2);
40132
40113
  };
40133
40114
  var create$9 = { "default": create$a, __esModule: true };
@@ -46885,7 +46866,9 @@ const useStyles$o = makeStyles((theme) => ({
46885
46866
  height: "auto",
46886
46867
  display: "block",
46887
46868
  paddingRight: "17px",
46869
+ /* Increase/decrease this value for cross-browser compatibility */
46888
46870
  boxSizing: "content-box",
46871
+ /* So the width will be 100% + 17px */
46889
46872
  "@global .rc-tree": {
46890
46873
  paddingLeft: "0",
46891
46874
  margin: "0",
@@ -47185,6 +47168,7 @@ const useHelpTooltipStyles = makeStyles((theme) => ({
47185
47168
  maxWidth: "250px",
47186
47169
  visibility: "visible",
47187
47170
  paddingTop: "8px",
47171
+ // Assumes placement: 'top'
47188
47172
  ...helpTooltipCommon,
47189
47173
  "@global .rc-tooltip-inner": {
47190
47174
  fontSize: "10px",
@@ -47212,6 +47196,7 @@ const useHelpTooltipStyles = makeStyles((theme) => ({
47212
47196
  cursor: "auto",
47213
47197
  userSelect: "text",
47214
47198
  paddingBottom: "10px",
47199
+ // Assumes placement: 'top'
47215
47200
  "&.rc-tooltip-placement-top": {
47216
47201
  paddingBottom: "10px"
47217
47202
  },
@@ -93926,11 +93911,11 @@ class Tileset2D {
93926
93911
  this._dirty = false;
93927
93912
  }
93928
93913
  }
93929
- _getTile(index2, create5) {
93914
+ _getTile(index2, create6) {
93930
93915
  const id2 = this.getTileId(index2);
93931
93916
  let tile = this._cache.get(id2);
93932
93917
  let needsReload = false;
93933
- if (!tile && create5) {
93918
+ if (!tile && create6) {
93934
93919
  tile = new Tile2DHeader(index2);
93935
93920
  Object.assign(tile, this.getTileMetadata(tile.index));
93936
93921
  Object.assign(tile, {
@@ -122180,7 +122165,7 @@ var defineProperty$2 = function(object2, name2, value2, predicate) {
122180
122165
  object2[name2] = value2;
122181
122166
  }
122182
122167
  };
122183
- var defineProperties2 = function(object2, map2) {
122168
+ var defineProperties3 = function(object2, map2) {
122184
122169
  var predicates = arguments.length > 2 ? arguments[2] : {};
122185
122170
  var props2 = keys$4(map2);
122186
122171
  if (hasSymbols2) {
@@ -122190,8 +122175,8 @@ var defineProperties2 = function(object2, map2) {
122190
122175
  defineProperty$2(object2, props2[i2], map2[props2[i2]], predicates[props2[i2]]);
122191
122176
  }
122192
122177
  };
122193
- defineProperties2.supportsDescriptors = !!supportsDescriptors$2;
122194
- var defineProperties_1 = defineProperties2;
122178
+ defineProperties3.supportsDescriptors = !!supportsDescriptors$2;
122179
+ var defineProperties_1 = defineProperties3;
122195
122180
  var numberIsNaN = function(value2) {
122196
122181
  return value2 !== value2;
122197
122182
  };
@@ -156421,16 +156406,16 @@ async function getDecoder(fileDirectory) {
156421
156406
  const Decoder = await importFn();
156422
156407
  return new Decoder(fileDirectory);
156423
156408
  }
156424
- addDecoder([void 0, 1], () => import("./raw-5ddb5b7f.js").then((m2) => m2.default));
156425
- addDecoder(5, () => import("./lzw-ee8021e0.js").then((m2) => m2.default));
156409
+ addDecoder([void 0, 1], () => import("./raw-221c7288.js").then((m2) => m2.default));
156410
+ addDecoder(5, () => import("./lzw-67b71961.js").then((m2) => m2.default));
156426
156411
  addDecoder(6, () => {
156427
156412
  throw new Error("old style JPEG compression is not supported.");
156428
156413
  });
156429
- addDecoder(7, () => import("./jpeg-773ebeec.js").then((m2) => m2.default));
156430
- addDecoder([8, 32946], () => import("./deflate-8ecc37d7.js").then((m2) => m2.default));
156431
- addDecoder(32773, () => import("./packbits-40c62302.js").then((m2) => m2.default));
156432
- addDecoder(34887, () => import("./lerc-cd64e4aa.js").then((m2) => m2.default));
156433
- addDecoder(50001, () => import("./webimage-50369c59.js").then((m2) => m2.default));
156414
+ addDecoder(7, () => import("./jpeg-7e1ceac4.js").then((m2) => m2.default));
156415
+ addDecoder([8, 32946], () => import("./deflate-7c420d06.js").then((m2) => m2.default));
156416
+ addDecoder(32773, () => import("./packbits-d95ea21b.js").then((m2) => m2.default));
156417
+ addDecoder(34887, () => import("./lerc-54fe9485.js").then((m2) => m2.default));
156418
+ addDecoder(50001, () => import("./webimage-e90de519.js").then((m2) => m2.default));
156434
156419
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
156435
156420
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
156436
156421
  }
@@ -172693,18 +172678,18 @@ function selection_lower() {
172693
172678
  return this.each(lower);
172694
172679
  }
172695
172680
  function selection_append(name2) {
172696
- var create5 = typeof name2 === "function" ? name2 : creator(name2);
172681
+ var create6 = typeof name2 === "function" ? name2 : creator(name2);
172697
172682
  return this.select(function() {
172698
- return this.appendChild(create5.apply(this, arguments));
172683
+ return this.appendChild(create6.apply(this, arguments));
172699
172684
  });
172700
172685
  }
172701
172686
  function constantNull() {
172702
172687
  return null;
172703
172688
  }
172704
172689
  function selection_insert(name2, before) {
172705
- var create5 = typeof name2 === "function" ? name2 : creator(name2), select2 = before == null ? constantNull : typeof before === "function" ? before : selector(before);
172690
+ var create6 = typeof name2 === "function" ? name2 : creator(name2), select2 = before == null ? constantNull : typeof before === "function" ? before : selector(before);
172706
172691
  return this.select(function() {
172707
- return this.insertBefore(create5.apply(this, arguments), select2.apply(this, arguments) || null);
172692
+ return this.insertBefore(create6.apply(this, arguments), select2.apply(this, arguments) || null);
172708
172693
  });
172709
172694
  }
172710
172695
  function remove$1() {
@@ -176724,7 +176709,7 @@ var typedFunction$1 = { exports: {} };
176724
176709
  function undef() {
176725
176710
  return void 0;
176726
176711
  }
176727
- function create5() {
176712
+ function create6() {
176728
176713
  var _types = [
176729
176714
  { name: "number", test: function(x2) {
176730
176715
  return typeof x2 === "number";
@@ -177476,7 +177461,7 @@ var typedFunction$1 = { exports: {} };
177476
177461
  return createTypedFunction(name2, extractSignatures(fns));
177477
177462
  }
177478
177463
  });
177479
- typed2.create = create5;
177464
+ typed2.create = create6;
177480
177465
  typed2.types = _types;
177481
177466
  typed2.conversions = _conversions;
177482
177467
  typed2.ignore = _ignore;
@@ -177507,7 +177492,7 @@ var typedFunction$1 = { exports: {} };
177507
177492
  };
177508
177493
  return typed2;
177509
177494
  }
177510
- return create5();
177495
+ return create6();
177511
177496
  });
177512
177497
  })(typedFunction$1);
177513
177498
  var typedFunctionExports = typedFunction$1.exports;
@@ -178219,11 +178204,11 @@ function getArrayDataType(array2, typeOf2) {
178219
178204
  }
178220
178205
  return type2;
178221
178206
  }
178222
- function factory(name2, dependencies2, create5, meta2) {
178207
+ function factory(name2, dependencies2, create6, meta2) {
178223
178208
  function assertAndCreate(scope) {
178224
178209
  var deps = pickShallow(scope, dependencies2.map(stripOptionalNotation));
178225
178210
  assertDependencies(name2, dependencies2, scope);
178226
- return create5(deps);
178211
+ return create6(deps);
178227
178212
  }
178228
178213
  assertAndCreate.isFactory = true;
178229
178214
  assertAndCreate.fn = name2;
@@ -194326,10 +194311,11 @@ class ZipFileStore {
194326
194311
  const ZipFileStore$1 = ZipFileStore;
194327
194312
  function zarrOpenRoot(url, fileType, requestInit2) {
194328
194313
  let store2;
194314
+ const opts2 = requestInit2 ? { overrides: requestInit2 } : void 0;
194329
194315
  if (fileType && fileType.endsWith(".zip")) {
194330
- store2 = ZipFileStore$1.fromUrl(url, { overrides: requestInit2 });
194316
+ store2 = ZipFileStore$1.fromUrl(url, opts2);
194331
194317
  } else {
194332
- store2 = new FetchStore$1(url, { overrides: requestInit2 });
194318
+ store2 = new FetchStore$1(url, opts2);
194333
194319
  }
194334
194320
  return root(store2);
194335
194321
  }
@@ -196075,10 +196061,15 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
196075
196061
  excludeBackground: true,
196076
196062
  onViewportLoad: () => {
196077
196063
  },
196064
+ // layerProps.callback, // TODO: figure out callback implementation
196078
196065
  colorScaleLo: 0,
196066
+ // TODO: check if these can be removed?
196079
196067
  colorScaleHi: 1,
196068
+ // TODO: check if these can be removed?
196080
196069
  isExpressionMode: false,
196070
+ // TODO: check if these can be removed?
196081
196071
  colormap: null,
196072
+ // TODO: check if these can be removed?
196082
196073
  expressionData: this.expression.data,
196083
196074
  // There is no onHover here,
196084
196075
  // see the onHover method of AbstractSpatialOrScatterplot.
@@ -196166,6 +196157,7 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
196166
196157
  zSlice: layerCoordination[CoordinationType$1.SPATIAL_SLICE_Z],
196167
196158
  onViewportLoad: () => {
196168
196159
  },
196160
+ // layerProps.callback, // TODO: figure out callback implementation
196169
196161
  excludeBackground: useTransparentColor,
196170
196162
  extensions,
196171
196163
  // Picking / onHover on the root DeckGL component
@@ -196360,7 +196352,9 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
196360
196352
  }
196361
196353
  this.segmentationColors[layerScope][channelScope] = {
196362
196354
  setColorIndices: obsColorIndices,
196355
+ // The Map from cell ID to color index.
196363
196356
  setColors: obsSetColor,
196357
+ // The array with [{ path, color: [r, g, b] }, ...].
196364
196358
  obsIndex: layerIndex
196365
196359
  // TODO: how to ensure obsIndex.length matches the number of cells
196366
196360
  };
@@ -202496,7 +202490,9 @@ const useStyles$i = makeStyles((theme) => ({
202496
202490
  /* background-color only for content */
202497
202491
  backgroundClip: "content-box",
202498
202492
  border: `2px solid ${theme.palette.grayLight}`,
202493
+ // map-get($global-colors, "gray-light");
202499
202494
  backgroundColor: theme.palette.grayLight,
202495
+ // map-get($global-colors, "gray-light");
202500
202496
  "&:checked": {
202501
202497
  backgroundClip: "unset"
202502
202498
  }
@@ -202756,6 +202752,7 @@ const useChannelSliderStyles = makeStyles((theme) => ({
202756
202752
  marginTop: "7px",
202757
202753
  "& span": {
202758
202754
  color: theme.palette.secondaryForeground,
202755
+ // Change color here
202759
202756
  backgroundColor: theme.palette.secondaryBackgroundDim
202760
202757
  // Change color here
202761
202758
  }
@@ -205770,7 +205767,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
205770
205767
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
205771
205768
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
205772
205769
  const LazyHiGlassComponent = React__default.lazy(async () => {
205773
- const { HiGlassComponent } = await import("./hglib-167b2b88.js").then((n3) => n3.h);
205770
+ const { HiGlassComponent } = await import("./hglib-abd4a9d9.js").then((n3) => n3.h);
205774
205771
  return { default: HiGlassComponent };
205775
205772
  });
205776
205773
  const HG_SIZE = 800;
@@ -229182,7 +229179,7 @@ inherits(Projection$1, Transform2, {
229182
229179
  transform(_, pulse2) {
229183
229180
  let proj = this.value;
229184
229181
  if (!proj || _.modified("type")) {
229185
- this.value = proj = create4(_.type);
229182
+ this.value = proj = create5(_.type);
229186
229183
  projectionProperties.forEach((prop) => {
229187
229184
  if (_[prop] != null)
229188
229185
  set$3(proj, prop, _[prop]);
@@ -229204,7 +229201,7 @@ function fit(proj, _) {
229204
229201
  const data2 = collectGeoJSON(_.fit);
229205
229202
  _.extent ? proj.fitExtent(_.extent, data2) : _.size ? proj.fitSize(_.size, data2) : 0;
229206
229203
  }
229207
- function create4(type2) {
229204
+ function create5(type2) {
229208
229205
  const constructor = projection((type2 || "mercator").toLowerCase());
229209
229206
  if (!constructor)
229210
229207
  error("Unrecognized projection type: " + type2);
@@ -238011,8 +238008,8 @@ function bind3(view, el2, binding) {
238011
238008
  bind4.update = debounce(param2.debounce, bind4.update);
238012
238009
  }
238013
238010
  }
238014
- const create5 = param2.input == null && param2.element ? target : generate;
238015
- create5(bind4, el2, param2, view);
238011
+ const create6 = param2.input == null && param2.element ? target : generate;
238012
+ create6(bind4, el2, param2, view);
238016
238013
  if (!bind4.active) {
238017
238014
  view.on(view._signals[param2.signal], null, () => {
238018
238015
  bind4.source ? bind4.source = false : bind4.set(view.signal(param2.signal));
@@ -264694,20 +264691,32 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
264694
264691
  }
264695
264692
  }
264696
264693
  class ZarrDataSource {
264694
+ /**
264695
+ * @param {DataSourceParams} params The parameters object.
264696
+ */
264697
264697
  constructor({ url, requestInit: requestInit2, store: store2, fileType }) {
264698
264698
  if (store2) {
264699
264699
  this.storeRoot = root(store2);
264700
- } else {
264700
+ } else if (url) {
264701
264701
  this.storeRoot = zarrOpenRoot(url, fileType, requestInit2);
264702
+ } else {
264703
+ throw new Error("Either a store or a URL must be provided to the ZarrDataSource constructor.");
264702
264704
  }
264703
264705
  }
264706
+ /**
264707
+ *
264708
+ * @param {string} path
264709
+ * @returns {ZarrLocation<Readable>}
264710
+ */
264704
264711
  getStoreRoot(path2) {
264705
264712
  return this.storeRoot.resolve(path2);
264706
264713
  }
264707
264714
  /**
264708
- * Class method for decoding json from the store.
264715
+ * Method for accessing JSON attributes, relative to the store root.
264709
264716
  * @param {string} key A path to the item.
264710
- * @returns {Promise} This async function returns a promise
264717
+ * @param {ZarrLocation<Readable>|null} storeRootParam An optional location,
264718
+ * which if provided will override the default store root.
264719
+ * @returns {Promise<any>} This async function returns a promise
264711
264720
  * that resolves to the parsed JSON if successful.
264712
264721
  * @throws This may throw an error.
264713
264722
  */
@@ -264728,16 +264737,41 @@ function dirname(path2) {
264728
264737
  }
264729
264738
  function basename(path2) {
264730
264739
  const arr = path2.split("/");
264731
- return arr.at(-1);
264740
+ const result = arr.at(-1);
264741
+ if (!result) {
264742
+ console.error("basename of path is empty", path2);
264743
+ return "";
264744
+ }
264745
+ return result;
264732
264746
  }
264733
264747
  class AnnDataSource extends ZarrDataSource {
264734
- constructor(...args) {
264735
- super(...args);
264748
+ /**
264749
+ *
264750
+ * @param {DataSourceParams} params
264751
+ */
264752
+ constructor(params2) {
264753
+ super(params2);
264736
264754
  this.promises = /* @__PURE__ */ new Map();
264737
264755
  }
264756
+ /**
264757
+ *
264758
+ * @param {string[]} paths Paths to multiple string-valued columns
264759
+ * within the obs dataframe.
264760
+ * @returns {Promise<(undefined | string[] | string[][])[]>} Returns
264761
+ * each column as an array of strings,
264762
+ * ordered the same as the paths.
264763
+ */
264738
264764
  loadObsColumns(paths) {
264739
264765
  return this._loadColumns(paths);
264740
264766
  }
264767
+ /**
264768
+ *
264769
+ * @param {string[]} paths Paths to multiple string-valued columns
264770
+ * within the var dataframe.
264771
+ * @returns {Promise<(undefined | string[] | string[][])[]>} Returns
264772
+ * each column as an array of strings,
264773
+ * ordered the same as the paths.
264774
+ */
264741
264775
  loadVarColumns(paths) {
264742
264776
  return this._loadColumns(paths);
264743
264777
  }
@@ -264745,8 +264779,10 @@ class AnnDataSource extends ZarrDataSource {
264745
264779
  * Class method for loading obs variables.
264746
264780
  * Takes the location as an argument because this is shared across objects,
264747
264781
  * which have different ways of specifying location.
264748
- * @param {string[]} paths An array of strings like "obs/leiden" or "obs/bulk_labels."
264749
- * @returns {Promise} A promise for an array of ids with one per cell.
264782
+ * @param {string[] | string[][]} paths An array of strings like
264783
+ * "obs/leiden" or "obs/bulk_labels."
264784
+ * @returns {Promise<(undefined | string[] | string[][])[]>} A promise
264785
+ * for an array of ids with one per cell.
264750
264786
  */
264751
264787
  _loadColumns(paths) {
264752
264788
  const promises = paths.map((path2) => {
@@ -264758,7 +264794,10 @@ class AnnDataSource extends ZarrDataSource {
264758
264794
  });
264759
264795
  this.promises.set(col, obsPromise);
264760
264796
  }
264761
- return this.promises.get(col);
264797
+ return (
264798
+ /** @type {Promise<string[]>} */
264799
+ this.promises.get(col)
264800
+ );
264762
264801
  };
264763
264802
  if (!path2) {
264764
264803
  return Promise.resolve(void 0);
@@ -264770,30 +264809,35 @@ class AnnDataSource extends ZarrDataSource {
264770
264809
  });
264771
264810
  return Promise.all(promises);
264772
264811
  }
264812
+ /**
264813
+ *
264814
+ * @param {string} path
264815
+ * @returns
264816
+ */
264773
264817
  async _loadColumn(path2) {
264774
264818
  const { storeRoot } = this;
264775
264819
  const prefix2 = dirname(path2);
264776
264820
  const { categories, "encoding-type": encodingType } = await this.getJson(`${path2}/.zattrs`);
264777
264821
  let categoriesValues;
264778
- let codes;
264822
+ let codesPath;
264779
264823
  if (categories) {
264780
- const { dtype } = await open(storeRoot.resolve(`/${prefix2}/${categories}`));
264824
+ const { dtype } = await open(storeRoot.resolve(`/${prefix2}/${categories}`), { kind: "array" });
264781
264825
  if (dtype === "v2:object") {
264782
264826
  categoriesValues = await this.getFlatArrDecompressed(`/${prefix2}/${categories}`);
264783
264827
  }
264784
264828
  } else if (encodingType === "categorical") {
264785
- const { dtype } = await open(storeRoot.resolve(`/${path2}/categories`));
264829
+ const { dtype } = await open(storeRoot.resolve(`/${path2}/categories`), { kind: "array" });
264786
264830
  if (dtype === "v2:object") {
264787
264831
  categoriesValues = await this.getFlatArrDecompressed(`/${path2}/categories`);
264788
264832
  }
264789
- codes = `/${path2}/codes`;
264833
+ codesPath = `/${path2}/codes`;
264790
264834
  } else {
264791
- const { dtype } = await open(storeRoot.resolve(`/${path2}`));
264835
+ const { dtype } = await open(storeRoot.resolve(`/${path2}`), { kind: "array" });
264792
264836
  if (dtype === "v2:object") {
264793
264837
  return this.getFlatArrDecompressed(path2);
264794
264838
  }
264795
264839
  }
264796
- const arr = await open(storeRoot.resolve(codes || path2), { kind: "array" });
264840
+ const arr = await open(storeRoot.resolve(codesPath || path2), { kind: "array" });
264797
264841
  const values3 = await get$6(arr, [null]);
264798
264842
  const { data: data2 } = values3;
264799
264843
  const mappedValues = Array.from(data2).map((i2) => !categoriesValues ? String(i2) : categoriesValues[i2]);
@@ -264802,7 +264846,7 @@ class AnnDataSource extends ZarrDataSource {
264802
264846
  /**
264803
264847
  * Class method for loading general numeric arrays.
264804
264848
  * @param {string} path A string like obsm.X_pca.
264805
- * @returns {Promise} A promise for a zarr array containing the data.
264849
+ * @returns {Promise<Chunk<any>>} A promise for a zarr array containing the data.
264806
264850
  */
264807
264851
  loadNumeric(path2) {
264808
264852
  const { storeRoot } = this;
@@ -264811,14 +264855,20 @@ class AnnDataSource extends ZarrDataSource {
264811
264855
  /**
264812
264856
  * Class method for loading specific columns of numeric arrays.
264813
264857
  * @param {string} path A string like obsm.X_pca.
264814
- * @param {number[]} dims The column indices to load.
264815
- * @returns {Promise} A promise for a zarr array containing the data.
264858
+ * @param {[number, number]} dims The column indices to load.
264859
+ * @returns {Promise<{
264860
+ * data: [ZarrTypedArray<any>, ZarrTypedArray<any>],
264861
+ * shape: [number, number],
264862
+ * }>} A promise for a zarr array containing the data.
264816
264863
  */
264817
264864
  loadNumericForDims(path2, dims) {
264818
264865
  const { storeRoot } = this;
264819
264866
  const arr = open(storeRoot.resolve(path2), { kind: "array" });
264820
264867
  return Promise.all(dims.map((dim) => arr.then((loadedArr) => get$6(loadedArr, [null, dim])))).then((cols) => ({
264821
- data: cols.map((col) => col.data),
264868
+ data: (
264869
+ /** @type {[ZarrTypedArray<any>, ZarrTypedArray<any>]} */
264870
+ cols.map((col) => col.data)
264871
+ ),
264822
264872
  shape: [dims.length, cols[0].shape[0]]
264823
264873
  }));
264824
264874
  }
@@ -264826,7 +264876,7 @@ class AnnDataSource extends ZarrDataSource {
264826
264876
  * A common method for loading flattened data
264827
264877
  * i.e that which has shape [n] where n is a natural number.
264828
264878
  * @param {string} path A path to a flat array location, like obs/_index
264829
- * @returns {Array} The data from the zarr array.
264879
+ * @returns {Promise<string[]>} The data from the zarr array.
264830
264880
  */
264831
264881
  async getFlatArrDecompressed(path2) {
264832
264882
  var _a3;
@@ -264836,13 +264886,18 @@ class AnnDataSource extends ZarrDataSource {
264836
264886
  if ((_a3 = data2.data) == null ? void 0 : _a3[Symbol.iterator]) {
264837
264887
  return Array.from(data2.data);
264838
264888
  }
264839
- return data2.data;
264889
+ return (
264890
+ /** @type {string[]} */
264891
+ data2.data
264892
+ );
264840
264893
  }
264841
264894
  /**
264842
264895
  * Class method for loading the obs index.
264843
- * @returns {Promise} An promise for a zarr array containing the indices.
264896
+ * @param {string|undefined} path Used by subclasses.
264897
+ * @returns {Promise<string[]>} An promise for a zarr array
264898
+ * containing the indices.
264844
264899
  */
264845
- loadObsIndex() {
264900
+ loadObsIndex(path2 = void 0) {
264846
264901
  if (this.obsIndex) {
264847
264902
  return this.obsIndex;
264848
264903
  }
@@ -264851,9 +264906,10 @@ class AnnDataSource extends ZarrDataSource {
264851
264906
  }
264852
264907
  /**
264853
264908
  * Class method for loading the var index.
264854
- * @returns {Promise} An promise for a zarr array containing the indices.
264909
+ * @param {string|undefined} path Used by subclasses.
264910
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
264855
264911
  */
264856
- loadVarIndex() {
264912
+ loadVarIndex(path2 = void 0) {
264857
264913
  if (this.varIndex) {
264858
264914
  return this.varIndex;
264859
264915
  }
@@ -264862,58 +264918,107 @@ class AnnDataSource extends ZarrDataSource {
264862
264918
  }
264863
264919
  /**
264864
264920
  * Class method for loading the var alias.
264865
- * @returns {Promise} An promise for a zarr array containing the aliased names.
264921
+ * @param {string} varPath
264922
+ * @param {string|undefined} matrixPath
264923
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
264866
264924
  */
264867
- async loadVarAlias(varPath) {
264925
+ async loadVarAlias(varPath, matrixPath = void 0) {
264868
264926
  if (this.varAlias) {
264869
264927
  return this.varAlias;
264870
264928
  }
264871
264929
  [this.varAlias] = await this.loadVarColumns([varPath]);
264872
264930
  const index2 = await this.loadVarIndex();
264873
- this.varAlias = this.varAlias.map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
264931
+ this.varAlias = this.varAlias.map(
264932
+ /** @type {(val: string, ind: number) => string} */
264933
+ (val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]
264934
+ );
264874
264935
  return this.varAlias;
264875
264936
  }
264937
+ /**
264938
+ *
264939
+ * @param {string} path
264940
+ * @returns {Promise<object>}
264941
+ */
264876
264942
  async _loadAttrs(path2) {
264877
264943
  return this.getJson(`${path2}/.zattrs`);
264878
264944
  }
264945
+ /**
264946
+ *
264947
+ * @param {string} path
264948
+ * @returns {Promise<string>}
264949
+ */
264879
264950
  async _loadString(path2) {
264880
264951
  const { storeRoot } = this;
264881
- const { "encoding-type": encodingType, "encoding-version": encodingVersion } = await this._loadAttrs(path2);
264882
- if (encodingType === "string" && encodingVersion === "0.2.0") {
264883
- const arr = await open(storeRoot.resolve(path2), { kind: "array" });
264884
- const { data: data2 } = await arr.getChunk([]);
264885
- return data2.get(0);
264952
+ const zattrs = await this._loadAttrs(path2);
264953
+ if ("encoding-type" in zattrs && "encoding-version" in zattrs) {
264954
+ const { "encoding-type": encodingType, "encoding-version": encodingVersion } = zattrs;
264955
+ if (encodingType === "string" && encodingVersion === "0.2.0") {
264956
+ const arr = await open(storeRoot.resolve(path2), { kind: "array" });
264957
+ const { data: data2 } = (
264958
+ /** @type {{ data: ByteStringArray }} */
264959
+ await arr.getChunk([])
264960
+ );
264961
+ return data2.get(0);
264962
+ }
264963
+ throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadString`);
264886
264964
  }
264887
- throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadString`);
264965
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
264888
264966
  }
264967
+ /**
264968
+ *
264969
+ * @param {string} path
264970
+ * @returns {Promise<string[]>}
264971
+ */
264889
264972
  async _loadStringArray(path2) {
264890
- const { "encoding-type": encodingType, "encoding-version": encodingVersion } = await this._loadAttrs(path2);
264891
- if (encodingType === "string-array" && encodingVersion === "0.2.0") {
264892
- return this.getFlatArrDecompressed(path2);
264973
+ const zattrs = await this._loadAttrs(path2);
264974
+ if ("encoding-type" in zattrs && "encoding-version" in zattrs) {
264975
+ const { "encoding-type": encodingType, "encoding-version": encodingVersion } = zattrs;
264976
+ if (encodingType === "string-array" && encodingVersion === "0.2.0") {
264977
+ return this.getFlatArrDecompressed(path2);
264978
+ }
264979
+ throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadStringArray`);
264893
264980
  }
264894
- throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadStringArray`);
264981
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
264895
264982
  }
264983
+ /**
264984
+ *
264985
+ * @param {string} path
264986
+ * @returns
264987
+ */
264896
264988
  async _loadElement(path2) {
264897
- const { "encoding-type": encodingType } = await this._loadAttrs(path2);
264898
- if (encodingType === "string") {
264899
- return this._loadString(path2);
264900
- }
264901
- if (encodingType === "string-array") {
264902
- return this._loadStringArray(path2);
264989
+ const zattrs = await this._loadAttrs(path2);
264990
+ if ("encoding-type" in zattrs) {
264991
+ const { "encoding-type": encodingType } = zattrs;
264992
+ if (encodingType === "string") {
264993
+ return this._loadString(path2);
264994
+ }
264995
+ if (encodingType === "string-array") {
264996
+ return this._loadStringArray(path2);
264997
+ }
264903
264998
  }
264904
264999
  return null;
264905
265000
  }
265001
+ /**
265002
+ *
265003
+ * @param {string} path
265004
+ * @param {string[]} keys
265005
+ * @returns
265006
+ */
264906
265007
  async _loadDict(path2, keys4) {
264907
- const { "encoding-type": encodingType, "encoding-version": encodingVersion } = await this._loadAttrs(path2);
264908
- if (encodingType === "dict" && encodingVersion === "0.1.0") {
264909
- const result = {};
264910
- await Promise.all(keys4.map(async (key2) => {
264911
- const val = await this._loadElement(`${path2}/${key2}`);
264912
- result[key2] = val;
264913
- }));
264914
- return result;
265008
+ const zattrs = await this._loadAttrs(path2);
265009
+ if ("encoding-type" in zattrs && "encoding-version" in zattrs) {
265010
+ const { "encoding-type": encodingType, "encoding-version": encodingVersion } = zattrs;
265011
+ if (encodingType === "dict" && encodingVersion === "0.1.0") {
265012
+ const result = {};
265013
+ await Promise.all(keys4.map(async (key2) => {
265014
+ const val = await this._loadElement(`${path2}/${key2}`);
265015
+ result[key2] = val;
265016
+ }));
265017
+ return result;
265018
+ }
265019
+ throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadDict`);
264915
265020
  }
264916
- throw new Error(`Unsupported encoding type ${encodingType} and version ${encodingVersion} in AnnDataSource._loadDict`);
265021
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
264917
265022
  }
264918
265023
  }
264919
265024
  const regex$2 = /^mod\/([^/]*)\/(.*)$/;
@@ -264998,17 +265103,30 @@ function getVarPath$1(arrPath) {
264998
265103
  return `${getTablePrefix(arrPath)}var`;
264999
265104
  }
265000
265105
  class SpatialDataTableSource extends AnnDataSource {
265106
+ /**
265107
+ *
265108
+ * @param {DataSourceParams} params
265109
+ */
265110
+ constructor(params2) {
265111
+ super(params2);
265112
+ this.obsIndices = {};
265113
+ this.varIndices = {};
265114
+ this.varAliases = {};
265115
+ }
265116
+ /**
265117
+ *
265118
+ * @param {string} tablePath
265119
+ * @returns
265120
+ */
265001
265121
  async loadSpatialDataAttrs(tablePath) {
265002
265122
  return this._loadDict(`${tablePath}uns/spatialdata_attrs`, ["instance_key", "region", "region_key"]);
265003
265123
  }
265004
265124
  /**
265005
265125
  * Class method for loading the obs index.
265006
- * @returns {Promise} An promise for a zarr array containing the indices.
265126
+ * @param {string|undefined} path
265127
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
265007
265128
  */
265008
- async loadObsIndex(path2 = null) {
265009
- if (!this.obsIndex) {
265010
- this.obsIndex = {};
265011
- }
265129
+ async loadObsIndex(path2 = void 0) {
265012
265130
  const obsPath = getObsPath(path2);
265013
265131
  const { _index } = await this.getJson(`${obsPath}/.zattrs`);
265014
265132
  let indexPath = `${obsPath}/${_index}`;
@@ -265019,43 +265137,41 @@ class SpatialDataTableSource extends AnnDataSource {
265019
265137
  // region,
265020
265138
  } = await this.loadSpatialDataAttrs(getTablePrefix(path2));
265021
265139
  indexPath = `${obsPath}/${instanceKey}`;
265022
- if (this.obsIndex[indexPath]) {
265023
- return this.obsIndex[indexPath];
265140
+ if (indexPath in this.obsIndices) {
265141
+ return this.obsIndices[indexPath];
265024
265142
  }
265025
- this.obsIndex[indexPath] = this._loadColumn(indexPath);
265026
- return this.obsIndex[indexPath];
265143
+ this.obsIndices[indexPath] = this._loadColumn(indexPath);
265144
+ return this.obsIndices[indexPath];
265027
265145
  }
265028
265146
  /**
265029
265147
  * Class method for loading the var index.
265030
- * @returns {Promise} An promise for a zarr array containing the indices.
265148
+ * @param {string|undefined} path
265149
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
265031
265150
  */
265032
- loadVarIndex(path2 = null) {
265033
- if (!this.varIndex) {
265034
- this.varIndex = {};
265035
- }
265151
+ loadVarIndex(path2 = void 0) {
265036
265152
  const varPath = getVarPath$1(path2);
265037
- if (this.varIndex[varPath]) {
265038
- return this.varIndex[varPath];
265153
+ if (varPath in this.varIndices) {
265154
+ return this.varIndices[varPath];
265039
265155
  }
265040
- this.varIndex[varPath] = this.getJson(`${varPath}/.zattrs`).then(({ _index }) => this.getFlatArrDecompressed(`${varPath}/${_index}`));
265041
- return this.varIndex[varPath];
265156
+ this.varIndices[varPath] = this.getJson(`${varPath}/.zattrs`).then(({ _index }) => this.getFlatArrDecompressed(`${varPath}/${_index}`));
265157
+ return this.varIndices[varPath];
265042
265158
  }
265043
265159
  /**
265044
265160
  * Class method for loading the var alias.
265045
- * @returns {Promise} An promise for a zarr array containing the aliased names.
265161
+ * @param {string} varPath
265162
+ * @param {string} matrixPath
265163
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
265046
265164
  */
265047
265165
  async loadVarAlias(varPath, matrixPath) {
265048
- if (!this.varAlias) {
265049
- this.varAlias = {};
265050
- }
265051
- if (this.varAlias[varPath]) {
265052
- return this.varAlias[varPath];
265166
+ if (varPath in this.varAliases) {
265167
+ return this.varAliases[varPath];
265053
265168
  }
265054
265169
  const [varAliasData] = await this.loadVarColumns([varPath]);
265055
- this.varAlias[varPath] = varAliasData;
265170
+ this.varAliases[varPath] = /** @type {string[]} */
265171
+ varAliasData;
265056
265172
  const index2 = await this.loadVarIndex(matrixPath);
265057
- this.varAlias[varPath] = this.varAlias[varPath].map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
265058
- return this.varAlias[varPath];
265173
+ this.varAliases[varPath] = this.varAliases[varPath].map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
265174
+ return this.varAliases[varPath];
265059
265175
  }
265060
265176
  }
265061
265177
  const regex = /^shapes\/([^/]*)\/(.*)$/;
@@ -265075,17 +265191,31 @@ function getVarPath(arrPath) {
265075
265191
  return `${getShapesPrefix(arrPath)}var`;
265076
265192
  }
265077
265193
  class SpatialDataShapesSource extends AnnDataSource {
265194
+ /**
265195
+ *
265196
+ * @param {DataSourceParams} params
265197
+ */
265198
+ constructor(params2) {
265199
+ super(params2);
265200
+ this.obsIndices = {};
265201
+ this.varIndices = {};
265202
+ this.varAliases = {};
265203
+ }
265204
+ /**
265205
+ *
265206
+ * @param {string} tablePath
265207
+ * @returns
265208
+ */
265078
265209
  async loadSpatialDataAttrs(tablePath) {
265079
265210
  return this._loadDict(`${tablePath}/uns/spatialdata_attrs`, ["instance_key", "region", "region_key"]);
265080
265211
  }
265081
265212
  /**
265082
265213
  * Class method for loading the obs index.
265083
- * @returns {Promise} An promise for a zarr array containing the indices.
265214
+ * @param {string|undefined} path
265215
+ * @param {string|undefined} tablePath
265216
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
265084
265217
  */
265085
- async loadObsIndex(path2 = null, tablePath = null) {
265086
- if (!this.obsIndex) {
265087
- this.obsIndex = {};
265088
- }
265218
+ async loadObsIndex(path2 = void 0, tablePath = void 0) {
265089
265219
  let indexPath = getIndexPath(path2);
265090
265220
  if (tablePath) {
265091
265221
  const obsPath = `${tablePath}/obs`;
@@ -265099,43 +265229,41 @@ class SpatialDataShapesSource extends AnnDataSource {
265099
265229
  } = await this.loadSpatialDataAttrs(tablePath);
265100
265230
  indexPath = `${obsPath}/${instanceKey}`;
265101
265231
  }
265102
- if (this.obsIndex[indexPath]) {
265103
- return this.obsIndex[indexPath];
265232
+ if (indexPath in this.obsIndices) {
265233
+ return this.obsIndices[indexPath];
265104
265234
  }
265105
- this.obsIndex[indexPath] = this._loadColumn(indexPath);
265106
- return this.obsIndex[indexPath];
265235
+ this.obsIndices[indexPath] = this._loadColumn(indexPath);
265236
+ return this.obsIndices[indexPath];
265107
265237
  }
265108
265238
  /**
265109
265239
  * Class method for loading the var index.
265110
- * @returns {Promise} An promise for a zarr array containing the indices.
265240
+ * @param {string|undefined} path
265241
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
265111
265242
  */
265112
- loadVarIndex(path2 = null) {
265113
- if (!this.varIndex) {
265114
- this.varIndex = {};
265115
- }
265243
+ loadVarIndex(path2 = void 0) {
265116
265244
  const varPath = getVarPath(path2);
265117
- if (this.varIndex[varPath]) {
265118
- return this.varIndex[varPath];
265245
+ if (varPath in this.varIndices) {
265246
+ return this.varIndices[varPath];
265119
265247
  }
265120
- this.varIndex[varPath] = this.getJson(`${varPath}/.zattrs`).then(({ _index }) => this.getFlatArrDecompressed(`${varPath}/${_index}`));
265121
- return this.varIndex[varPath];
265248
+ this.varIndices[varPath] = this.getJson(`${varPath}/.zattrs`).then(({ _index }) => this.getFlatArrDecompressed(`${varPath}/${_index}`));
265249
+ return this.varIndices[varPath];
265122
265250
  }
265123
265251
  /**
265124
265252
  * Class method for loading the var alias.
265125
- * @returns {Promise} An promise for a zarr array containing the aliased names.
265253
+ * @param {string} varPath
265254
+ * @param {string} matrixPath
265255
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
265126
265256
  */
265127
265257
  async loadVarAlias(varPath, matrixPath) {
265128
- if (!this.varAlias) {
265129
- this.varAlias = {};
265130
- }
265131
- if (this.varAlias[varPath]) {
265132
- return this.varAlias[varPath];
265258
+ if (varPath in this.varAliases) {
265259
+ return this.varAliases[varPath];
265133
265260
  }
265134
265261
  const [varAliasData] = await this.loadVarColumns([varPath]);
265135
- this.varAlias[varPath] = varAliasData;
265262
+ this.varAliases[varPath] = /** @type {string[]} */
265263
+ varAliasData;
265136
265264
  const index2 = await this.loadVarIndex(matrixPath);
265137
- this.varAlias[varPath] = this.varAlias[varPath].map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
265138
- return this.varAlias[varPath];
265265
+ this.varAliases[varPath] = this.varAliases[varPath].map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
265266
+ return this.varAliases[varPath];
265139
265267
  }
265140
265268
  }
265141
265269
  class MatrixZarrAsObsFeatureMatrixLoader extends AbstractTwoStepLoader {
@@ -265481,20 +265609,29 @@ class ObsFeatureMatrixAnndataLoader extends AbstractTwoStepLoader {
265481
265609
  class ObsEmbeddingAnndataLoader extends AbstractTwoStepLoader {
265482
265610
  /**
265483
265611
  * Class method for loading embedding coordinates, such as those from UMAP or t-SNE.
265484
- * @returns {Promise} A promise for an array of columns.
265612
+ * @returns {Promise<MatrixResult>} A promise for an array of columns.
265485
265613
  */
265486
- loadEmbedding() {
265614
+ async loadEmbedding() {
265487
265615
  const { path: path2, dims = [0, 1] } = this.options;
265488
265616
  if (this.embedding) {
265489
- return this.embedding;
265617
+ return (
265618
+ /** @type {Promise<MatrixResult>} */
265619
+ this.embedding
265620
+ );
265490
265621
  }
265491
265622
  if (!this.embedding) {
265492
265623
  this.embedding = this.dataSource.loadNumericForDims(path2, dims);
265493
- return this.embedding;
265624
+ return (
265625
+ /** @type {Promise<MatrixResult>} */
265626
+ this.embedding
265627
+ );
265494
265628
  }
265495
- this.embedding = Promise.resolve(null);
265496
265629
  return this.embedding;
265497
265630
  }
265631
+ /**
265632
+ *
265633
+ * @returns {Promise<LoaderResult<ObsEmbeddingData>>}
265634
+ */
265498
265635
  async load() {
265499
265636
  const { path: path2 } = this.options;
265500
265637
  const superResult = await super.load().catch((reason) => Promise.resolve(reason));
@@ -265796,9 +265933,9 @@ class ObsLabelsAnndataLoader extends AbstractTwoStepLoader {
265796
265933
  class FeatureLabelsAnndataLoader extends AbstractTwoStepLoader {
265797
265934
  /**
265798
265935
  * Class method for loading feature string labels.
265799
- * @returns {Promise} A promise for the array.
265936
+ * @returns {Promise<string[]>} A promise for the array.
265800
265937
  */
265801
- loadLabels() {
265938
+ async loadLabels() {
265802
265939
  const { path: path2 } = this.options;
265803
265940
  if (this.labels) {
265804
265941
  return this.labels;
@@ -265807,9 +265944,12 @@ class FeatureLabelsAnndataLoader extends AbstractTwoStepLoader {
265807
265944
  this.labels = this.dataSource._loadColumn(path2);
265808
265945
  return this.labels;
265809
265946
  }
265810
- this.labels = Promise.resolve(null);
265811
265947
  return this.labels;
265812
265948
  }
265949
+ /**
265950
+ *
265951
+ * @returns {Promise<LoaderResult<FeatureLabelsData>>}
265952
+ */
265813
265953
  async load() {
265814
265954
  const { path: path2 } = this.options;
265815
265955
  const superResult = await super.load().catch((reason) => Promise.resolve(reason));
@@ -265825,7 +265965,7 @@ class FeatureLabelsAnndataLoader extends AbstractTwoStepLoader {
265825
265965
  ]).then(([featureIndex, featureLabels]) => Promise.resolve(new LoaderResult({
265826
265966
  featureIndex,
265827
265967
  featureLabels,
265828
- featureLabelsMap: new Map(featureIndex.map((key2, i2) => [key2, featureLabels[i2]]))
265968
+ featureLabelsMap: new Map(featureIndex.map((key2, i2) => [key2, featureLabels == null ? void 0 : featureLabels[i2]]))
265829
265969
  }, null)));
265830
265970
  }
265831
265971
  }
@@ -266047,6 +266187,7 @@ class ImageWrapper {
266047
266187
  name: channel.Name || `Channel ${i2}`,
266048
266188
  defaultColor: channel.Color ? channel.Color : void 0,
266049
266189
  defaultWindow: void 0,
266190
+ // TODO: does OME-TIFF support this?
266050
266191
  autoDefaultColor: VIEWER_PALETTE[i2 % VIEWER_PALETTE.length]
266051
266192
  }));
266052
266193
  }
@@ -266285,7 +266426,9 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
266285
266426
  return Promise.resolve(new LoaderResult({
266286
266427
  image: {
266287
266428
  loaders: imageLayerLoaders,
266429
+ // TODO: replace with imageWrapper
266288
266430
  meta: imageLayerMeta,
266431
+ // TODO: replace with imageWrapper
266289
266432
  instance: imageWrapper
266290
266433
  // TODO: make this the root value of LoaderResult.image.
266291
266434
  },
@@ -266556,7 +266699,9 @@ class OmeTiffLoader extends AbstractTwoStepLoader {
266556
266699
  return new LoaderResult({
266557
266700
  image: {
266558
266701
  loaders: imageLayerLoaders,
266702
+ // TODO: replace with imageWrapper
266559
266703
  meta: imageLayerMeta,
266704
+ // TODO: replace with imageWrapper
266560
266705
  instance: imageWrapper
266561
266706
  // TODO: make this the root value of LoaderResult.image.
266562
266707
  },
@@ -266640,7 +266785,9 @@ class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
266640
266785
  obsSegmentationsType: "bitmask",
266641
266786
  obsSegmentations: {
266642
266787
  loaders: imageLayerLoaders,
266788
+ // TODO: replace with imageWrapper
266643
266789
  meta: imageLayerMeta,
266790
+ // TODO: replace with imageWrapper
266644
266791
  instance: imageWrapper
266645
266792
  // TODO: make this the root value of LoaderResult.image.
266646
266793
  }