@vitessce/zarr 3.4.14 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{deflate-b2db2606.js → deflate-d6c44024.js} +1 -1
  2. package/dist/{index-40df751d.js → index-315714b8.js} +185 -197
  3. package/dist/index.js +1 -1
  4. package/dist/{jpeg-4eb208e2.js → jpeg-2118e67e.js} +1 -1
  5. package/dist/{lerc-488045ad.js → lerc-48cfdf2b.js} +1 -1
  6. package/dist/{lzw-7dbd05ec.js → lzw-10e7c9ff.js} +1 -1
  7. package/dist/{packbits-86870a09.js → packbits-166dac1c.js} +1 -1
  8. package/dist/{raw-997b5663.js → raw-155ab7ca.js} +1 -1
  9. package/dist/{webimage-fc1b5b38.js → webimage-f1ecb720.js} +1 -1
  10. package/dist-tsc/AnnDataSource.test.js +1 -1
  11. package/dist-tsc/SpatialDataShapesSource.d.ts.map +1 -1
  12. package/dist-tsc/SpatialDataShapesSource.js +1 -6
  13. package/dist-tsc/anndata-loaders/ObsEmbeddingAnndataLoader.test.js +1 -1
  14. package/dist-tsc/json-fixtures/anndata-0.10/anndata-csc.json +1 -1
  15. package/dist-tsc/json-fixtures/anndata-0.10/anndata-csr.adata.json +1 -1
  16. package/dist-tsc/json-fixtures/anndata-0.10/anndata-dense.json +1 -1
  17. package/dist-tsc/json-fixtures/anndata-0.7/anndata-csc.json +1 -1
  18. package/dist-tsc/json-fixtures/anndata-0.7/anndata-csr.json +1 -1
  19. package/dist-tsc/json-fixtures/anndata-0.7/anndata-dense.json +1 -1
  20. package/dist-tsc/json-fixtures/anndata-0.8/anndata-csc.json +1 -1
  21. package/dist-tsc/json-fixtures/anndata-0.8/anndata-csr.adata.json +1 -1
  22. package/dist-tsc/json-fixtures/anndata-0.8/anndata-dense.json +1 -1
  23. package/dist-tsc/json-fixtures/anndata-0.9/anndata-csc.json +1 -1
  24. package/dist-tsc/json-fixtures/anndata-0.9/anndata-csr.adata.json +1 -1
  25. package/dist-tsc/json-fixtures/anndata-0.9/anndata-dense.json +1 -1
  26. package/package.json +12 -13
  27. package/src/AnnDataSource.test.js +1 -1
  28. package/src/SpatialDataShapesSource.js +1 -7
  29. package/src/anndata-loaders/ObsEmbeddingAnndataLoader.test.js +1 -1
  30. package/src/json-fixtures/anndata-0.10/anndata-csc.json +1 -1
  31. package/src/json-fixtures/anndata-0.10/anndata-csr.adata.json +1 -1
  32. package/src/json-fixtures/anndata-0.10/anndata-dense.json +1 -1
  33. package/src/json-fixtures/anndata-0.7/anndata-csc.json +1 -1
  34. package/src/json-fixtures/anndata-0.7/anndata-csr.json +1 -1
  35. package/src/json-fixtures/anndata-0.7/anndata-dense.json +1 -1
  36. package/src/json-fixtures/anndata-0.8/anndata-csc.json +1 -1
  37. package/src/json-fixtures/anndata-0.8/anndata-csr.adata.json +1 -1
  38. package/src/json-fixtures/anndata-0.8/anndata-dense.json +1 -1
  39. package/src/json-fixtures/anndata-0.9/anndata-csc.json +1 -1
  40. package/src/json-fixtures/anndata-0.9/anndata-csr.adata.json +1 -1
  41. package/src/json-fixtures/anndata-0.9/anndata-dense.json +1 -1
@@ -779,11 +779,11 @@ function is_typed_array_like_meta(meta2) {
779
779
  return meta2.data_type !== "v2:object";
780
780
  }
781
781
  const MAX_BIG_UINT = 18446744073709551615n;
782
- function create_sharded_chunk_getter(location2, shard_shape, encode_shard_key, sharding_config) {
783
- if (location2.store.getRange === void 0) {
782
+ function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sharding_config) {
783
+ if (location.store.getRange === void 0) {
784
784
  throw new Error("Store does not support range requests");
785
785
  }
786
- let get_range = location2.store.getRange.bind(location2.store);
786
+ let get_range = location.store.getRange.bind(location.store);
787
787
  let index_shape = shard_shape.map((d, i2) => d / sharding_config.chunk_shape[i2]);
788
788
  let index_codec = create_codec_pipeline({
789
789
  data_type: "uint64",
@@ -793,7 +793,7 @@ function create_sharded_chunk_getter(location2, shard_shape, encode_shard_key, s
793
793
  let cache2 = {};
794
794
  return async (chunk_coord) => {
795
795
  let shard_coord = chunk_coord.map((d, i2) => Math.floor(d / index_shape[i2]));
796
- let shard_path = location2.resolve(encode_shard_key(shard_coord)).path;
796
+ let shard_path = location.resolve(encode_shard_key(shard_coord)).path;
797
797
  let index2;
798
798
  if (shard_path in cache2) {
799
799
  index2 = cache2[shard_path];
@@ -852,7 +852,7 @@ const CONTEXT_MARKER = Symbol("zarrita.context");
852
852
  function get_context(obj) {
853
853
  return obj[CONTEXT_MARKER];
854
854
  }
855
- function create_context(location2, metadata) {
855
+ function create_context(location, metadata) {
856
856
  let { configuration } = metadata.codecs.find(is_sharding_codec) ?? {};
857
857
  let shared_context = {
858
858
  encode_chunk_key: create_chunk_key_encoder(metadata.chunk_key_encoding),
@@ -873,7 +873,7 @@ function create_context(location2, metadata) {
873
873
  get_strides(shape, order) {
874
874
  return get_strides(shape, order ?? native_order2);
875
875
  },
876
- get_chunk_bytes: create_sharded_chunk_getter(location2, metadata.chunk_grid.configuration.chunk_shape, shared_context.encode_chunk_key, configuration)
876
+ get_chunk_bytes: create_sharded_chunk_getter(location, metadata.chunk_grid.configuration.chunk_shape, shared_context.encode_chunk_key, configuration)
877
877
  };
878
878
  }
879
879
  let native_order = get_array_order(metadata.codecs);
@@ -891,8 +891,8 @@ function create_context(location2, metadata) {
891
891
  },
892
892
  async get_chunk_bytes(chunk_coords, options) {
893
893
  let chunk_key = shared_context.encode_chunk_key(chunk_coords);
894
- let chunk_path = location2.resolve(chunk_key).path;
895
- return location2.store.get(chunk_path, options);
894
+ let chunk_path = location.resolve(chunk_key).path;
895
+ return location.store.get(chunk_path, options);
896
896
  }
897
897
  };
898
898
  }
@@ -974,14 +974,14 @@ function create_version_counter() {
974
974
  }
975
975
  };
976
976
  }
977
- async function load_attrs(location2) {
978
- let meta_bytes = await location2.store.get(location2.resolve(".zattrs").path);
977
+ async function load_attrs(location) {
978
+ let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
979
979
  if (!meta_bytes)
980
980
  return {};
981
981
  return json_decode_object(meta_bytes);
982
982
  }
983
- async function open_v2(location2, options = {}) {
984
- let loc = "store" in location2 ? location2 : new Location(location2);
983
+ async function open_v2(location, options = {}) {
984
+ let loc = "store" in location ? location : new Location(location);
985
985
  let attrs = {};
986
986
  if (options.attrs ?? true)
987
987
  attrs = await load_attrs(loc);
@@ -995,31 +995,31 @@ async function open_v2(location2, options = {}) {
995
995
  throw err2;
996
996
  });
997
997
  }
998
- async function open_array_v2(location2, attrs) {
999
- let { path } = location2.resolve(".zarray");
1000
- let meta2 = await location2.store.get(path);
998
+ async function open_array_v2(location, attrs) {
999
+ let { path } = location.resolve(".zarray");
1000
+ let meta2 = await location.store.get(path);
1001
1001
  if (!meta2) {
1002
1002
  throw new NodeNotFoundError("v2 array", {
1003
1003
  cause: new KeyError(path)
1004
1004
  });
1005
1005
  }
1006
- VERSION_COUNTER.increment(location2.store, "v2");
1007
- return new Array$1(location2.store, location2.path, v2_to_v3_array_metadata(json_decode_object(meta2), attrs));
1006
+ VERSION_COUNTER.increment(location.store, "v2");
1007
+ return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta2), attrs));
1008
1008
  }
1009
- async function open_group_v2(location2, attrs) {
1010
- let { path } = location2.resolve(".zgroup");
1011
- let meta2 = await location2.store.get(path);
1009
+ async function open_group_v2(location, attrs) {
1010
+ let { path } = location.resolve(".zgroup");
1011
+ let meta2 = await location.store.get(path);
1012
1012
  if (!meta2) {
1013
1013
  throw new NodeNotFoundError("v2 group", {
1014
1014
  cause: new KeyError(path)
1015
1015
  });
1016
1016
  }
1017
- VERSION_COUNTER.increment(location2.store, "v2");
1018
- return new Group(location2.store, location2.path, v2_to_v3_group_metadata(json_decode_object(meta2), attrs));
1017
+ VERSION_COUNTER.increment(location.store, "v2");
1018
+ return new Group(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta2), attrs));
1019
1019
  }
1020
- async function _open_v3(location2) {
1021
- let { store, path } = location2.resolve("zarr.json");
1022
- let meta2 = await location2.store.get(path);
1020
+ async function _open_v3(location) {
1021
+ let { store, path } = location.resolve("zarr.json");
1022
+ let meta2 = await location.store.get(path);
1023
1023
  if (!meta2) {
1024
1024
  throw new NodeNotFoundError("v3 array or group", {
1025
1025
  cause: new KeyError(path)
@@ -1029,10 +1029,10 @@ async function _open_v3(location2) {
1029
1029
  if (meta_doc.node_type === "array") {
1030
1030
  meta_doc.fill_value = ensure_correct_scalar(meta_doc);
1031
1031
  }
1032
- return meta_doc.node_type === "array" ? new Array$1(store, location2.path, meta_doc) : new Group(store, location2.path, meta_doc);
1032
+ return meta_doc.node_type === "array" ? new Array$1(store, location.path, meta_doc) : new Group(store, location.path, meta_doc);
1033
1033
  }
1034
- async function open_v3(location2, options = {}) {
1035
- let loc = "store" in location2 ? location2 : new Location(location2);
1034
+ async function open_v3(location, options = {}) {
1035
+ let loc = "store" in location ? location : new Location(location);
1036
1036
  let node2 = await _open_v3(loc);
1037
1037
  VERSION_COUNTER.increment(loc.store, "v3");
1038
1038
  if (options.kind === void 0)
@@ -1044,14 +1044,14 @@ async function open_v3(location2, options = {}) {
1044
1044
  let kind = node2 instanceof Array$1 ? "array" : "group";
1045
1045
  throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
1046
1046
  }
1047
- async function open(location2, options = {}) {
1048
- let store = "store" in location2 ? location2.store : location2;
1047
+ async function open(location, options = {}) {
1048
+ let store = "store" in location ? location.store : location;
1049
1049
  let version_max = VERSION_COUNTER.version_max(store);
1050
1050
  let open_primary = version_max === "v2" ? open.v2 : open.v3;
1051
1051
  let open_secondary = version_max === "v2" ? open.v3 : open.v2;
1052
- return open_primary(location2, options).catch((err2) => {
1052
+ return open_primary(location, options).catch((err2) => {
1053
1053
  if (err2 instanceof NodeNotFoundError) {
1054
- return open_secondary(location2, options);
1054
+ return open_secondary(location, options);
1055
1055
  }
1056
1056
  throw err2;
1057
1057
  });
@@ -3293,27 +3293,6 @@ class SpatialDataTableSource extends AnnDataSource {
3293
3293
  return this.varAliases[varPath];
3294
3294
  }
3295
3295
  }
3296
- function e$1({ modulePath: e2 = ".", importFunctionName: t2 = "__import__" } = {}) {
3297
- try {
3298
- self[t2] = new Function("u", "return import(u)");
3299
- } catch (o2) {
3300
- const r2 = new URL(e2, location), n3 = (e3) => {
3301
- URL.revokeObjectURL(e3.src), e3.remove();
3302
- };
3303
- self[t2] = (e3) => new Promise((o3, a2) => {
3304
- const c = new URL(e3, r2);
3305
- if (self[t2].moduleMap[c])
3306
- return o3(self[t2].moduleMap[c]);
3307
- const l2 = new Blob([`import * as m from '${c}';`, `${t2}.moduleMap['${c}']=m;`], { type: "text/javascript" }), m = Object.assign(document.createElement("script"), { type: "module", src: URL.createObjectURL(l2), onerror() {
3308
- a2(new Error(`Failed to import: ${e3}`)), n3(m);
3309
- }, onload() {
3310
- o3(self[t2].moduleMap[c]), n3(m);
3311
- } });
3312
- document.head.appendChild(m);
3313
- }), self[t2].moduleMap = {};
3314
- }
3315
- }
3316
- var t$3 = Object.freeze({ initialize: e$1 });
3317
3296
  function __awaiter(thisArg, _arguments, P2, generator) {
3318
3297
  function adopt(value) {
3319
3298
  return value instanceof P2 ? value : new P2(function(resolve2) {
@@ -18647,11 +18626,11 @@ function getDataView(source) {
18647
18626
  return null;
18648
18627
  }
18649
18628
  const WKB$1 = WKB;
18650
- if (t$3) {
18651
- t$3.initialize();
18652
- }
18653
18629
  async function getReadParquet() {
18654
- const module2 = await __import__("https://unpkg.com/parquet-wasm@0.6.1/esm/parquet_wasm.js");
18630
+ const module2 = await import(
18631
+ /* webpackIgnore: true */
18632
+ "https://unpkg.com/parquet-wasm@0.6.1/esm/parquet_wasm.js"
18633
+ );
18655
18634
  await module2.default();
18656
18635
  return module2.readParquet;
18657
18636
  }
@@ -19307,7 +19286,8 @@ const ViewType$1 = {
19307
19286
  OBS_SET_FEATURE_VALUE_DISTRIBUTION: "obsSetFeatureValueDistribution",
19308
19287
  FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
19309
19288
  DOT_PLOT: "dotPlot",
19310
- FEATURE_BAR_PLOT: "featureBarPlot"
19289
+ FEATURE_BAR_PLOT: "featureBarPlot",
19290
+ BIOMARKER_SELECT: "biomarkerSelect"
19311
19291
  };
19312
19292
  const DataType$2 = {
19313
19293
  OBS_LABELS: "obsLabels",
@@ -43321,7 +43301,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
43321
43301
  meta: {
43322
43302
  suffix: "ANGLE"
43323
43303
  },
43324
- vertexAttribDivisor(location2, divisor) {
43304
+ vertexAttribDivisor(location, divisor) {
43325
43305
  assert$8(divisor === 0, "WebGL instanced rendering not supported");
43326
43306
  },
43327
43307
  drawElementsInstanced: () => {
@@ -43368,7 +43348,7 @@ const WEBGL2_CONTEXT_OVERRIDES = {
43368
43348
  originalFunc(attachment);
43369
43349
  }
43370
43350
  },
43371
- getVertexAttrib: (gl, originalFunc, location2, pname) => {
43351
+ getVertexAttrib: (gl, originalFunc, location, pname) => {
43372
43352
  const {
43373
43353
  webgl2,
43374
43354
  ext
@@ -43382,7 +43362,7 @@ const WEBGL2_CONTEXT_OVERRIDES = {
43382
43362
  result = !webgl2 && !ext ? 0 : void 0;
43383
43363
  break;
43384
43364
  }
43385
- return result !== void 0 ? result : originalFunc(location2, pname);
43365
+ return result !== void 0 ? result : originalFunc(location, pname);
43386
43366
  },
43387
43367
  getProgramParameter: (gl, originalFunc, program, pname) => {
43388
43368
  if (!isWebGL2$1(gl)) {
@@ -47612,12 +47592,12 @@ function toIntArray(value, uniformLength) {
47612
47592
  function toUIntArray(value, uniformLength) {
47613
47593
  return toTypedArray$1(value, uniformLength, Uint32Array, UINT_ARRAY);
47614
47594
  }
47615
- function getUniformSetter(gl, location2, info) {
47595
+ function getUniformSetter(gl, location, info) {
47616
47596
  const setter2 = UNIFORM_SETTERS[info.type];
47617
47597
  if (!setter2) {
47618
47598
  throw new Error("Unknown GLSL uniform type ".concat(info.type));
47619
47599
  }
47620
- return setter2().bind(null, gl, location2);
47600
+ return setter2().bind(null, gl, location);
47621
47601
  }
47622
47602
  function parseUniformName(name2) {
47623
47603
  if (name2[name2.length - 1] !== "]") {
@@ -47695,10 +47675,10 @@ function checkUniformArray(value) {
47695
47675
  }
47696
47676
  function getSamplerSetter() {
47697
47677
  let cache2 = null;
47698
- return (gl, location2, value) => {
47678
+ return (gl, location, value) => {
47699
47679
  const update = cache2 !== value;
47700
47680
  if (update) {
47701
- gl.uniform1i(location2, value);
47681
+ gl.uniform1i(location, value);
47702
47682
  cache2 = value;
47703
47683
  }
47704
47684
  return update;
@@ -47707,7 +47687,7 @@ function getSamplerSetter() {
47707
47687
  function getArraySetter(functionName, toArray, size2, uniformSetter) {
47708
47688
  let cache2 = null;
47709
47689
  let cacheLength = null;
47710
- return (gl, location2, value) => {
47690
+ return (gl, location, value) => {
47711
47691
  const arrayValue = toArray(value, size2);
47712
47692
  const length2 = arrayValue.length;
47713
47693
  let update = false;
@@ -47725,17 +47705,17 @@ function getArraySetter(functionName, toArray, size2, uniformSetter) {
47725
47705
  }
47726
47706
  }
47727
47707
  if (update) {
47728
- uniformSetter(gl, functionName, location2, arrayValue);
47708
+ uniformSetter(gl, functionName, location, arrayValue);
47729
47709
  cache2.set(arrayValue);
47730
47710
  }
47731
47711
  return update;
47732
47712
  };
47733
47713
  }
47734
- function setVectorUniform(gl, functionName, location2, value) {
47735
- gl[functionName](location2, value);
47714
+ function setVectorUniform(gl, functionName, location, value) {
47715
+ gl[functionName](location, value);
47736
47716
  }
47737
- function setMatrixUniform(gl, functionName, location2, value) {
47738
- gl[functionName](location2, false, value);
47717
+ function setMatrixUniform(gl, functionName, location, value) {
47718
+ gl[functionName](location, false, value);
47739
47719
  }
47740
47720
  const GL_BYTE = 5120;
47741
47721
  const GL_UNSIGNED_BYTE = 5121;
@@ -47865,9 +47845,9 @@ class ProgramConfiguration {
47865
47845
  this._readVaryingsFromProgram(program);
47866
47846
  }
47867
47847
  getAttributeInfo(locationOrName) {
47868
- const location2 = Number(locationOrName);
47869
- if (Number.isFinite(location2)) {
47870
- return this.attributeInfosByLocation[location2];
47848
+ const location = Number(locationOrName);
47849
+ if (Number.isFinite(location)) {
47850
+ return this.attributeInfosByLocation[location];
47871
47851
  }
47872
47852
  return this.attributeInfosByName[locationOrName] || null;
47873
47853
  }
@@ -47880,9 +47860,9 @@ class ProgramConfiguration {
47880
47860
  return attributeInfo ? attributeInfo.accessor : null;
47881
47861
  }
47882
47862
  getVaryingInfo(locationOrName) {
47883
- const location2 = Number(locationOrName);
47884
- if (Number.isFinite(location2)) {
47885
- return this.varyingInfos[location2];
47863
+ const location = Number(locationOrName);
47864
+ if (Number.isFinite(location)) {
47865
+ return this.varyingInfos[location];
47886
47866
  }
47887
47867
  return this.varyingInfosByName[locationOrName] || null;
47888
47868
  }
@@ -47905,9 +47885,9 @@ class ProgramConfiguration {
47905
47885
  type: type2,
47906
47886
  size: size2
47907
47887
  } = gl.getActiveAttrib(program.handle, index2);
47908
- const location2 = gl.getAttribLocation(program.handle, name2);
47909
- if (location2 >= 0) {
47910
- this._addAttribute(location2, name2, type2, size2);
47888
+ const location = gl.getAttribLocation(program.handle, name2);
47889
+ if (location >= 0) {
47890
+ this._addAttribute(location, name2, type2, size2);
47911
47891
  }
47912
47892
  }
47913
47893
  this.attributeInfos.sort((a2, b) => a2.location - b.location);
@@ -47920,17 +47900,17 @@ class ProgramConfiguration {
47920
47900
  return;
47921
47901
  }
47922
47902
  const count2 = gl.getProgramParameter(program.handle, 35971);
47923
- for (let location2 = 0; location2 < count2; location2++) {
47903
+ for (let location = 0; location < count2; location++) {
47924
47904
  const {
47925
47905
  name: name2,
47926
47906
  type: type2,
47927
47907
  size: size2
47928
- } = gl.getTransformFeedbackVarying(program.handle, location2);
47929
- this._addVarying(location2, name2, type2, size2);
47908
+ } = gl.getTransformFeedbackVarying(program.handle, location);
47909
+ this._addVarying(location, name2, type2, size2);
47930
47910
  }
47931
47911
  this.varyingInfos.sort((a2, b) => a2.location - b.location);
47932
47912
  }
47933
- _addAttribute(location2, name2, compositeType, size2) {
47913
+ _addAttribute(location, name2, compositeType, size2) {
47934
47914
  const {
47935
47915
  type: type2,
47936
47916
  components
@@ -47939,22 +47919,22 @@ class ProgramConfiguration {
47939
47919
  type: type2,
47940
47920
  size: size2 * components
47941
47921
  };
47942
- this._inferProperties(location2, name2, accessor);
47922
+ this._inferProperties(location, name2, accessor);
47943
47923
  const attributeInfo = {
47944
- location: location2,
47924
+ location,
47945
47925
  name: name2,
47946
47926
  accessor: new Accessor(accessor)
47947
47927
  };
47948
47928
  this.attributeInfos.push(attributeInfo);
47949
- this.attributeInfosByLocation[location2] = attributeInfo;
47929
+ this.attributeInfosByLocation[location] = attributeInfo;
47950
47930
  this.attributeInfosByName[attributeInfo.name] = attributeInfo;
47951
47931
  }
47952
- _inferProperties(location2, name2, accessor) {
47932
+ _inferProperties(location, name2, accessor) {
47953
47933
  if (/instance/i.test(name2)) {
47954
47934
  accessor.divisor = 1;
47955
47935
  }
47956
47936
  }
47957
- _addVarying(location2, name2, compositeType, size2) {
47937
+ _addVarying(location, name2, compositeType, size2) {
47958
47938
  const {
47959
47939
  type: type2,
47960
47940
  components
@@ -47964,7 +47944,7 @@ class ProgramConfiguration {
47964
47944
  size: size2 * components
47965
47945
  });
47966
47946
  const varying = {
47967
- location: location2,
47947
+ location,
47968
47948
  name: name2,
47969
47949
  accessor
47970
47950
  };
@@ -48225,12 +48205,12 @@ class Program extends Resource$1 {
48225
48205
  const {
48226
48206
  name: name2
48227
48207
  } = parseUniformName(info.name);
48228
- let location2 = gl.getUniformLocation(this.handle, name2);
48229
- this._uniformSetters[name2] = getUniformSetter(gl, location2, info);
48208
+ let location = gl.getUniformLocation(this.handle, name2);
48209
+ this._uniformSetters[name2] = getUniformSetter(gl, location, info);
48230
48210
  if (info.size > 1) {
48231
48211
  for (let l2 = 0; l2 < info.size; l2++) {
48232
- location2 = gl.getUniformLocation(this.handle, "".concat(name2, "[").concat(l2, "]"));
48233
- this._uniformSetters["".concat(name2, "[").concat(l2, "]")] = getUniformSetter(gl, location2, info);
48212
+ location = gl.getUniformLocation(this.handle, "".concat(name2, "[").concat(l2, "]"));
48213
+ this._uniformSetters["".concat(name2, "[").concat(l2, "]")] = getUniformSetter(gl, location, info);
48234
48214
  }
48235
48215
  }
48236
48216
  }
@@ -48417,20 +48397,20 @@ class TransformFeedback extends Resource$1 {
48417
48397
  return this;
48418
48398
  }
48419
48399
  setBuffer(locationOrName, bufferOrParams) {
48420
- const location2 = this._getVaryingIndex(locationOrName);
48400
+ const location = this._getVaryingIndex(locationOrName);
48421
48401
  const {
48422
48402
  buffer: buffer2,
48423
48403
  byteSize,
48424
48404
  byteOffset
48425
48405
  } = this._getBufferParams(bufferOrParams);
48426
- if (location2 < 0) {
48406
+ if (location < 0) {
48427
48407
  this.unused[locationOrName] = buffer2;
48428
48408
  log$2.warn("".concat(this.id, " unused varying buffer ").concat(locationOrName))();
48429
48409
  return this;
48430
48410
  }
48431
- this.buffers[location2] = bufferOrParams;
48411
+ this.buffers[location] = bufferOrParams;
48432
48412
  if (!this.bindOnUse) {
48433
- this._bindBuffer(location2, buffer2, byteOffset, byteSize);
48413
+ this._bindBuffer(location, buffer2, byteOffset, byteSize);
48434
48414
  }
48435
48415
  return this;
48436
48416
  }
@@ -48475,8 +48455,8 @@ class TransformFeedback extends Resource$1 {
48475
48455
  if (this.configuration) {
48476
48456
  return this.configuration.getVaryingInfo(locationOrName).location;
48477
48457
  }
48478
- const location2 = Number(locationOrName);
48479
- return Number.isFinite(location2) ? location2 : -1;
48458
+ const location = Number(locationOrName);
48459
+ return Number.isFinite(location) ? location : -1;
48480
48460
  }
48481
48461
  _bindBuffers() {
48482
48462
  if (this.bindOnUse) {
@@ -48579,16 +48559,16 @@ class VertexArrayObject extends Resource$1 {
48579
48559
  VertexArrayObject.MAX_ATTRIBUTES = VertexArrayObject.MAX_ATTRIBUTES || gl.getParameter(34921);
48580
48560
  return VertexArrayObject.MAX_ATTRIBUTES;
48581
48561
  }
48582
- static setConstant(gl, location2, array) {
48562
+ static setConstant(gl, location, array) {
48583
48563
  switch (array.constructor) {
48584
48564
  case Float32Array:
48585
- VertexArrayObject._setConstantFloatArray(gl, location2, array);
48565
+ VertexArrayObject._setConstantFloatArray(gl, location, array);
48586
48566
  break;
48587
48567
  case Int32Array:
48588
- VertexArrayObject._setConstantIntArray(gl, location2, array);
48568
+ VertexArrayObject._setConstantIntArray(gl, location, array);
48589
48569
  break;
48590
48570
  case Uint32Array:
48591
- VertexArrayObject._setConstantUintArray(gl, location2, array);
48571
+ VertexArrayObject._setConstantUintArray(gl, location, array);
48592
48572
  break;
48593
48573
  default:
48594
48574
  assert$7(false);
@@ -48632,7 +48612,7 @@ class VertexArrayObject extends Resource$1 {
48632
48612
  });
48633
48613
  return this;
48634
48614
  }
48635
- setBuffer(location2, buffer2, accessor) {
48615
+ setBuffer(location, buffer2, accessor) {
48636
48616
  if (buffer2.target === 34963) {
48637
48617
  return this.setElementBuffer(buffer2, accessor);
48638
48618
  }
@@ -48649,28 +48629,28 @@ class VertexArrayObject extends Resource$1 {
48649
48629
  gl,
48650
48630
  gl2
48651
48631
  } = this;
48652
- location2 = Number(location2);
48632
+ location = Number(location);
48653
48633
  this.bind(() => {
48654
48634
  gl.bindBuffer(34962, buffer2.handle);
48655
48635
  if (integer) {
48656
48636
  assert$7(isWebGL2$1(gl));
48657
- gl2.vertexAttribIPointer(location2, size2, type2, stride, offset);
48637
+ gl2.vertexAttribIPointer(location, size2, type2, stride, offset);
48658
48638
  } else {
48659
- gl.vertexAttribPointer(location2, size2, type2, normalized, stride, offset);
48639
+ gl.vertexAttribPointer(location, size2, type2, normalized, stride, offset);
48660
48640
  }
48661
- gl.enableVertexAttribArray(location2);
48662
- gl2.vertexAttribDivisor(location2, divisor || 0);
48641
+ gl.enableVertexAttribArray(location);
48642
+ gl2.vertexAttribDivisor(location, divisor || 0);
48663
48643
  });
48664
48644
  return this;
48665
48645
  }
48666
- enable(location2) {
48646
+ enable(location) {
48667
48647
  let enable2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
48668
- const disablingAttributeZero = !enable2 && location2 === 0 && !VertexArrayObject.isSupported(this.gl, {
48648
+ const disablingAttributeZero = !enable2 && location === 0 && !VertexArrayObject.isSupported(this.gl, {
48669
48649
  constantAttributeZero: true
48670
48650
  });
48671
48651
  if (!disablingAttributeZero) {
48672
- location2 = Number(location2);
48673
- this.bind(() => enable2 ? this.gl.enableVertexAttribArray(location2) : this.gl.disableVertexAttribArray(location2));
48652
+ location = Number(location);
48653
+ this.bind(() => enable2 ? this.gl.enableVertexAttribArray(location) : this.gl.disableVertexAttribArray(location));
48674
48654
  }
48675
48655
  return this;
48676
48656
  }
@@ -48712,57 +48692,57 @@ class VertexArrayObject extends Resource$1 {
48712
48692
  }
48713
48693
  return true;
48714
48694
  }
48715
- static _setConstantFloatArray(gl, location2, array) {
48695
+ static _setConstantFloatArray(gl, location, array) {
48716
48696
  switch (array.length) {
48717
48697
  case 1:
48718
- gl.vertexAttrib1fv(location2, array);
48698
+ gl.vertexAttrib1fv(location, array);
48719
48699
  break;
48720
48700
  case 2:
48721
- gl.vertexAttrib2fv(location2, array);
48701
+ gl.vertexAttrib2fv(location, array);
48722
48702
  break;
48723
48703
  case 3:
48724
- gl.vertexAttrib3fv(location2, array);
48704
+ gl.vertexAttrib3fv(location, array);
48725
48705
  break;
48726
48706
  case 4:
48727
- gl.vertexAttrib4fv(location2, array);
48707
+ gl.vertexAttrib4fv(location, array);
48728
48708
  break;
48729
48709
  default:
48730
48710
  assert$7(false);
48731
48711
  }
48732
48712
  }
48733
- static _setConstantIntArray(gl, location2, array) {
48713
+ static _setConstantIntArray(gl, location, array) {
48734
48714
  assert$7(isWebGL2$1(gl));
48735
48715
  switch (array.length) {
48736
48716
  case 1:
48737
- gl.vertexAttribI1iv(location2, array);
48717
+ gl.vertexAttribI1iv(location, array);
48738
48718
  break;
48739
48719
  case 2:
48740
- gl.vertexAttribI2iv(location2, array);
48720
+ gl.vertexAttribI2iv(location, array);
48741
48721
  break;
48742
48722
  case 3:
48743
- gl.vertexAttribI3iv(location2, array);
48723
+ gl.vertexAttribI3iv(location, array);
48744
48724
  break;
48745
48725
  case 4:
48746
- gl.vertexAttribI4iv(location2, array);
48726
+ gl.vertexAttribI4iv(location, array);
48747
48727
  break;
48748
48728
  default:
48749
48729
  assert$7(false);
48750
48730
  }
48751
48731
  }
48752
- static _setConstantUintArray(gl, location2, array) {
48732
+ static _setConstantUintArray(gl, location, array) {
48753
48733
  assert$7(isWebGL2$1(gl));
48754
48734
  switch (array.length) {
48755
48735
  case 1:
48756
- gl.vertexAttribI1uiv(location2, array);
48736
+ gl.vertexAttribI1uiv(location, array);
48757
48737
  break;
48758
48738
  case 2:
48759
- gl.vertexAttribI2uiv(location2, array);
48739
+ gl.vertexAttribI2uiv(location, array);
48760
48740
  break;
48761
48741
  case 3:
48762
- gl.vertexAttribI3uiv(location2, array);
48742
+ gl.vertexAttribI3uiv(location, array);
48763
48743
  break;
48764
48744
  case 4:
48765
- gl.vertexAttribI4uiv(location2, array);
48745
+ gl.vertexAttribI4uiv(location, array);
48766
48746
  break;
48767
48747
  default:
48768
48748
  assert$7(false);
@@ -48781,15 +48761,15 @@ class VertexArrayObject extends Resource$1 {
48781
48761
  }
48782
48762
  _getParameter(pname, _ref) {
48783
48763
  let {
48784
- location: location2
48764
+ location
48785
48765
  } = _ref;
48786
- assert$7(Number.isFinite(location2));
48766
+ assert$7(Number.isFinite(location));
48787
48767
  return this.bind(() => {
48788
48768
  switch (pname) {
48789
48769
  case 34373:
48790
- return this.gl.getVertexAttribOffset(location2, pname);
48770
+ return this.gl.getVertexAttribOffset(location, pname);
48791
48771
  default:
48792
- return this.gl.getVertexAttrib(location2, pname);
48772
+ return this.gl.getVertexAttrib(location, pname);
48793
48773
  }
48794
48774
  });
48795
48775
  }
@@ -48893,31 +48873,31 @@ class VertexArray {
48893
48873
  return this.setElementBuffer(buffer2, appAccessor);
48894
48874
  }
48895
48875
  const {
48896
- location: location2,
48876
+ location,
48897
48877
  accessor
48898
48878
  } = this._resolveLocationAndAccessor(locationOrName, buffer2, buffer2.accessor, appAccessor);
48899
- if (location2 >= 0) {
48900
- this.values[location2] = buffer2;
48901
- this.accessors[location2] = accessor;
48879
+ if (location >= 0) {
48880
+ this.values[location] = buffer2;
48881
+ this.accessors[location] = accessor;
48902
48882
  this.clearDrawParams();
48903
- this.vertexArrayObject.setBuffer(location2, buffer2, accessor);
48883
+ this.vertexArrayObject.setBuffer(location, buffer2, accessor);
48904
48884
  }
48905
48885
  return this;
48906
48886
  }
48907
48887
  setConstant(locationOrName, arrayValue) {
48908
48888
  let appAccessor = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
48909
48889
  const {
48910
- location: location2,
48890
+ location,
48911
48891
  accessor
48912
48892
  } = this._resolveLocationAndAccessor(locationOrName, arrayValue, Object.assign({
48913
48893
  size: arrayValue.length
48914
48894
  }, appAccessor));
48915
- if (location2 >= 0) {
48895
+ if (location >= 0) {
48916
48896
  arrayValue = this.vertexArrayObject._normalizeConstantArrayValue(arrayValue);
48917
- this.values[location2] = arrayValue;
48918
- this.accessors[location2] = accessor;
48897
+ this.values[location] = arrayValue;
48898
+ this.accessors[location] = accessor;
48919
48899
  this.clearDrawParams();
48920
- this.vertexArrayObject.enable(location2, false);
48900
+ this.vertexArrayObject.enable(location, false);
48921
48901
  }
48922
48902
  return this;
48923
48903
  }
@@ -48931,11 +48911,11 @@ class VertexArray {
48931
48911
  size: 4
48932
48912
  }
48933
48913
  });
48934
- for (let location2 = 0; location2 < this.vertexArrayObject.MAX_ATTRIBUTES; location2++) {
48935
- if (this.values[location2] instanceof Buffer$1) {
48936
- this.gl.disableVertexAttribArray(location2);
48914
+ for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {
48915
+ if (this.values[location] instanceof Buffer$1) {
48916
+ this.gl.disableVertexAttribArray(location);
48937
48917
  this.gl.bindBuffer(34962, this.buffer.handle);
48938
- this.gl.vertexAttribPointer(location2, 1, 5126, false, 0, 0);
48918
+ this.gl.vertexAttribPointer(location, 1, 5126, false, 0, 0);
48939
48919
  }
48940
48920
  }
48941
48921
  });
@@ -48946,10 +48926,10 @@ class VertexArray {
48946
48926
  if (this.elements) {
48947
48927
  this.setElementBuffer(this.elements);
48948
48928
  }
48949
- for (let location2 = 0; location2 < this.vertexArrayObject.MAX_ATTRIBUTES; location2++) {
48950
- const buffer2 = this.values[location2];
48929
+ for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {
48930
+ const buffer2 = this.values[location];
48951
48931
  if (buffer2 instanceof Buffer$1) {
48952
- this.setBuffer(location2, buffer2);
48932
+ this.setBuffer(location, buffer2);
48953
48933
  }
48954
48934
  }
48955
48935
  });
@@ -48969,19 +48949,19 @@ class VertexArray {
48969
48949
  accessor: null
48970
48950
  };
48971
48951
  const {
48972
- location: location2,
48952
+ location,
48973
48953
  name: name2
48974
48954
  } = this._getAttributeIndex(locationOrName);
48975
- if (!Number.isFinite(location2) || location2 < 0) {
48955
+ if (!Number.isFinite(location) || location < 0) {
48976
48956
  this.unused[locationOrName] = value;
48977
48957
  log$2.once(3, () => "unused value ".concat(locationOrName, " in ").concat(this.id))();
48978
48958
  return INVALID_RESULT;
48979
48959
  }
48980
- const accessInfo = this._getAttributeInfo(name2 || location2);
48960
+ const accessInfo = this._getAttributeInfo(name2 || location);
48981
48961
  if (!accessInfo) {
48982
48962
  return INVALID_RESULT;
48983
48963
  }
48984
- const currentAccessor = this.accessors[location2] || {};
48964
+ const currentAccessor = this.accessors[location] || {};
48985
48965
  const accessor = Accessor.resolve(accessInfo.accessor, currentAccessor, valueAccessor, appAccessor);
48986
48966
  const {
48987
48967
  size: size2,
@@ -48989,7 +48969,7 @@ class VertexArray {
48989
48969
  } = accessor;
48990
48970
  assert$7(Number.isFinite(size2) && Number.isFinite(type2));
48991
48971
  return {
48992
- location: location2,
48972
+ location,
48993
48973
  accessor
48994
48974
  };
48995
48975
  }
@@ -48997,10 +48977,10 @@ class VertexArray {
48997
48977
  return this.configuration && this.configuration.getAttributeInfo(attributeName);
48998
48978
  }
48999
48979
  _getAttributeIndex(locationOrName) {
49000
- const location2 = Number(locationOrName);
49001
- if (Number.isFinite(location2)) {
48980
+ const location = Number(locationOrName);
48981
+ if (Number.isFinite(location)) {
49002
48982
  return {
49003
- location: location2
48983
+ location
49004
48984
  };
49005
48985
  }
49006
48986
  const multiLocation = MULTI_LOCATION_ATTRIBUTE_REGEXP.exec(locationOrName);
@@ -49039,10 +49019,10 @@ class VertexArray {
49039
49019
  if (ArrayBuffer.isView(constant2)) {
49040
49020
  this._setConstantAttributeZero(constant2, elementCount);
49041
49021
  }
49042
- for (let location2 = 1; location2 < this.vertexArrayObject.MAX_ATTRIBUTES; location2++) {
49043
- constant2 = this.values[location2];
49022
+ for (let location = 1; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {
49023
+ constant2 = this.values[location];
49044
49024
  if (ArrayBuffer.isView(constant2)) {
49045
- this._setConstantAttribute(location2, constant2);
49025
+ this._setConstantAttribute(location, constant2);
49046
49026
  }
49047
49027
  }
49048
49028
  }
@@ -49056,8 +49036,8 @@ class VertexArray {
49056
49036
  const buffer2 = this.vertexArrayObject.getConstantBuffer(elementCount, constant2);
49057
49037
  this.vertexArrayObject.setBuffer(0, buffer2, this.accessors[0]);
49058
49038
  }
49059
- _setConstantAttribute(location2, constant2) {
49060
- VertexArrayObject.setConstant(this.gl, location2, constant2);
49039
+ _setConstantAttribute(location, constant2) {
49040
+ VertexArrayObject.setConstant(this.gl, location, constant2);
49061
49041
  }
49062
49042
  _updateDrawParams() {
49063
49043
  const drawParams = {
@@ -49067,8 +49047,8 @@ class VertexArray {
49067
49047
  vertexCount: Infinity,
49068
49048
  instanceCount: Infinity
49069
49049
  };
49070
- for (let location2 = 0; location2 < this.vertexArrayObject.MAX_ATTRIBUTES; location2++) {
49071
- this._updateDrawParamsForLocation(drawParams, location2);
49050
+ for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {
49051
+ this._updateDrawParamsForLocation(drawParams, location);
49072
49052
  }
49073
49053
  if (this.elements) {
49074
49054
  drawParams.elementCount = this.elements.getElementCount(this.elements.accessor);
@@ -49087,9 +49067,9 @@ class VertexArray {
49087
49067
  }
49088
49068
  return drawParams;
49089
49069
  }
49090
- _updateDrawParamsForLocation(drawParams, location2) {
49091
- const value = this.values[location2];
49092
- const accessor = this.accessors[location2];
49070
+ _updateDrawParamsForLocation(drawParams, location) {
49071
+ const value = this.values[location];
49072
+ const accessor = this.accessors[location];
49093
49073
  if (!value) {
49094
49074
  return;
49095
49075
  }
@@ -105045,7 +105025,7 @@ keysShim.shim = function shimObjectKeys() {
105045
105025
  return Object.keys || keysShim;
105046
105026
  };
105047
105027
  var objectKeys$1 = keysShim;
105048
- var shams$2 = function hasSymbols() {
105028
+ var shams$1 = function hasSymbols() {
105049
105029
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
105050
105030
  return false;
105051
105031
  }
@@ -105090,9 +105070,9 @@ var shams$2 = function hasSymbols() {
105090
105070
  }
105091
105071
  return true;
105092
105072
  };
105093
- var hasSymbols$4 = shams$2;
105094
- var shams$1 = function hasToStringTagShams() {
105095
- return hasSymbols$4() && !!Symbol.toStringTag;
105073
+ var hasSymbols$3 = shams$1;
105074
+ var shams = function hasToStringTagShams() {
105075
+ return hasSymbols$3() && !!Symbol.toStringTag;
105096
105076
  };
105097
105077
  var esErrors = Error;
105098
105078
  var _eval = EvalError;
@@ -105102,8 +105082,8 @@ var syntax = SyntaxError;
105102
105082
  var type = TypeError;
105103
105083
  var uri = URIError;
105104
105084
  var origSymbol = typeof Symbol !== "undefined" && Symbol;
105105
- var hasSymbolSham = shams$2;
105106
- var hasSymbols$3 = function hasNativeSymbols() {
105085
+ var hasSymbolSham = shams$1;
105086
+ var hasSymbols$2 = function hasNativeSymbols() {
105107
105087
  if (typeof origSymbol !== "function") {
105108
105088
  return false;
105109
105089
  }
@@ -105119,11 +105099,12 @@ var hasSymbols$3 = function hasNativeSymbols() {
105119
105099
  return hasSymbolSham();
105120
105100
  };
105121
105101
  var test = {
105102
+ __proto__: null,
105122
105103
  foo: {}
105123
105104
  };
105124
105105
  var $Object$1 = Object;
105125
105106
  var hasProto$1 = function hasProto() {
105126
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
105107
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object$1);
105127
105108
  };
105128
105109
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
105129
105110
  var toStr$2 = Object.prototype.toString;
@@ -105238,7 +105219,7 @@ var ThrowTypeError = $gOPD$2 ? function() {
105238
105219
  }
105239
105220
  }
105240
105221
  }() : throwTypeError;
105241
- var hasSymbols$2 = hasSymbols$3();
105222
+ var hasSymbols$1 = hasSymbols$2();
105242
105223
  var hasProto2 = hasProto$1();
105243
105224
  var getProto$1 = Object.getPrototypeOf || (hasProto2 ? function(x2) {
105244
105225
  return x2.__proto__;
@@ -105250,7 +105231,7 @@ var INTRINSICS = {
105250
105231
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
105251
105232
  "%Array%": Array,
105252
105233
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
105253
- "%ArrayIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
105234
+ "%ArrayIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
105254
105235
  "%AsyncFromSyncIteratorPrototype%": undefined$1,
105255
105236
  "%AsyncFunction%": needsEval,
105256
105237
  "%AsyncGenerator%": needsEval,
@@ -105281,10 +105262,10 @@ var INTRINSICS = {
105281
105262
  "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
105282
105263
  "%isFinite%": isFinite,
105283
105264
  "%isNaN%": isNaN,
105284
- "%IteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
105265
+ "%IteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
105285
105266
  "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
105286
105267
  "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
105287
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
105268
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
105288
105269
  "%Math%": Math,
105289
105270
  "%Number%": Number,
105290
105271
  "%Object%": Object,
@@ -105297,11 +105278,11 @@ var INTRINSICS = {
105297
105278
  "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
105298
105279
  "%RegExp%": RegExp,
105299
105280
  "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
105300
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
105281
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
105301
105282
  "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
105302
105283
  "%String%": String,
105303
- "%StringIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
105304
- "%Symbol%": hasSymbols$2 ? Symbol : undefined$1,
105284
+ "%StringIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
105285
+ "%Symbol%": hasSymbols$1 ? Symbol : undefined$1,
105305
105286
  "%SyntaxError%": $SyntaxError$1,
105306
105287
  "%ThrowTypeError%": ThrowTypeError,
105307
105288
  "%TypedArray%": TypedArray,
@@ -105670,7 +105651,7 @@ var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
105670
105651
  }
105671
105652
  return intrinsic;
105672
105653
  };
105673
- var hasToStringTag$2 = shams$1();
105654
+ var hasToStringTag$2 = shams();
105674
105655
  var callBound$1 = callBound$2;
105675
105656
  var $toString$1 = callBound$1("Object.prototype.toString");
105676
105657
  var isStandardArguments = function isArguments2(value) {
@@ -105715,7 +105696,7 @@ hasPropertyDescriptors2.hasArrayLengthDefineBug = function hasArrayLengthDefineB
105715
105696
  };
105716
105697
  var hasPropertyDescriptors_1 = hasPropertyDescriptors2;
105717
105698
  var keys2 = objectKeys$1;
105718
- var hasSymbols$1 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
105699
+ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
105719
105700
  var toStr$1 = Object.prototype.toString;
105720
105701
  var concat = Array.prototype.concat;
105721
105702
  var defineDataProperty2 = defineDataProperty$1;
@@ -105742,7 +105723,7 @@ var defineProperty$1 = function(object2, name2, value, predicate) {
105742
105723
  var defineProperties = function(object2, map2) {
105743
105724
  var predicates = arguments.length > 2 ? arguments[2] : {};
105744
105725
  var props = keys2(map2);
105745
- if (hasSymbols$1) {
105726
+ if (hasSymbols2) {
105746
105727
  props = concat.call(props, Object.getOwnPropertySymbols(map2));
105747
105728
  }
105748
105729
  for (var i2 = 0; i2 < props.length; i2 += 1) {
@@ -105793,10 +105774,6 @@ define$2(polyfill$1, {
105793
105774
  shim: shim$2
105794
105775
  });
105795
105776
  var objectIs = polyfill$1;
105796
- var hasSymbols2 = shams$2;
105797
- var shams = function hasToStringTagShams2() {
105798
- return hasSymbols2() && !!Symbol.toStringTag;
105799
- };
105800
105777
  var callBound = callBound$2;
105801
105778
  var hasToStringTag$1 = shams();
105802
105779
  var has;
@@ -106003,7 +105980,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
106003
105980
  };
106004
105981
  var toStr = Object.prototype.toString;
106005
105982
  var dateClass = "[object Date]";
106006
- var hasToStringTag = shams$1();
105983
+ var hasToStringTag = shams();
106007
105984
  var isDateObject = function isDateObject2(value) {
106008
105985
  if (typeof value !== "object" || value === null) {
106009
105986
  return false;
@@ -139251,16 +139228,16 @@ function addDecoder(cases, importFn) {
139251
139228
  }
139252
139229
  cases.forEach((c) => registry$1.set(c, importFn));
139253
139230
  }
139254
- addDecoder([void 0, 1], () => import("./raw-997b5663.js").then((m) => m.default));
139255
- addDecoder(5, () => import("./lzw-7dbd05ec.js").then((m) => m.default));
139231
+ addDecoder([void 0, 1], () => import("./raw-155ab7ca.js").then((m) => m.default));
139232
+ addDecoder(5, () => import("./lzw-10e7c9ff.js").then((m) => m.default));
139256
139233
  addDecoder(6, () => {
139257
139234
  throw new Error("old style JPEG compression is not supported.");
139258
139235
  });
139259
- addDecoder(7, () => import("./jpeg-4eb208e2.js").then((m) => m.default));
139260
- addDecoder([8, 32946], () => import("./deflate-b2db2606.js").then((m) => m.default));
139261
- addDecoder(32773, () => import("./packbits-86870a09.js").then((m) => m.default));
139262
- addDecoder(34887, () => import("./lerc-488045ad.js").then((m) => m.default));
139263
- addDecoder(50001, () => import("./webimage-fc1b5b38.js").then((m) => m.default));
139236
+ addDecoder(7, () => import("./jpeg-2118e67e.js").then((m) => m.default));
139237
+ addDecoder([8, 32946], () => import("./deflate-d6c44024.js").then((m) => m.default));
139238
+ addDecoder(32773, () => import("./packbits-166dac1c.js").then((m) => m.default));
139239
+ addDecoder(34887, () => import("./lerc-48cfdf2b.js").then((m) => m.default));
139240
+ addDecoder(50001, () => import("./webimage-f1ecb720.js").then((m) => m.default));
139264
139241
  function decodeRowAcc(row, stride) {
139265
139242
  let length2 = row.length - stride;
139266
139243
  let offset = 0;
@@ -165172,6 +165149,17 @@ class ImageWrapper {
165172
165149
  }
165173
165150
  return [];
165174
165151
  }
165152
+ getChannelIndex(channelSpecifier) {
165153
+ if (typeof channelSpecifier === "number") {
165154
+ return channelSpecifier;
165155
+ }
165156
+ const channelNames = this.getChannelNames();
165157
+ const channelIndex = channelNames.indexOf(channelSpecifier);
165158
+ if (channelIndex === -1) {
165159
+ console.error(`Channel ${channelSpecifier} not found in image.`);
165160
+ }
165161
+ return channelIndex;
165162
+ }
165175
165163
  // TODO: support passing a custom color palette array.
165176
165164
  getChannelObjects() {
165177
165165
  if ("image-label" in this.vivLoader.metadata) {