@vitessce/json 3.4.9 → 3.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{deflate-bb592345.js → deflate-ae673a66.js} +1 -1
- package/dist/{index-2b48875e.js → index-e57214db.js} +643 -289
- package/dist/index.js +1 -1
- package/dist/{jpeg-27c931cc.js → jpeg-66ca148e.js} +1 -1
- package/dist/{lerc-c156b11b.js → lerc-5bb256f6.js} +1 -1
- package/dist/{lzw-35a4c5b9.js → lzw-138e1cde.js} +1 -1
- package/dist/{packbits-dedc6ff6.js → packbits-8ad74a5e.js} +1 -1
- package/dist/{raw-a0e96ac4.js → raw-0a868094.js} +1 -1
- package/dist/{webimage-262eb38b.js → webimage-bc6cbf52.js} +1 -1
- package/dist-tsc/raster-json-loaders/RasterJsonLoader.js +2 -2
- package/package.json +11 -11
- package/src/raster-json-loaders/RasterJsonLoader.js +2 -2
|
@@ -26,7 +26,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
26
26
|
__accessCheck(obj, member, "access private method");
|
|
27
27
|
return method;
|
|
28
28
|
};
|
|
29
|
-
var _bytes, _encoder, _data,
|
|
29
|
+
var _bytes, _encoder, _data, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _shape2, _strides2, _metadata, _metadata2, _a2, _b, _overrides, _use_suffix_request, _merge_init, merge_init_fn, _overrides2, _refs, _opts, _overrides3;
|
|
30
30
|
import { DataSourceFetchError, AbstractTwoStepLoader, AbstractLoaderError, LoaderResult, LoaderValidationError } from "@vitessce/vit-s";
|
|
31
31
|
import "react";
|
|
32
32
|
function _mergeNamespaces(n3, m) {
|
|
@@ -104,6 +104,7 @@ const FileType$1 = {
|
|
|
104
104
|
// Joint file types
|
|
105
105
|
ANNDATA_ZARR: "anndata.zarr",
|
|
106
106
|
ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
|
|
107
|
+
ANNDATA_H5AD: "anndata.h5ad",
|
|
107
108
|
SPATIALDATA_ZARR: "spatialdata.zarr",
|
|
108
109
|
// Atomic file types
|
|
109
110
|
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
@@ -144,6 +145,18 @@ const FileType$1 = {
|
|
|
144
145
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
|
145
146
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
146
147
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
148
|
+
// AnnData - h5ad via reference spec
|
|
149
|
+
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
150
|
+
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
151
|
+
OBS_SETS_ANNDATA_H5AD: "obsSets.anndata.h5ad",
|
|
152
|
+
OBS_EMBEDDING_ANNDATA_H5AD: "obsEmbedding.anndata.h5ad",
|
|
153
|
+
OBS_SPOTS_ANNDATA_H5AD: "obsSpots.anndata.h5ad",
|
|
154
|
+
OBS_POINTS_ANNDATA_H5AD: "obsPoints.anndata.h5ad",
|
|
155
|
+
OBS_LOCATIONS_ANNDATA_H5AD: "obsLocations.anndata.h5ad",
|
|
156
|
+
OBS_SEGMENTATIONS_ANNDATA_H5AD: "obsSegmentations.anndata.h5ad",
|
|
157
|
+
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
|
158
|
+
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
159
|
+
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
147
160
|
// SpatialData
|
|
148
161
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
149
162
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -4305,6 +4318,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
|
|
|
4305
4318
|
coordinationScopesBy: componentCoordinationScopesBy.optional()
|
|
4306
4319
|
}))
|
|
4307
4320
|
});
|
|
4321
|
+
const configSchema1_0_17 = configSchema1_0_16.extend({
|
|
4322
|
+
version: z.literal("1.0.17")
|
|
4323
|
+
});
|
|
4308
4324
|
let getRandomValues$1;
|
|
4309
4325
|
const rnds8$1 = new Uint8Array(16);
|
|
4310
4326
|
function rng$1() {
|
|
@@ -5469,8 +5485,8 @@ function createRange(fromRight) {
|
|
|
5469
5485
|
return baseRange(start, end, step, fromRight);
|
|
5470
5486
|
};
|
|
5471
5487
|
}
|
|
5472
|
-
var range$
|
|
5473
|
-
const range$
|
|
5488
|
+
var range$7 = createRange();
|
|
5489
|
+
const range$8 = range$7;
|
|
5474
5490
|
function sum$3(array) {
|
|
5475
5491
|
return array && array.length ? baseSum(array, identity$6) : 0;
|
|
5476
5492
|
}
|
|
@@ -6388,7 +6404,43 @@ function upgradeFrom1_0_15(config3) {
|
|
|
6388
6404
|
version: "1.0.16"
|
|
6389
6405
|
};
|
|
6390
6406
|
}
|
|
6391
|
-
|
|
6407
|
+
function upgradeFrom1_0_16(config3) {
|
|
6408
|
+
const newConfig = cloneDeep(config3);
|
|
6409
|
+
const { datasets } = newConfig;
|
|
6410
|
+
const newDatasets = datasets.map((datasetDef) => {
|
|
6411
|
+
const { files } = datasetDef;
|
|
6412
|
+
const newFiles = files.map((fileDef) => {
|
|
6413
|
+
const { fileType, options } = fileDef;
|
|
6414
|
+
if (fileType === "obsSets.anndata.zarr") {
|
|
6415
|
+
return {
|
|
6416
|
+
...fileDef,
|
|
6417
|
+
options: {
|
|
6418
|
+
obsSets: options
|
|
6419
|
+
}
|
|
6420
|
+
};
|
|
6421
|
+
}
|
|
6422
|
+
if (fileType === "obsFeatureColumns.anndata.zarr") {
|
|
6423
|
+
return {
|
|
6424
|
+
...fileDef,
|
|
6425
|
+
options: {
|
|
6426
|
+
obsFeatureColumns: options
|
|
6427
|
+
}
|
|
6428
|
+
};
|
|
6429
|
+
}
|
|
6430
|
+
return fileDef;
|
|
6431
|
+
});
|
|
6432
|
+
return {
|
|
6433
|
+
...datasetDef,
|
|
6434
|
+
files: newFiles
|
|
6435
|
+
};
|
|
6436
|
+
});
|
|
6437
|
+
return {
|
|
6438
|
+
...newConfig,
|
|
6439
|
+
datasets: newDatasets,
|
|
6440
|
+
version: "1.0.17"
|
|
6441
|
+
};
|
|
6442
|
+
}
|
|
6443
|
+
const latestConfigSchema = configSchema1_0_17;
|
|
6392
6444
|
const SCHEMA_HANDLERS = [
|
|
6393
6445
|
[configSchema0_1_0, upgradeFrom0_1_0],
|
|
6394
6446
|
[configSchema1_0_0, upgradeFrom1_0_0],
|
|
@@ -6406,7 +6458,8 @@ const SCHEMA_HANDLERS = [
|
|
|
6406
6458
|
[configSchema1_0_12, upgradeFrom1_0_12],
|
|
6407
6459
|
[configSchema1_0_13, upgradeFrom1_0_13],
|
|
6408
6460
|
[configSchema1_0_14, upgradeFrom1_0_14],
|
|
6409
|
-
[configSchema1_0_15, upgradeFrom1_0_15]
|
|
6461
|
+
[configSchema1_0_15, upgradeFrom1_0_15],
|
|
6462
|
+
[configSchema1_0_16, upgradeFrom1_0_16]
|
|
6410
6463
|
];
|
|
6411
6464
|
var re$3 = { exports: {} };
|
|
6412
6465
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
@@ -6730,7 +6783,7 @@ const { MAX_LENGTH } = constants$4;
|
|
|
6730
6783
|
const { re: re$1, t: t$1 } = reExports;
|
|
6731
6784
|
const SemVer$c = semver;
|
|
6732
6785
|
const parseOptions = parseOptions_1;
|
|
6733
|
-
const parse$
|
|
6786
|
+
const parse$c = (version2, options) => {
|
|
6734
6787
|
options = parseOptions(options);
|
|
6735
6788
|
if (version2 instanceof SemVer$c) {
|
|
6736
6789
|
return version2;
|
|
@@ -6751,16 +6804,16 @@ const parse$a = (version2, options) => {
|
|
|
6751
6804
|
return null;
|
|
6752
6805
|
}
|
|
6753
6806
|
};
|
|
6754
|
-
var parse_1 = parse$
|
|
6755
|
-
const parse$
|
|
6756
|
-
const valid$
|
|
6757
|
-
const v = parse$
|
|
6807
|
+
var parse_1 = parse$c;
|
|
6808
|
+
const parse$b = parse_1;
|
|
6809
|
+
const valid$3 = (version2, options) => {
|
|
6810
|
+
const v = parse$b(version2, options);
|
|
6758
6811
|
return v ? v.version : null;
|
|
6759
6812
|
};
|
|
6760
|
-
var valid_1 = valid$
|
|
6761
|
-
const parse$
|
|
6813
|
+
var valid_1 = valid$3;
|
|
6814
|
+
const parse$a = parse_1;
|
|
6762
6815
|
const clean$1 = (version2, options) => {
|
|
6763
|
-
const s2 = parse$
|
|
6816
|
+
const s2 = parse$a(version2.trim().replace(/^[=v]+/, ""), options);
|
|
6764
6817
|
return s2 ? s2.version : null;
|
|
6765
6818
|
};
|
|
6766
6819
|
var clean_1 = clean$1;
|
|
@@ -6786,14 +6839,14 @@ var compare_1 = compare$c;
|
|
|
6786
6839
|
const compare$b = compare_1;
|
|
6787
6840
|
const eq$3 = (a2, b, loose) => compare$b(a2, b, loose) === 0;
|
|
6788
6841
|
var eq_1 = eq$3;
|
|
6789
|
-
const parse$
|
|
6842
|
+
const parse$9 = parse_1;
|
|
6790
6843
|
const eq$2 = eq_1;
|
|
6791
6844
|
const diff$1 = (version1, version2) => {
|
|
6792
6845
|
if (eq$2(version1, version2)) {
|
|
6793
6846
|
return null;
|
|
6794
6847
|
} else {
|
|
6795
|
-
const v12 = parse$
|
|
6796
|
-
const v2 = parse$
|
|
6848
|
+
const v12 = parse$9(version1);
|
|
6849
|
+
const v2 = parse$9(version2);
|
|
6797
6850
|
const hasPre = v12.prerelease.length || v2.prerelease.length;
|
|
6798
6851
|
const prefix = hasPre ? "pre" : "";
|
|
6799
6852
|
const defaultResult = hasPre ? "prerelease" : "";
|
|
@@ -6817,9 +6870,9 @@ var minor_1 = minor$1;
|
|
|
6817
6870
|
const SemVer$7 = semver;
|
|
6818
6871
|
const patch$1 = (a2, loose) => new SemVer$7(a2, loose).patch;
|
|
6819
6872
|
var patch_1 = patch$1;
|
|
6820
|
-
const parse$
|
|
6873
|
+
const parse$8 = parse_1;
|
|
6821
6874
|
const prerelease$1 = (version2, options) => {
|
|
6822
|
-
const parsed = parse$
|
|
6875
|
+
const parsed = parse$8(version2, options);
|
|
6823
6876
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
6824
6877
|
};
|
|
6825
6878
|
var prerelease_1 = prerelease$1;
|
|
@@ -6901,7 +6954,7 @@ const cmp$1 = (a2, op, b, loose) => {
|
|
|
6901
6954
|
};
|
|
6902
6955
|
var cmp_1 = cmp$1;
|
|
6903
6956
|
const SemVer$5 = semver;
|
|
6904
|
-
const parse$
|
|
6957
|
+
const parse$7 = parse_1;
|
|
6905
6958
|
const { re, t } = reExports;
|
|
6906
6959
|
const coerce$1 = (version2, options) => {
|
|
6907
6960
|
if (version2 instanceof SemVer$5) {
|
|
@@ -6930,7 +6983,7 @@ const coerce$1 = (version2, options) => {
|
|
|
6930
6983
|
if (match === null) {
|
|
6931
6984
|
return null;
|
|
6932
6985
|
}
|
|
6933
|
-
return parse$
|
|
6986
|
+
return parse$7(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
|
|
6934
6987
|
};
|
|
6935
6988
|
var coerce_1 = coerce$1;
|
|
6936
6989
|
var iterator;
|
|
@@ -7573,11 +7626,11 @@ const forEachStep = (self2, fn, node2, thisp) => {
|
|
|
7573
7626
|
fn.call(thisp, hit.value, hit.key, self2);
|
|
7574
7627
|
};
|
|
7575
7628
|
var lruCache = LRUCache$1;
|
|
7576
|
-
var range$
|
|
7629
|
+
var range$6;
|
|
7577
7630
|
var hasRequiredRange;
|
|
7578
7631
|
function requireRange() {
|
|
7579
7632
|
if (hasRequiredRange)
|
|
7580
|
-
return range$
|
|
7633
|
+
return range$6;
|
|
7581
7634
|
hasRequiredRange = 1;
|
|
7582
7635
|
class Range2 {
|
|
7583
7636
|
constructor(range2, options) {
|
|
@@ -7702,7 +7755,7 @@ function requireRange() {
|
|
|
7702
7755
|
return false;
|
|
7703
7756
|
}
|
|
7704
7757
|
}
|
|
7705
|
-
range$
|
|
7758
|
+
range$6 = Range2;
|
|
7706
7759
|
const LRU = lruCache;
|
|
7707
7760
|
const cache2 = new LRU({ max: 1e3 });
|
|
7708
7761
|
const parseOptions2 = parseOptions_1;
|
|
@@ -7933,7 +7986,7 @@ function requireRange() {
|
|
|
7933
7986
|
}
|
|
7934
7987
|
return true;
|
|
7935
7988
|
};
|
|
7936
|
-
return range$
|
|
7989
|
+
return range$6;
|
|
7937
7990
|
}
|
|
7938
7991
|
var comparator;
|
|
7939
7992
|
var hasRequiredComparator;
|
|
@@ -8153,7 +8206,7 @@ const validRange$1 = (range2, options) => {
|
|
|
8153
8206
|
return null;
|
|
8154
8207
|
}
|
|
8155
8208
|
};
|
|
8156
|
-
var valid$
|
|
8209
|
+
var valid$2 = validRange$1;
|
|
8157
8210
|
const SemVer$1 = semver;
|
|
8158
8211
|
const Comparator$2 = requireComparator();
|
|
8159
8212
|
const { ANY: ANY$1 } = Comparator$2;
|
|
@@ -8430,8 +8483,8 @@ const internalRe = reExports;
|
|
|
8430
8483
|
const constants$3 = constants$4;
|
|
8431
8484
|
const SemVer2 = semver;
|
|
8432
8485
|
const identifiers = identifiers$1;
|
|
8433
|
-
const parse$
|
|
8434
|
-
const valid = valid_1;
|
|
8486
|
+
const parse$6 = parse_1;
|
|
8487
|
+
const valid$1 = valid_1;
|
|
8435
8488
|
const clean = clean_1;
|
|
8436
8489
|
const inc = inc_1;
|
|
8437
8490
|
const diff = diff_1;
|
|
@@ -8460,7 +8513,7 @@ const toComparators = toComparators_1;
|
|
|
8460
8513
|
const maxSatisfying = maxSatisfying_1;
|
|
8461
8514
|
const minSatisfying = minSatisfying_1;
|
|
8462
8515
|
const minVersion = minVersion_1;
|
|
8463
|
-
const validRange = valid$
|
|
8516
|
+
const validRange = valid$2;
|
|
8464
8517
|
const outside = outside_1;
|
|
8465
8518
|
const gtr = gtr_1;
|
|
8466
8519
|
const ltr = ltr_1;
|
|
@@ -8468,8 +8521,8 @@ const intersects$5 = intersects_1;
|
|
|
8468
8521
|
const simplifyRange = simplify;
|
|
8469
8522
|
const subset = subset_1;
|
|
8470
8523
|
({
|
|
8471
|
-
parse: parse$
|
|
8472
|
-
valid,
|
|
8524
|
+
parse: parse$6,
|
|
8525
|
+
valid: valid$1,
|
|
8473
8526
|
clean,
|
|
8474
8527
|
inc,
|
|
8475
8528
|
diff,
|
|
@@ -8677,10 +8730,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
8677
8730
|
const handler = {
|
|
8678
8731
|
get(obj, prop) {
|
|
8679
8732
|
const oldKeys = Object.keys(oldObj);
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
${oldObj[
|
|
8683
|
-
|
|
8733
|
+
const propKey = String(prop);
|
|
8734
|
+
if (oldKeys.includes(propKey)) {
|
|
8735
|
+
console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
|
8736
|
+
${oldObj[propKey][1]}`);
|
|
8737
|
+
return oldObj[propKey];
|
|
8684
8738
|
}
|
|
8685
8739
|
return obj[prop];
|
|
8686
8740
|
}
|
|
@@ -8765,7 +8819,7 @@ const annDataObsFeatureMatrix = z.object({
|
|
|
8765
8819
|
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"),
|
|
8766
8820
|
initialFeatureFilterPath: z.string().optional().describe("If only a subset of the matrix should be loaded initially, put a boolean column along the feature axis here (analogous to the previous matrixGeneFilter option). e.g., var/highly_variable")
|
|
8767
8821
|
});
|
|
8768
|
-
const
|
|
8822
|
+
const annDataObsSetsArr = z.array(z.object({
|
|
8769
8823
|
name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
|
|
8770
8824
|
path: z.union([
|
|
8771
8825
|
z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
|
|
@@ -8773,9 +8827,15 @@ const annDataObsSets = z.array(z.object({
|
|
|
8773
8827
|
]),
|
|
8774
8828
|
scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
|
|
8775
8829
|
}));
|
|
8776
|
-
z.
|
|
8830
|
+
const annDataObsSets = z.object({
|
|
8831
|
+
obsSets: annDataObsSetsArr
|
|
8832
|
+
});
|
|
8833
|
+
const annDataObsFeatureColumnsArr = z.array(z.object({
|
|
8777
8834
|
path: z.string()
|
|
8778
8835
|
}));
|
|
8836
|
+
z.object({
|
|
8837
|
+
obsFeatureColumns: annDataObsFeatureColumnsArr
|
|
8838
|
+
});
|
|
8779
8839
|
const annDataObsSpots = annDataObsm;
|
|
8780
8840
|
const annDataObsPoints = annDataObsm;
|
|
8781
8841
|
const annDataObsLocations = annDataObsm;
|
|
@@ -8898,7 +8958,7 @@ z.object({
|
|
|
8898
8958
|
scoreColumn: z.string().optional()
|
|
8899
8959
|
}))
|
|
8900
8960
|
});
|
|
8901
|
-
z.object({
|
|
8961
|
+
const anndataZarrSchema = z.object({
|
|
8902
8962
|
obsLabels: z.union([
|
|
8903
8963
|
annDataObsLabels,
|
|
8904
8964
|
z.array(annDataConvenienceObsLabelsItem)
|
|
@@ -8908,7 +8968,7 @@ z.object({
|
|
|
8908
8968
|
z.array(annDataConvenienceFeatureLabelsItem)
|
|
8909
8969
|
]),
|
|
8910
8970
|
obsFeatureMatrix: annDataObsFeatureMatrix,
|
|
8911
|
-
obsSets:
|
|
8971
|
+
obsSets: annDataObsSetsArr,
|
|
8912
8972
|
obsSpots: annDataObsSpots,
|
|
8913
8973
|
obsPoints: annDataObsPoints,
|
|
8914
8974
|
obsLocations: annDataObsLocations,
|
|
@@ -8919,6 +8979,9 @@ z.object({
|
|
|
8919
8979
|
]),
|
|
8920
8980
|
sampleEdges: annDataSampleEdges
|
|
8921
8981
|
}).partial();
|
|
8982
|
+
anndataZarrSchema.extend({
|
|
8983
|
+
refSpecUrl: z.string()
|
|
8984
|
+
});
|
|
8922
8985
|
z.object({
|
|
8923
8986
|
// TODO: should `image` be a special schema
|
|
8924
8987
|
// to allow specifying fileUid (like for embeddingType)?
|
|
@@ -11813,7 +11876,7 @@ function treeToMembershipMap(currTree) {
|
|
|
11813
11876
|
if (currTree) {
|
|
11814
11877
|
currTree.tree.forEach((lzn) => {
|
|
11815
11878
|
const height = nodeToHeight(lzn);
|
|
11816
|
-
range$
|
|
11879
|
+
range$8(height).forEach((i2) => {
|
|
11817
11880
|
const levelIndex = i2 + 1;
|
|
11818
11881
|
const levelNodePaths = nodeToLevelDescendantNamePaths(lzn, levelIndex, [], true);
|
|
11819
11882
|
levelNodePaths.forEach((setNamePath) => {
|
|
@@ -22916,7 +22979,7 @@ function reshape(array, sizes) {
|
|
|
22916
22979
|
throw new DimensionError(0, currentLength, "!=");
|
|
22917
22980
|
}
|
|
22918
22981
|
sizes = processSizesWildcard(sizes, currentLength);
|
|
22919
|
-
var newLength = product$
|
|
22982
|
+
var newLength = product$2(sizes);
|
|
22920
22983
|
if (currentLength !== newLength) {
|
|
22921
22984
|
throw new DimensionError(newLength, currentLength, "!=");
|
|
22922
22985
|
}
|
|
@@ -22930,7 +22993,7 @@ function reshape(array, sizes) {
|
|
|
22930
22993
|
}
|
|
22931
22994
|
}
|
|
22932
22995
|
function processSizesWildcard(sizes, currentLength) {
|
|
22933
|
-
var newLength = product$
|
|
22996
|
+
var newLength = product$2(sizes);
|
|
22934
22997
|
var processedSizes = sizes.slice();
|
|
22935
22998
|
var WILDCARD = -1;
|
|
22936
22999
|
var wildCardIndex = sizes.indexOf(WILDCARD);
|
|
@@ -22949,7 +23012,7 @@ function processSizesWildcard(sizes, currentLength) {
|
|
|
22949
23012
|
}
|
|
22950
23013
|
return processedSizes;
|
|
22951
23014
|
}
|
|
22952
|
-
function product$
|
|
23015
|
+
function product$2(array) {
|
|
22953
23016
|
return array.reduce((prev, curr) => prev * curr, 1);
|
|
22954
23017
|
}
|
|
22955
23018
|
function _reshape(array, sizes) {
|
|
@@ -37124,16 +37187,16 @@ class Stats {
|
|
|
37124
37187
|
}
|
|
37125
37188
|
}
|
|
37126
37189
|
getTable() {
|
|
37127
|
-
const
|
|
37190
|
+
const table2 = {};
|
|
37128
37191
|
this.forEach((stat) => {
|
|
37129
|
-
|
|
37192
|
+
table2[stat.name] = {
|
|
37130
37193
|
time: stat.time || 0,
|
|
37131
37194
|
count: stat.count || 0,
|
|
37132
37195
|
average: stat.getAverageTime() || 0,
|
|
37133
37196
|
hz: stat.getHz() || 0
|
|
37134
37197
|
};
|
|
37135
37198
|
});
|
|
37136
|
-
return
|
|
37199
|
+
return table2;
|
|
37137
37200
|
}
|
|
37138
37201
|
_initializeStats() {
|
|
37139
37202
|
let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
@@ -37792,10 +37855,10 @@ class Log {
|
|
|
37792
37855
|
}
|
|
37793
37856
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
37794
37857
|
}
|
|
37795
|
-
table(logLevel,
|
|
37796
|
-
if (
|
|
37797
|
-
return this._getLogFunction(logLevel,
|
|
37798
|
-
tag: getTableHeader(
|
|
37858
|
+
table(logLevel, table2, columns) {
|
|
37859
|
+
if (table2) {
|
|
37860
|
+
return this._getLogFunction(logLevel, table2, console.table || noop$4, columns && [columns], {
|
|
37861
|
+
tag: getTableHeader(table2)
|
|
37799
37862
|
});
|
|
37800
37863
|
}
|
|
37801
37864
|
return noop$4;
|
|
@@ -37995,9 +38058,9 @@ function logImageInBrowser(_ref3) {
|
|
|
37995
38058
|
}
|
|
37996
38059
|
return noop$4;
|
|
37997
38060
|
}
|
|
37998
|
-
function getTableHeader(
|
|
37999
|
-
for (const key in
|
|
38000
|
-
for (const title in
|
|
38061
|
+
function getTableHeader(table2) {
|
|
38062
|
+
for (const key in table2) {
|
|
38063
|
+
for (const title in table2[key]) {
|
|
38001
38064
|
return title || "untitled";
|
|
38002
38065
|
}
|
|
38003
38066
|
}
|
|
@@ -38601,7 +38664,7 @@ function getLoadersFromContext(loaders, context) {
|
|
|
38601
38664
|
}
|
|
38602
38665
|
return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;
|
|
38603
38666
|
}
|
|
38604
|
-
async function parse$
|
|
38667
|
+
async function parse$5(data, loaders, options, context) {
|
|
38605
38668
|
assert$b(!context || typeof context === "object");
|
|
38606
38669
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
38607
38670
|
context = void 0;
|
|
@@ -38622,7 +38685,7 @@ async function parse$3(data, loaders, options, context) {
|
|
|
38622
38685
|
options = normalizeOptions$1(options, loader, candidateLoaders, url);
|
|
38623
38686
|
context = getLoaderContext({
|
|
38624
38687
|
url,
|
|
38625
|
-
parse: parse$
|
|
38688
|
+
parse: parse$5,
|
|
38626
38689
|
loaders: candidateLoaders
|
|
38627
38690
|
}, options, context);
|
|
38628
38691
|
return await parseWithLoader(loader, data, options, context);
|
|
@@ -38656,7 +38719,7 @@ async function parseWithLoader(loader, data, options, context) {
|
|
|
38656
38719
|
return loader.parseTextSync(data, options, context, loader);
|
|
38657
38720
|
}
|
|
38658
38721
|
if (canParseWithWorker(loader, options)) {
|
|
38659
|
-
return await parseWithWorker(loader, data, options, context, parse$
|
|
38722
|
+
return await parseWithWorker(loader, data, options, context, parse$5);
|
|
38660
38723
|
}
|
|
38661
38724
|
if (loader.parseText && typeof data === "string") {
|
|
38662
38725
|
return await loader.parseText(data, options, context, loader);
|
|
@@ -38680,7 +38743,7 @@ async function load(url, loaders, options, context) {
|
|
|
38680
38743
|
if (isBlob$1(url)) {
|
|
38681
38744
|
data = await fetch2(url);
|
|
38682
38745
|
}
|
|
38683
|
-
return await parse$
|
|
38746
|
+
return await parse$5(data, loaders, options);
|
|
38684
38747
|
}
|
|
38685
38748
|
const VERSION$8 = "3.2.10";
|
|
38686
38749
|
const {
|
|
@@ -45440,13 +45503,13 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45440
45503
|
const SHADER_MODULE_UNIFORM_REGEXP = ".*_.*";
|
|
45441
45504
|
const PROJECT_MODULE_UNIFORM_REGEXP = ".*Matrix";
|
|
45442
45505
|
const uniformLocations = program._uniformSetters;
|
|
45443
|
-
const
|
|
45506
|
+
const table2 = {};
|
|
45444
45507
|
const uniformNames = Object.keys(uniformLocations).sort();
|
|
45445
45508
|
let count2 = 0;
|
|
45446
45509
|
for (const uniformName of uniformNames) {
|
|
45447
45510
|
if (!uniformName.match(SHADER_MODULE_UNIFORM_REGEXP) && !uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
|
|
45448
45511
|
if (addUniformToTable({
|
|
45449
|
-
table,
|
|
45512
|
+
table: table2,
|
|
45450
45513
|
header,
|
|
45451
45514
|
uniforms,
|
|
45452
45515
|
uniformName,
|
|
@@ -45459,7 +45522,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45459
45522
|
for (const uniformName of uniformNames) {
|
|
45460
45523
|
if (uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
|
|
45461
45524
|
if (addUniformToTable({
|
|
45462
|
-
table,
|
|
45525
|
+
table: table2,
|
|
45463
45526
|
header,
|
|
45464
45527
|
uniforms,
|
|
45465
45528
|
uniformName,
|
|
@@ -45470,9 +45533,9 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45470
45533
|
}
|
|
45471
45534
|
}
|
|
45472
45535
|
for (const uniformName of uniformNames) {
|
|
45473
|
-
if (!
|
|
45536
|
+
if (!table2[uniformName]) {
|
|
45474
45537
|
if (addUniformToTable({
|
|
45475
|
-
table,
|
|
45538
|
+
table: table2,
|
|
45476
45539
|
header,
|
|
45477
45540
|
uniforms,
|
|
45478
45541
|
uniformName,
|
|
@@ -45487,7 +45550,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45487
45550
|
if (!undefinedOnly) {
|
|
45488
45551
|
for (const uniformName in uniforms) {
|
|
45489
45552
|
const uniform = uniforms[uniformName];
|
|
45490
|
-
if (!
|
|
45553
|
+
if (!table2[uniformName]) {
|
|
45491
45554
|
unusedCount++;
|
|
45492
45555
|
unusedTable[uniformName] = {
|
|
45493
45556
|
Type: "NOT USED: ".concat(uniform),
|
|
@@ -45497,7 +45560,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45497
45560
|
}
|
|
45498
45561
|
}
|
|
45499
45562
|
return {
|
|
45500
|
-
table,
|
|
45563
|
+
table: table2,
|
|
45501
45564
|
count: count2,
|
|
45502
45565
|
unusedTable,
|
|
45503
45566
|
unusedCount
|
|
@@ -45505,7 +45568,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
45505
45568
|
}
|
|
45506
45569
|
function addUniformToTable(_ref2) {
|
|
45507
45570
|
let {
|
|
45508
|
-
table,
|
|
45571
|
+
table: table2,
|
|
45509
45572
|
header,
|
|
45510
45573
|
uniforms,
|
|
45511
45574
|
uniformName,
|
|
@@ -45514,7 +45577,7 @@ function addUniformToTable(_ref2) {
|
|
|
45514
45577
|
const value = uniforms[uniformName];
|
|
45515
45578
|
const isDefined = isUniformDefined(value);
|
|
45516
45579
|
if (!undefinedOnly || !isDefined) {
|
|
45517
|
-
|
|
45580
|
+
table2[uniformName] = {
|
|
45518
45581
|
[header]: isDefined ? formatValue(value) : "N/A",
|
|
45519
45582
|
"Uniform Type": isDefined ? value : "NOT PROVIDED"
|
|
45520
45583
|
};
|
|
@@ -45533,9 +45596,9 @@ function getDebugTableForVertexArray(_ref) {
|
|
|
45533
45596
|
if (!vertexArray.configuration) {
|
|
45534
45597
|
return {};
|
|
45535
45598
|
}
|
|
45536
|
-
const
|
|
45599
|
+
const table2 = {};
|
|
45537
45600
|
if (vertexArray.elements) {
|
|
45538
|
-
|
|
45601
|
+
table2.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);
|
|
45539
45602
|
}
|
|
45540
45603
|
const attributes = vertexArray.values;
|
|
45541
45604
|
for (const attributeLocation in attributes) {
|
|
@@ -45546,10 +45609,10 @@ function getDebugTableForVertexArray(_ref) {
|
|
|
45546
45609
|
if (accessor) {
|
|
45547
45610
|
rowHeader = "".concat(attributeLocation, ": ").concat(getGLSLDeclaration$1(info.name, accessor));
|
|
45548
45611
|
}
|
|
45549
|
-
|
|
45612
|
+
table2[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header);
|
|
45550
45613
|
}
|
|
45551
45614
|
}
|
|
45552
|
-
return
|
|
45615
|
+
return table2;
|
|
45553
45616
|
}
|
|
45554
45617
|
function getDebugTableRow(vertexArray, attribute, accessor, header) {
|
|
45555
45618
|
const {
|
|
@@ -45621,12 +45684,12 @@ function getGLSLDeclaration$1(name2, accessor) {
|
|
|
45621
45684
|
return typeAndName ? "".concat(name2, " (").concat(typeAndName.name, ")") : name2;
|
|
45622
45685
|
}
|
|
45623
45686
|
function getDebugTableForProgramConfiguration(config3) {
|
|
45624
|
-
const
|
|
45687
|
+
const table2 = {};
|
|
45625
45688
|
const header = "Accessors for ".concat(config3.id);
|
|
45626
45689
|
for (const attributeInfo of config3.attributeInfos) {
|
|
45627
45690
|
if (attributeInfo) {
|
|
45628
45691
|
const glslDeclaration = getGLSLDeclaration(attributeInfo);
|
|
45629
|
-
|
|
45692
|
+
table2["in ".concat(glslDeclaration)] = {
|
|
45630
45693
|
[header]: JSON.stringify(attributeInfo.accessor)
|
|
45631
45694
|
};
|
|
45632
45695
|
}
|
|
@@ -45634,12 +45697,12 @@ function getDebugTableForProgramConfiguration(config3) {
|
|
|
45634
45697
|
for (const varyingInfo of config3.varyingInfos) {
|
|
45635
45698
|
if (varyingInfo) {
|
|
45636
45699
|
const glslDeclaration = getGLSLDeclaration(varyingInfo);
|
|
45637
|
-
|
|
45700
|
+
table2["out ".concat(glslDeclaration)] = {
|
|
45638
45701
|
[header]: JSON.stringify(varyingInfo.accessor)
|
|
45639
45702
|
};
|
|
45640
45703
|
}
|
|
45641
45704
|
}
|
|
45642
|
-
return
|
|
45705
|
+
return table2;
|
|
45643
45706
|
}
|
|
45644
45707
|
function getGLSLDeclaration(attributeInfo) {
|
|
45645
45708
|
const {
|
|
@@ -88168,9 +88231,9 @@ function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
|
|
|
88168
88231
|
}
|
|
88169
88232
|
const DracoLoader = {
|
|
88170
88233
|
...DracoLoader$1,
|
|
88171
|
-
parse: parse$
|
|
88234
|
+
parse: parse$4
|
|
88172
88235
|
};
|
|
88173
|
-
async function parse$
|
|
88236
|
+
async function parse$4(arrayBuffer2, options) {
|
|
88174
88237
|
const {
|
|
88175
88238
|
draco
|
|
88176
88239
|
} = await loadDracoDecoderModule(options);
|
|
@@ -89323,7 +89386,7 @@ const GLTFLoader = {
|
|
|
89323
89386
|
text: true,
|
|
89324
89387
|
binary: true,
|
|
89325
89388
|
tests: ["glTF"],
|
|
89326
|
-
parse: parse$
|
|
89389
|
+
parse: parse$3,
|
|
89327
89390
|
options: {
|
|
89328
89391
|
gltf: {
|
|
89329
89392
|
normalize: true,
|
|
@@ -89344,7 +89407,7 @@ const GLTFLoader = {
|
|
|
89344
89407
|
}
|
|
89345
89408
|
}
|
|
89346
89409
|
};
|
|
89347
|
-
async function parse$
|
|
89410
|
+
async function parse$3(arrayBuffer2, options = {}, context) {
|
|
89348
89411
|
options = {
|
|
89349
89412
|
...GLTFLoader.options,
|
|
89350
89413
|
...options
|
|
@@ -93934,7 +93997,7 @@ const Tiles3DLoader = {
|
|
|
93934
93997
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
93935
93998
|
mimeTypes: ["application/octet-stream"],
|
|
93936
93999
|
tests: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
93937
|
-
parse,
|
|
94000
|
+
parse: parse$2,
|
|
93938
94001
|
options: {
|
|
93939
94002
|
"3d-tiles": {
|
|
93940
94003
|
loadGLTF: true,
|
|
@@ -93969,7 +94032,7 @@ async function parseTileset(data, options, context) {
|
|
|
93969
94032
|
tilesetJson.lodMetricValue = ((_tilesetJson$root = tilesetJson.root) === null || _tilesetJson$root === void 0 ? void 0 : _tilesetJson$root.lodMetricValue) || 0;
|
|
93970
94033
|
return tilesetJson;
|
|
93971
94034
|
}
|
|
93972
|
-
async function parse(data, options, context) {
|
|
94035
|
+
async function parse$2(data, options, context) {
|
|
93973
94036
|
const loaderOptions = options["3d-tiles"] || {};
|
|
93974
94037
|
let isTileset;
|
|
93975
94038
|
if (loaderOptions.isTileset === "auto") {
|
|
@@ -97212,11 +97275,11 @@ function parseMVT(arrayBuffer2, options) {
|
|
|
97212
97275
|
data: parseToBinary(arrayBuffer2, mvtOptions)
|
|
97213
97276
|
};
|
|
97214
97277
|
case "geojson-row-table": {
|
|
97215
|
-
const
|
|
97278
|
+
const table2 = {
|
|
97216
97279
|
shape: "geojson-row-table",
|
|
97217
97280
|
data: parseToGeojson(arrayBuffer2, mvtOptions)
|
|
97218
97281
|
};
|
|
97219
|
-
return
|
|
97282
|
+
return table2;
|
|
97220
97283
|
}
|
|
97221
97284
|
case "geojson":
|
|
97222
97285
|
return parseToGeojson(arrayBuffer2, mvtOptions);
|
|
@@ -100168,7 +100231,7 @@ var shams$1 = function hasToStringTagShams() {
|
|
|
100168
100231
|
};
|
|
100169
100232
|
var esErrors = Error;
|
|
100170
100233
|
var _eval = EvalError;
|
|
100171
|
-
var range$
|
|
100234
|
+
var range$5 = RangeError;
|
|
100172
100235
|
var ref = ReferenceError;
|
|
100173
100236
|
var syntax = SyntaxError;
|
|
100174
100237
|
var type = TypeError;
|
|
@@ -100275,7 +100338,7 @@ var hasown = bind$1.call(call, $hasOwn);
|
|
|
100275
100338
|
var undefined$1;
|
|
100276
100339
|
var $Error = esErrors;
|
|
100277
100340
|
var $EvalError = _eval;
|
|
100278
|
-
var $RangeError = range$
|
|
100341
|
+
var $RangeError = range$5;
|
|
100279
100342
|
var $ReferenceError = ref;
|
|
100280
100343
|
var $SyntaxError$1 = syntax;
|
|
100281
100344
|
var $TypeError$4 = type;
|
|
@@ -111794,7 +111857,7 @@ function cartesianNormalizeInPlace(d) {
|
|
|
111794
111857
|
var l2 = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
|
|
111795
111858
|
d[0] /= l2, d[1] /= l2, d[2] /= l2;
|
|
111796
111859
|
}
|
|
111797
|
-
var lambda0$1, phi0, lambda1, phi1, lambda2, lambda00$1, phi00$1, p0, deltaSum = adder(), ranges, range$
|
|
111860
|
+
var lambda0$1, phi0, lambda1, phi1, lambda2, lambda00$1, phi00$1, p0, deltaSum = adder(), ranges, range$4;
|
|
111798
111861
|
var boundsStream$1 = {
|
|
111799
111862
|
point: boundsPoint$1,
|
|
111800
111863
|
lineStart: boundsLineStart,
|
|
@@ -111817,11 +111880,11 @@ var boundsStream$1 = {
|
|
|
111817
111880
|
phi1 = 90;
|
|
111818
111881
|
else if (deltaSum < -epsilon)
|
|
111819
111882
|
phi0 = -90;
|
|
111820
|
-
range$
|
|
111883
|
+
range$4[0] = lambda0$1, range$4[1] = lambda1;
|
|
111821
111884
|
}
|
|
111822
111885
|
};
|
|
111823
111886
|
function boundsPoint$1(lambda, phi) {
|
|
111824
|
-
ranges.push(range$
|
|
111887
|
+
ranges.push(range$4 = [lambda0$1 = lambda, lambda1 = lambda]);
|
|
111825
111888
|
if (phi < phi0)
|
|
111826
111889
|
phi0 = phi;
|
|
111827
111890
|
if (phi > phi1)
|
|
@@ -111873,7 +111936,7 @@ function linePoint(lambda, phi) {
|
|
|
111873
111936
|
}
|
|
111874
111937
|
}
|
|
111875
111938
|
} else {
|
|
111876
|
-
ranges.push(range$
|
|
111939
|
+
ranges.push(range$4 = [lambda0$1 = lambda, lambda1 = lambda]);
|
|
111877
111940
|
}
|
|
111878
111941
|
if (phi < phi0)
|
|
111879
111942
|
phi0 = phi;
|
|
@@ -111885,7 +111948,7 @@ function boundsLineStart() {
|
|
|
111885
111948
|
boundsStream$1.point = linePoint;
|
|
111886
111949
|
}
|
|
111887
111950
|
function boundsLineEnd() {
|
|
111888
|
-
range$
|
|
111951
|
+
range$4[0] = lambda0$1, range$4[1] = lambda1;
|
|
111889
111952
|
boundsStream$1.point = boundsPoint$1;
|
|
111890
111953
|
p0 = null;
|
|
111891
111954
|
}
|
|
@@ -111907,7 +111970,7 @@ function boundsRingEnd() {
|
|
|
111907
111970
|
areaStream$1.lineEnd();
|
|
111908
111971
|
if (abs(deltaSum) > epsilon)
|
|
111909
111972
|
lambda0$1 = -(lambda1 = 180);
|
|
111910
|
-
range$
|
|
111973
|
+
range$4[0] = lambda0$1, range$4[1] = lambda1;
|
|
111911
111974
|
p0 = null;
|
|
111912
111975
|
}
|
|
111913
111976
|
function angle(lambda02, lambda12) {
|
|
@@ -111943,7 +112006,7 @@ function bounds(feature2) {
|
|
|
111943
112006
|
deltaMax = delta, lambda0$1 = b[0], lambda1 = a2[1];
|
|
111944
112007
|
}
|
|
111945
112008
|
}
|
|
111946
|
-
ranges = range$
|
|
112009
|
+
ranges = range$4 = null;
|
|
111947
112010
|
return lambda0$1 === Infinity || phi0 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0$1, phi0], [lambda1, phi1]];
|
|
111948
112011
|
}
|
|
111949
112012
|
var W0, W1, X0$1, Y0$1, Z0$1, X1$1, Y1$1, Z1$1, X2$1, Y2$1, Z2$1, lambda00, phi00, x0$4, y0$4, z0;
|
|
@@ -112368,7 +112431,7 @@ function ascendingComparator(f2) {
|
|
|
112368
112431
|
};
|
|
112369
112432
|
}
|
|
112370
112433
|
bisector(ascending);
|
|
112371
|
-
function range$
|
|
112434
|
+
function range$3(start, stop, step) {
|
|
112372
112435
|
start = +start, stop = +stop, step = (n3 = arguments.length) < 2 ? (stop = start, start = 0, 1) : n3 < 3 ? 1 : +step;
|
|
112373
112436
|
var i2 = -1, n3 = Math.max(0, Math.ceil((stop - start) / step)) | 0, range2 = new Array(n3);
|
|
112374
112437
|
while (++i2 < n3) {
|
|
@@ -112671,7 +112734,7 @@ function contains(object2, point2) {
|
|
|
112671
112734
|
return (object2 && containsObjectType.hasOwnProperty(object2.type) ? containsObjectType[object2.type] : containsGeometry)(object2, point2);
|
|
112672
112735
|
}
|
|
112673
112736
|
function graticuleX(y02, y12, dy) {
|
|
112674
|
-
var y2 = range$
|
|
112737
|
+
var y2 = range$3(y02, y12 - epsilon, dy).concat(y12);
|
|
112675
112738
|
return function(x2) {
|
|
112676
112739
|
return y2.map(function(y22) {
|
|
112677
112740
|
return [x2, y22];
|
|
@@ -112679,7 +112742,7 @@ function graticuleX(y02, y12, dy) {
|
|
|
112679
112742
|
};
|
|
112680
112743
|
}
|
|
112681
112744
|
function graticuleY(x02, x12, dx) {
|
|
112682
|
-
var x2 = range$
|
|
112745
|
+
var x2 = range$3(x02, x12 - epsilon, dx).concat(x12);
|
|
112683
112746
|
return function(y2) {
|
|
112684
112747
|
return x2.map(function(x22) {
|
|
112685
112748
|
return [x22, y2];
|
|
@@ -112692,9 +112755,9 @@ function graticule() {
|
|
|
112692
112755
|
return { type: "MultiLineString", coordinates: lines() };
|
|
112693
112756
|
}
|
|
112694
112757
|
function lines() {
|
|
112695
|
-
return range$
|
|
112758
|
+
return range$3(ceil(X02 / DX) * DX, X12, DX).map(X).concat(range$3(ceil(Y02 / DY) * DY, Y12, DY).map(Y)).concat(range$3(ceil(x02 / dx) * dx, x12, dx).filter(function(x22) {
|
|
112696
112759
|
return abs(x22 % DX) > epsilon;
|
|
112697
|
-
}).map(x2)).concat(range$
|
|
112760
|
+
}).map(x2)).concat(range$3(ceil(y02 / dy) * dy, y12, dy).filter(function(y22) {
|
|
112698
112761
|
return abs(y22 % DY) > epsilon;
|
|
112699
112762
|
}).map(y2));
|
|
112700
112763
|
}
|
|
@@ -116442,7 +116505,7 @@ js$n.default = distance;
|
|
|
116442
116505
|
}
|
|
116443
116506
|
}, {
|
|
116444
116507
|
key: "render",
|
|
116445
|
-
value: function
|
|
116508
|
+
value: function render2() {
|
|
116446
116509
|
var _this = this;
|
|
116447
116510
|
var data = [];
|
|
116448
116511
|
var dataPick = [];
|
|
@@ -117534,7 +117597,7 @@ const require$$1$3 = /* @__PURE__ */ getAugmentedNamespace(esmBrowser);
|
|
|
117534
117597
|
}
|
|
117535
117598
|
_createClass2(NebulaLayer2, [{
|
|
117536
117599
|
key: "render",
|
|
117537
|
-
value: function
|
|
117600
|
+
value: function render2(config3) {
|
|
117538
117601
|
return null;
|
|
117539
117602
|
}
|
|
117540
117603
|
}]);
|
|
@@ -131926,7 +131989,7 @@ var deckCache = {};
|
|
|
131926
131989
|
}
|
|
131927
131990
|
_createClass2(JunctionsLayer2, [{
|
|
131928
131991
|
key: "render",
|
|
131929
|
-
value: function
|
|
131992
|
+
value: function render2(_ref) {
|
|
131930
131993
|
_ref.nebula;
|
|
131931
131994
|
var defaultColor = [0, 0, 0, 255];
|
|
131932
131995
|
var _this$deckCache = this.deckCache, objects = _this$deckCache.objects, updateTrigger = _this$deckCache.updateTrigger;
|
|
@@ -132098,7 +132161,7 @@ var textsLayer = {};
|
|
|
132098
132161
|
}
|
|
132099
132162
|
_createClass2(TextsLayer2, [{
|
|
132100
132163
|
key: "render",
|
|
132101
|
-
value: function
|
|
132164
|
+
value: function render2(_ref) {
|
|
132102
132165
|
var nebula2 = _ref.nebula;
|
|
132103
132166
|
var defaultColor = [0, 0, 0, 255];
|
|
132104
132167
|
var _this$deckCache = this.deckCache, objects = _this$deckCache.objects, updateTrigger = _this$deckCache.updateTrigger;
|
|
@@ -132325,7 +132388,7 @@ var segmentsLayer = {};
|
|
|
132325
132388
|
}
|
|
132326
132389
|
}, {
|
|
132327
132390
|
key: "render",
|
|
132328
|
-
value: function
|
|
132391
|
+
value: function render2(_ref2) {
|
|
132329
132392
|
var nebula2 = _ref2.nebula;
|
|
132330
132393
|
var defaultColor = [0, 0, 0, 255];
|
|
132331
132394
|
var _this$deckCache = this.deckCache, objects = _this$deckCache.objects, updateTrigger = _this$deckCache.updateTrigger;
|
|
@@ -135002,16 +135065,16 @@ async function getDecoder(fileDirectory) {
|
|
|
135002
135065
|
const Decoder = await importFn();
|
|
135003
135066
|
return new Decoder(fileDirectory);
|
|
135004
135067
|
}
|
|
135005
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
135006
|
-
addDecoder(5, () => import("./lzw-
|
|
135068
|
+
addDecoder([void 0, 1], () => import("./raw-0a868094.js").then((m) => m.default));
|
|
135069
|
+
addDecoder(5, () => import("./lzw-138e1cde.js").then((m) => m.default));
|
|
135007
135070
|
addDecoder(6, () => {
|
|
135008
135071
|
throw new Error("old style JPEG compression is not supported.");
|
|
135009
135072
|
});
|
|
135010
|
-
addDecoder(7, () => import("./jpeg-
|
|
135011
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
135012
|
-
addDecoder(32773, () => import("./packbits-
|
|
135013
|
-
addDecoder(34887, () => import("./lerc-
|
|
135014
|
-
addDecoder(50001, () => import("./webimage-
|
|
135073
|
+
addDecoder(7, () => import("./jpeg-66ca148e.js").then((m) => m.default));
|
|
135074
|
+
addDecoder([8, 32946], () => import("./deflate-ae673a66.js").then((m) => m.default));
|
|
135075
|
+
addDecoder(32773, () => import("./packbits-8ad74a5e.js").then((m) => m.default));
|
|
135076
|
+
addDecoder(34887, () => import("./lerc-5bb256f6.js").then((m) => m.default));
|
|
135077
|
+
addDecoder(50001, () => import("./webimage-bc6cbf52.js").then((m) => m.default));
|
|
135015
135078
|
function copyNewSize(array, width, height, samplesPerPixel = 1) {
|
|
135016
135079
|
return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
|
|
135017
135080
|
}
|
|
@@ -138729,15 +138792,15 @@ const adler32 = (adler, buf, len2, pos) => {
|
|
|
138729
138792
|
};
|
|
138730
138793
|
var adler32_1 = adler32;
|
|
138731
138794
|
const makeTable = () => {
|
|
138732
|
-
let c,
|
|
138795
|
+
let c, table2 = [];
|
|
138733
138796
|
for (var n3 = 0; n3 < 256; n3++) {
|
|
138734
138797
|
c = n3;
|
|
138735
138798
|
for (var k = 0; k < 8; k++) {
|
|
138736
138799
|
c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
138737
138800
|
}
|
|
138738
|
-
|
|
138801
|
+
table2[n3] = c;
|
|
138739
138802
|
}
|
|
138740
|
-
return
|
|
138803
|
+
return table2;
|
|
138741
138804
|
};
|
|
138742
138805
|
const crcTable = new Uint32Array(makeTable());
|
|
138743
138806
|
const crc32 = (crc2, buf, len2, pos) => {
|
|
@@ -140550,7 +140613,7 @@ const dext = new Uint8Array([
|
|
|
140550
140613
|
64,
|
|
140551
140614
|
64
|
|
140552
140615
|
]);
|
|
140553
|
-
const inflate_table = (type2, lens2, lens_index, codes,
|
|
140616
|
+
const inflate_table = (type2, lens2, lens_index, codes, table2, table_index, work, opts2) => {
|
|
140554
140617
|
const bits = opts2.bits;
|
|
140555
140618
|
let len2 = 0;
|
|
140556
140619
|
let sym = 0;
|
|
@@ -140590,8 +140653,8 @@ const inflate_table = (type2, lens2, lens_index, codes, table, table_index, work
|
|
|
140590
140653
|
root2 = max2;
|
|
140591
140654
|
}
|
|
140592
140655
|
if (max2 === 0) {
|
|
140593
|
-
|
|
140594
|
-
|
|
140656
|
+
table2[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
140657
|
+
table2[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
140595
140658
|
opts2.bits = 1;
|
|
140596
140659
|
return 0;
|
|
140597
140660
|
}
|
|
@@ -140666,7 +140729,7 @@ const inflate_table = (type2, lens2, lens_index, codes, table, table_index, work
|
|
|
140666
140729
|
min2 = fill;
|
|
140667
140730
|
do {
|
|
140668
140731
|
fill -= incr;
|
|
140669
|
-
|
|
140732
|
+
table2[next3 + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
|
|
140670
140733
|
} while (fill !== 0);
|
|
140671
140734
|
incr = 1 << len2 - 1;
|
|
140672
140735
|
while (huff & incr) {
|
|
@@ -140705,11 +140768,11 @@ const inflate_table = (type2, lens2, lens_index, codes, table, table_index, work
|
|
|
140705
140768
|
return 1;
|
|
140706
140769
|
}
|
|
140707
140770
|
low = huff & mask;
|
|
140708
|
-
|
|
140771
|
+
table2[low] = root2 << 24 | curr << 16 | next3 - table_index | 0;
|
|
140709
140772
|
}
|
|
140710
140773
|
}
|
|
140711
140774
|
if (huff !== 0) {
|
|
140712
|
-
|
|
140775
|
+
table2[next3 + huff] = len2 - drop << 24 | 64 << 16 | 0;
|
|
140713
140776
|
}
|
|
140714
140777
|
opts2.bits = root2;
|
|
140715
140778
|
return 0;
|
|
@@ -142184,15 +142247,15 @@ const Zlib = (_a$1 = class Zlib2 {
|
|
|
142184
142247
|
}, _a$1.codecId = "zlib", _a$1);
|
|
142185
142248
|
const IS_NODE = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
142186
142249
|
let __toBinary = IS_NODE ? (base64) => new Uint8Array(Buffer.from(base64, "base64")) : /* @__PURE__ */ (() => {
|
|
142187
|
-
var
|
|
142250
|
+
var table2 = new Uint8Array(128);
|
|
142188
142251
|
for (var i2 = 0; i2 < 64; i2++)
|
|
142189
|
-
|
|
142252
|
+
table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
142190
142253
|
return (base64) => {
|
|
142191
142254
|
var n3 = base64.length;
|
|
142192
142255
|
var bytes = new Uint8Array((n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0);
|
|
142193
142256
|
for (var i3 = 0, j = 0; i3 < n3; ) {
|
|
142194
|
-
var c0 =
|
|
142195
|
-
var c2 =
|
|
142257
|
+
var c0 = table2[base64.charCodeAt(i3++)], c1 = table2[base64.charCodeAt(i3++)];
|
|
142258
|
+
var c2 = table2[base64.charCodeAt(i3++)], c3 = table2[base64.charCodeAt(i3++)];
|
|
142196
142259
|
bytes[j++] = c0 << 2 | c1 >> 4;
|
|
142197
142260
|
bytes[j++] = c1 << 4 | c2 >> 2;
|
|
142198
142261
|
bytes[j++] = c2 << 6 | c3;
|
|
@@ -146059,7 +146122,7 @@ const channels = {
|
|
|
146059
146122
|
},
|
|
146060
146123
|
fs: fs$2
|
|
146061
146124
|
};
|
|
146062
|
-
function range$
|
|
146125
|
+
function range$2(len2) {
|
|
146063
146126
|
return [...Array(len2).keys()];
|
|
146064
146127
|
}
|
|
146065
146128
|
function padWithDefault$2(arr, defaultValue2, padWidth) {
|
|
@@ -147163,7 +147226,7 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
147163
147226
|
sizeScale: 2 ** -zoom,
|
|
147164
147227
|
characterSet: [
|
|
147165
147228
|
...displayUnit.split(""),
|
|
147166
|
-
...range$
|
|
147229
|
+
...range$2(10).map((i2) => String(i2)),
|
|
147167
147230
|
".",
|
|
147168
147231
|
"e",
|
|
147169
147232
|
"+"
|
|
@@ -148617,7 +148680,7 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
148617
148680
|
} = this.state;
|
|
148618
148681
|
if (textures && model) {
|
|
148619
148682
|
const scaleFactor = 1 / 2 ** (maxZoom - zoom);
|
|
148620
|
-
const colors = Object.fromEntries(range$
|
|
148683
|
+
const colors = Object.fromEntries(range$8(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
|
|
148621
148684
|
model.setUniforms(Object.assign({}, uniforms, {
|
|
148622
148685
|
...colors,
|
|
148623
148686
|
// Bitmask image channel data textures
|
|
@@ -149208,7 +149271,6 @@ const _UnicodeStringArray = class {
|
|
|
149208
149271
|
constructor(chars, x2, byteOffset, length2) {
|
|
149209
149272
|
__privateAdd(this, _data, void 0);
|
|
149210
149273
|
__publicField(this, "chars");
|
|
149211
|
-
__privateAdd(this, _encode_buffer, void 0);
|
|
149212
149274
|
this.chars = chars;
|
|
149213
149275
|
if (typeof x2 === "number") {
|
|
149214
149276
|
__privateSet(this, _data, new Int32Array(x2 * chars));
|
|
@@ -149226,7 +149288,6 @@ const _UnicodeStringArray = class {
|
|
|
149226
149288
|
}
|
|
149227
149289
|
}()));
|
|
149228
149290
|
}
|
|
149229
|
-
__privateSet(this, _encode_buffer, new Int32Array(chars));
|
|
149230
149291
|
}
|
|
149231
149292
|
get BYTES_PER_ELEMENT() {
|
|
149232
149293
|
return __privateGet(this, _data).BYTES_PER_ELEMENT * this.chars;
|
|
@@ -149276,7 +149337,6 @@ const _UnicodeStringArray = class {
|
|
|
149276
149337
|
};
|
|
149277
149338
|
let UnicodeStringArray = _UnicodeStringArray;
|
|
149278
149339
|
_data = new WeakMap();
|
|
149279
|
-
_encode_buffer = new WeakMap();
|
|
149280
149340
|
function json_decode_object(bytes) {
|
|
149281
149341
|
const str = new TextDecoder().decode(bytes);
|
|
149282
149342
|
return JSON.parse(str);
|
|
@@ -149345,10 +149405,12 @@ function col_major_stride(shape) {
|
|
|
149345
149405
|
}
|
|
149346
149406
|
function create_chunk_key_encoder({ name: name2, configuration }) {
|
|
149347
149407
|
if (name2 === "default") {
|
|
149348
|
-
|
|
149408
|
+
const separator = (configuration == null ? void 0 : configuration.separator) ?? "/";
|
|
149409
|
+
return (chunk_coords) => ["c", ...chunk_coords].join(separator);
|
|
149349
149410
|
}
|
|
149350
149411
|
if (name2 === "v2") {
|
|
149351
|
-
|
|
149412
|
+
const separator = (configuration == null ? void 0 : configuration.separator) ?? ".";
|
|
149413
|
+
return (chunk_coords) => chunk_coords.join(separator) || "0";
|
|
149352
149414
|
}
|
|
149353
149415
|
throw new Error(`Unknown chunk key encoding: ${name2}`);
|
|
149354
149416
|
}
|
|
@@ -149368,17 +149430,17 @@ function coerce_dtype(dtype) {
|
|
|
149368
149430
|
}
|
|
149369
149431
|
let [, endian, rest] = match;
|
|
149370
149432
|
let data_type = {
|
|
149371
|
-
|
|
149372
|
-
|
|
149373
|
-
|
|
149374
|
-
|
|
149375
|
-
|
|
149376
|
-
|
|
149377
|
-
|
|
149378
|
-
|
|
149379
|
-
|
|
149380
|
-
|
|
149381
|
-
|
|
149433
|
+
b1: "bool",
|
|
149434
|
+
i1: "int8",
|
|
149435
|
+
u1: "uint8",
|
|
149436
|
+
i2: "int16",
|
|
149437
|
+
u2: "uint16",
|
|
149438
|
+
i4: "int32",
|
|
149439
|
+
u4: "uint32",
|
|
149440
|
+
i8: "int64",
|
|
149441
|
+
u8: "uint64",
|
|
149442
|
+
f4: "float32",
|
|
149443
|
+
f8: "float64"
|
|
149382
149444
|
}[rest] ?? (rest.startsWith("S") || rest.startsWith("U") ? `v2:${rest}` : void 0);
|
|
149383
149445
|
if (!data_type) {
|
|
149384
149446
|
throw new Error(`Unsupported or unknown dtype: ${dtype}`);
|
|
@@ -149455,93 +149517,11 @@ function is_sharding_codec(codec) {
|
|
|
149455
149517
|
return (codec == null ? void 0 : codec.name) === "sharding_indexed";
|
|
149456
149518
|
}
|
|
149457
149519
|
function ensure_correct_scalar(metadata) {
|
|
149458
|
-
if ((metadata.data_type === "uint64" || metadata.data_type === "int64") && metadata.fill_value !=
|
|
149520
|
+
if ((metadata.data_type === "uint64" || metadata.data_type === "int64") && metadata.fill_value != null) {
|
|
149459
149521
|
return BigInt(metadata.fill_value);
|
|
149460
149522
|
}
|
|
149461
149523
|
return metadata.fill_value;
|
|
149462
149524
|
}
|
|
149463
|
-
function proxy(arr) {
|
|
149464
|
-
if (arr instanceof BoolArray || arr instanceof ByteStringArray || arr instanceof UnicodeStringArray) {
|
|
149465
|
-
return new Proxy(arr, {
|
|
149466
|
-
get(target, prop) {
|
|
149467
|
-
return target.get(Number(prop));
|
|
149468
|
-
},
|
|
149469
|
-
set(target, prop, value) {
|
|
149470
|
-
target.set(Number(prop), value);
|
|
149471
|
-
return true;
|
|
149472
|
-
}
|
|
149473
|
-
});
|
|
149474
|
-
}
|
|
149475
|
-
return arr;
|
|
149476
|
-
}
|
|
149477
|
-
function empty_like(chunk, order) {
|
|
149478
|
-
let data;
|
|
149479
|
-
if (chunk.data instanceof ByteStringArray || chunk.data instanceof UnicodeStringArray) {
|
|
149480
|
-
data = new chunk.constructor(
|
|
149481
|
-
// @ts-expect-error
|
|
149482
|
-
chunk.data.length,
|
|
149483
|
-
chunk.data.chars
|
|
149484
|
-
);
|
|
149485
|
-
} else {
|
|
149486
|
-
data = new chunk.constructor(chunk.data.length);
|
|
149487
|
-
}
|
|
149488
|
-
return {
|
|
149489
|
-
data,
|
|
149490
|
-
shape: chunk.shape,
|
|
149491
|
-
stride: get_strides(chunk.shape, order)
|
|
149492
|
-
};
|
|
149493
|
-
}
|
|
149494
|
-
function convert_array_order(src, target) {
|
|
149495
|
-
let out = empty_like(src, target);
|
|
149496
|
-
let n_dims = src.shape.length;
|
|
149497
|
-
let size2 = src.data.length;
|
|
149498
|
-
let index2 = Array(n_dims).fill(0);
|
|
149499
|
-
let src_data = proxy(src.data);
|
|
149500
|
-
let out_data = proxy(out.data);
|
|
149501
|
-
for (let src_idx = 0; src_idx < size2; src_idx++) {
|
|
149502
|
-
let out_idx = 0;
|
|
149503
|
-
for (let dim = 0; dim < n_dims; dim++) {
|
|
149504
|
-
out_idx += index2[dim] * out.stride[dim];
|
|
149505
|
-
}
|
|
149506
|
-
out_data[out_idx] = src_data[src_idx];
|
|
149507
|
-
index2[0] += 1;
|
|
149508
|
-
for (let dim = 0; dim < n_dims; dim++) {
|
|
149509
|
-
if (index2[dim] === src.shape[dim]) {
|
|
149510
|
-
if (dim + 1 === n_dims) {
|
|
149511
|
-
break;
|
|
149512
|
-
}
|
|
149513
|
-
index2[dim] = 0;
|
|
149514
|
-
index2[dim + 1] += 1;
|
|
149515
|
-
}
|
|
149516
|
-
}
|
|
149517
|
-
}
|
|
149518
|
-
return out;
|
|
149519
|
-
}
|
|
149520
|
-
function get_order(arr) {
|
|
149521
|
-
if (!arr.stride)
|
|
149522
|
-
return "C";
|
|
149523
|
-
let row_major_strides = get_strides(arr.shape, "C");
|
|
149524
|
-
return arr.stride.every((s2, i2) => s2 === row_major_strides[i2]) ? "C" : "F";
|
|
149525
|
-
}
|
|
149526
|
-
class TransposeCodec {
|
|
149527
|
-
constructor(configuration) {
|
|
149528
|
-
__publicField(this, "configuration");
|
|
149529
|
-
__publicField(this, "kind", "array_to_array");
|
|
149530
|
-
this.configuration = configuration;
|
|
149531
|
-
}
|
|
149532
|
-
static fromConfig(configuration) {
|
|
149533
|
-
return new TransposeCodec(configuration);
|
|
149534
|
-
}
|
|
149535
|
-
encode(arr) {
|
|
149536
|
-
if (get_order(arr) === this.configuration.order) {
|
|
149537
|
-
return arr;
|
|
149538
|
-
}
|
|
149539
|
-
return convert_array_order(arr, this.configuration.order);
|
|
149540
|
-
}
|
|
149541
|
-
decode(arr) {
|
|
149542
|
-
return arr;
|
|
149543
|
-
}
|
|
149544
|
-
}
|
|
149545
149525
|
const LITTLE_ENDIAN_OS = system_is_little_endian();
|
|
149546
149526
|
function system_is_little_endian() {
|
|
149547
149527
|
const a2 = new Uint32Array([305419896]);
|
|
@@ -149562,7 +149542,7 @@ const _BytesCodec = class {
|
|
|
149562
149542
|
__privateAdd(this, _BYTES_PER_ELEMENT, void 0);
|
|
149563
149543
|
__privateAdd(this, _shape, void 0);
|
|
149564
149544
|
__privateAdd(this, _endian, void 0);
|
|
149565
|
-
__privateSet(this, _endian, configuration.endian);
|
|
149545
|
+
__privateSet(this, _endian, configuration == null ? void 0 : configuration.endian);
|
|
149566
149546
|
__privateSet(this, _TypedArray, get_ctr(meta2.data_type));
|
|
149567
149547
|
__privateSet(this, _shape, meta2.shape);
|
|
149568
149548
|
__privateSet(this, _strides, get_strides(meta2.shape, get_array_order(meta2.codecs)));
|
|
@@ -149610,57 +149590,26 @@ class Crc32cCodec {
|
|
|
149610
149590
|
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength - 4);
|
|
149611
149591
|
}
|
|
149612
149592
|
}
|
|
149613
|
-
const _VLenUTF8 = class {
|
|
149614
|
-
constructor(shape) {
|
|
149615
|
-
__publicField(this, "kind", "array_to_bytes");
|
|
149616
|
-
__privateAdd(this, _shape2, void 0);
|
|
149617
|
-
__privateAdd(this, _strides2, void 0);
|
|
149618
|
-
__privateSet(this, _shape2, shape);
|
|
149619
|
-
__privateSet(this, _strides2, get_strides(shape, "C"));
|
|
149620
|
-
}
|
|
149621
|
-
static fromConfig(_, meta2) {
|
|
149622
|
-
return new _VLenUTF8(meta2.shape);
|
|
149623
|
-
}
|
|
149624
|
-
encode(_chunk) {
|
|
149625
|
-
throw new Error("Method not implemented.");
|
|
149626
|
-
}
|
|
149627
|
-
decode(bytes) {
|
|
149628
|
-
let decoder = new TextDecoder();
|
|
149629
|
-
let view = new DataView(bytes.buffer);
|
|
149630
|
-
let data = Array(view.getUint32(0, true));
|
|
149631
|
-
let pos = 4;
|
|
149632
|
-
for (let i2 = 0; i2 < data.length; i2++) {
|
|
149633
|
-
let item_length = view.getUint32(pos, true);
|
|
149634
|
-
pos += 4;
|
|
149635
|
-
data[i2] = decoder.decode(bytes.buffer.slice(pos, pos + item_length));
|
|
149636
|
-
pos += item_length;
|
|
149637
|
-
}
|
|
149638
|
-
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this, _strides2) };
|
|
149639
|
-
}
|
|
149640
|
-
};
|
|
149641
|
-
let VLenUTF8 = _VLenUTF8;
|
|
149642
|
-
_shape2 = new WeakMap();
|
|
149643
|
-
_strides2 = new WeakMap();
|
|
149644
149593
|
function throw_on_nan_replacer(_key, value) {
|
|
149645
|
-
if (value
|
|
149594
|
+
if (Number.isNaN(value)) {
|
|
149646
149595
|
throw new Error("JsonCodec allow_nan is false but NaN was encountered during encoding.");
|
|
149647
149596
|
}
|
|
149648
|
-
if (value ===
|
|
149597
|
+
if (value === Number.POSITIVE_INFINITY) {
|
|
149649
149598
|
throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
|
|
149650
149599
|
}
|
|
149651
|
-
if (value ===
|
|
149600
|
+
if (value === Number.NEGATIVE_INFINITY) {
|
|
149652
149601
|
throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
|
|
149653
149602
|
}
|
|
149654
149603
|
return value;
|
|
149655
149604
|
}
|
|
149656
149605
|
function sort_keys_replacer(_key, value) {
|
|
149657
|
-
return value instanceof Object && !(value
|
|
149606
|
+
return value instanceof Object && !Array.isArray(value) ? Object.keys(value).sort().reduce((sorted, key) => {
|
|
149658
149607
|
sorted[key] = value[key];
|
|
149659
149608
|
return sorted;
|
|
149660
149609
|
}, {}) : value;
|
|
149661
149610
|
}
|
|
149662
149611
|
const _JsonCodec = class {
|
|
149663
|
-
constructor(configuration) {
|
|
149612
|
+
constructor(configuration = {}) {
|
|
149664
149613
|
__publicField(this, "configuration");
|
|
149665
149614
|
__publicField(this, "kind", "array_to_bytes");
|
|
149666
149615
|
__privateAdd(this, _encoder_config, void 0);
|
|
@@ -149710,20 +149659,20 @@ const _JsonCodec = class {
|
|
|
149710
149659
|
items.push(buf.shape);
|
|
149711
149660
|
let replacer = void 0;
|
|
149712
149661
|
if (replacer_functions.length) {
|
|
149713
|
-
replacer =
|
|
149662
|
+
replacer = (key, value) => {
|
|
149714
149663
|
let new_value = value;
|
|
149715
|
-
|
|
149664
|
+
for (let sub_replacer of replacer_functions) {
|
|
149716
149665
|
new_value = sub_replacer(key, new_value);
|
|
149717
|
-
}
|
|
149666
|
+
}
|
|
149718
149667
|
return new_value;
|
|
149719
149668
|
};
|
|
149720
149669
|
}
|
|
149721
149670
|
let json_str = JSON.stringify(items, replacer, indent);
|
|
149722
149671
|
if (ensure_ascii) {
|
|
149723
|
-
json_str = json_str.replace(/[\u007F-\uFFFF]/g,
|
|
149724
|
-
const full_str =
|
|
149672
|
+
json_str = json_str.replace(/[\u007F-\uFFFF]/g, (chr) => {
|
|
149673
|
+
const full_str = `0000${chr.charCodeAt(0).toString(16)}`;
|
|
149725
149674
|
const sub_str = full_str.substring(full_str.length - 4);
|
|
149726
|
-
return
|
|
149675
|
+
return `\\u${sub_str}`;
|
|
149727
149676
|
});
|
|
149728
149677
|
}
|
|
149729
149678
|
return new TextEncoder().encode(json_str);
|
|
@@ -149738,16 +149687,130 @@ const _JsonCodec = class {
|
|
|
149738
149687
|
items.pop();
|
|
149739
149688
|
if (!shape) {
|
|
149740
149689
|
throw new Error("0D not implemented for JsonCodec.");
|
|
149741
|
-
} else {
|
|
149742
|
-
const stride = get_strides(shape, "C");
|
|
149743
|
-
const data = items;
|
|
149744
|
-
return { data, shape, stride };
|
|
149745
149690
|
}
|
|
149691
|
+
const stride = get_strides(shape, "C");
|
|
149692
|
+
const data = items;
|
|
149693
|
+
return { data, shape, stride };
|
|
149746
149694
|
}
|
|
149747
149695
|
};
|
|
149748
149696
|
let JsonCodec = _JsonCodec;
|
|
149749
149697
|
_encoder_config = new WeakMap();
|
|
149750
149698
|
_decoder_config = new WeakMap();
|
|
149699
|
+
function proxy(arr) {
|
|
149700
|
+
if (arr instanceof BoolArray || arr instanceof ByteStringArray || arr instanceof UnicodeStringArray) {
|
|
149701
|
+
const arrp = new Proxy(arr, {
|
|
149702
|
+
get(target, prop) {
|
|
149703
|
+
return target.get(Number(prop));
|
|
149704
|
+
},
|
|
149705
|
+
set(target, prop, value) {
|
|
149706
|
+
target.set(Number(prop), value);
|
|
149707
|
+
return true;
|
|
149708
|
+
}
|
|
149709
|
+
});
|
|
149710
|
+
return arrp;
|
|
149711
|
+
}
|
|
149712
|
+
return arr;
|
|
149713
|
+
}
|
|
149714
|
+
function empty_like(chunk, order) {
|
|
149715
|
+
let data;
|
|
149716
|
+
if (chunk.data instanceof ByteStringArray || chunk.data instanceof UnicodeStringArray) {
|
|
149717
|
+
data = new chunk.constructor(
|
|
149718
|
+
// @ts-expect-error
|
|
149719
|
+
chunk.data.length,
|
|
149720
|
+
chunk.data.chars
|
|
149721
|
+
);
|
|
149722
|
+
} else {
|
|
149723
|
+
data = new chunk.constructor(chunk.data.length);
|
|
149724
|
+
}
|
|
149725
|
+
return {
|
|
149726
|
+
data,
|
|
149727
|
+
shape: chunk.shape,
|
|
149728
|
+
stride: get_strides(chunk.shape, order)
|
|
149729
|
+
};
|
|
149730
|
+
}
|
|
149731
|
+
function convert_array_order(src, target) {
|
|
149732
|
+
let out = empty_like(src, target);
|
|
149733
|
+
let n_dims = src.shape.length;
|
|
149734
|
+
let size2 = src.data.length;
|
|
149735
|
+
let index2 = Array(n_dims).fill(0);
|
|
149736
|
+
let src_data = proxy(src.data);
|
|
149737
|
+
let out_data = proxy(out.data);
|
|
149738
|
+
for (let src_idx = 0; src_idx < size2; src_idx++) {
|
|
149739
|
+
let out_idx = 0;
|
|
149740
|
+
for (let dim = 0; dim < n_dims; dim++) {
|
|
149741
|
+
out_idx += index2[dim] * out.stride[dim];
|
|
149742
|
+
}
|
|
149743
|
+
out_data[out_idx] = src_data[src_idx];
|
|
149744
|
+
index2[0] += 1;
|
|
149745
|
+
for (let dim = 0; dim < n_dims; dim++) {
|
|
149746
|
+
if (index2[dim] === src.shape[dim]) {
|
|
149747
|
+
if (dim + 1 === n_dims) {
|
|
149748
|
+
break;
|
|
149749
|
+
}
|
|
149750
|
+
index2[dim] = 0;
|
|
149751
|
+
index2[dim + 1] += 1;
|
|
149752
|
+
}
|
|
149753
|
+
}
|
|
149754
|
+
}
|
|
149755
|
+
return out;
|
|
149756
|
+
}
|
|
149757
|
+
function get_order(arr) {
|
|
149758
|
+
if (!arr.stride)
|
|
149759
|
+
return "C";
|
|
149760
|
+
let row_major_strides = get_strides(arr.shape, "C");
|
|
149761
|
+
return arr.stride.every((s2, i2) => s2 === row_major_strides[i2]) ? "C" : "F";
|
|
149762
|
+
}
|
|
149763
|
+
class TransposeCodec {
|
|
149764
|
+
constructor(configuration) {
|
|
149765
|
+
__publicField(this, "configuration");
|
|
149766
|
+
__publicField(this, "kind", "array_to_array");
|
|
149767
|
+
this.configuration = configuration;
|
|
149768
|
+
}
|
|
149769
|
+
static fromConfig(configuration) {
|
|
149770
|
+
return new TransposeCodec(configuration);
|
|
149771
|
+
}
|
|
149772
|
+
encode(arr) {
|
|
149773
|
+
var _a3, _b2;
|
|
149774
|
+
if (get_order(arr) === ((_a3 = this.configuration) == null ? void 0 : _a3.order)) {
|
|
149775
|
+
return arr;
|
|
149776
|
+
}
|
|
149777
|
+
return convert_array_order(arr, ((_b2 = this.configuration) == null ? void 0 : _b2.order) ?? "C");
|
|
149778
|
+
}
|
|
149779
|
+
decode(arr) {
|
|
149780
|
+
return arr;
|
|
149781
|
+
}
|
|
149782
|
+
}
|
|
149783
|
+
const _VLenUTF8 = class {
|
|
149784
|
+
constructor(shape) {
|
|
149785
|
+
__publicField(this, "kind", "array_to_bytes");
|
|
149786
|
+
__privateAdd(this, _shape2, void 0);
|
|
149787
|
+
__privateAdd(this, _strides2, void 0);
|
|
149788
|
+
__privateSet(this, _shape2, shape);
|
|
149789
|
+
__privateSet(this, _strides2, get_strides(shape, "C"));
|
|
149790
|
+
}
|
|
149791
|
+
static fromConfig(_, meta2) {
|
|
149792
|
+
return new _VLenUTF8(meta2.shape);
|
|
149793
|
+
}
|
|
149794
|
+
encode(_chunk) {
|
|
149795
|
+
throw new Error("Method not implemented.");
|
|
149796
|
+
}
|
|
149797
|
+
decode(bytes) {
|
|
149798
|
+
let decoder = new TextDecoder();
|
|
149799
|
+
let view = new DataView(bytes.buffer);
|
|
149800
|
+
let data = Array(view.getUint32(0, true));
|
|
149801
|
+
let pos = 4;
|
|
149802
|
+
for (let i2 = 0; i2 < data.length; i2++) {
|
|
149803
|
+
let item_length = view.getUint32(pos, true);
|
|
149804
|
+
pos += 4;
|
|
149805
|
+
data[i2] = decoder.decode(bytes.buffer.slice(pos, pos + item_length));
|
|
149806
|
+
pos += item_length;
|
|
149807
|
+
}
|
|
149808
|
+
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this, _strides2) };
|
|
149809
|
+
}
|
|
149810
|
+
};
|
|
149811
|
+
let VLenUTF8 = _VLenUTF8;
|
|
149812
|
+
_shape2 = new WeakMap();
|
|
149813
|
+
_strides2 = new WeakMap();
|
|
149751
149814
|
function create_default_registry() {
|
|
149752
149815
|
return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-537fd004.js").then((m) => m.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m) => m.default)).set("lz4", () => import("./lz4-bbd18009.js").then((m) => m.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m) => m.default)).set("zstd", () => import("./zstd-ec5a40b8.js").then((m) => m.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec);
|
|
149753
149816
|
}
|
|
@@ -150065,8 +150128,8 @@ async function _open_v3(location) {
|
|
|
150065
150128
|
});
|
|
150066
150129
|
}
|
|
150067
150130
|
let meta_doc = json_decode_object(meta2);
|
|
150068
|
-
if (meta_doc.node_type === "array"
|
|
150069
|
-
meta_doc.fill_value =
|
|
150131
|
+
if (meta_doc.node_type === "array") {
|
|
150132
|
+
meta_doc.fill_value = ensure_correct_scalar(meta_doc);
|
|
150070
150133
|
}
|
|
150071
150134
|
return meta_doc.node_type === "array" ? new Array$1(store, location.path, meta_doc) : new Group(store, location.path, meta_doc);
|
|
150072
150135
|
}
|
|
@@ -150097,7 +150160,7 @@ async function open(location, options = {}) {
|
|
|
150097
150160
|
}
|
|
150098
150161
|
open.v2 = open_v2;
|
|
150099
150162
|
open.v3 = open_v3;
|
|
150100
|
-
function* range(start, stop, step = 1) {
|
|
150163
|
+
function* range$1(start, stop, step = 1) {
|
|
150101
150164
|
if (stop === void 0) {
|
|
150102
150165
|
stop = start;
|
|
150103
150166
|
start = 0;
|
|
@@ -150106,7 +150169,7 @@ function* range(start, stop, step = 1) {
|
|
|
150106
150169
|
yield i2;
|
|
150107
150170
|
}
|
|
150108
150171
|
}
|
|
150109
|
-
function* product(...iterables) {
|
|
150172
|
+
function* product$1(...iterables) {
|
|
150110
150173
|
if (iterables.length === 0) {
|
|
150111
150174
|
return;
|
|
150112
150175
|
}
|
|
@@ -150252,7 +150315,7 @@ class SliceDimIndexer {
|
|
|
150252
150315
|
*[Symbol.iterator]() {
|
|
150253
150316
|
const dim_chunk_ix_from = Math.floor(this.start / this.dim_chunk_len);
|
|
150254
150317
|
const dim_chunk_ix_to = Math.ceil(this.stop / this.dim_chunk_len);
|
|
150255
|
-
for (const dim_chunk_ix of range(dim_chunk_ix_from, dim_chunk_ix_to)) {
|
|
150318
|
+
for (const dim_chunk_ix of range$1(dim_chunk_ix_from, dim_chunk_ix_to)) {
|
|
150256
150319
|
const dim_offset = dim_chunk_ix * this.dim_chunk_len;
|
|
150257
150320
|
const dim_limit = Math.min(this.dim_len, (dim_chunk_ix + 1) * this.dim_chunk_len);
|
|
150258
150321
|
const dim_chunk_len = dim_limit - dim_offset;
|
|
@@ -150307,7 +150370,7 @@ class BasicIndexer {
|
|
|
150307
150370
|
this.shape = this.dim_indexers.filter((ixr) => ixr instanceof SliceDimIndexer).map((sixr) => sixr.nitems);
|
|
150308
150371
|
}
|
|
150309
150372
|
*[Symbol.iterator]() {
|
|
150310
|
-
for (const dim_projections of product(...this.dim_indexers)) {
|
|
150373
|
+
for (const dim_projections of product$1(...this.dim_indexers)) {
|
|
150311
150374
|
const chunk_coords = dim_projections.map((p) => p.dim_chunk_ix);
|
|
150312
150375
|
const mapping = dim_projections.map((p) => {
|
|
150313
150376
|
if ("dim_out_sel" in p) {
|
|
@@ -150360,7 +150423,7 @@ function object_array_view(arr, offset = 0, size2) {
|
|
|
150360
150423
|
};
|
|
150361
150424
|
}
|
|
150362
150425
|
function compat_chunk(arr) {
|
|
150363
|
-
if (arr.data
|
|
150426
|
+
if (globalThis.Array.isArray(arr.data)) {
|
|
150364
150427
|
return {
|
|
150365
150428
|
// @ts-expect-error
|
|
150366
150429
|
data: object_array_view(arr.data),
|
|
@@ -150381,7 +150444,7 @@ function get_typed_array_constructor(arr) {
|
|
|
150381
150444
|
return arr.constructor;
|
|
150382
150445
|
}
|
|
150383
150446
|
function compat_scalar(arr, value) {
|
|
150384
|
-
if (arr.data
|
|
150447
|
+
if (globalThis.Array.isArray(arr.data)) {
|
|
150385
150448
|
return object_array_view([value]);
|
|
150386
150449
|
}
|
|
150387
150450
|
let TypedArray2 = get_typed_array_constructor(arr.data);
|
|
@@ -150493,6 +150556,19 @@ function set_from_chunk_binary(dest, src, bytes_per_element2, projections) {
|
|
|
150493
150556
|
function strip_prefix(path) {
|
|
150494
150557
|
return path.slice(1);
|
|
150495
150558
|
}
|
|
150559
|
+
function uri2href(url) {
|
|
150560
|
+
let [protocol, rest] = (typeof url === "string" ? url : url.href).split("://");
|
|
150561
|
+
if (protocol === "https" || protocol === "http") {
|
|
150562
|
+
return url;
|
|
150563
|
+
}
|
|
150564
|
+
if (protocol === "gc") {
|
|
150565
|
+
return `https://storage.googleapis.com/${rest}`;
|
|
150566
|
+
}
|
|
150567
|
+
if (protocol === "s3") {
|
|
150568
|
+
return `https://s3.amazonaws.com/${rest}`;
|
|
150569
|
+
}
|
|
150570
|
+
throw Error(`Protocol not supported, got: ${JSON.stringify(protocol)}`);
|
|
150571
|
+
}
|
|
150496
150572
|
function fetch_range(url, offset, length2, opts2 = {}) {
|
|
150497
150573
|
if (offset !== void 0 && length2 !== void 0) {
|
|
150498
150574
|
opts2 = {
|
|
@@ -150528,7 +150604,7 @@ async function handle_response(response) {
|
|
|
150528
150604
|
if (response.status === 404 || response.status === 403) {
|
|
150529
150605
|
return void 0;
|
|
150530
150606
|
}
|
|
150531
|
-
if (response.status
|
|
150607
|
+
if (response.status === 200 || response.status === 206) {
|
|
150532
150608
|
return new Uint8Array(await response.arrayBuffer());
|
|
150533
150609
|
}
|
|
150534
150610
|
throw new Error(`Unexpected response status ${response.status} ${response.statusText}`);
|
|
@@ -151463,7 +151539,7 @@ class HTTPRangeReader {
|
|
|
151463
151539
|
if (!req.ok) {
|
|
151464
151540
|
throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
|
|
151465
151541
|
}
|
|
151466
|
-
this.length =
|
|
151542
|
+
this.length = Number(req.headers.get("content-length"));
|
|
151467
151543
|
if (Number.isNaN(this.length)) {
|
|
151468
151544
|
throw Error("could not get length");
|
|
151469
151545
|
}
|
|
@@ -151504,13 +151580,291 @@ class ZipFileStore {
|
|
|
151504
151580
|
}
|
|
151505
151581
|
}
|
|
151506
151582
|
const ZipFileStore$1 = ZipFileStore;
|
|
151507
|
-
function
|
|
151583
|
+
function parse$1(template, re2 = /{{(.*?)}}/) {
|
|
151584
|
+
let result = re2.exec(template);
|
|
151585
|
+
const parts = [];
|
|
151586
|
+
let pos;
|
|
151587
|
+
while (result) {
|
|
151588
|
+
pos = result.index;
|
|
151589
|
+
if (pos !== 0) {
|
|
151590
|
+
parts.push({ match: false, str: template.substring(0, pos) });
|
|
151591
|
+
template = template.slice(pos);
|
|
151592
|
+
}
|
|
151593
|
+
parts.push({ match: true, str: result[0] });
|
|
151594
|
+
template = template.slice(result[0].length);
|
|
151595
|
+
result = re2.exec(template);
|
|
151596
|
+
}
|
|
151597
|
+
if (template) {
|
|
151598
|
+
parts.push({ match: false, str: template });
|
|
151599
|
+
}
|
|
151600
|
+
return parts;
|
|
151601
|
+
}
|
|
151602
|
+
function matchFn(str) {
|
|
151603
|
+
const match = str.match(/(?<fname>[A-Z_][A-Z_1-9]*)\((?<args>[^)]+)\)/i);
|
|
151604
|
+
if (!(match == null ? void 0 : match.groups))
|
|
151605
|
+
return;
|
|
151606
|
+
const { fname, args } = match.groups;
|
|
151607
|
+
const ctx = Object.fromEntries(
|
|
151608
|
+
args.split(",").map((kwarg) => {
|
|
151609
|
+
var _a3;
|
|
151610
|
+
const { key, num, str: str2 } = ((_a3 = kwarg.match(
|
|
151611
|
+
/(?<key>[a-z_0-9]*)\s*=\s*((?<num>[0-9.]+)|('|")(?<str>.*)('|"))/i
|
|
151612
|
+
)) == null ? void 0 : _a3.groups) ?? {};
|
|
151613
|
+
if (!key || !(num || str2)) {
|
|
151614
|
+
throw Error(`Failed to match fn kwarg: ${kwarg}`);
|
|
151615
|
+
}
|
|
151616
|
+
return [key, num ? Number(num) : str2];
|
|
151617
|
+
})
|
|
151618
|
+
);
|
|
151619
|
+
return { fname, ctx };
|
|
151620
|
+
}
|
|
151621
|
+
const alphabet = "abcdefghijklmnopqrstuvwxyz";
|
|
151622
|
+
const numbers = "01234569789";
|
|
151623
|
+
const expr = "()*/+-";
|
|
151624
|
+
const space = " ";
|
|
151625
|
+
const valid = new Set(
|
|
151626
|
+
alphabet + alphabet.toUpperCase() + numbers + expr + space
|
|
151627
|
+
);
|
|
151628
|
+
function matchMathEval(str) {
|
|
151629
|
+
for (let i2 = 0; i2 < str.length; i2++) {
|
|
151630
|
+
if (!valid.has(str.charAt(i2)))
|
|
151631
|
+
return;
|
|
151632
|
+
}
|
|
151633
|
+
return parse$1(str, /[A-Za-z_][A-Za-z0-9_]*/gi);
|
|
151634
|
+
}
|
|
151635
|
+
function render(template, context) {
|
|
151636
|
+
const grps = parse$1(template);
|
|
151637
|
+
return grps.map((grp) => {
|
|
151638
|
+
if (!grp.match) {
|
|
151639
|
+
return grp.str;
|
|
151640
|
+
}
|
|
151641
|
+
let inner = grp.str.split(/{{|}}/).filter(Boolean)[0].trim();
|
|
151642
|
+
if (inner in context) {
|
|
151643
|
+
return context[inner];
|
|
151644
|
+
}
|
|
151645
|
+
const fnMatch = matchFn(inner);
|
|
151646
|
+
if (fnMatch) {
|
|
151647
|
+
const { fname, ctx } = fnMatch;
|
|
151648
|
+
const fn = context[fname];
|
|
151649
|
+
if (typeof fn === "function") {
|
|
151650
|
+
return fn(ctx);
|
|
151651
|
+
}
|
|
151652
|
+
throw Error(
|
|
151653
|
+
`Cannot find function named ${fname} in rendering context.`
|
|
151654
|
+
);
|
|
151655
|
+
}
|
|
151656
|
+
const matches2 = matchMathEval(inner);
|
|
151657
|
+
if (matches2) {
|
|
151658
|
+
const exprParts = matches2.map((match) => {
|
|
151659
|
+
if (!match.match)
|
|
151660
|
+
return match.str;
|
|
151661
|
+
const value = context[match.str];
|
|
151662
|
+
if (value == null) {
|
|
151663
|
+
throw Error(
|
|
151664
|
+
`Cannot find number named ${match.str} in rendering context.`
|
|
151665
|
+
);
|
|
151666
|
+
}
|
|
151667
|
+
if (typeof value !== "number") {
|
|
151668
|
+
throw Error(
|
|
151669
|
+
`The provided value for ${match.str} must be a number.`
|
|
151670
|
+
);
|
|
151671
|
+
}
|
|
151672
|
+
return value;
|
|
151673
|
+
});
|
|
151674
|
+
return Function('"use strict";return (' + exprParts.join("") + ")")();
|
|
151675
|
+
}
|
|
151676
|
+
throw new Error(`Unable to match ${grp.str}`);
|
|
151677
|
+
}).join("");
|
|
151678
|
+
}
|
|
151679
|
+
function parse(spec, renderString = render) {
|
|
151680
|
+
return "version" in spec ? parseV1(spec, renderString) : parseV0(spec);
|
|
151681
|
+
}
|
|
151682
|
+
function parseV0(spec) {
|
|
151683
|
+
return new Map(Object.entries(spec));
|
|
151684
|
+
}
|
|
151685
|
+
function parseV1(spec, renderString) {
|
|
151686
|
+
var _a3;
|
|
151687
|
+
const context = {};
|
|
151688
|
+
for (const [key, template] of Object.entries(spec.templates ?? {})) {
|
|
151689
|
+
if (template.includes("{{")) {
|
|
151690
|
+
context[key] = (ctx) => renderString(template, ctx);
|
|
151691
|
+
} else {
|
|
151692
|
+
context[key] = template;
|
|
151693
|
+
}
|
|
151694
|
+
}
|
|
151695
|
+
const render2 = (t2, o2) => {
|
|
151696
|
+
return renderString(t2, { ...context, ...o2 });
|
|
151697
|
+
};
|
|
151698
|
+
const refs = /* @__PURE__ */ new Map();
|
|
151699
|
+
for (const [key, ref2] of Object.entries(spec.refs ?? {})) {
|
|
151700
|
+
if (typeof ref2 === "string") {
|
|
151701
|
+
refs.set(key, ref2);
|
|
151702
|
+
} else {
|
|
151703
|
+
const url = ((_a3 = ref2[0]) == null ? void 0 : _a3.includes("{{")) ? render2(ref2[0]) : ref2[0];
|
|
151704
|
+
refs.set(key, ref2.length === 1 ? [url] : [url, ref2[1], ref2[2]]);
|
|
151705
|
+
}
|
|
151706
|
+
}
|
|
151707
|
+
for (const g2 of spec.gen ?? []) {
|
|
151708
|
+
for (const dims of iterDims(g2.dimensions)) {
|
|
151709
|
+
const key = render2(g2.key, dims);
|
|
151710
|
+
const url = render2(g2.url, dims);
|
|
151711
|
+
if ("offset" in g2 && "length" in g2) {
|
|
151712
|
+
const offset = render2(g2.offset, dims);
|
|
151713
|
+
const length2 = render2(g2.length, dims);
|
|
151714
|
+
refs.set(key, [url, parseInt(offset), parseInt(length2)]);
|
|
151715
|
+
} else {
|
|
151716
|
+
refs.set(key, [url]);
|
|
151717
|
+
}
|
|
151718
|
+
}
|
|
151719
|
+
}
|
|
151720
|
+
return refs;
|
|
151721
|
+
}
|
|
151722
|
+
function* iterDims(dimensions) {
|
|
151723
|
+
const keys3 = Object.keys(dimensions);
|
|
151724
|
+
const iterables = Object.values(dimensions).map(
|
|
151725
|
+
(i2) => Array.isArray(i2) ? i2 : [...range(i2)]
|
|
151726
|
+
);
|
|
151727
|
+
for (const values2 of product(...iterables)) {
|
|
151728
|
+
yield Object.fromEntries(keys3.map((key, i2) => [key, values2[i2]]));
|
|
151729
|
+
}
|
|
151730
|
+
}
|
|
151731
|
+
function* product(...iterables) {
|
|
151732
|
+
if (iterables.length === 0) {
|
|
151733
|
+
return;
|
|
151734
|
+
}
|
|
151735
|
+
const iterators = iterables.map((it) => it[Symbol.iterator]());
|
|
151736
|
+
const results = iterators.map((it) => it.next());
|
|
151737
|
+
if (results.some((r2) => r2.done)) {
|
|
151738
|
+
throw new Error("Input contains an empty iterator.");
|
|
151739
|
+
}
|
|
151740
|
+
for (let i2 = 0; ; ) {
|
|
151741
|
+
if (results[i2].done) {
|
|
151742
|
+
iterators[i2] = iterables[i2][Symbol.iterator]();
|
|
151743
|
+
results[i2] = iterators[i2].next();
|
|
151744
|
+
if (++i2 >= iterators.length) {
|
|
151745
|
+
return;
|
|
151746
|
+
}
|
|
151747
|
+
} else {
|
|
151748
|
+
yield results.map(({ value }) => value);
|
|
151749
|
+
i2 = 0;
|
|
151750
|
+
}
|
|
151751
|
+
results[i2] = iterators[i2].next();
|
|
151752
|
+
}
|
|
151753
|
+
}
|
|
151754
|
+
function* range({ stop, start = 0, step = 1 }) {
|
|
151755
|
+
for (let i2 = start; i2 < stop; i2 += step) {
|
|
151756
|
+
yield i2;
|
|
151757
|
+
}
|
|
151758
|
+
}
|
|
151759
|
+
(() => {
|
|
151760
|
+
var table2 = new Uint8Array(128);
|
|
151761
|
+
for (var i2 = 0; i2 < 64; i2++) {
|
|
151762
|
+
table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
151763
|
+
}
|
|
151764
|
+
return (base64) => {
|
|
151765
|
+
var n3 = base64.length;
|
|
151766
|
+
var bytes = new Uint8Array(
|
|
151767
|
+
// @ts-expect-error
|
|
151768
|
+
(n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0
|
|
151769
|
+
);
|
|
151770
|
+
for (var i22 = 0, j = 0; i22 < n3; ) {
|
|
151771
|
+
var c0 = table2[base64.charCodeAt(i22++)], c1 = table2[base64.charCodeAt(i22++)];
|
|
151772
|
+
var c2 = table2[base64.charCodeAt(i22++)], c3 = table2[base64.charCodeAt(i22++)];
|
|
151773
|
+
bytes[j++] = c0 << 2 | c1 >> 4;
|
|
151774
|
+
bytes[j++] = c1 << 4 | c2 >> 2;
|
|
151775
|
+
bytes[j++] = c2 << 6 | c3;
|
|
151776
|
+
}
|
|
151777
|
+
return bytes;
|
|
151778
|
+
};
|
|
151779
|
+
})();
|
|
151780
|
+
new TextEncoder();
|
|
151781
|
+
let table = new Uint8Array(128);
|
|
151782
|
+
for (let i2 = 0; i2 < 64; i2++) {
|
|
151783
|
+
table[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
151784
|
+
}
|
|
151785
|
+
function to_binary(base64) {
|
|
151786
|
+
const n3 = base64.length;
|
|
151787
|
+
const bytes = new Uint8Array(
|
|
151788
|
+
// @ts-ignore
|
|
151789
|
+
(n3 - (base64[n3 - 1] === "=") - (base64[n3 - 2] === "=")) * 3 / 4 | 0
|
|
151790
|
+
);
|
|
151791
|
+
for (let i2 = 0, j = 0; i2 < n3; ) {
|
|
151792
|
+
const c0 = table[base64.charCodeAt(i2++)];
|
|
151793
|
+
const c1 = table[base64.charCodeAt(i2++)];
|
|
151794
|
+
const c2 = table[base64.charCodeAt(i2++)];
|
|
151795
|
+
const c3 = table[base64.charCodeAt(i2++)];
|
|
151796
|
+
bytes[j++] = c0 << 2 | c1 >> 4;
|
|
151797
|
+
bytes[j++] = c1 << 4 | c2 >> 2;
|
|
151798
|
+
bytes[j++] = c2 << 6 | c3;
|
|
151799
|
+
}
|
|
151800
|
+
return bytes;
|
|
151801
|
+
}
|
|
151802
|
+
const _ReferenceStore = class {
|
|
151803
|
+
constructor(refs, opts2 = {}) {
|
|
151804
|
+
__privateAdd(this, _refs, void 0);
|
|
151805
|
+
__privateAdd(this, _opts, void 0);
|
|
151806
|
+
__privateAdd(this, _overrides3, void 0);
|
|
151807
|
+
__privateSet(this, _refs, Promise.resolve(refs));
|
|
151808
|
+
__privateSet(this, _opts, opts2);
|
|
151809
|
+
__privateSet(this, _overrides3, opts2.overrides || {});
|
|
151810
|
+
}
|
|
151811
|
+
async get(key, opts2 = {}) {
|
|
151812
|
+
let ref2 = (await __privateGet(this, _refs)).get(strip_prefix(key));
|
|
151813
|
+
if (!ref2)
|
|
151814
|
+
return;
|
|
151815
|
+
if (typeof ref2 === "string") {
|
|
151816
|
+
if (ref2.startsWith("base64:")) {
|
|
151817
|
+
return to_binary(ref2.slice("base64:".length));
|
|
151818
|
+
}
|
|
151819
|
+
return new TextEncoder().encode(ref2);
|
|
151820
|
+
}
|
|
151821
|
+
let [urlOrNull, offset, size2] = ref2;
|
|
151822
|
+
let url = urlOrNull ?? __privateGet(this, _opts).target;
|
|
151823
|
+
if (!url) {
|
|
151824
|
+
throw Error(`No url for key ${key}, and no target url provided.`);
|
|
151825
|
+
}
|
|
151826
|
+
let res = await fetch_range(uri2href(url), offset, size2, merge_init(__privateGet(this, _overrides3), opts2));
|
|
151827
|
+
if (res.status === 200 || res.status === 206) {
|
|
151828
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
151829
|
+
}
|
|
151830
|
+
throw new Error(`Request unsuccessful for key ${key}. Response status: ${res.status}.`);
|
|
151831
|
+
}
|
|
151832
|
+
static fromSpec(spec, opts2) {
|
|
151833
|
+
let refs = Promise.resolve(spec).then((spec2) => parse(spec2));
|
|
151834
|
+
return new _ReferenceStore(refs, opts2);
|
|
151835
|
+
}
|
|
151836
|
+
static fromUrl(url, opts2) {
|
|
151837
|
+
let spec = fetch(url, opts2 == null ? void 0 : opts2.overrides).then((res) => res.json());
|
|
151838
|
+
return _ReferenceStore.fromSpec(spec, opts2);
|
|
151839
|
+
}
|
|
151840
|
+
};
|
|
151841
|
+
let ReferenceStore = _ReferenceStore;
|
|
151842
|
+
_refs = new WeakMap();
|
|
151843
|
+
_opts = new WeakMap();
|
|
151844
|
+
_overrides3 = new WeakMap();
|
|
151845
|
+
const ReferenceStore$1 = ReferenceStore;
|
|
151846
|
+
function zarrOpenRoot(url, fileType, opts2) {
|
|
151508
151847
|
let store;
|
|
151509
|
-
const opts2 = requestInit2 ? { overrides: requestInit2 } : void 0;
|
|
151510
151848
|
if (fileType && fileType.endsWith(".zip")) {
|
|
151511
|
-
store = ZipFileStore$1.fromUrl(url, opts2);
|
|
151849
|
+
store = ZipFileStore$1.fromUrl(url, { overrides: opts2 == null ? void 0 : opts2.requestInit });
|
|
151850
|
+
} else if (fileType && fileType.endsWith(".h5ad")) {
|
|
151851
|
+
if (!(opts2 == null ? void 0 : opts2.refSpecUrl)) {
|
|
151852
|
+
throw new Error("refSpecUrl is required for H5AD files");
|
|
151853
|
+
}
|
|
151854
|
+
const referenceSpecPromise = fetch(opts2.refSpecUrl).then((res) => res.json()).then((referenceSpec) => Object.fromEntries(
|
|
151855
|
+
// We want ReferenceStore.fromSpec to use our `target` URL option regardless
|
|
151856
|
+
// of what target URL(s) are specified in the reference spec JSON.
|
|
151857
|
+
// Reference: https://github.com/manzt/zarrita.js/pull/155
|
|
151858
|
+
Object.entries(referenceSpec).map(([key, entry]) => {
|
|
151859
|
+
if (Array.isArray(entry) && entry.length >= 1) {
|
|
151860
|
+
entry[0] = null;
|
|
151861
|
+
}
|
|
151862
|
+
return [key, entry];
|
|
151863
|
+
})
|
|
151864
|
+
));
|
|
151865
|
+
store = ReferenceStore$1.fromSpec(referenceSpecPromise, { target: url, overrides: opts2 == null ? void 0 : opts2.requestInit });
|
|
151512
151866
|
} else {
|
|
151513
|
-
store = new FetchStore$1(url, opts2);
|
|
151867
|
+
store = new FetchStore$1(url, { overrides: opts2 == null ? void 0 : opts2.requestInit });
|
|
151514
151868
|
}
|
|
151515
151869
|
return root(store);
|
|
151516
151870
|
}
|
|
@@ -151649,7 +152003,7 @@ class ClustersJsonAsObsFeatureMatrixLoader extends JsonLoader {
|
|
|
151649
152003
|
const normalize2 = (d) => Math.floor((d - min2) / (max2 - min2) * 255);
|
|
151650
152004
|
return col.map(normalize2);
|
|
151651
152005
|
});
|
|
151652
|
-
const tNormalizedMatrix = range$
|
|
152006
|
+
const tNormalizedMatrix = range$8(shape[0]).map((i2) => range$8(shape[1]).map((j) => normalizedMatrix[j][i2]));
|
|
151653
152007
|
const normalizedFlatMatrix = tNormalizedMatrix.flat();
|
|
151654
152008
|
const obsFeatureMatrix = { data: Uint8Array.from(normalizedFlatMatrix) };
|
|
151655
152009
|
this.cachedResult = { obsIndex, featureIndex, obsFeatureMatrix };
|
|
@@ -151714,12 +152068,12 @@ class MoleculesJsonAsObsLabelsLoader extends JsonLoader {
|
|
|
151714
152068
|
if (this.cachedResult) {
|
|
151715
152069
|
return this.cachedResult;
|
|
151716
152070
|
}
|
|
151717
|
-
const obsIndex = range$
|
|
152071
|
+
const obsIndex = range$8(sum$3(Object.values(data).map((v) => v.length))).map((i2) => String(i2));
|
|
151718
152072
|
let obsLabels = [];
|
|
151719
152073
|
Object.entries(data).forEach(([gene, locations]) => {
|
|
151720
152074
|
obsLabels = [
|
|
151721
152075
|
...obsLabels,
|
|
151722
|
-
...range$
|
|
152076
|
+
...range$8(locations.length).map(() => gene)
|
|
151723
152077
|
];
|
|
151724
152078
|
});
|
|
151725
152079
|
this.cachedResult = { obsIndex, obsLabels };
|
|
@@ -151745,7 +152099,7 @@ class MoleculesJsonAsObsLocationsLoader extends JsonLoader {
|
|
|
151745
152099
|
return this.cachedResult;
|
|
151746
152100
|
}
|
|
151747
152101
|
const moleculesValues = Object.values(data);
|
|
151748
|
-
const obsIndex = range$
|
|
152102
|
+
const obsIndex = range$8(sum$3(moleculesValues.map((v) => v.length))).map((i2) => String(i2));
|
|
151749
152103
|
const obsLocationsX = new Float32Array(obsIndex.length);
|
|
151750
152104
|
const obsLocationsY = new Float32Array(obsIndex.length);
|
|
151751
152105
|
let startAt = 0;
|
|
@@ -151791,7 +152145,7 @@ async function initLoader(imageData) {
|
|
|
151791
152145
|
} = metadata || {};
|
|
151792
152146
|
const labels = dimensions.map((d) => d.field);
|
|
151793
152147
|
let source;
|
|
151794
|
-
const root2 = await zarrOpenRoot(url, null, requestInit2);
|
|
152148
|
+
const root2 = await zarrOpenRoot(url, null, { requestInit: requestInit2 });
|
|
151795
152149
|
if (isPyramid) {
|
|
151796
152150
|
const metadataUrl = `${url}${url.slice(-1) === "/" ? "" : "/"}.zmetadata`;
|
|
151797
152151
|
const response = await fetch(metadataUrl);
|
|
@@ -151834,7 +152188,7 @@ async function initLoader(imageData) {
|
|
|
151834
152188
|
}
|
|
151835
152189
|
case "ome-zarr": {
|
|
151836
152190
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata || {};
|
|
151837
|
-
const root2 = await zarrOpenRoot(url, null, requestInit2);
|
|
152191
|
+
const root2 = await zarrOpenRoot(url, null, { requestInit: requestInit2 });
|
|
151838
152192
|
const loader = await loadOmeZarr(root2);
|
|
151839
152193
|
const { metadata: loaderMetadata } = loader;
|
|
151840
152194
|
const { omero, multiscales } = loaderMetadata;
|