@vitessce/dev 3.3.6 → 3.3.7

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.
@@ -26,7 +26,7 @@ var __privateMethod = (obj, member, method2) => {
26
26
  __accessCheck(obj, member, "access private method");
27
27
  return method2;
28
28
  };
29
- var _bytes, _encoder, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn;
29
+ var _bytes, _encoder, _data, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _encoder_config, _decoder_config, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn, _overrides2;
30
30
  import * as React$6 from "react";
31
31
  import React__default, { Children, isValidElement, cloneElement as cloneElement$1, useReducer, useRef, useDebugValue, useEffect, useLayoutEffect as useLayoutEffect$1, createContext as createContext$1, createElement, useContext, useMemo, useCallback, useState, forwardRef, useImperativeHandle, PureComponent, Component as Component$1, Suspense } from "react";
32
32
  import * as ReactDOM from "react-dom";
@@ -79,11 +79,14 @@ const DataType$3 = {
79
79
  GENOMIC_PROFILES: "genomic-profiles",
80
80
  OBS_SPOTS: "obsSpots",
81
81
  OBS_POINTS: "obsPoints",
82
- OBS_LOCATIONS: "obsLocations"
82
+ OBS_LOCATIONS: "obsLocations",
83
+ SAMPLE_SETS: "sampleSets",
84
+ SAMPLE_EDGES: "sampleEdges"
83
85
  };
84
86
  const FileType$2 = {
85
87
  // Joint file types
86
88
  ANNDATA_ZARR: "anndata.zarr",
89
+ ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
87
90
  SPATIALDATA_ZARR: "spatialdata.zarr",
88
91
  // Atomic file types
89
92
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -96,6 +99,7 @@ const FileType$2 = {
96
99
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
97
100
  OBS_SETS_CSV: "obsSets.csv",
98
101
  OBS_SETS_JSON: "obsSets.json",
102
+ SAMPLE_SETS_CSV: "sampleSets.csv",
99
103
  // OME-Zarr
100
104
  IMAGE_OME_ZARR: "image.ome-zarr",
101
105
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
@@ -110,6 +114,19 @@ const FileType$2 = {
110
114
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
111
115
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
112
116
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
117
+ SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
118
+ // AnnData - zipped
119
+ OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
120
+ OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
121
+ OBS_SETS_ANNDATA_ZARR_ZIP: "obsSets.anndata.zarr.zip",
122
+ OBS_EMBEDDING_ANNDATA_ZARR_ZIP: "obsEmbedding.anndata.zarr.zip",
123
+ OBS_SPOTS_ANNDATA_ZARR_ZIP: "obsSpots.anndata.zarr.zip",
124
+ OBS_POINTS_ANNDATA_ZARR_ZIP: "obsPoints.anndata.zarr.zip",
125
+ OBS_LOCATIONS_ANNDATA_ZARR_ZIP: "obsLocations.anndata.zarr.zip",
126
+ OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP: "obsSegmentations.anndata.zarr.zip",
127
+ OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
128
+ FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
129
+ SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
113
130
  // SpatialData
114
131
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
115
132
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -117,6 +134,7 @@ const FileType$2 = {
117
134
  OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
118
135
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
119
136
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
137
+ FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
120
138
  // TODO:
121
139
  // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
122
140
  // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
@@ -273,7 +291,10 @@ const CoordinationType$2 = {
273
291
  LEGEND_VISIBLE: "legendVisible",
274
292
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
275
293
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
276
- SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize"
294
+ SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
295
+ // Multi-sample / comparative
296
+ SAMPLE_TYPE: "sampleType",
297
+ SAMPLE_SET_SELECTION: "sampleSetSelection"
277
298
  };
278
299
  const STATUS$1 = {
279
300
  LOADING: "loading",
@@ -317,7 +338,49 @@ const DATA_TYPE_COORDINATION_VALUE_USAGE = {
317
338
  [DataType$3.IMAGE]: [
318
339
  CoordinationType$2.FILE_UID
319
340
  ],
320
- [DataType$3.NEIGHBORHOODS]: []
341
+ [DataType$3.NEIGHBORHOODS]: [],
342
+ [DataType$3.SAMPLE_SETS]: [
343
+ CoordinationType$2.SAMPLE_TYPE
344
+ ],
345
+ [DataType$3.SAMPLE_EDGES]: [
346
+ CoordinationType$2.OBS_TYPE,
347
+ CoordinationType$2.SAMPLE_TYPE
348
+ ]
349
+ };
350
+ const ALT_ZARR_STORE_TYPES = {
351
+ [FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR]: {
352
+ zip: FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP
353
+ },
354
+ [FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR]: {
355
+ zip: FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP
356
+ },
357
+ [FileType$2.OBS_SETS_ANNDATA_ZARR]: {
358
+ zip: FileType$2.OBS_SETS_ANNDATA_ZARR_ZIP
359
+ },
360
+ [FileType$2.OBS_EMBEDDING_ANNDATA_ZARR]: {
361
+ zip: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR_ZIP
362
+ },
363
+ [FileType$2.OBS_SPOTS_ANNDATA_ZARR]: {
364
+ zip: FileType$2.OBS_SPOTS_ANNDATA_ZARR_ZIP
365
+ },
366
+ [FileType$2.OBS_POINTS_ANNDATA_ZARR]: {
367
+ zip: FileType$2.OBS_POINTS_ANNDATA_ZARR_ZIP
368
+ },
369
+ [FileType$2.OBS_LOCATIONS_ANNDATA_ZARR]: {
370
+ zip: FileType$2.OBS_LOCATIONS_ANNDATA_ZARR_ZIP
371
+ },
372
+ [FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR]: {
373
+ zip: FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP
374
+ },
375
+ [FileType$2.OBS_LABELS_ANNDATA_ZARR]: {
376
+ zip: FileType$2.OBS_LABELS_ANNDATA_ZARR_ZIP
377
+ },
378
+ [FileType$2.FEATURE_LABELS_ANNDATA_ZARR]: {
379
+ zip: FileType$2.FEATURE_LABELS_ANNDATA_ZARR_ZIP
380
+ },
381
+ [FileType$2.SAMPLE_EDGES_ANNDATA_ZARR]: {
382
+ zip: FileType$2.SAMPLE_EDGES_ANNDATA_ZARR_ZIP
383
+ }
321
384
  };
322
385
  const AUTO_INDEPENDENT_COORDINATION_TYPES = [
323
386
  CoordinationType$2.HEATMAP_ZOOM_X,
@@ -580,7 +643,9 @@ const COMPONENT_COORDINATION_TYPES = {
580
643
  CoordinationType$2.OBS_SET_SELECTION,
581
644
  CoordinationType$2.OBS_SET_HIGHLIGHT,
582
645
  CoordinationType$2.OBS_SET_COLOR,
583
- CoordinationType$2.ADDITIONAL_OBS_SETS
646
+ CoordinationType$2.ADDITIONAL_OBS_SETS,
647
+ CoordinationType$2.SAMPLE_TYPE,
648
+ CoordinationType$2.SAMPLE_SET_SELECTION
584
649
  ],
585
650
  [ViewType$2.FEATURE_VALUE_HISTOGRAM]: [
586
651
  CoordinationType$2.DATASET,
@@ -705,10 +770,10 @@ const COMPONENT_COORDINATION_TYPES = {
705
770
  ]
706
771
  };
707
772
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
708
- const version$6 = "3.3.6";
709
- const date$5 = "2024-02-25";
773
+ const version$6 = "3.3.7";
774
+ const date$5 = "2024-03-04";
710
775
  const branch = "changeset-release/main";
711
- const hash$1 = "fcb2a92d";
776
+ const hash$1 = "c82b4395";
712
777
  const META_VERSION = {
713
778
  note,
714
779
  version: version$6,
@@ -10170,7 +10235,7 @@ function useIsFocusVisible() {
10170
10235
  function _toArray(arr) {
10171
10236
  return _arrayWithHoles$9(arr) || _iterableToArray$k(arr) || _unsupportedIterableToArray$o(arr) || _nonIterableRest$9();
10172
10237
  }
10173
- const config$3 = {
10238
+ const config$4 = {
10174
10239
  disabled: false
10175
10240
  };
10176
10241
  var timeoutsShape = _pt.oneOfType([_pt.number, _pt.shape({
@@ -10304,7 +10369,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
10304
10369
  var _ref22 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref22[0], maybeAppearing = _ref22[1];
10305
10370
  var timeouts = this.getTimeouts();
10306
10371
  var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
10307
- if (!mounting && !enter || config$3.disabled) {
10372
+ if (!mounting && !enter || config$4.disabled) {
10308
10373
  this.safeSetState({
10309
10374
  status: ENTERED
10310
10375
  }, function() {
@@ -10331,7 +10396,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
10331
10396
  var exit = this.props.exit;
10332
10397
  var timeouts = this.getTimeouts();
10333
10398
  var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this);
10334
- if (!exit || config$3.disabled) {
10399
+ if (!exit || config$4.disabled) {
10335
10400
  this.safeSetState({
10336
10401
  status: EXITED
10337
10402
  }, function() {
@@ -35144,6 +35209,7 @@ const annDataConvenienceObsEmbeddingItem = z.object({
35144
35209
  });
35145
35210
  const annDataObsLabels = annDataObs;
35146
35211
  const annDataFeatureLabels = annDataObs;
35212
+ const annDataSampleEdges = annDataObs;
35147
35213
  const annDataObsFeatureMatrix = z.object({
35148
35214
  path: z.string(),
35149
35215
  featureFilterPath: z.string().optional().describe("If the feature index should be filtered, put a boolean column here (analogous to the previous geneFilter option). e.g., var/in_obsm_X_small_matrix"),
@@ -35225,6 +35291,7 @@ const obsFeatureMatrixAnndataSchema = annDataObsFeatureMatrix;
35225
35291
  const obsLabelsAnndataSchema = annDataObsLabels;
35226
35292
  const featureLabelsAnndataSchema = annDataFeatureLabels;
35227
35293
  const obsFeatureColumnsAnndataSchema = annDataObsFeatureColumns;
35294
+ const sampleEdgesAnndataSchema = annDataSampleEdges;
35228
35295
  const obsEmbeddingCsvSchema = z.object({
35229
35296
  obsIndex: z.string(),
35230
35297
  obsEmbedding: z.array(z.string()).length(2)
@@ -35263,6 +35330,17 @@ const obsSetsCsvSchema = z.object({
35263
35330
  scoreColumn: z.string().optional()
35264
35331
  }))
35265
35332
  });
35333
+ const sampleSetsCsvSchema = z.object({
35334
+ sampleIndex: z.string(),
35335
+ sampleSets: z.array(z.object({
35336
+ name: z.string(),
35337
+ column: z.union([
35338
+ z.string(),
35339
+ z.array(z.string())
35340
+ ]),
35341
+ scoreColumn: z.string().optional()
35342
+ }))
35343
+ });
35266
35344
  const anndataZarrSchema = z.object({
35267
35345
  obsLabels: z.union([
35268
35346
  annDataObsLabels,
@@ -42636,6 +42714,7 @@ function createLoaders(datasets, configDescription, fileTypes, coordinationTypes
42636
42714
  if (!dataSources.has(dataSourceKey)) {
42637
42715
  dataSources.set(dataSourceKey, new DataSourceClass({
42638
42716
  url,
42717
+ fileType,
42639
42718
  requestInit: requestInit2,
42640
42719
  // Optionally, pass a Zarrita store to the data source,
42641
42720
  // if one was mapped to this URL.
@@ -44395,6 +44474,12 @@ function useObsSegmentationsData(loaders, dataset, isRequired, coordinationSette
44395
44474
  function useObsSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44396
44475
  return useDataType(DataType$3.OBS_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44397
44476
  }
44477
+ function useSampleSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44478
+ return useDataType(DataType$3.SAMPLE_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44479
+ }
44480
+ function useSampleEdgesData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44481
+ return useDataType(DataType$3.SAMPLE_EDGES, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44482
+ }
44398
44483
  function useObsFeatureMatrixData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44399
44484
  return useDataType(DataType$3.OBS_FEATURE_MATRIX, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44400
44485
  }
@@ -44571,6 +44656,20 @@ function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders,
44571
44656
  const [obsSetsData, obsSetsDataStatus, obsSetsUrls] = useDataTypeMulti(DataType$3.OBS_SETS, loaders, dataset, false, {}, {}, matchOnObj);
44572
44657
  return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
44573
44658
  }
44659
+ function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
44660
+ const featureTypeCoordination = useComplexCoordination([
44661
+ CoordinationType$2.FEATURE_TYPE
44662
+ ], coordinationScopes, coordinationScopesBy, CoordinationType$2.SPOT_LAYER);
44663
+ const matchOnObj = useMemo(
44664
+ () => featureTypeCoordination[0],
44665
+ // imageCoordination reference changes each render,
44666
+ // use coordinationScopes and coordinationScopesBy which are
44667
+ // indirect dependencies here.
44668
+ [coordinationScopes, coordinationScopesBy]
44669
+ );
44670
+ const [featureLabelsData, featureLabelsStatus, featureLabelsUrls] = useDataTypeMulti(DataType$3.FEATURE_LABELS, loaders, dataset, false, {}, {}, matchOnObj);
44671
+ return [featureLabelsData, featureLabelsStatus, featureLabelsUrls];
44672
+ }
44574
44673
  function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
44575
44674
  const obsLabelsTypes = useMultiCoordinationValues(CoordinationType$2.OBS_LABELS_TYPE, coordinationScopes);
44576
44675
  const obsLabelsMatchOnObj = useMemo(() => Object.fromEntries(Object.entries(obsLabelsTypes).map(([scope, obsLabelsType]) => [
@@ -45114,10 +45213,10 @@ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined
45114
45213
  let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
45115
45214
  function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
45116
45215
  let [value2, setValue] = useState(defaultId2);
45117
- let nextId = useRef(null);
45216
+ let nextId2 = useRef(null);
45118
45217
  let res = $b5e257d569688ac6$export$619500959fc48b26(value2);
45119
45218
  let updateValue = useCallback((val) => {
45120
- nextId.current = val;
45219
+ nextId2.current = val;
45121
45220
  }, []);
45122
45221
  $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
45123
45222
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
@@ -45129,9 +45228,9 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
45129
45228
  res
45130
45229
  ]);
45131
45230
  useEffect(() => {
45132
- let newId = nextId.current;
45231
+ let newId = nextId2.current;
45133
45232
  if (newId) {
45134
- nextId.current = null;
45233
+ nextId2.current = null;
45135
45234
  setValue(newId);
45136
45235
  }
45137
45236
  });
@@ -68954,7 +69053,7 @@ const isPureObject = (x2) => isObject$4(x2) && x2.constructor === {}.constructor
68954
69053
  const isIterable$1 = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
68955
69054
  const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
68956
69055
  const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
68957
- const isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
69056
+ const isBlob$1 = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
68958
69057
  const isBuffer$2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
68959
69058
  const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$4(x2) && isFunction$4(x2.tee) && isFunction$4(x2.cancel) && isFunction$4(x2.getReader);
68960
69059
  const isReadableNodeStream = (x2) => isObject$4(x2) && isFunction$4(x2.read) && isFunction$4(x2.pipe) && isBoolean$4(x2.readable);
@@ -68985,7 +69084,7 @@ function getResourceUrlAndType(resource) {
68985
69084
  type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)
68986
69085
  };
68987
69086
  }
68988
- if (isBlob(resource)) {
69087
+ if (isBlob$1(resource)) {
68989
69088
  return {
68990
69089
  url: stripQueryString(resource.name || ""),
68991
69090
  type: resource.type || ""
@@ -69006,7 +69105,7 @@ function getResourceContentLength(resource) {
69006
69105
  if (isResponse(resource)) {
69007
69106
  return resource.headers["content-length"] || -1;
69008
69107
  }
69009
- if (isBlob(resource)) {
69108
+ if (isBlob$1(resource)) {
69010
69109
  return resource.size;
69011
69110
  }
69012
69111
  if (typeof resource === "string") {
@@ -69909,7 +70008,7 @@ async function selectLoader(data2, loaders = [], options, context2) {
69909
70008
  if (loader2) {
69910
70009
  return loader2;
69911
70010
  }
69912
- if (isBlob(data2)) {
70011
+ if (isBlob$1(data2)) {
69913
70012
  data2 = await data2.slice(0, 10).arrayBuffer();
69914
70013
  loader2 = selectLoaderSync(data2, loaders, options, context2);
69915
70014
  }
@@ -70163,7 +70262,7 @@ function makeIterator(data2, options) {
70163
70262
  if (data2 instanceof ArrayBuffer) {
70164
70263
  return makeArrayBufferIterator(data2, options);
70165
70264
  }
70166
- if (isBlob(data2)) {
70265
+ if (isBlob$1(data2)) {
70167
70266
  return makeBlobIterator(data2, options);
70168
70267
  }
70169
70268
  if (isReadableStream(data2)) {
@@ -70210,7 +70309,7 @@ async function getArrayBufferOrStringFromData(data2, loader2, options) {
70210
70309
  if (typeof data2 === "string" || isArrayBuffer) {
70211
70310
  return getArrayBufferOrStringFromDataSync(data2, loader2);
70212
70311
  }
70213
- if (isBlob(data2)) {
70312
+ if (isBlob$1(data2)) {
70214
70313
  data2 = await makeResponse(data2);
70215
70314
  }
70216
70315
  if (isResponse(data2)) {
@@ -70329,7 +70428,7 @@ async function load$2(url, loaders, options, context2) {
70329
70428
  if (typeof url === "string") {
70330
70429
  data2 = await fetch2(url);
70331
70430
  }
70332
- if (isBlob(url)) {
70431
+ if (isBlob$1(url)) {
70333
70432
  data2 = await fetch2(url);
70334
70433
  }
70335
70434
  return await parse$b(data2, loaders, options);
@@ -78554,7 +78653,7 @@ function assert$7(condition, message) {
78554
78653
  }
78555
78654
  const RADIANS_TO_DEGREES$2 = 1 / Math.PI * 180;
78556
78655
  const DEGREES_TO_RADIANS$7 = 1 / 180 * Math.PI;
78557
- const config$2 = {
78656
+ const config$3 = {
78558
78657
  EPSILON: 1e-12,
78559
78658
  debug: false,
78560
78659
  precision: 4,
@@ -78564,13 +78663,13 @@ const config$2 = {
78564
78663
  };
78565
78664
  function configure(options) {
78566
78665
  for (const key2 in options) {
78567
- assert$7(key2 in config$2);
78568
- config$2[key2] = options[key2];
78666
+ assert$7(key2 in config$3);
78667
+ config$3[key2] = options[key2];
78569
78668
  }
78570
- return config$2;
78669
+ return config$3;
78571
78670
  }
78572
78671
  function formatValue$4(value2, {
78573
- precision = config$2.precision
78672
+ precision = config$3.precision
78574
78673
  } = {}) {
78575
78674
  value2 = round$3(value2);
78576
78675
  return "".concat(parseFloat(value2.toPrecision(precision)));
@@ -78621,9 +78720,9 @@ function lerp$7(a2, b2, t4) {
78621
78720
  return t4 * b2 + (1 - t4) * a2;
78622
78721
  }
78623
78722
  function equals$3(a2, b2, epsilon3) {
78624
- const oldEpsilon = config$2.EPSILON;
78723
+ const oldEpsilon = config$3.EPSILON;
78625
78724
  if (epsilon3) {
78626
- config$2.EPSILON = epsilon3;
78725
+ config$3.EPSILON = epsilon3;
78627
78726
  }
78628
78727
  try {
78629
78728
  if (a2 === b2) {
@@ -78647,11 +78746,11 @@ function equals$3(a2, b2, epsilon3) {
78647
78746
  return b2.equals(a2);
78648
78747
  }
78649
78748
  if (typeof a2 === "number" && typeof b2 === "number") {
78650
- return Math.abs(a2 - b2) <= config$2.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
78749
+ return Math.abs(a2 - b2) <= config$3.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
78651
78750
  }
78652
78751
  return false;
78653
78752
  } finally {
78654
- config$2.EPSILON = oldEpsilon;
78753
+ config$3.EPSILON = oldEpsilon;
78655
78754
  }
78656
78755
  }
78657
78756
  function exactEquals(a2, b2) {
@@ -78680,18 +78779,18 @@ function exactEquals(a2, b2) {
78680
78779
  return false;
78681
78780
  }
78682
78781
  function withEpsilon(epsilon3, func) {
78683
- const oldPrecision = config$2.EPSILON;
78684
- config$2.EPSILON = epsilon3;
78782
+ const oldPrecision = config$3.EPSILON;
78783
+ config$3.EPSILON = epsilon3;
78685
78784
  let value2;
78686
78785
  try {
78687
78786
  value2 = func();
78688
78787
  } finally {
78689
- config$2.EPSILON = oldPrecision;
78788
+ config$3.EPSILON = oldPrecision;
78690
78789
  }
78691
78790
  return value2;
78692
78791
  }
78693
78792
  function round$3(value2) {
78694
- return Math.round(value2 / config$2.EPSILON) * config$2.EPSILON;
78793
+ return Math.round(value2 / config$3.EPSILON) * config$3.EPSILON;
78695
78794
  }
78696
78795
  function duplicateArray(array2) {
78697
78796
  return array2.clone ? array2.clone() : new Array(array2.length);
@@ -78760,7 +78859,7 @@ class MathArray extends _extendableBuiltin(Array) {
78760
78859
  return new Float32Array(this);
78761
78860
  }
78762
78861
  toString() {
78763
- return this.formatString(config$2);
78862
+ return this.formatString(config$3);
78764
78863
  }
78765
78864
  formatString(opts2) {
78766
78865
  let string2 = "";
@@ -78860,7 +78959,7 @@ class MathArray extends _extendableBuiltin(Array) {
78860
78959
  return this.check();
78861
78960
  }
78862
78961
  check() {
78863
- if (config$2.debug && !this.validate()) {
78962
+ if (config$3.debug && !this.validate()) {
78864
78963
  throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
78865
78964
  }
78866
78965
  return this;
@@ -78927,7 +79026,7 @@ function checkNumber(value2) {
78927
79026
  return value2;
78928
79027
  }
78929
79028
  function checkVector(v, length2, callerName = "") {
78930
- if (config$2.debug && !validateVector(v, length2)) {
79029
+ if (config$3.debug && !validateVector(v, length2)) {
78931
79030
  throw new Error("math.gl: ".concat(callerName, " some fields set to invalid numbers'"));
78932
79031
  }
78933
79032
  return v;
@@ -79185,7 +79284,7 @@ class Vector2 extends Vector {
79185
79284
  if (isArray$3(x2) && arguments.length === 1) {
79186
79285
  this.copy(x2);
79187
79286
  } else {
79188
- if (config$2.debug) {
79287
+ if (config$3.debug) {
79189
79288
  checkNumber(x2);
79190
79289
  checkNumber(y2);
79191
79290
  }
@@ -79204,7 +79303,7 @@ class Vector2 extends Vector {
79204
79303
  return this.check();
79205
79304
  }
79206
79305
  fromObject(object2) {
79207
- if (config$2.debug) {
79306
+ if (config$3.debug) {
79208
79307
  checkNumber(object2.x);
79209
79308
  checkNumber(object2.y);
79210
79309
  }
@@ -79457,7 +79556,7 @@ class Vector3 extends Vector {
79457
79556
  if (arguments.length === 1 && isArray$3(x2)) {
79458
79557
  this.copy(x2);
79459
79558
  } else {
79460
- if (config$2.debug) {
79559
+ if (config$3.debug) {
79461
79560
  checkNumber(x2);
79462
79561
  checkNumber(y2);
79463
79562
  checkNumber(z2);
@@ -79480,7 +79579,7 @@ class Vector3 extends Vector {
79480
79579
  return this.check();
79481
79580
  }
79482
79581
  fromObject(object2) {
79483
- if (config$2.debug) {
79582
+ if (config$3.debug) {
79484
79583
  checkNumber(object2.x);
79485
79584
  checkNumber(object2.y);
79486
79585
  checkNumber(object2.z);
@@ -79571,7 +79670,7 @@ class Vector4 extends Vector {
79571
79670
  if (isArray$3(x2) && arguments.length === 1) {
79572
79671
  this.copy(x2);
79573
79672
  } else {
79574
- if (config$2.debug) {
79673
+ if (config$3.debug) {
79575
79674
  checkNumber(x2);
79576
79675
  checkNumber(y2);
79577
79676
  checkNumber(z2);
@@ -79598,7 +79697,7 @@ class Vector4 extends Vector {
79598
79697
  return this.check();
79599
79698
  }
79600
79699
  fromObject(object2) {
79601
- if (config$2.debug) {
79700
+ if (config$3.debug) {
79602
79701
  checkNumber(object2.x);
79603
79702
  checkNumber(object2.y);
79604
79703
  checkNumber(object2.z);
@@ -79656,7 +79755,7 @@ class Vector4 extends Vector {
79656
79755
  let Matrix$1 = class Matrix extends MathArray {
79657
79756
  toString() {
79658
79757
  let string2 = "[";
79659
- if (config$2.printRowMajor) {
79758
+ if (config$3.printRowMajor) {
79660
79759
  string2 += "row-major:";
79661
79760
  for (let row = 0; row < this.RANK; ++row) {
79662
79761
  for (let col = 0; col < this.RANK; ++col) {
@@ -81519,7 +81618,7 @@ class SphericalCoordinates {
81519
81618
  this.check();
81520
81619
  }
81521
81620
  toString() {
81522
- return this.formatString(config$2);
81621
+ return this.formatString(config$3);
81523
81622
  }
81524
81623
  formatString({
81525
81624
  printTypes = false
@@ -125094,7 +125193,7 @@ function fromCartographic(cartographic, result = [], map2 = identity$f) {
125094
125193
  return result;
125095
125194
  }
125096
125195
  function fromCartographicToRadians(cartographic, vector = []) {
125097
- return fromCartographic(cartographic, vector, config$2._cartographicRadians ? identity$f : toRadians);
125196
+ return fromCartographic(cartographic, vector, config$3._cartographicRadians ? identity$f : toRadians);
125098
125197
  }
125099
125198
  function toCartographic(vector, cartographic, map2 = identity$f) {
125100
125199
  if ("longitude" in cartographic) {
@@ -125113,7 +125212,7 @@ function toCartographic(vector, cartographic, map2 = identity$f) {
125113
125212
  return cartographic;
125114
125213
  }
125115
125214
  function toCartographicFromRadians(vector, cartographic) {
125116
- return toCartographic(vector, cartographic, config$2._cartographicRadians ? identity$f : toDegrees);
125215
+ return toCartographic(vector, cartographic, config$3._cartographicRadians ? identity$f : toDegrees);
125117
125216
  }
125118
125217
  const scratchVector$4 = new Vector3();
125119
125218
  const scaleToGeodeticSurfaceIntersection = new Vector3();
@@ -137668,14 +137767,14 @@ var jsts_min = { exports: {} };
137668
137767
  return 1e-15;
137669
137768
  }, Object.defineProperties(q, B2);
137670
137769
  var V = function() {
137671
- }, U = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
137672
- U.X.get = function() {
137770
+ }, U2 = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
137771
+ U2.X.get = function() {
137673
137772
  return 0;
137674
- }, U.Y.get = function() {
137773
+ }, U2.Y.get = function() {
137675
137774
  return 1;
137676
- }, U.Z.get = function() {
137775
+ }, U2.Z.get = function() {
137677
137776
  return 2;
137678
- }, U.M.get = function() {
137777
+ }, U2.M.get = function() {
137679
137778
  return 3;
137680
137779
  }, V.prototype.setOrdinate = function(t5, e4, n4) {
137681
137780
  }, V.prototype.size = function() {
@@ -137693,7 +137792,7 @@ var jsts_min = { exports: {} };
137693
137792
  return [x2];
137694
137793
  }, V.prototype.getClass = function() {
137695
137794
  return V;
137696
- }, Object.defineProperties(V, U);
137795
+ }, Object.defineProperties(V, U2);
137697
137796
  var z2 = function() {
137698
137797
  }, X3 = function(t5) {
137699
137798
  function e4() {
@@ -166103,7 +166202,7 @@ const esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
166103
166202
  atan: atan$3,
166104
166203
  clamp: clamp$3,
166105
166204
  clone: clone$9,
166106
- config: config$2,
166205
+ config: config$3,
166107
166206
  configure,
166108
166207
  cos: cos$5,
166109
166208
  degrees: degrees$5,
@@ -170537,16 +170636,16 @@ async function getDecoder(fileDirectory) {
170537
170636
  const Decoder = await importFn();
170538
170637
  return new Decoder(fileDirectory);
170539
170638
  }
170540
- addDecoder([void 0, 1], () => import("./raw-a36c9f65.js").then((m2) => m2.default));
170541
- addDecoder(5, () => import("./lzw-8f645795.js").then((m2) => m2.default));
170639
+ addDecoder([void 0, 1], () => import("./raw-dc6571a4.js").then((m2) => m2.default));
170640
+ addDecoder(5, () => import("./lzw-c15ba7a3.js").then((m2) => m2.default));
170542
170641
  addDecoder(6, () => {
170543
170642
  throw new Error("old style JPEG compression is not supported.");
170544
170643
  });
170545
- addDecoder(7, () => import("./jpeg-d904d490.js").then((m2) => m2.default));
170546
- addDecoder([8, 32946], () => import("./deflate-0e6942ee.js").then((m2) => m2.default));
170547
- addDecoder(32773, () => import("./packbits-d51ee8e1.js").then((m2) => m2.default));
170548
- addDecoder(34887, () => import("./lerc-92ba15d8.js").then((m2) => m2.default));
170549
- addDecoder(50001, () => import("./webimage-bc0ca93d.js").then((m2) => m2.default));
170644
+ addDecoder(7, () => import("./jpeg-f8f11856.js").then((m2) => m2.default));
170645
+ addDecoder([8, 32946], () => import("./deflate-ce341fc9.js").then((m2) => m2.default));
170646
+ addDecoder(32773, () => import("./packbits-4d4e9377.js").then((m2) => m2.default));
170647
+ addDecoder(34887, () => import("./lerc-07a5c2dc.js").then((m2) => m2.default));
170648
+ addDecoder(50001, () => import("./webimage-b407d15a.js").then((m2) => m2.default));
170550
170649
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
170551
170650
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
170552
170651
  }
@@ -175551,14 +175650,14 @@ const makeTable = () => {
175551
175650
  return table;
175552
175651
  };
175553
175652
  const crcTable = new Uint32Array(makeTable());
175554
- const crc32 = (crc, buf, len2, pos) => {
175653
+ const crc32 = (crc2, buf, len2, pos) => {
175555
175654
  const t4 = crcTable;
175556
175655
  const end = pos + len2;
175557
- crc ^= -1;
175656
+ crc2 ^= -1;
175558
175657
  for (let i2 = pos; i2 < end; i2++) {
175559
- crc = crc >>> 8 ^ t4[(crc ^ buf[i2]) & 255];
175658
+ crc2 = crc2 >>> 8 ^ t4[(crc2 ^ buf[i2]) & 255];
175560
175659
  }
175561
- return crc ^ -1;
175660
+ return crc2 ^ -1;
175562
175661
  };
175563
175662
  var crc32_1 = crc32;
175564
175663
  var messages = {
@@ -177760,7 +177859,7 @@ const updatewindow = (strm, src2, end, copy2) => {
177760
177859
  }
177761
177860
  return 0;
177762
177861
  };
177763
- const inflate = (strm, flush2) => {
177862
+ const inflate$1 = (strm, flush2) => {
177764
177863
  let state;
177765
177864
  let input, output2;
177766
177865
  let next3;
@@ -178717,7 +178816,7 @@ var inflateReset2_1 = inflateReset2;
178717
178816
  var inflateResetKeep_1 = inflateResetKeep;
178718
178817
  var inflateInit_1 = inflateInit;
178719
178818
  var inflateInit2_1 = inflateInit2;
178720
- var inflate_2 = inflate;
178819
+ var inflate_2 = inflate$1;
178721
178820
  var inflateEnd_1 = inflateEnd;
178722
178821
  var inflateGetHeader_1 = inflateGetHeader;
178723
178822
  var inflateSetDictionary_1 = inflateSetDictionary;
@@ -178899,22 +178998,22 @@ Inflate.prototype.onEnd = function(status) {
178899
178998
  this.err = status;
178900
178999
  this.msg = this.strm.msg;
178901
179000
  };
178902
- function inflate$1(input, options) {
179001
+ function inflate$1$1(input, options) {
178903
179002
  const inflator = new Inflate(options);
178904
179003
  inflator.push(input);
178905
179004
  if (inflator.err)
178906
179005
  throw inflator.msg || messages[inflator.err];
178907
179006
  return inflator.result;
178908
179007
  }
178909
- function inflateRaw(input, options) {
179008
+ function inflateRaw$1(input, options) {
178910
179009
  options = options || {};
178911
179010
  options.raw = true;
178912
- return inflate$1(input, options);
179011
+ return inflate$1$1(input, options);
178913
179012
  }
178914
179013
  var Inflate_1 = Inflate;
178915
- var inflate_2$1 = inflate$1;
178916
- var inflateRaw_1 = inflateRaw;
178917
- var ungzip = inflate$1;
179014
+ var inflate_2$1 = inflate$1$1;
179015
+ var inflateRaw_1 = inflateRaw$1;
179016
+ var ungzip = inflate$1$1;
178918
179017
  var constants$2$1 = constants$3;
178919
179018
  var inflate_1$1 = {
178920
179019
  Inflate: Inflate_1,
@@ -178924,14 +179023,14 @@ var inflate_1$1 = {
178924
179023
  constants: constants$2$1
178925
179024
  };
178926
179025
  const { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;
178927
- const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;
179026
+ const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1$1, ungzip: ungzip$1 } = inflate_1$1;
178928
179027
  var Deflate_1$1 = Deflate$1;
178929
179028
  var deflate_1$2 = deflate$2;
178930
179029
  var deflateRaw_1$1 = deflateRaw$1;
178931
179030
  var gzip_1$1 = gzip$1;
178932
179031
  var Inflate_1$1 = Inflate$1;
178933
179032
  var inflate_1$2 = inflate$2;
178934
- var inflateRaw_1$1 = inflateRaw$1;
179033
+ var inflateRaw_1$1 = inflateRaw$1$1;
178935
179034
  var ungzip_1 = ungzip$1;
178936
179035
  var constants_1 = constants$3;
178937
179036
  var pako = {
@@ -179317,7 +179416,7 @@ var blosc_codec = function() {
179317
179416
  if (h2.length !== d.length)
179318
179417
  throw new La("Mismatched type converter count");
179319
179418
  for (var l2 = 0; l2 < d.length; ++l2)
179320
- U(d[l2], h2[l2]);
179419
+ U2(d[l2], h2[l2]);
179321
179420
  }
179322
179421
  var d = [];
179323
179422
  d.forEach(function(h2) {
@@ -179333,7 +179432,7 @@ var blosc_codec = function() {
179333
179432
  });
179334
179433
  0 === g2.length && c2(e3);
179335
179434
  }
179336
- function U(a2, b2, c2) {
179435
+ function U2(a2, b2, c2) {
179337
179436
  c2 = c2 || {};
179338
179437
  if (!("argPackAdvance" in b2))
179339
179438
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
@@ -179528,7 +179627,7 @@ var blosc_codec = function() {
179528
179627
  }, z: function(a2, b2, c2, d, e3) {
179529
179628
  var g2 = Fa(c2);
179530
179629
  b2 = P2(b2);
179531
- U(a2, { name: b2, fromWireType: function(k) {
179630
+ U2(a2, { name: b2, fromWireType: function(k) {
179532
179631
  return !!k;
179533
179632
  }, toWireType: function(k, h2) {
179534
179633
  return h2 ? d : e3;
@@ -179545,7 +179644,7 @@ var blosc_codec = function() {
179545
179644
  }, M: null });
179546
179645
  }, y: function(a2, b2) {
179547
179646
  b2 = P2(b2);
179548
- U(a2, { name: b2, fromWireType: function(c2) {
179647
+ U2(a2, { name: b2, fromWireType: function(c2) {
179549
179648
  var d = V[c2].value;
179550
179649
  Qa(c2);
179551
179650
  return d;
@@ -179555,7 +179654,7 @@ var blosc_codec = function() {
179555
179654
  }, h: function(a2, b2, c2) {
179556
179655
  c2 = Fa(c2);
179557
179656
  b2 = P2(b2);
179558
- U(a2, { name: b2, fromWireType: function(d) {
179657
+ U2(a2, { name: b2, fromWireType: function(d) {
179559
179658
  return d;
179560
179659
  }, toWireType: function(d, e3) {
179561
179660
  if ("number" !== typeof e3 && "boolean" !== typeof e3)
@@ -179623,7 +179722,7 @@ var blosc_codec = function() {
179623
179722
  };
179624
179723
  }
179625
179724
  var l2 = -1 != b2.indexOf("unsigned");
179626
- U(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
179725
+ U2(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
179627
179726
  if ("number" !== typeof p && "boolean" !== typeof p)
179628
179727
  throw new TypeError('Cannot convert "' + Ta(p) + '" to ' + this.name);
179629
179728
  if (p < d || p > e3)
@@ -179642,11 +179741,11 @@ var blosc_codec = function() {
179642
179741
  }
179643
179742
  var e3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b2];
179644
179743
  c2 = P2(c2);
179645
- U(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
179744
+ U2(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
179646
179745
  }, i: function(a2, b2) {
179647
179746
  b2 = P2(b2);
179648
179747
  var c2 = "std::string" === b2;
179649
- U(a2, { name: b2, fromWireType: function(d) {
179748
+ U2(a2, { name: b2, fromWireType: function(d) {
179650
179749
  var e3 = G2[d >> 2];
179651
179750
  if (c2)
179652
179751
  for (var g2 = d + 4, k = 0; k <= e3; ++k) {
@@ -179713,7 +179812,7 @@ var blosc_codec = function() {
179713
179812
  4 === b2 && (d = na, e3 = oa, g2 = pa2, k = function() {
179714
179813
  return G2;
179715
179814
  }, h2 = 2);
179716
- U(a2, { name: c2, fromWireType: function(l2) {
179815
+ U2(a2, { name: c2, fromWireType: function(l2) {
179717
179816
  for (var n3 = G2[l2 >> 2], p = k(), q, x2 = l2 + 4, B2 = 0; B2 <= n3; ++B2) {
179718
179817
  var m2 = l2 + 4 + B2 * b2;
179719
179818
  if (B2 == n3 || 0 == p[m2 >> h2])
@@ -179733,7 +179832,7 @@ var blosc_codec = function() {
179733
179832
  } });
179734
179833
  }, A: function(a2, b2) {
179735
179834
  b2 = P2(b2);
179736
- U(a2, {
179835
+ U2(a2, {
179737
179836
  aa: true,
179738
179837
  name: b2,
179739
179838
  argPackAdvance: 0,
@@ -189820,6 +189919,7 @@ function MultiLegend(props2) {
189820
189919
  spotLayerScopes,
189821
189920
  spotLayerCoordination,
189822
189921
  spotMultiExpressionExtents,
189922
+ spotMultiFeatureLabels,
189823
189923
  // Points
189824
189924
  pointLayerScopes,
189825
189925
  pointLayerCoordination
@@ -189858,26 +189958,8 @@ function MultiLegend(props2) {
189858
189958
  const firstExpressionExtent = expressionExtents?.[0];
189859
189959
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
189860
189960
  const height2 = isStaticColor ? 20 : 36;
189861
- return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, {
189862
- positionRelative: true,
189863
- highContrast: true,
189864
- showObsLabel: true,
189865
- visible: spatialLayerVisible,
189866
- theme,
189867
- obsType,
189868
- featureType,
189869
- featureValueType,
189870
- obsColorEncoding,
189871
- spatialLayerColor,
189872
- featureSelection,
189873
- // featureLabelsMap={featureLabelsMap} // TODO
189874
- featureValueColormap,
189875
- featureValueColormapRange,
189876
- extent: firstExpressionExtent,
189877
- height: height2,
189878
- obsSetSelection,
189879
- obsSetColor
189880
- }, layerScope) : null;
189961
+ const featureLabelsMap = spotMultiFeatureLabels?.[layerScope]?.featureLabelsMap;
189962
+ return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, { positionRelative: true, highContrast: true, showObsLabel: true, visible: spatialLayerVisible, theme, obsType, featureType, featureValueType, obsColorEncoding, spatialLayerColor, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, extent: firstExpressionExtent, height: height2, obsSetSelection, obsSetColor }, layerScope) : null;
189881
189963
  }) : null, segmentationLayerScopes ? reversedSegmentationLayerScopes.flatMap((layerScope) => {
189882
189964
  const layerCoordination = segmentationLayerCoordination[0][layerScope];
189883
189965
  const channelScopes = segmentationChannelScopesByLayer[layerScope];
@@ -190493,7 +190575,7 @@ function isFunctionNode(x2) {
190493
190575
  function isIndexNode(x2) {
190494
190576
  return x2 && x2.isIndexNode === true && x2.constructor.prototype.isNode === true || false;
190495
190577
  }
190496
- function isNode(x2) {
190578
+ function isNode$1(x2) {
190497
190579
  return x2 && x2.isNode === true && x2.constructor.prototype.isNode === true || false;
190498
190580
  }
190499
190581
  function isObjectNode(x2) {
@@ -190541,7 +190623,7 @@ function typeOf(x2) {
190541
190623
  return "Range";
190542
190624
  if (isResultSet(x2))
190543
190625
  return "ResultSet";
190544
- if (isNode(x2))
190626
+ if (isNode$1(x2))
190545
190627
  return x2.type;
190546
190628
  if (isChain(x2))
190547
190629
  return "Chain";
@@ -190643,13 +190725,13 @@ function pickShallow(object2, properties2) {
190643
190725
  }
190644
190726
  var MATRIX_OPTIONS = ["Matrix", "Array"];
190645
190727
  var NUMBER_OPTIONS = ["number", "BigNumber", "Fraction"];
190646
- var config$1 = function config(options) {
190728
+ var config$2 = function config(options) {
190647
190729
  if (options) {
190648
190730
  throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n import { create, all } from 'mathjs';\n const mathjs = create(all);\n mathjs.config({ number: 'BigNumber' });\n");
190649
190731
  }
190650
190732
  return Object.freeze(DEFAULT_CONFIG);
190651
190733
  };
190652
- _extends$a(config$1, DEFAULT_CONFIG, {
190734
+ _extends$a(config$2, DEFAULT_CONFIG, {
190653
190735
  MATRIX_OPTIONS,
190654
190736
  NUMBER_OPTIONS
190655
190737
  });
@@ -192415,7 +192497,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$R, function crea
192415
192497
  },
192416
192498
  {
192417
192499
  name: "Node",
192418
- test: isNode
192500
+ test: isNode$1
192419
192501
  },
192420
192502
  {
192421
192503
  name: "ObjectNode",
@@ -194592,7 +194674,7 @@ function ceil$2(x2) {
194592
194674
  function clamp$1(x2, min2, max2) {
194593
194675
  return new this(x2).clamp(min2, max2);
194594
194676
  }
194595
- function config2(obj) {
194677
+ function config$1(obj) {
194596
194678
  if (!obj || typeof obj !== "object")
194597
194679
  throw Error(decimalError + "Object expected");
194598
194680
  var i2, p, v, useDefaults = obj.defaults === true, ps = [
@@ -194744,7 +194826,7 @@ function clone$1(obj) {
194744
194826
  Decimal2.ROUND_HALF_CEIL = 7;
194745
194827
  Decimal2.ROUND_HALF_FLOOR = 8;
194746
194828
  Decimal2.EUCLID = 9;
194747
- Decimal2.config = Decimal2.set = config2;
194829
+ Decimal2.config = Decimal2.set = config$1;
194748
194830
  Decimal2.clone = clone$1;
194749
194831
  Decimal2.isDecimal = isDecimalInstance;
194750
194832
  Decimal2.abs = abs$4;
@@ -205145,7 +205227,7 @@ var createDivide = /* @__PURE__ */ factory(name$2, dependencies$1, (_ref3) => {
205145
205227
  });
205146
205228
  var Complex = /* @__PURE__ */ createComplexClass({});
205147
205229
  var BigNumber = /* @__PURE__ */ createBigNumberClass({
205148
- config: config$1
205230
+ config: config$2
205149
205231
  });
205150
205232
  var Matrix2 = /* @__PURE__ */ createMatrixClass({});
205151
205233
  var Fraction = /* @__PURE__ */ createFractionClass({});
@@ -205162,7 +205244,7 @@ var isNumeric$1 = /* @__PURE__ */ createIsNumeric({
205162
205244
  typed
205163
205245
  });
205164
205246
  var equalScalar = /* @__PURE__ */ createEqualScalar({
205165
- config: config$1,
205247
+ config: config$2,
205166
205248
  typed
205167
205249
  });
205168
205250
  var number$9 = /* @__PURE__ */ createNumber({
@@ -205205,18 +205287,18 @@ var identity$8 = /* @__PURE__ */ createIdentity({
205205
205287
  BigNumber,
205206
205288
  DenseMatrix,
205207
205289
  SparseMatrix,
205208
- config: config$1,
205290
+ config: config$2,
205209
205291
  matrix,
205210
205292
  typed
205211
205293
  });
205212
205294
  var size$1 = /* @__PURE__ */ createSize({
205213
205295
  matrix,
205214
- config: config$1,
205296
+ config: config$2,
205215
205297
  typed
205216
205298
  });
205217
205299
  var zeros = /* @__PURE__ */ createZeros({
205218
205300
  BigNumber,
205219
- config: config$1,
205301
+ config: config$2,
205220
205302
  matrix,
205221
205303
  typed
205222
205304
  });
@@ -205232,20 +205314,20 @@ var compare$a = /* @__PURE__ */ createCompare({
205232
205314
  BigNumber,
205233
205315
  DenseMatrix,
205234
205316
  Fraction,
205235
- config: config$1,
205317
+ config: config$2,
205236
205318
  equalScalar,
205237
205319
  matrix,
205238
205320
  typed
205239
205321
  });
205240
205322
  var smaller = /* @__PURE__ */ createSmaller({
205241
205323
  DenseMatrix,
205242
- config: config$1,
205324
+ config: config$2,
205243
205325
  matrix,
205244
205326
  typed
205245
205327
  });
205246
205328
  var larger = /* @__PURE__ */ createLarger({
205247
205329
  DenseMatrix,
205248
- config: config$1,
205330
+ config: config$2,
205249
205331
  matrix,
205250
205332
  typed
205251
205333
  });
@@ -205261,7 +205343,7 @@ var dot = /* @__PURE__ */ createDot({
205261
205343
  typed
205262
205344
  });
205263
205345
  var floor$1 = /* @__PURE__ */ createFloor({
205264
- config: config$1,
205346
+ config: config$2,
205265
205347
  equalScalar,
205266
205348
  matrix,
205267
205349
  round: round$1,
@@ -205277,7 +205359,7 @@ var multiply = /* @__PURE__ */ createMultiply({
205277
205359
  });
205278
205360
  var pow$5 = /* @__PURE__ */ createPow({
205279
205361
  Complex,
205280
- config: config$1,
205362
+ config: config$2,
205281
205363
  fraction,
205282
205364
  identity: identity$8,
205283
205365
  matrix,
@@ -205309,7 +205391,7 @@ var equal$1 = /* @__PURE__ */ createEqual({
205309
205391
  typed
205310
205392
  });
205311
205393
  var ceil$1 = /* @__PURE__ */ createCeil({
205312
- config: config$1,
205394
+ config: config$2,
205313
205395
  equalScalar,
205314
205396
  matrix,
205315
205397
  round: round$1,
@@ -205379,7 +205461,7 @@ var Unit = /* @__PURE__ */ createUnitClass({
205379
205461
  Fraction,
205380
205462
  abs: abs$3,
205381
205463
  addScalar,
205382
- config: config$1,
205464
+ config: config$2,
205383
205465
  divideScalar,
205384
205466
  equal: equal$1,
205385
205467
  fix,
@@ -205837,14 +205919,14 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
205837
205919
  return result;
205838
205920
  }
205839
205921
  class NodeNotFoundError extends Error {
205840
- constructor(msg) {
205841
- super(msg);
205922
+ constructor(context2, options = {}) {
205923
+ super(`Node not found: ${context2}`, options);
205842
205924
  this.name = "NodeNotFoundError";
205843
205925
  }
205844
205926
  }
205845
205927
  class KeyError extends Error {
205846
- constructor(msg) {
205847
- super(msg);
205928
+ constructor(path2) {
205929
+ super(`Missing key: ${path2}`);
205848
205930
  this.name = "KeyError";
205849
205931
  }
205850
205932
  }
@@ -205955,56 +206037,56 @@ class ByteStringArray {
205955
206037
  _encoder = new WeakMap();
205956
206038
  const _UnicodeStringArray = class {
205957
206039
  constructor(chars, x2, byteOffset, length2) {
205958
- __publicField(this, "_data");
206040
+ __privateAdd(this, _data, void 0);
205959
206041
  __publicField(this, "chars");
205960
206042
  __privateAdd(this, _encode_buffer, void 0);
205961
206043
  this.chars = chars;
205962
206044
  if (typeof x2 === "number") {
205963
- this._data = new Int32Array(x2 * chars);
206045
+ __privateSet(this, _data, new Int32Array(x2 * chars));
205964
206046
  } else if (x2 instanceof ArrayBuffer) {
205965
206047
  if (length2)
205966
206048
  length2 *= chars;
205967
- this._data = new Int32Array(x2, byteOffset, length2);
206049
+ __privateSet(this, _data, new Int32Array(x2, byteOffset, length2));
205968
206050
  } else {
205969
206051
  const values3 = x2;
205970
206052
  const d = new _UnicodeStringArray(chars, 1);
205971
- this._data = new Int32Array(function* () {
206053
+ __privateSet(this, _data, new Int32Array(function* () {
205972
206054
  for (let str of values3) {
205973
206055
  d.set(0, str);
205974
- yield* d._data;
206056
+ yield* __privateGet(d, _data);
205975
206057
  }
205976
- }());
206058
+ }()));
205977
206059
  }
205978
206060
  __privateSet(this, _encode_buffer, new Int32Array(chars));
205979
206061
  }
205980
206062
  get BYTES_PER_ELEMENT() {
205981
- return this._data.BYTES_PER_ELEMENT * this.chars;
206063
+ return __privateGet(this, _data).BYTES_PER_ELEMENT * this.chars;
205982
206064
  }
205983
206065
  get byteLength() {
205984
- return this._data.byteLength;
206066
+ return __privateGet(this, _data).byteLength;
205985
206067
  }
205986
206068
  get byteOffset() {
205987
- return this._data.byteOffset;
206069
+ return __privateGet(this, _data).byteOffset;
205988
206070
  }
205989
206071
  /** @type {ArrayBuffer} */
205990
206072
  get buffer() {
205991
- return this._data.buffer;
206073
+ return __privateGet(this, _data).buffer;
205992
206074
  }
205993
206075
  /** @type {number} */
205994
206076
  get length() {
205995
- return this._data.length / this.chars;
206077
+ return __privateGet(this, _data).length / this.chars;
205996
206078
  }
205997
206079
  get(idx) {
205998
206080
  const offset6 = this.chars * idx;
205999
206081
  let result = "";
206000
206082
  for (let i2 = 0; i2 < this.chars; i2++) {
206001
- result += String.fromCodePoint(this._data[offset6 + i2]);
206083
+ result += String.fromCodePoint(__privateGet(this, _data)[offset6 + i2]);
206002
206084
  }
206003
206085
  return result.replace(/\u0000/g, "");
206004
206086
  }
206005
206087
  set(idx, value2) {
206006
206088
  const offset6 = this.chars * idx;
206007
- const view = this._data.subarray(offset6, offset6 + this.chars);
206089
+ const view = __privateGet(this, _data).subarray(offset6, offset6 + this.chars);
206008
206090
  view.fill(0);
206009
206091
  for (let i2 = 0; i2 < this.chars; i2++) {
206010
206092
  view[i2] = value2.codePointAt(i2) ?? 0;
@@ -206012,9 +206094,9 @@ const _UnicodeStringArray = class {
206012
206094
  }
206013
206095
  fill(value2) {
206014
206096
  this.set(0, value2);
206015
- let encoded = this._data.subarray(0, this.chars);
206097
+ let encoded = __privateGet(this, _data).subarray(0, this.chars);
206016
206098
  for (let i2 = 1; i2 < this.length; i2++) {
206017
- this._data.set(encoded, i2 * this.chars);
206099
+ __privateGet(this, _data).set(encoded, i2 * this.chars);
206018
206100
  }
206019
206101
  }
206020
206102
  *[Symbol.iterator]() {
@@ -206024,6 +206106,7 @@ const _UnicodeStringArray = class {
206024
206106
  }
206025
206107
  };
206026
206108
  let UnicodeStringArray = _UnicodeStringArray;
206109
+ _data = new WeakMap();
206027
206110
  _encode_buffer = new WeakMap();
206028
206111
  function json_decode_object(bytes) {
206029
206112
  const str = new TextDecoder().decode(bytes);
@@ -206388,8 +206471,115 @@ const _VLenUTF8 = class {
206388
206471
  let VLenUTF8 = _VLenUTF8;
206389
206472
  _shape2 = new WeakMap();
206390
206473
  _strides2 = new WeakMap();
206474
+ function throw_on_nan_replacer(_key, value2) {
206475
+ if (value2 !== value2) {
206476
+ throw new Error("JsonCodec allow_nan is false but NaN was encountered during encoding.");
206477
+ }
206478
+ if (value2 === Infinity) {
206479
+ throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
206480
+ }
206481
+ if (value2 === -Infinity) {
206482
+ throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
206483
+ }
206484
+ return value2;
206485
+ }
206486
+ function sort_keys_replacer(_key, value2) {
206487
+ return value2 instanceof Object && !(value2 instanceof Array) ? Object.keys(value2).sort().reduce((sorted, key2) => {
206488
+ sorted[key2] = value2[key2];
206489
+ return sorted;
206490
+ }, {}) : value2;
206491
+ }
206492
+ const _JsonCodec = class {
206493
+ constructor(configuration) {
206494
+ __publicField(this, "configuration");
206495
+ __publicField(this, "kind", "array_to_bytes");
206496
+ __privateAdd(this, _encoder_config, void 0);
206497
+ __privateAdd(this, _decoder_config, void 0);
206498
+ this.configuration = configuration;
206499
+ const { encoding = "utf-8", skipkeys = false, ensure_ascii = true, check_circular = true, allow_nan = true, sort_keys = true, indent, strict = true } = configuration;
206500
+ let separators = configuration.separators;
206501
+ if (!separators) {
206502
+ if (!indent) {
206503
+ separators = [",", ":"];
206504
+ } else {
206505
+ separators = [", ", ": "];
206506
+ }
206507
+ }
206508
+ __privateSet(this, _encoder_config, {
206509
+ encoding,
206510
+ skipkeys,
206511
+ ensure_ascii,
206512
+ check_circular,
206513
+ allow_nan,
206514
+ indent,
206515
+ separators,
206516
+ sort_keys
206517
+ });
206518
+ __privateSet(this, _decoder_config, { strict });
206519
+ }
206520
+ static fromConfig(configuration) {
206521
+ return new _JsonCodec(configuration);
206522
+ }
206523
+ encode(buf) {
206524
+ const { indent, encoding, ensure_ascii, check_circular, allow_nan, sort_keys } = __privateGet(this, _encoder_config);
206525
+ if (encoding !== "utf-8") {
206526
+ throw new Error("JsonCodec does not yet support non-utf-8 encoding.");
206527
+ }
206528
+ const replacer_functions = [];
206529
+ if (!check_circular) {
206530
+ throw new Error("JsonCodec does not yet support skipping the check for circular references during encoding.");
206531
+ }
206532
+ if (!allow_nan) {
206533
+ replacer_functions.push(throw_on_nan_replacer);
206534
+ }
206535
+ if (sort_keys) {
206536
+ replacer_functions.push(sort_keys_replacer);
206537
+ }
206538
+ const items = Array.from(buf.data);
206539
+ items.push("|O");
206540
+ items.push(buf.shape);
206541
+ let replacer2 = void 0;
206542
+ if (replacer_functions.length) {
206543
+ replacer2 = function(key2, value2) {
206544
+ let new_value = value2;
206545
+ replacer_functions.forEach((sub_replacer) => {
206546
+ new_value = sub_replacer(key2, new_value);
206547
+ });
206548
+ return new_value;
206549
+ };
206550
+ }
206551
+ let json_str = JSON.stringify(items, replacer2, indent);
206552
+ if (ensure_ascii) {
206553
+ json_str = json_str.replace(/[\u007F-\uFFFF]/g, function(chr) {
206554
+ const full_str = "0000" + chr.charCodeAt(0).toString(16);
206555
+ const sub_str = full_str.substring(full_str.length - 4);
206556
+ return "\\u" + sub_str;
206557
+ });
206558
+ }
206559
+ return new TextEncoder().encode(json_str);
206560
+ }
206561
+ decode(bytes) {
206562
+ const { strict } = __privateGet(this, _decoder_config);
206563
+ if (!strict) {
206564
+ throw new Error("JsonCodec does not yet support non-strict decoding.");
206565
+ }
206566
+ const items = json_decode_object(bytes);
206567
+ const shape2 = items.pop();
206568
+ items.pop();
206569
+ if (!shape2) {
206570
+ throw new Error("0D not implemented for JsonCodec.");
206571
+ } else {
206572
+ const stride = get_strides(shape2, "C");
206573
+ const data2 = items;
206574
+ return { data: data2, shape: shape2, stride };
206575
+ }
206576
+ }
206577
+ };
206578
+ let JsonCodec = _JsonCodec;
206579
+ _encoder_config = new WeakMap();
206580
+ _decoder_config = new WeakMap();
206391
206581
  function create_default_registry() {
206392
- return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-0acfcf7e.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-dd5ab7c8.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-abb4416a.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-cd823c38.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-4072ca78.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8);
206582
+ return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-039d2f27.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-e899c949.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-9aabb3ce.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec);
206393
206583
  }
206394
206584
  const registry = create_default_registry();
206395
206585
  function create_codec_pipeline(chunk_metadata) {
@@ -206633,6 +206823,7 @@ let Array$1 = (_c = class extends Location {
206633
206823
  return is_dtype(this.dtype, query);
206634
206824
  }
206635
206825
  }, _b = CONTEXT_MARKER, _metadata2 = new WeakMap(), _c);
206826
+ let VERSION_COUNTER = create_version_counter();
206636
206827
  function create_version_counter() {
206637
206828
  let version_counts = /* @__PURE__ */ new WeakMap();
206638
206829
  function get_counts(store2) {
@@ -206650,7 +206841,6 @@ function create_version_counter() {
206650
206841
  }
206651
206842
  };
206652
206843
  }
206653
- let VERSION_COUNTER = create_version_counter();
206654
206844
  async function load_attrs(location) {
206655
206845
  let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
206656
206846
  if (!meta_bytes)
@@ -206676,7 +206866,9 @@ async function open_array_v2(location, attrs) {
206676
206866
  let { path: path2 } = location.resolve(".zarray");
206677
206867
  let meta2 = await location.store.get(path2);
206678
206868
  if (!meta2) {
206679
- throw new NodeNotFoundError(path2);
206869
+ throw new NodeNotFoundError("v2 array", {
206870
+ cause: new KeyError(path2)
206871
+ });
206680
206872
  }
206681
206873
  VERSION_COUNTER.increment(location.store, "v2");
206682
206874
  return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta2), attrs));
@@ -206685,7 +206877,9 @@ async function open_group_v2(location, attrs) {
206685
206877
  let { path: path2 } = location.resolve(".zgroup");
206686
206878
  let meta2 = await location.store.get(path2);
206687
206879
  if (!meta2) {
206688
- throw new NodeNotFoundError(path2);
206880
+ throw new NodeNotFoundError("v2 group", {
206881
+ cause: new KeyError(path2)
206882
+ });
206689
206883
  }
206690
206884
  VERSION_COUNTER.increment(location.store, "v2");
206691
206885
  return new Group$1(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta2), attrs));
@@ -206694,7 +206888,9 @@ async function _open_v3(location) {
206694
206888
  let { store: store2, path: path2 } = location.resolve("zarr.json");
206695
206889
  let meta2 = await location.store.get(path2);
206696
206890
  if (!meta2) {
206697
- throw new NodeNotFoundError(path2);
206891
+ throw new NodeNotFoundError("v3 array or group", {
206892
+ cause: new KeyError(path2)
206893
+ });
206698
206894
  }
206699
206895
  let meta_doc = json_decode_object(meta2);
206700
206896
  if (meta_doc.node_type === "array" && (meta_doc.data_type === "uint64" || meta_doc.data_type === "int64") && meta_doc.fill_value != void 0) {
@@ -206716,8 +206912,8 @@ async function open_v3(location, options = {}) {
206716
206912
  throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
206717
206913
  }
206718
206914
  async function open(location, options = {}) {
206719
- const store2 = "store" in location ? location.store : location;
206720
- const version_max = VERSION_COUNTER.version_max(store2);
206915
+ let store2 = "store" in location ? location.store : location;
206916
+ let version_max = VERSION_COUNTER.version_max(store2);
206721
206917
  let open_primary = version_max === "v2" ? open.v2 : open.v3;
206722
206918
  let open_secondary = version_max === "v2" ? open.v3 : open.v2;
206723
206919
  return open_primary(location, options).catch((err2) => {
@@ -206761,7 +206957,7 @@ function* product(...iterables) {
206761
206957
  results[i2] = iterators[i2].next();
206762
206958
  }
206763
206959
  }
206764
- function slice_indices(start, stop3, step2, length2) {
206960
+ function slice_indices({ start, stop: stop3, step: step2 }, length2) {
206765
206961
  if (step2 === 0) {
206766
206962
  throw new Error("slice step cannot be zero");
206767
206963
  }
@@ -206802,10 +206998,7 @@ function slice$4(start, stop3, step2 = null) {
206802
206998
  return {
206803
206999
  start,
206804
207000
  stop: stop3,
206805
- step: step2,
206806
- indices(length2) {
206807
- return slice_indices(this.start, this.stop, this.step, length2);
206808
- }
207001
+ step: step2
206809
207002
  };
206810
207003
  }
206811
207004
  function create_queue() {
@@ -206873,7 +207066,7 @@ class SliceDimIndexer {
206873
207066
  __publicField(this, "dim_chunk_len");
206874
207067
  __publicField(this, "nitems");
206875
207068
  __publicField(this, "nchunks");
206876
- const [start, stop3, step2] = dim_sel.indices(dim_len);
207069
+ const [start, stop3, step2] = slice_indices(dim_sel, dim_len);
206877
207070
  this.start = start;
206878
207071
  this.stop = stop3;
206879
207072
  this.step = step2;
@@ -206958,25 +207151,20 @@ function unwrap(arr, idx) {
206958
207151
  return "get" in arr ? arr.get(idx) : arr[idx];
206959
207152
  }
206960
207153
  async function get$7(arr, selection, opts2, setter2) {
206961
- const context2 = get_context(arr);
206962
- const indexer = new BasicIndexer({
207154
+ let context2 = get_context(arr);
207155
+ let indexer = new BasicIndexer({
206963
207156
  selection,
206964
207157
  shape: arr.shape,
206965
207158
  chunk_shape: arr.chunks
206966
207159
  });
206967
- const out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
206968
- const queue = opts2.create_queue?.() ?? create_queue();
207160
+ let out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
207161
+ let queue = opts2.create_queue?.() ?? create_queue();
206969
207162
  for (const { chunk_coords, mapping } of indexer) {
206970
- queue.add(() => arr.getChunk(chunk_coords, opts2.opts).then(({ data: data2, shape: shape2, stride }) => {
206971
- const chunk = setter2.prepare(data2, shape2, stride);
207163
+ queue.add(async () => {
207164
+ let { data: data2, shape: shape2, stride } = await arr.getChunk(chunk_coords, opts2.opts);
207165
+ let chunk = setter2.prepare(data2, shape2, stride);
206972
207166
  setter2.set_from_chunk(out, chunk, mapping);
206973
- }).catch((err2) => {
206974
- if (!(err2 instanceof KeyError))
206975
- throw err2;
206976
- if (context2.fill_value) {
206977
- setter2.set_scalar(out, mapping.map((m2) => m2.to).filter((s2) => s2 !== null), context2.fill_value);
206978
- }
206979
- }));
207167
+ });
206980
207168
  }
206981
207169
  await queue.onIdle();
206982
207170
  return indexer.shape.length === 0 ? unwrap(out.data, 0) : out;
@@ -207129,6 +207317,9 @@ function set_from_chunk_binary(dest, src2, bytes_per_element2, projections2) {
207129
207317
  }, bytes_per_element2, projs);
207130
207318
  }
207131
207319
  }
207320
+ function strip_prefix(path2) {
207321
+ return path2.slice(1);
207322
+ }
207132
207323
  function fetch_range(url, offset6, length2, opts2 = {}) {
207133
207324
  if (offset6 !== void 0 && length2 !== void 0) {
207134
207325
  opts2 = {
@@ -207141,6 +207332,16 @@ function fetch_range(url, offset6, length2, opts2 = {}) {
207141
207332
  }
207142
207333
  return fetch(url, opts2);
207143
207334
  }
207335
+ function merge_init(storeOverrides, requestOverrides) {
207336
+ return {
207337
+ ...storeOverrides,
207338
+ ...requestOverrides,
207339
+ headers: {
207340
+ ...storeOverrides.headers,
207341
+ ...requestOverrides.headers
207342
+ }
207343
+ };
207344
+ }
207144
207345
  function resolve$1(root2, path2) {
207145
207346
  const base2 = typeof root2 === "string" ? new URL(root2) : root2;
207146
207347
  if (!base2.pathname.endsWith("/")) {
@@ -207205,14 +207406,7 @@ _overrides = new WeakMap();
207205
207406
  _use_suffix_request = new WeakMap();
207206
207407
  _merge_init = new WeakSet();
207207
207408
  merge_init_fn = function(overrides) {
207208
- return {
207209
- ...__privateGet(this, _overrides),
207210
- ...overrides,
207211
- headers: {
207212
- ...__privateGet(this, _overrides).headers,
207213
- ...overrides.headers
207214
- }
207215
- };
207409
+ return merge_init(__privateGet(this, _overrides), overrides);
207216
207410
  };
207217
207411
  const FetchStore$1 = FetchStore;
207218
207412
  function getV2DataType(dtype) {
@@ -207254,8 +207448,896 @@ function createZarrArrayAdapter(arr) {
207254
207448
  }
207255
207449
  });
207256
207450
  }
207257
- function zarrOpenRoot(url, requestInit2) {
207258
- const store2 = new FetchStore$1(url, { overrides: requestInit2 });
207451
+ function readBlobAsArrayBuffer(blob) {
207452
+ if (blob.arrayBuffer) {
207453
+ return blob.arrayBuffer();
207454
+ }
207455
+ return new Promise((resolve2, reject) => {
207456
+ const reader = new FileReader();
207457
+ reader.addEventListener("loadend", () => {
207458
+ resolve2(reader.result);
207459
+ });
207460
+ reader.addEventListener("error", reject);
207461
+ reader.readAsArrayBuffer(blob);
207462
+ });
207463
+ }
207464
+ async function readBlobAsUint8Array(blob) {
207465
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
207466
+ return new Uint8Array(arrayBuffer2);
207467
+ }
207468
+ function isBlob(v) {
207469
+ return typeof Blob !== "undefined" && v instanceof Blob;
207470
+ }
207471
+ function isSharedArrayBuffer(b2) {
207472
+ return typeof SharedArrayBuffer !== "undefined" && b2 instanceof SharedArrayBuffer;
207473
+ }
207474
+ const isNode = typeof process !== "undefined" && process.versions && typeof process.versions.node !== "undefined" && typeof process.versions.electron === "undefined";
207475
+ function isTypedArraySameAsArrayBuffer(typedArray) {
207476
+ return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;
207477
+ }
207478
+ class ArrayBufferReader {
207479
+ constructor(arrayBufferOrView) {
207480
+ this.typedArray = arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView) ? new Uint8Array(arrayBufferOrView) : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);
207481
+ }
207482
+ async getLength() {
207483
+ return this.typedArray.byteLength;
207484
+ }
207485
+ async read(offset6, length2) {
207486
+ return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset6, length2);
207487
+ }
207488
+ }
207489
+ let BlobReader$1 = class BlobReader {
207490
+ constructor(blob) {
207491
+ this.blob = blob;
207492
+ }
207493
+ async getLength() {
207494
+ return this.blob.size;
207495
+ }
207496
+ async read(offset6, length2) {
207497
+ const blob = this.blob.slice(offset6, offset6 + length2);
207498
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
207499
+ return new Uint8Array(arrayBuffer2);
207500
+ }
207501
+ async sliceAsBlob(offset6, length2, type3 = "") {
207502
+ return this.blob.slice(offset6, offset6 + length2, type3);
207503
+ }
207504
+ };
207505
+ function inflate(data2, buf) {
207506
+ var u8 = Uint8Array;
207507
+ if (data2[0] == 3 && data2[1] == 0)
207508
+ return buf ? buf : new u8(0);
207509
+ var bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;
207510
+ var noBuf = buf == null;
207511
+ if (noBuf)
207512
+ buf = new u8(data2.length >>> 2 << 3);
207513
+ var BFINAL = 0, BTYPE = 0, HLIT = 0, HDIST = 0, HCLEN = 0, ML = 0, MD = 0;
207514
+ var off = 0, pos = 0;
207515
+ var lmap, dmap;
207516
+ while (BFINAL == 0) {
207517
+ BFINAL = bitsF(data2, pos, 1);
207518
+ BTYPE = bitsF(data2, pos + 1, 2);
207519
+ pos += 3;
207520
+ if (BTYPE == 0) {
207521
+ if ((pos & 7) != 0)
207522
+ pos += 8 - (pos & 7);
207523
+ var p8 = (pos >>> 3) + 4, len2 = data2[p8 - 4] | data2[p8 - 3] << 8;
207524
+ if (noBuf)
207525
+ buf = _check(buf, off + len2);
207526
+ buf.set(new u8(data2.buffer, data2.byteOffset + p8, len2), off);
207527
+ pos = p8 + len2 << 3;
207528
+ off += len2;
207529
+ continue;
207530
+ }
207531
+ if (noBuf)
207532
+ buf = _check(buf, off + (1 << 17));
207533
+ if (BTYPE == 1) {
207534
+ lmap = U.flmap;
207535
+ dmap = U.fdmap;
207536
+ ML = (1 << 9) - 1;
207537
+ MD = (1 << 5) - 1;
207538
+ }
207539
+ if (BTYPE == 2) {
207540
+ HLIT = bitsE(data2, pos, 5) + 257;
207541
+ HDIST = bitsE(data2, pos + 5, 5) + 1;
207542
+ HCLEN = bitsE(data2, pos + 10, 4) + 4;
207543
+ pos += 14;
207544
+ for (var i2 = 0; i2 < 38; i2 += 2) {
207545
+ U.itree[i2] = 0;
207546
+ U.itree[i2 + 1] = 0;
207547
+ }
207548
+ var tl2 = 1;
207549
+ for (var i2 = 0; i2 < HCLEN; i2++) {
207550
+ var l2 = bitsE(data2, pos + i2 * 3, 3);
207551
+ U.itree[(U.ordr[i2] << 1) + 1] = l2;
207552
+ if (l2 > tl2)
207553
+ tl2 = l2;
207554
+ }
207555
+ pos += 3 * HCLEN;
207556
+ makeCodes(U.itree, tl2);
207557
+ codes2map(U.itree, tl2, U.imap);
207558
+ lmap = U.lmap;
207559
+ dmap = U.dmap;
207560
+ pos = decodeTiny(U.imap, (1 << tl2) - 1, HLIT + HDIST, data2, pos, U.ttree);
207561
+ var mx0 = _copyOut(U.ttree, 0, HLIT, U.ltree);
207562
+ ML = (1 << mx0) - 1;
207563
+ var mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree);
207564
+ MD = (1 << mx1) - 1;
207565
+ makeCodes(U.ltree, mx0);
207566
+ codes2map(U.ltree, mx0, lmap);
207567
+ makeCodes(U.dtree, mx1);
207568
+ codes2map(U.dtree, mx1, dmap);
207569
+ }
207570
+ while (true) {
207571
+ var code = lmap[get17(data2, pos) & ML];
207572
+ pos += code & 15;
207573
+ var lit = code >>> 4;
207574
+ if (lit >>> 8 == 0) {
207575
+ buf[off++] = lit;
207576
+ } else if (lit == 256) {
207577
+ break;
207578
+ } else {
207579
+ var end = off + lit - 254;
207580
+ if (lit > 264) {
207581
+ var ebs = U.ldef[lit - 257];
207582
+ end = off + (ebs >>> 3) + bitsE(data2, pos, ebs & 7);
207583
+ pos += ebs & 7;
207584
+ }
207585
+ var dcode = dmap[get17(data2, pos) & MD];
207586
+ pos += dcode & 15;
207587
+ var dlit = dcode >>> 4;
207588
+ var dbs = U.ddef[dlit], dst = (dbs >>> 4) + bitsF(data2, pos, dbs & 15);
207589
+ pos += dbs & 15;
207590
+ if (noBuf)
207591
+ buf = _check(buf, off + (1 << 17));
207592
+ while (off < end) {
207593
+ buf[off] = buf[off++ - dst];
207594
+ buf[off] = buf[off++ - dst];
207595
+ buf[off] = buf[off++ - dst];
207596
+ buf[off] = buf[off++ - dst];
207597
+ }
207598
+ off = end;
207599
+ }
207600
+ }
207601
+ }
207602
+ return buf.length == off ? buf : buf.slice(0, off);
207603
+ }
207604
+ function _check(buf, len2) {
207605
+ var bl2 = buf.length;
207606
+ if (len2 <= bl2)
207607
+ return buf;
207608
+ var nbuf = new Uint8Array(Math.max(bl2 << 1, len2));
207609
+ nbuf.set(buf, 0);
207610
+ return nbuf;
207611
+ }
207612
+ function _decodeTiny(lmap, LL, len2, data2, pos, tree2) {
207613
+ var bitsE = _bitsE, get17 = _get17;
207614
+ var i2 = 0;
207615
+ while (i2 < len2) {
207616
+ var code = lmap[get17(data2, pos) & LL];
207617
+ pos += code & 15;
207618
+ var lit = code >>> 4;
207619
+ if (lit <= 15) {
207620
+ tree2[i2] = lit;
207621
+ i2++;
207622
+ } else {
207623
+ var ll = 0, n3 = 0;
207624
+ if (lit == 16) {
207625
+ n3 = 3 + bitsE(data2, pos, 2);
207626
+ pos += 2;
207627
+ ll = tree2[i2 - 1];
207628
+ } else if (lit == 17) {
207629
+ n3 = 3 + bitsE(data2, pos, 3);
207630
+ pos += 3;
207631
+ } else if (lit == 18) {
207632
+ n3 = 11 + bitsE(data2, pos, 7);
207633
+ pos += 7;
207634
+ }
207635
+ var ni = i2 + n3;
207636
+ while (i2 < ni) {
207637
+ tree2[i2] = ll;
207638
+ i2++;
207639
+ }
207640
+ }
207641
+ }
207642
+ return pos;
207643
+ }
207644
+ function _copyOut(src2, off, len2, tree2) {
207645
+ var mx = 0, i2 = 0, tl2 = tree2.length >>> 1;
207646
+ while (i2 < len2) {
207647
+ var v = src2[i2 + off];
207648
+ tree2[i2 << 1] = 0;
207649
+ tree2[(i2 << 1) + 1] = v;
207650
+ if (v > mx)
207651
+ mx = v;
207652
+ i2++;
207653
+ }
207654
+ while (i2 < tl2) {
207655
+ tree2[i2 << 1] = 0;
207656
+ tree2[(i2 << 1) + 1] = 0;
207657
+ i2++;
207658
+ }
207659
+ return mx;
207660
+ }
207661
+ function makeCodes(tree2, MAX_BITS2) {
207662
+ var max_code = tree2.length;
207663
+ var code, bits, n3, i2, len2;
207664
+ var bl_count = U.bl_count;
207665
+ for (var i2 = 0; i2 <= MAX_BITS2; i2++)
207666
+ bl_count[i2] = 0;
207667
+ for (i2 = 1; i2 < max_code; i2 += 2)
207668
+ bl_count[tree2[i2]]++;
207669
+ var next_code = U.next_code;
207670
+ code = 0;
207671
+ bl_count[0] = 0;
207672
+ for (bits = 1; bits <= MAX_BITS2; bits++) {
207673
+ code = code + bl_count[bits - 1] << 1;
207674
+ next_code[bits] = code;
207675
+ }
207676
+ for (n3 = 0; n3 < max_code; n3 += 2) {
207677
+ len2 = tree2[n3 + 1];
207678
+ if (len2 != 0) {
207679
+ tree2[n3] = next_code[len2];
207680
+ next_code[len2]++;
207681
+ }
207682
+ }
207683
+ }
207684
+ function codes2map(tree2, MAX_BITS2, map2) {
207685
+ var max_code = tree2.length;
207686
+ var r15 = U.rev15;
207687
+ for (var i2 = 0; i2 < max_code; i2 += 2)
207688
+ if (tree2[i2 + 1] != 0) {
207689
+ var lit = i2 >> 1;
207690
+ var cl = tree2[i2 + 1], val = lit << 4 | cl;
207691
+ var rest = MAX_BITS2 - cl, i0 = tree2[i2] << rest, i1 = i0 + (1 << rest);
207692
+ while (i0 != i1) {
207693
+ var p02 = r15[i0] >>> 15 - MAX_BITS2;
207694
+ map2[p02] = val;
207695
+ i0++;
207696
+ }
207697
+ }
207698
+ }
207699
+ function revCodes(tree2, MAX_BITS2) {
207700
+ var r15 = U.rev15, imb = 15 - MAX_BITS2;
207701
+ for (var i2 = 0; i2 < tree2.length; i2 += 2) {
207702
+ var i0 = tree2[i2] << MAX_BITS2 - tree2[i2 + 1];
207703
+ tree2[i2] = r15[i0] >>> imb;
207704
+ }
207705
+ }
207706
+ function _bitsE(dt, pos, length2) {
207707
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8) >>> (pos & 7) & (1 << length2) - 1;
207708
+ }
207709
+ function _bitsF(dt, pos, length2) {
207710
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7) & (1 << length2) - 1;
207711
+ }
207712
+ function _get17(dt, pos) {
207713
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7);
207714
+ }
207715
+ const U = function() {
207716
+ var u16 = Uint16Array, u32 = Uint32Array;
207717
+ return {
207718
+ next_code: new u16(16),
207719
+ bl_count: new u16(16),
207720
+ ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
207721
+ of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999],
207722
+ exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],
207723
+ ldef: new u16(32),
207724
+ df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535],
207725
+ dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],
207726
+ ddef: new u32(32),
207727
+ flmap: new u16(512),
207728
+ fltree: [],
207729
+ fdmap: new u16(32),
207730
+ fdtree: [],
207731
+ lmap: new u16(32768),
207732
+ ltree: [],
207733
+ ttree: [],
207734
+ dmap: new u16(32768),
207735
+ dtree: [],
207736
+ imap: new u16(512),
207737
+ itree: [],
207738
+ //rev9 : new u16( 512)
207739
+ rev15: new u16(1 << 15),
207740
+ lhst: new u32(286),
207741
+ dhst: new u32(30),
207742
+ ihst: new u32(19),
207743
+ lits: new u32(15e3),
207744
+ strt: new u16(1 << 16),
207745
+ prev: new u16(1 << 15)
207746
+ };
207747
+ }();
207748
+ (function() {
207749
+ var len2 = 1 << 15;
207750
+ for (var i2 = 0; i2 < len2; i2++) {
207751
+ var x2 = i2;
207752
+ x2 = (x2 & 2863311530) >>> 1 | (x2 & 1431655765) << 1;
207753
+ x2 = (x2 & 3435973836) >>> 2 | (x2 & 858993459) << 2;
207754
+ x2 = (x2 & 4042322160) >>> 4 | (x2 & 252645135) << 4;
207755
+ x2 = (x2 & 4278255360) >>> 8 | (x2 & 16711935) << 8;
207756
+ U.rev15[i2] = (x2 >>> 16 | x2 << 16) >>> 17;
207757
+ }
207758
+ function pushV(tgt, n3, sv) {
207759
+ while (n3-- != 0)
207760
+ tgt.push(0, sv);
207761
+ }
207762
+ for (var i2 = 0; i2 < 32; i2++) {
207763
+ U.ldef[i2] = U.of0[i2] << 3 | U.exb[i2];
207764
+ U.ddef[i2] = U.df0[i2] << 4 | U.dxb[i2];
207765
+ }
207766
+ pushV(U.fltree, 144, 8);
207767
+ pushV(U.fltree, 255 - 143, 9);
207768
+ pushV(U.fltree, 279 - 255, 7);
207769
+ pushV(U.fltree, 287 - 279, 8);
207770
+ makeCodes(U.fltree, 9);
207771
+ codes2map(U.fltree, 9, U.flmap);
207772
+ revCodes(U.fltree, 9);
207773
+ pushV(U.fdtree, 32, 5);
207774
+ makeCodes(U.fdtree, 5);
207775
+ codes2map(U.fdtree, 5, U.fdmap);
207776
+ revCodes(U.fdtree, 5);
207777
+ pushV(U.itree, 19, 0);
207778
+ pushV(U.ltree, 286, 0);
207779
+ pushV(U.dtree, 30, 0);
207780
+ pushV(U.ttree, 320, 0);
207781
+ })();
207782
+ const crc = {
207783
+ table: function() {
207784
+ var tab = new Uint32Array(256);
207785
+ for (var n3 = 0; n3 < 256; n3++) {
207786
+ var c2 = n3;
207787
+ for (var k = 0; k < 8; k++) {
207788
+ if (c2 & 1)
207789
+ c2 = 3988292384 ^ c2 >>> 1;
207790
+ else
207791
+ c2 = c2 >>> 1;
207792
+ }
207793
+ tab[n3] = c2;
207794
+ }
207795
+ return tab;
207796
+ }(),
207797
+ update: function(c2, buf, off, len2) {
207798
+ for (var i2 = 0; i2 < len2; i2++)
207799
+ c2 = crc.table[(c2 ^ buf[off + i2]) & 255] ^ c2 >>> 8;
207800
+ return c2;
207801
+ },
207802
+ crc: function(b2, o2, l2) {
207803
+ return crc.update(4294967295, b2, o2, l2) ^ 4294967295;
207804
+ }
207805
+ };
207806
+ function inflateRaw(file, buf) {
207807
+ return inflate(file, buf);
207808
+ }
207809
+ const config2 = {
207810
+ numWorkers: 1,
207811
+ workerURL: "",
207812
+ useWorkers: false
207813
+ };
207814
+ let nextId = 0;
207815
+ const waitingForWorkerQueue = [];
207816
+ function startWorker(url) {
207817
+ return new Promise((resolve2, reject) => {
207818
+ const worker = new Worker(url);
207819
+ worker.onmessage = (e3) => {
207820
+ if (e3.data === "start") {
207821
+ worker.onerror = void 0;
207822
+ worker.onmessage = void 0;
207823
+ resolve2(worker);
207824
+ } else {
207825
+ reject(new Error(`unexpected message: ${e3.data}`));
207826
+ }
207827
+ };
207828
+ worker.onerror = reject;
207829
+ });
207830
+ }
207831
+ function dynamicRequire(mod2, request2) {
207832
+ return mod2.require ? mod2.require(request2) : {};
207833
+ }
207834
+ (function() {
207835
+ if (isNode) {
207836
+ const { Worker: Worker3 } = dynamicRequire(module, "worker_threads");
207837
+ return {
207838
+ async createWorker(url) {
207839
+ return new Worker3(url);
207840
+ },
207841
+ addEventListener(worker, fn) {
207842
+ worker.on("message", (data2) => {
207843
+ fn({ target: worker, data: data2 });
207844
+ });
207845
+ },
207846
+ async terminate(worker) {
207847
+ await worker.terminate();
207848
+ }
207849
+ };
207850
+ } else {
207851
+ return {
207852
+ async createWorker(url) {
207853
+ try {
207854
+ const worker = await startWorker(url);
207855
+ return worker;
207856
+ } catch (e3) {
207857
+ console.warn("could not load worker:", url);
207858
+ }
207859
+ let text2;
207860
+ try {
207861
+ const req = await fetch(url, { mode: "cors" });
207862
+ if (!req.ok) {
207863
+ throw new Error(`could not load: ${url}`);
207864
+ }
207865
+ text2 = await req.text();
207866
+ url = URL.createObjectURL(new Blob([text2], { type: "application/javascript" }));
207867
+ const worker = await startWorker(url);
207868
+ config2.workerURL = url;
207869
+ return worker;
207870
+ } catch (e3) {
207871
+ console.warn("could not load worker via fetch:", url);
207872
+ }
207873
+ if (text2 !== void 0) {
207874
+ try {
207875
+ url = `data:application/javascript;base64,${btoa(text2)}`;
207876
+ const worker = await startWorker(url);
207877
+ config2.workerURL = url;
207878
+ return worker;
207879
+ } catch (e3) {
207880
+ console.warn("could not load worker via dataURI");
207881
+ }
207882
+ }
207883
+ console.warn("workers will not be used");
207884
+ throw new Error("can not start workers");
207885
+ },
207886
+ addEventListener(worker, fn) {
207887
+ worker.addEventListener("message", fn);
207888
+ },
207889
+ async terminate(worker) {
207890
+ worker.terminate();
207891
+ }
207892
+ };
207893
+ }
207894
+ })();
207895
+ function inflateRawLocal(src2, uncompressedSize, type3, resolve2) {
207896
+ const dst = new Uint8Array(uncompressedSize);
207897
+ inflateRaw(src2, dst);
207898
+ resolve2(type3 ? new Blob([dst], { type: type3 }) : dst.buffer);
207899
+ }
207900
+ async function processWaitingForWorkerQueue() {
207901
+ if (waitingForWorkerQueue.length === 0) {
207902
+ return;
207903
+ }
207904
+ while (waitingForWorkerQueue.length) {
207905
+ const { src: src2, uncompressedSize, type: type3, resolve: resolve2 } = waitingForWorkerQueue.shift();
207906
+ let data2 = src2;
207907
+ if (isBlob(src2)) {
207908
+ data2 = await readBlobAsUint8Array(src2);
207909
+ }
207910
+ inflateRawLocal(data2, uncompressedSize, type3, resolve2);
207911
+ }
207912
+ }
207913
+ function inflateRawAsync(src2, uncompressedSize, type3) {
207914
+ return new Promise((resolve2, reject) => {
207915
+ waitingForWorkerQueue.push({ src: src2, uncompressedSize, type: type3, resolve: resolve2, reject, id: nextId++ });
207916
+ processWaitingForWorkerQueue();
207917
+ });
207918
+ }
207919
+ function dosDateTimeToDate(date2, time2) {
207920
+ const day2 = date2 & 31;
207921
+ const month2 = (date2 >> 5 & 15) - 1;
207922
+ const year2 = (date2 >> 9 & 127) + 1980;
207923
+ const millisecond2 = 0;
207924
+ const second2 = (time2 & 31) * 2;
207925
+ const minute2 = time2 >> 5 & 63;
207926
+ const hour2 = time2 >> 11 & 31;
207927
+ return new Date(year2, month2, day2, hour2, minute2, second2, millisecond2);
207928
+ }
207929
+ class ZipEntry {
207930
+ constructor(reader, rawEntry) {
207931
+ this._reader = reader;
207932
+ this._rawEntry = rawEntry;
207933
+ this.name = rawEntry.name;
207934
+ this.nameBytes = rawEntry.nameBytes;
207935
+ this.size = rawEntry.uncompressedSize;
207936
+ this.compressedSize = rawEntry.compressedSize;
207937
+ this.comment = rawEntry.comment;
207938
+ this.commentBytes = rawEntry.commentBytes;
207939
+ this.compressionMethod = rawEntry.compressionMethod;
207940
+ this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);
207941
+ this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith("/");
207942
+ this.encrypted = !!(rawEntry.generalPurposeBitFlag & 1);
207943
+ this.externalFileAttributes = rawEntry.externalFileAttributes;
207944
+ this.versionMadeBy = rawEntry.versionMadeBy;
207945
+ }
207946
+ // returns a promise that returns a Blob for this entry
207947
+ async blob(type3 = "application/octet-stream") {
207948
+ return await readEntryDataAsBlob(this._reader, this._rawEntry, type3);
207949
+ }
207950
+ // returns a promise that returns an ArrayBuffer for this entry
207951
+ async arrayBuffer() {
207952
+ return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);
207953
+ }
207954
+ // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself
207955
+ async text() {
207956
+ const buffer2 = await this.arrayBuffer();
207957
+ return decodeBuffer(new Uint8Array(buffer2));
207958
+ }
207959
+ // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself
207960
+ async json() {
207961
+ const text2 = await this.text();
207962
+ return JSON.parse(text2);
207963
+ }
207964
+ }
207965
+ const EOCDR_WITHOUT_COMMENT_SIZE = 22;
207966
+ const MAX_COMMENT_SIZE = 65535;
207967
+ const EOCDR_SIGNATURE = 101010256;
207968
+ const ZIP64_EOCDR_SIGNATURE = 101075792;
207969
+ async function readAs(reader, offset6, length2) {
207970
+ return await reader.read(offset6, length2);
207971
+ }
207972
+ async function readAsBlobOrTypedArray(reader, offset6, length2, type3) {
207973
+ if (reader.sliceAsBlob) {
207974
+ return await reader.sliceAsBlob(offset6, length2, type3);
207975
+ }
207976
+ return await reader.read(offset6, length2);
207977
+ }
207978
+ const crc$1 = {
207979
+ unsigned() {
207980
+ return 0;
207981
+ }
207982
+ };
207983
+ function getUint16LE(uint8View, offset6) {
207984
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256;
207985
+ }
207986
+ function getUint32LE(uint8View, offset6) {
207987
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256 + uint8View[offset6 + 2] * 65536 + uint8View[offset6 + 3] * 16777216;
207988
+ }
207989
+ function getUint64LE(uint8View, offset6) {
207990
+ return getUint32LE(uint8View, offset6) + getUint32LE(uint8View, offset6 + 4) * 4294967296;
207991
+ }
207992
+ const utf8Decoder = new TextDecoder();
207993
+ function decodeBuffer(uint8View, isUTF8) {
207994
+ if (isSharedArrayBuffer(uint8View.buffer)) {
207995
+ uint8View = new Uint8Array(uint8View);
207996
+ }
207997
+ return utf8Decoder.decode(uint8View);
207998
+ }
207999
+ async function findEndOfCentralDirector(reader, totalLength) {
208000
+ const size2 = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);
208001
+ const readStart = totalLength - size2;
208002
+ const data2 = await readAs(reader, readStart, size2);
208003
+ for (let i2 = size2 - EOCDR_WITHOUT_COMMENT_SIZE; i2 >= 0; --i2) {
208004
+ if (getUint32LE(data2, i2) !== EOCDR_SIGNATURE) {
208005
+ continue;
208006
+ }
208007
+ const eocdr = new Uint8Array(data2.buffer, data2.byteOffset + i2, data2.byteLength - i2);
208008
+ const diskNumber = getUint16LE(eocdr, 4);
208009
+ if (diskNumber !== 0) {
208010
+ throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);
208011
+ }
208012
+ const entryCount = getUint16LE(eocdr, 10);
208013
+ const centralDirectorySize = getUint32LE(eocdr, 12);
208014
+ const centralDirectoryOffset = getUint32LE(eocdr, 16);
208015
+ const commentLength = getUint16LE(eocdr, 20);
208016
+ const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;
208017
+ if (commentLength !== expectedCommentLength) {
208018
+ throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);
208019
+ }
208020
+ const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);
208021
+ const comment = decodeBuffer(commentBytes);
208022
+ if (entryCount === 65535 || centralDirectoryOffset === 4294967295) {
208023
+ return await readZip64CentralDirectory(reader, readStart + i2, comment, commentBytes);
208024
+ } else {
208025
+ return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
208026
+ }
208027
+ }
208028
+ throw new Error("could not find end of central directory. maybe not zip file");
208029
+ }
208030
+ const END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 117853008;
208031
+ async function readZip64CentralDirectory(reader, offset6, comment, commentBytes) {
208032
+ const zip64EocdlOffset = offset6 - 20;
208033
+ const eocdl = await readAs(reader, zip64EocdlOffset, 20);
208034
+ if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {
208035
+ throw new Error("invalid zip64 end of central directory locator signature");
208036
+ }
208037
+ const zip64EocdrOffset = getUint64LE(eocdl, 8);
208038
+ const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);
208039
+ if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {
208040
+ throw new Error("invalid zip64 end of central directory record signature");
208041
+ }
208042
+ const entryCount = getUint64LE(zip64Eocdr, 32);
208043
+ const centralDirectorySize = getUint64LE(zip64Eocdr, 40);
208044
+ const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);
208045
+ return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
208046
+ }
208047
+ const CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 33639248;
208048
+ async function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {
208049
+ let readEntryCursor = 0;
208050
+ const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);
208051
+ const rawEntries = [];
208052
+ for (let e3 = 0; e3 < rawEntryCount; ++e3) {
208053
+ const buffer2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);
208054
+ const signature = getUint32LE(buffer2, 0);
208055
+ if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {
208056
+ throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);
208057
+ }
208058
+ const rawEntry = {
208059
+ // 4 - Version made by
208060
+ versionMadeBy: getUint16LE(buffer2, 4),
208061
+ // 6 - Version needed to extract (minimum)
208062
+ versionNeededToExtract: getUint16LE(buffer2, 6),
208063
+ // 8 - General purpose bit flag
208064
+ generalPurposeBitFlag: getUint16LE(buffer2, 8),
208065
+ // 10 - Compression method
208066
+ compressionMethod: getUint16LE(buffer2, 10),
208067
+ // 12 - File last modification time
208068
+ lastModFileTime: getUint16LE(buffer2, 12),
208069
+ // 14 - File last modification date
208070
+ lastModFileDate: getUint16LE(buffer2, 14),
208071
+ // 16 - CRC-32
208072
+ crc32: getUint32LE(buffer2, 16),
208073
+ // 20 - Compressed size
208074
+ compressedSize: getUint32LE(buffer2, 20),
208075
+ // 24 - Uncompressed size
208076
+ uncompressedSize: getUint32LE(buffer2, 24),
208077
+ // 28 - File name length (n)
208078
+ fileNameLength: getUint16LE(buffer2, 28),
208079
+ // 30 - Extra field length (m)
208080
+ extraFieldLength: getUint16LE(buffer2, 30),
208081
+ // 32 - File comment length (k)
208082
+ fileCommentLength: getUint16LE(buffer2, 32),
208083
+ // 34 - Disk number where file starts
208084
+ // 36 - Internal file attributes
208085
+ internalFileAttributes: getUint16LE(buffer2, 36),
208086
+ // 38 - External file attributes
208087
+ externalFileAttributes: getUint32LE(buffer2, 38),
208088
+ // 42 - Relative offset of local file header
208089
+ relativeOffsetOfLocalHeader: getUint32LE(buffer2, 42)
208090
+ };
208091
+ if (rawEntry.generalPurposeBitFlag & 64) {
208092
+ throw new Error("strong encryption is not supported");
208093
+ }
208094
+ readEntryCursor += 46;
208095
+ const data2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);
208096
+ rawEntry.nameBytes = data2.slice(0, rawEntry.fileNameLength);
208097
+ rawEntry.name = decodeBuffer(rawEntry.nameBytes);
208098
+ const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;
208099
+ const extraFieldBuffer = data2.slice(rawEntry.fileNameLength, fileCommentStart);
208100
+ rawEntry.extraFields = [];
208101
+ let i2 = 0;
208102
+ while (i2 < extraFieldBuffer.length - 3) {
208103
+ const headerId = getUint16LE(extraFieldBuffer, i2 + 0);
208104
+ const dataSize = getUint16LE(extraFieldBuffer, i2 + 2);
208105
+ const dataStart = i2 + 4;
208106
+ const dataEnd = dataStart + dataSize;
208107
+ if (dataEnd > extraFieldBuffer.length) {
208108
+ throw new Error("extra field length exceeds extra field buffer size");
208109
+ }
208110
+ rawEntry.extraFields.push({
208111
+ id: headerId,
208112
+ data: extraFieldBuffer.slice(dataStart, dataEnd)
208113
+ });
208114
+ i2 = dataEnd;
208115
+ }
208116
+ rawEntry.commentBytes = data2.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);
208117
+ rawEntry.comment = decodeBuffer(rawEntry.commentBytes);
208118
+ readEntryCursor += data2.length;
208119
+ if (rawEntry.uncompressedSize === 4294967295 || rawEntry.compressedSize === 4294967295 || rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
208120
+ const zip64ExtraField = rawEntry.extraFields.find((e4) => e4.id === 1);
208121
+ if (!zip64ExtraField) {
208122
+ throw new Error("expected zip64 extended information extra field");
208123
+ }
208124
+ const zip64EiefBuffer = zip64ExtraField.data;
208125
+ let index2 = 0;
208126
+ if (rawEntry.uncompressedSize === 4294967295) {
208127
+ if (index2 + 8 > zip64EiefBuffer.length) {
208128
+ throw new Error("zip64 extended information extra field does not include uncompressed size");
208129
+ }
208130
+ rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index2);
208131
+ index2 += 8;
208132
+ }
208133
+ if (rawEntry.compressedSize === 4294967295) {
208134
+ if (index2 + 8 > zip64EiefBuffer.length) {
208135
+ throw new Error("zip64 extended information extra field does not include compressed size");
208136
+ }
208137
+ rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index2);
208138
+ index2 += 8;
208139
+ }
208140
+ if (rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
208141
+ if (index2 + 8 > zip64EiefBuffer.length) {
208142
+ throw new Error("zip64 extended information extra field does not include relative header offset");
208143
+ }
208144
+ rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index2);
208145
+ index2 += 8;
208146
+ }
208147
+ }
208148
+ const nameField = rawEntry.extraFields.find((e4) => e4.id === 28789 && e4.data.length >= 6 && // too short to be meaningful
208149
+ e4.data[0] === 1 && // Version 1 byte version of this extra field, currently 1
208150
+ getUint32LE(e4.data, 1), crc$1.unsigned(rawEntry.nameBytes));
208151
+ if (nameField) {
208152
+ rawEntry.fileName = decodeBuffer(nameField.data.slice(5));
208153
+ }
208154
+ if (rawEntry.compressionMethod === 0) {
208155
+ let expectedCompressedSize = rawEntry.uncompressedSize;
208156
+ if ((rawEntry.generalPurposeBitFlag & 1) !== 0) {
208157
+ expectedCompressedSize += 12;
208158
+ }
208159
+ if (rawEntry.compressedSize !== expectedCompressedSize) {
208160
+ throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);
208161
+ }
208162
+ }
208163
+ rawEntries.push(rawEntry);
208164
+ }
208165
+ const zip2 = {
208166
+ comment,
208167
+ commentBytes
208168
+ };
208169
+ return {
208170
+ zip: zip2,
208171
+ entries: rawEntries.map((e3) => new ZipEntry(reader, e3))
208172
+ };
208173
+ }
208174
+ async function readEntryDataHeader(reader, rawEntry) {
208175
+ if (rawEntry.generalPurposeBitFlag & 1) {
208176
+ throw new Error("encrypted entries not supported");
208177
+ }
208178
+ const buffer2 = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);
208179
+ const totalLength = await reader.getLength();
208180
+ const signature = getUint32LE(buffer2, 0);
208181
+ if (signature !== 67324752) {
208182
+ throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);
208183
+ }
208184
+ const fileNameLength = getUint16LE(buffer2, 26);
208185
+ const extraFieldLength = getUint16LE(buffer2, 28);
208186
+ const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer2.length + fileNameLength + extraFieldLength;
208187
+ let decompress;
208188
+ if (rawEntry.compressionMethod === 0) {
208189
+ decompress = false;
208190
+ } else if (rawEntry.compressionMethod === 8) {
208191
+ decompress = true;
208192
+ } else {
208193
+ throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);
208194
+ }
208195
+ const fileDataStart = localFileHeaderEnd;
208196
+ const fileDataEnd = fileDataStart + rawEntry.compressedSize;
208197
+ if (rawEntry.compressedSize !== 0) {
208198
+ if (fileDataEnd > totalLength) {
208199
+ throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);
208200
+ }
208201
+ }
208202
+ return {
208203
+ decompress,
208204
+ fileDataStart
208205
+ };
208206
+ }
208207
+ async function readEntryDataAsArrayBuffer(reader, rawEntry) {
208208
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
208209
+ if (!decompress) {
208210
+ const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);
208211
+ return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;
208212
+ }
208213
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
208214
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);
208215
+ return result;
208216
+ }
208217
+ async function readEntryDataAsBlob(reader, rawEntry, type3) {
208218
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
208219
+ if (!decompress) {
208220
+ const typedArrayOrBlob2 = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type3);
208221
+ if (isBlob(typedArrayOrBlob2)) {
208222
+ return typedArrayOrBlob2;
208223
+ }
208224
+ return new Blob([isSharedArrayBuffer(typedArrayOrBlob2.buffer) ? new Uint8Array(typedArrayOrBlob2) : typedArrayOrBlob2], { type: type3 });
208225
+ }
208226
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
208227
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type3);
208228
+ return result;
208229
+ }
208230
+ async function unzipRaw(source2) {
208231
+ let reader;
208232
+ if (typeof Blob !== "undefined" && source2 instanceof Blob) {
208233
+ reader = new BlobReader$1(source2);
208234
+ } else if (source2 instanceof ArrayBuffer || source2 && source2.buffer && source2.buffer instanceof ArrayBuffer) {
208235
+ reader = new ArrayBufferReader(source2);
208236
+ } else if (isSharedArrayBuffer(source2) || isSharedArrayBuffer(source2.buffer)) {
208237
+ reader = new ArrayBufferReader(source2);
208238
+ } else if (typeof source2 === "string") {
208239
+ const req = await fetch(source2);
208240
+ if (!req.ok) {
208241
+ throw new Error(`failed http request ${source2}, status: ${req.status}: ${req.statusText}`);
208242
+ }
208243
+ const blob = await req.blob();
208244
+ reader = new BlobReader$1(blob);
208245
+ } else if (typeof source2.getLength === "function" && typeof source2.read === "function") {
208246
+ reader = source2;
208247
+ } else {
208248
+ throw new Error("unsupported source type");
208249
+ }
208250
+ const totalLength = await reader.getLength();
208251
+ if (totalLength > Number.MAX_SAFE_INTEGER) {
208252
+ throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);
208253
+ }
208254
+ return await findEndOfCentralDirector(reader, totalLength);
208255
+ }
208256
+ async function unzip(source2) {
208257
+ const { zip: zip2, entries: entries2 } = await unzipRaw(source2);
208258
+ return {
208259
+ zip: zip2,
208260
+ entries: Object.fromEntries(entries2.map((v) => [v.name, v]))
208261
+ };
208262
+ }
208263
+ class BlobReader2 {
208264
+ constructor(blob) {
208265
+ __publicField(this, "blob");
208266
+ this.blob = blob;
208267
+ }
208268
+ async getLength() {
208269
+ return this.blob.size;
208270
+ }
208271
+ async read(offset6, length2) {
208272
+ const blob = this.blob.slice(offset6, offset6 + length2);
208273
+ return new Uint8Array(await blob.arrayBuffer());
208274
+ }
208275
+ }
208276
+ class HTTPRangeReader {
208277
+ constructor(url, opts2 = {}) {
208278
+ __publicField(this, "url");
208279
+ __publicField(this, "length");
208280
+ __privateAdd(this, _overrides2, void 0);
208281
+ this.url = url;
208282
+ __privateSet(this, _overrides2, opts2.overrides ?? {});
208283
+ }
208284
+ async getLength() {
208285
+ if (this.length === void 0) {
208286
+ const req = await fetch(this.url, {
208287
+ ...__privateGet(this, _overrides2),
208288
+ method: "HEAD"
208289
+ });
208290
+ if (!req.ok) {
208291
+ throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
208292
+ }
208293
+ this.length = parseInt(req.headers.get("content-length"));
208294
+ if (Number.isNaN(this.length)) {
208295
+ throw Error("could not get length");
208296
+ }
208297
+ }
208298
+ return this.length;
208299
+ }
208300
+ async read(offset6, size2) {
208301
+ if (size2 === 0) {
208302
+ return new Uint8Array(0);
208303
+ }
208304
+ const req = await fetch_range(this.url, offset6, size2, __privateGet(this, _overrides2));
208305
+ if (!req.ok) {
208306
+ throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset6} size: ${size2}: ${req.statusText}`);
208307
+ }
208308
+ return new Uint8Array(await req.arrayBuffer());
208309
+ }
208310
+ }
208311
+ _overrides2 = new WeakMap();
208312
+ class ZipFileStore {
208313
+ constructor(reader) {
208314
+ __publicField(this, "info");
208315
+ this.info = unzip(reader);
208316
+ }
208317
+ async get(key2) {
208318
+ let entry2 = (await this.info).entries[strip_prefix(key2)];
208319
+ if (!entry2)
208320
+ return;
208321
+ return new Uint8Array(await entry2.arrayBuffer());
208322
+ }
208323
+ async has(key2) {
208324
+ return strip_prefix(key2) in (await this.info).entries;
208325
+ }
208326
+ static fromUrl(href2, opts2 = {}) {
208327
+ return new ZipFileStore(new HTTPRangeReader(href2, opts2));
208328
+ }
208329
+ static fromBlob(blob) {
208330
+ return new ZipFileStore(new BlobReader2(blob));
208331
+ }
208332
+ }
208333
+ const ZipFileStore$1 = ZipFileStore;
208334
+ function zarrOpenRoot(url, fileType, requestInit2) {
208335
+ let store2;
208336
+ if (fileType && fileType.endsWith(".zip")) {
208337
+ store2 = ZipFileStore$1.fromUrl(url, { overrides: requestInit2 });
208338
+ } else {
208339
+ store2 = new FetchStore$1(url, { overrides: requestInit2 });
208340
+ }
207259
208341
  return root(store2);
207260
208342
  }
207261
208343
  function prevPowerOf2(x2) {
@@ -209857,6 +210939,7 @@ function SpatialSubscriber(props2) {
209857
210939
  const [pointMultiObsLabelsData, pointMultiObsLabelsDataStatus] = usePointMultiObsLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
209858
210940
  const [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls] = useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, uuid);
209859
210941
  const [obsSpotsSetsData, obsSpotsSetsDataStatus] = useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders, dataset);
210942
+ const [obsSpotsFeatureLabelsData, obsSpotsFeatureLabelsDataStatus] = useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
209860
210943
  const [spotMultiExpressionData, spotMultiLoadedFeatureSelection, spotMultiExpressionExtents, spotMultiExpressionNormData, spotMultiFeatureSelectionStatus] = useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy, loaders, dataset);
209861
210944
  const [spotMultiIndicesData, spotMultiIndicesDataStatus] = useSpotMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset);
209862
210945
  const [obsSegmentationsLocationsData, obsSegmentationsLocationsDataStatus] = useSegmentationMultiObsLocations(coordinationScopes, coordinationScopesBy, loaders, dataset);
@@ -210177,6 +211260,7 @@ function SpatialSubscriber(props2) {
210177
211260
  spotLayerScopes,
210178
211261
  spotLayerCoordination,
210179
211262
  spotMultiExpressionExtents,
211263
+ spotMultiFeatureLabels: obsSpotsFeatureLabelsData,
210180
211264
  // Points
210181
211265
  pointLayerScopes,
210182
211266
  pointLayerCoordination
@@ -217563,7 +218647,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
217563
218647
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
217564
218648
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
217565
218649
  const LazyHiGlassComponent = React__default.lazy(async () => {
217566
- const { HiGlassComponent } = await import("./hglib-f850a2ea.js").then((n3) => n3.h);
218650
+ const { HiGlassComponent } = await import("./hglib-63947de6.js").then((n3) => n3.h);
217567
218651
  return { default: HiGlassComponent };
217568
218652
  });
217569
218653
  const HG_SIZE = 800;
@@ -222670,23 +223754,29 @@ function CellSetExpressionPlotSubscriber(props2) {
222670
223754
  const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, jitter: jitter2 = false, yMin = null, yUnits = null } = props2;
222671
223755
  const classes = useStyles$1();
222672
223756
  const loaders = useLoaders();
222673
- const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
223757
+ const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, sampleType }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
222674
223758
  const [width2, height2, containerRef] = useGridItemSize();
222675
223759
  const transformOptions = VALUE_TRANSFORM_OPTIONS;
222676
223760
  const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
222677
223761
  const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
222678
223762
  const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
222679
223763
  const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
223764
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
223765
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
222680
223766
  const isReady = useReady([
222681
223767
  featureSelectionStatus,
222682
223768
  matrixIndicesStatus,
222683
223769
  obsSetsStatus,
222684
- featureLabelsStatus
223770
+ featureLabelsStatus,
223771
+ sampleSetsStatus,
223772
+ sampleEdgesStatus
222685
223773
  ]);
222686
223774
  const urls2 = useUrls([
222687
223775
  featureLabelsUrls,
222688
223776
  matrixIndicesUrls,
222689
- obsSetsUrls
223777
+ obsSetsUrls,
223778
+ sampleSetsUrls,
223779
+ sampleEdgesUrls
222690
223780
  ]);
222691
223781
  const [expressionArr, setArr] = useExpressionByCellSet(expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, theme);
222692
223782
  const firstGeneSelected = geneSelection && geneSelection.length >= 1 ? featureLabelsMap?.get(geneSelection[0]) || geneSelection[0] : null;
@@ -275820,6 +276910,40 @@ class ObsSetsCsvLoader extends CsvLoader {
275820
276910
  }, url, coordinationValues));
275821
276911
  }
275822
276912
  }
276913
+ class SampleSetsCsvLoader extends CsvLoader {
276914
+ loadFromCache(data2) {
276915
+ if (this.cachedResult) {
276916
+ return this.cachedResult;
276917
+ }
276918
+ const { sampleIndex: indexCol, sampleSets: setsArr } = this.options;
276919
+ const obsIndex = data2.map((d) => String(d[indexCol]));
276920
+ const setsCols = setsArr.map(({ column }) => column);
276921
+ const cellSetIds = setsCols.map((setCol) => Array.isArray(setCol) ? setCol.map((subCol) => data2.map((d) => d[subCol])) : data2.map((d) => d[setCol]));
276922
+ const scoresCols = setsArr.map((option) => option.scorePath || void 0);
276923
+ const cellSetScores = scoresCols.map((scoreCol) => scoreCol ? data2.map((d) => d[scoreCol]) : void 0);
276924
+ const obsIndices = cellSetIds.map(() => obsIndex);
276925
+ const cellSetsTree = dataToCellSetsTree([
276926
+ obsIndices,
276927
+ cellSetIds,
276928
+ cellSetScores
276929
+ ], setsArr);
276930
+ const obsSetsMembership = treeToMembershipMap(cellSetsTree);
276931
+ return [obsIndex, cellSetsTree, obsSetsMembership];
276932
+ }
276933
+ async load() {
276934
+ const payload = await this.getSourceData().catch((reason) => Promise.resolve(reason));
276935
+ if (payload instanceof AbstractLoaderError) {
276936
+ return Promise.reject(payload);
276937
+ }
276938
+ const { data: data2, url } = payload;
276939
+ const [obsIndex, cellSetsTree, obsSetsMembership] = this.loadFromCache(data2);
276940
+ return Promise.resolve(new LoaderResult({
276941
+ sampleIndex: obsIndex,
276942
+ sampleSets: cellSetsTree,
276943
+ sampleSetsMembership: obsSetsMembership
276944
+ }, url));
276945
+ }
276946
+ }
275823
276947
  class JsonSource {
275824
276948
  constructor({ url, requestInit: requestInit2 }) {
275825
276949
  this.url = url;
@@ -276273,7 +277397,7 @@ async function initLoader(imageData) {
276273
277397
  const { dimensions, isPyramid, transform: transform4 } = metadata2 || {};
276274
277398
  const labels2 = dimensions.map((d) => d.field);
276275
277399
  let source2;
276276
- const root2 = await zarrOpenRoot(url, requestInit2);
277400
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
276277
277401
  if (isPyramid) {
276278
277402
  const metadataUrl = `${url}${url.slice(-1) === "/" ? "" : "/"}.zmetadata`;
276279
277403
  const response = await fetch(metadataUrl);
@@ -276311,7 +277435,7 @@ async function initLoader(imageData) {
276311
277435
  }
276312
277436
  case "ome-zarr": {
276313
277437
  const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata2 || {};
276314
- const root2 = await zarrOpenRoot(url, requestInit2);
277438
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
276315
277439
  const loader2 = await loadOmeZarr(root2);
276316
277440
  const { metadata: loaderMetadata } = loader2;
276317
277441
  const { omero, multiscales } = loaderMetadata;
@@ -276437,11 +277561,11 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
276437
277561
  }
276438
277562
  }
276439
277563
  class ZarrDataSource {
276440
- constructor({ url, requestInit: requestInit2, store: store2 }) {
277564
+ constructor({ url, requestInit: requestInit2, store: store2, fileType }) {
276441
277565
  if (store2) {
276442
277566
  this.storeRoot = root(store2);
276443
277567
  } else {
276444
- this.storeRoot = zarrOpenRoot(url, requestInit2);
277568
+ this.storeRoot = zarrOpenRoot(url, fileType, requestInit2);
276445
277569
  }
276446
277570
  }
276447
277571
  getStoreRoot(path2) {
@@ -277610,6 +278734,35 @@ class ObsFeatureColumnsAnndataLoader extends AbstractTwoStepLoader {
277610
278734
  ]).then(([{ obsIndex, obsFeatureMatrix, featureIndex }]) => Promise.resolve(new LoaderResult({ obsIndex, obsFeatureMatrix, featureIndex }, null)));
277611
278735
  }
277612
278736
  }
278737
+ class SampleEdgesAnndataLoader extends AbstractTwoStepLoader {
278738
+ /**
278739
+ * Class method for loading observation string labels.
278740
+ * @returns {Promise} A promise for the array.
278741
+ */
278742
+ loadLabels() {
278743
+ const { path: path2 } = this.options;
278744
+ if (this.labels) {
278745
+ return this.labels;
278746
+ }
278747
+ if (!this.labels) {
278748
+ this.labels = this.dataSource._loadColumn(path2);
278749
+ return this.labels;
278750
+ }
278751
+ this.labels = Promise.resolve(null);
278752
+ return this.labels;
278753
+ }
278754
+ async load() {
278755
+ const { path: path2 } = this.options;
278756
+ const superResult = await super.load().catch((reason) => Promise.resolve(reason));
278757
+ if (superResult instanceof AbstractLoaderError) {
278758
+ return Promise.reject(superResult);
278759
+ }
278760
+ return Promise.all([
278761
+ this.dataSource.loadObsIndex(path2),
278762
+ this.loadLabels()
278763
+ ]).then(([obsIndex, sampleIds]) => Promise.resolve(new LoaderResult({ obsIndex, sampleIds }, null)));
278764
+ }
278765
+ }
277613
278766
  class ImageWrapper {
277614
278767
  constructor(vivLoader, options) {
277615
278768
  __publicField(this, "vivLoader");
@@ -278060,7 +279213,7 @@ class SpatialDataLabelsLoader extends SpatialDataImageLoader {
278060
279213
  };
278061
279214
  const imageWrapper = result.data.obsSegmentations.instance;
278062
279215
  const channelObjects = imageWrapper.getChannelObjects();
278063
- const channelCoordination = channelObjects.slice(0, 5).map((channelObj, i2) => ({
279216
+ const channelCoordination = channelObjects.slice(0, 7).map((channelObj, i2) => ({
278064
279217
  spatialTargetC: i2,
278065
279218
  // obsType: channelObj.name,
278066
279219
  spatialChannelColor: (channelObj.defaultColor || channelObj.autoDefaultColor).slice(0, 3),
@@ -278362,7 +279515,16 @@ const expectedCoordinationTypes = [
278362
279515
  "obsLabelsType",
278363
279516
  "embeddingType"
278364
279517
  ];
279518
+ function createGetFileType(jointFileType) {
279519
+ return (fileType) => {
279520
+ if (jointFileType.endsWith(".zip") && ALT_ZARR_STORE_TYPES[fileType]?.zip) {
279521
+ return ALT_ZARR_STORE_TYPES[fileType].zip;
279522
+ }
279523
+ return fileType;
279524
+ };
279525
+ }
278365
279526
  function expandAnndataZarr(fileDef) {
279527
+ const getFileType2 = createGetFileType(fileDef.fileType);
278366
279528
  const baseFileDef = {
278367
279529
  url: fileDef.url,
278368
279530
  requestInit: fileDef.requestInit,
@@ -278384,7 +279546,7 @@ function expandAnndataZarr(fileDef) {
278384
279546
  // obsFeatureMatrix
278385
279547
  ...options.obsFeatureMatrix ? [{
278386
279548
  ...baseFileDef,
278387
- fileType: FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
279549
+ fileType: getFileType2(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR),
278388
279550
  options: options.obsFeatureMatrix,
278389
279551
  coordinationValues: {
278390
279552
  ...extraCoordinationValues,
@@ -278396,7 +279558,7 @@ function expandAnndataZarr(fileDef) {
278396
279558
  // obsSets
278397
279559
  ...options.obsSets ? [{
278398
279560
  ...baseFileDef,
278399
- fileType: FileType$2.OBS_SETS_ANNDATA_ZARR,
279561
+ fileType: getFileType2(FileType$2.OBS_SETS_ANNDATA_ZARR),
278400
279562
  options: options.obsSets,
278401
279563
  coordinationValues: {
278402
279564
  ...extraCoordinationValues,
@@ -278406,7 +279568,7 @@ function expandAnndataZarr(fileDef) {
278406
279568
  // obsSpots
278407
279569
  ...options.obsSpots ? [{
278408
279570
  ...baseFileDef,
278409
- fileType: FileType$2.OBS_SPOTS_ANNDATA_ZARR,
279571
+ fileType: getFileType2(FileType$2.OBS_SPOTS_ANNDATA_ZARR),
278410
279572
  options: options.obsSpots,
278411
279573
  coordinationValues: {
278412
279574
  ...extraCoordinationValues,
@@ -278416,7 +279578,7 @@ function expandAnndataZarr(fileDef) {
278416
279578
  // obsPoints
278417
279579
  ...options.obsPoints ? [{
278418
279580
  ...baseFileDef,
278419
- fileType: FileType$2.OBS_POINTS_ANNDATA_ZARR,
279581
+ fileType: getFileType2(FileType$2.OBS_POINTS_ANNDATA_ZARR),
278420
279582
  options: options.obsPoints,
278421
279583
  coordinationValues: {
278422
279584
  ...extraCoordinationValues,
@@ -278426,7 +279588,7 @@ function expandAnndataZarr(fileDef) {
278426
279588
  // obsLocations
278427
279589
  ...options.obsLocations ? [{
278428
279590
  ...baseFileDef,
278429
- fileType: FileType$2.OBS_LOCATIONS_ANNDATA_ZARR,
279591
+ fileType: getFileType2(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR),
278430
279592
  options: options.obsLocations,
278431
279593
  coordinationValues: {
278432
279594
  ...extraCoordinationValues,
@@ -278436,7 +279598,7 @@ function expandAnndataZarr(fileDef) {
278436
279598
  // obsSegmentations
278437
279599
  ...options.obsSegmentations ? [{
278438
279600
  ...baseFileDef,
278439
- fileType: FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR,
279601
+ fileType: getFileType2(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR),
278440
279602
  options: options.obsSegmentations,
278441
279603
  coordinationValues: {
278442
279604
  ...extraCoordinationValues,
@@ -278448,7 +279610,7 @@ function expandAnndataZarr(fileDef) {
278448
279610
  ...options.obsEmbedding ? Array.isArray(options.obsEmbedding) ? options.obsEmbedding.map((oe) => ({
278449
279611
  // obsEmbedding was an array, process each element.
278450
279612
  ...baseFileDef,
278451
- fileType: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR,
279613
+ fileType: getFileType2(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR),
278452
279614
  options: {
278453
279615
  path: oe.path,
278454
279616
  dims: oe.dims
@@ -278462,7 +279624,7 @@ function expandAnndataZarr(fileDef) {
278462
279624
  })) : [{
278463
279625
  // obsEmbedding was an object.
278464
279626
  ...baseFileDef,
278465
- fileType: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR,
279627
+ fileType: getFileType2(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR),
278466
279628
  options: options.obsEmbedding,
278467
279629
  coordinationValues: {
278468
279630
  ...extraCoordinationValues,
@@ -278475,7 +279637,7 @@ function expandAnndataZarr(fileDef) {
278475
279637
  ...options.obsLabels ? Array.isArray(options.obsLabels) ? options.obsLabels.map((ol) => ({
278476
279638
  // obsLabels was an array, process each element.
278477
279639
  ...baseFileDef,
278478
- fileType: FileType$2.OBS_LABELS_ANNDATA_ZARR,
279640
+ fileType: getFileType2(FileType$2.OBS_LABELS_ANNDATA_ZARR),
278479
279641
  options: {
278480
279642
  path: ol.path
278481
279643
  },
@@ -278488,7 +279650,7 @@ function expandAnndataZarr(fileDef) {
278488
279650
  })) : [{
278489
279651
  // obsLabels was an object.
278490
279652
  ...baseFileDef,
278491
- fileType: FileType$2.OBS_LABELS_ANNDATA_ZARR,
279653
+ fileType: getFileType2(FileType$2.OBS_LABELS_ANNDATA_ZARR),
278492
279654
  options: options.obsLabels,
278493
279655
  coordinationValues: {
278494
279656
  ...extraCoordinationValues,
@@ -278501,7 +279663,7 @@ function expandAnndataZarr(fileDef) {
278501
279663
  ...options.featureLabels ? Array.isArray(options.featureLabels) ? options.featureLabels.map((fl) => ({
278502
279664
  // featureLabels was an array, process each element.
278503
279665
  ...baseFileDef,
278504
- fileType: FileType$2.FEATURE_LABELS_ANNDATA_ZARR,
279666
+ fileType: getFileType2(FileType$2.FEATURE_LABELS_ANNDATA_ZARR),
278505
279667
  options: {
278506
279668
  path: fl.path
278507
279669
  },
@@ -278514,7 +279676,7 @@ function expandAnndataZarr(fileDef) {
278514
279676
  })) : [{
278515
279677
  // featureLabels was an object.
278516
279678
  ...baseFileDef,
278517
- fileType: FileType$2.FEATURE_LABELS_ANNDATA_ZARR,
279679
+ fileType: getFileType2(FileType$2.FEATURE_LABELS_ANNDATA_ZARR),
278518
279680
  options: options.featureLabels,
278519
279681
  coordinationValues: {
278520
279682
  ...extraCoordinationValues,
@@ -278871,6 +280033,13 @@ function makeViewType(name2, component) {
278871
280033
  function makeFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
278872
280034
  return new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema);
278873
280035
  }
280036
+ function makeZarrFileTypes(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
280037
+ const altFileTypes = Object.values(ALT_ZARR_STORE_TYPES[name2]);
280038
+ return [
280039
+ new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema),
280040
+ ...altFileTypes.map((n3) => new PluginFileType(n3, dataType, dataLoaderClass, dataSourceClass, optionsSchema))
280041
+ ];
280042
+ }
278874
280043
  const baseViewTypes = [
278875
280044
  makeViewType(ViewType$2.DESCRIPTION, DescriptionSubscriber),
278876
280045
  makeViewType(ViewType$2.OBS_SETS, ObsSetsManagerSubscriber),
@@ -278899,20 +280068,22 @@ const baseFileTypes = [
278899
280068
  makeFileType(FileType$2.OBS_LABELS_CSV, DataType$3.OBS_LABELS, ObsLabelsCsvLoader, CsvSource, obsLabelsCsvSchema),
278900
280069
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_CSV, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixCsvLoader, CsvSource, z.null()),
278901
280070
  makeFileType(FileType$2.FEATURE_LABELS_CSV, DataType$3.FEATURE_LABELS, FeatureLabelsCsvLoader, CsvSource, featureLabelsCsvSchema),
280071
+ makeFileType(FileType$2.SAMPLE_SETS_CSV, DataType$3.SAMPLE_SETS, SampleSetsCsvLoader, CsvSource, sampleSetsCsvSchema),
278902
280072
  // All JSON file types
278903
280073
  makeFileType(FileType$2.OBS_SEGMENTATIONS_JSON, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsJsonLoader, JsonSource, z.null()),
278904
280074
  makeFileType(FileType$2.OBS_SETS_JSON, DataType$3.OBS_SETS, ObsSetsJsonLoader, JsonSource, z.null()),
278905
280075
  // All AnnData file types
278906
- makeFileType(FileType$2.OBS_SETS_ANNDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
278907
- makeFileType(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
278908
- makeFileType(FileType$2.OBS_SPOTS_ANNDATA_ZARR, DataType$3.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
278909
- makeFileType(FileType$2.OBS_POINTS_ANNDATA_ZARR, DataType$3.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
278910
- makeFileType(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR, DataType$3.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
278911
- makeFileType(FileType$2.OBS_LABELS_ANNDATA_ZARR, DataType$3.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
278912
- makeFileType(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
278913
- makeFileType(FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
278914
- makeFileType(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
278915
- makeFileType(FileType$2.FEATURE_LABELS_ANNDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
280076
+ ...makeZarrFileTypes(FileType$2.OBS_SETS_ANNDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
280077
+ ...makeZarrFileTypes(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
280078
+ ...makeZarrFileTypes(FileType$2.OBS_SPOTS_ANNDATA_ZARR, DataType$3.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
280079
+ ...makeZarrFileTypes(FileType$2.OBS_POINTS_ANNDATA_ZARR, DataType$3.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
280080
+ ...makeZarrFileTypes(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR, DataType$3.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
280081
+ ...makeZarrFileTypes(FileType$2.OBS_LABELS_ANNDATA_ZARR, DataType$3.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
280082
+ ...makeZarrFileTypes(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
280083
+ ...makeZarrFileTypes(FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
280084
+ ...makeZarrFileTypes(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
280085
+ ...makeZarrFileTypes(FileType$2.FEATURE_LABELS_ANNDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
280086
+ ...makeZarrFileTypes(FileType$2.SAMPLE_EDGES_ANNDATA_ZARR, DataType$3.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
278916
280087
  // All MuData file types
278917
280088
  makeFileType(FileType$2.OBS_SETS_MUDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
278918
280089
  makeFileType(FileType$2.OBS_EMBEDDING_MUDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
@@ -278938,6 +280109,7 @@ const baseFileTypes = [
278938
280109
  makeFileType(FileType$2.OBS_SPOTS_SPATIALDATA_ZARR, DataType$3.OBS_SPOTS, SpatialDataObsSpotsLoader, SpatialDataShapesSource, obsSpotsSpatialdataSchema),
278939
280110
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, SpatialDataTableSource, obsFeatureMatrixSpatialdataSchema),
278940
280111
  makeFileType(FileType$2.OBS_SETS_SPATIALDATA_ZARR, DataType$3.OBS_SETS, SpatialDataObsSetsLoader, SpatialDataTableSource, obsSetsSpatialdataSchema),
280112
+ makeFileType(FileType$2.FEATURE_LABELS_SPATIALDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, SpatialDataTableSource, featureLabelsAnndataSchema),
278941
280113
  // All legacy file types
278942
280114
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR, DataType$3.OBS_FEATURE_MATRIX, MatrixZarrAsObsFeatureMatrixLoader, ZarrDataSource, z.null()),
278943
280115
  makeFileType(FileType$2.IMAGE_RASTER_JSON, DataType$3.IMAGE, RasterJsonAsImageLoader, JsonSource, rasterJsonSchema),
@@ -278956,6 +280128,7 @@ const baseFileTypes = [
278956
280128
  ];
278957
280129
  const baseJointFileTypes = [
278958
280130
  new PluginJointFileType(FileType$2.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
280131
+ new PluginJointFileType(FileType$2.ANNDATA_ZARR_ZIP, expandAnndataZarr, anndataZarrSchema),
278959
280132
  new PluginJointFileType(FileType$2.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
278960
280133
  // For legacy file types:
278961
280134
  new PluginJointFileType(FileType$2.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
@@ -279077,7 +280250,9 @@ const baseCoordinationTypes = [
279077
280250
  new PluginCoordinationType(CoordinationType$2.LEGEND_VISIBLE, true, z.boolean()),
279078
280251
  new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABELS_VISIBLE, true, z.boolean()),
279079
280252
  new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABELS_ORIENTATION, "vertical", z.enum(["vertical", "horizontal"])),
279080
- new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number())
280253
+ new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
280254
+ new PluginCoordinationType(CoordinationType$2.SAMPLE_TYPE, null, z.string().nullable()),
280255
+ new PluginCoordinationType(CoordinationType$2.SAMPLE_SET_SELECTION, null, z.array(z.string()).nullable())
279081
280256
  ];
279082
280257
  function Vitessce(props2) {
279083
280258
  const { config: config3, onConfigUpgrade, pluginViewTypes: pluginViewTypesProp, pluginFileTypes: pluginFileTypesProp, pluginCoordinationTypes: pluginCoordinationTypesProp, pluginJointFileTypes: pluginJointFileTypesProp } = props2;