@vitessce/scatterplot-gating 3.3.2 → 3.3.3
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-77b61410.js → deflate-77caba00.js} +1 -1
- package/dist/{index-db49eef4.js → index-46421b0b.js} +226 -150
- package/dist/index.js +1 -1
- package/dist/{jpeg-8eab1ac6.js → jpeg-8db09338.js} +1 -1
- package/dist/{lerc-5d8884d4.js → lerc-e0aaacab.js} +1 -1
- package/dist/{lzw-ba7d74c9.js → lzw-0fc42bf7.js} +1 -1
- package/dist/{packbits-ad44bc57.js → packbits-25bf12f6.js} +1 -1
- package/dist/{raw-e380bba5.js → raw-dd940ebd.js} +1 -1
- package/dist/{webimage-d4200105.js → webimage-3b65bcee.js} +1 -1
- package/package.json +6 -6
|
@@ -942,18 +942,18 @@ var reactJsxRuntime_development = {};
|
|
|
942
942
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
943
943
|
function extent$1(values2, valueof) {
|
|
944
944
|
let min;
|
|
945
|
-
let
|
|
945
|
+
let max2;
|
|
946
946
|
if (valueof === void 0) {
|
|
947
947
|
for (const value of values2) {
|
|
948
948
|
if (value != null) {
|
|
949
949
|
if (min === void 0) {
|
|
950
950
|
if (value >= value)
|
|
951
|
-
min =
|
|
951
|
+
min = max2 = value;
|
|
952
952
|
} else {
|
|
953
953
|
if (min > value)
|
|
954
954
|
min = value;
|
|
955
|
-
if (
|
|
956
|
-
|
|
955
|
+
if (max2 < value)
|
|
956
|
+
max2 = value;
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
}
|
|
@@ -963,17 +963,35 @@ function extent$1(values2, valueof) {
|
|
|
963
963
|
if ((value = valueof(value, ++index2, values2)) != null) {
|
|
964
964
|
if (min === void 0) {
|
|
965
965
|
if (value >= value)
|
|
966
|
-
min =
|
|
966
|
+
min = max2 = value;
|
|
967
967
|
} else {
|
|
968
968
|
if (min > value)
|
|
969
969
|
min = value;
|
|
970
|
-
if (
|
|
971
|
-
|
|
970
|
+
if (max2 < value)
|
|
971
|
+
max2 = value;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
return [min,
|
|
976
|
+
return [min, max2];
|
|
977
|
+
}
|
|
978
|
+
function max(values2, valueof) {
|
|
979
|
+
let max2;
|
|
980
|
+
if (valueof === void 0) {
|
|
981
|
+
for (const value of values2) {
|
|
982
|
+
if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
983
|
+
max2 = value;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
} else {
|
|
987
|
+
let index2 = -1;
|
|
988
|
+
for (let value of values2) {
|
|
989
|
+
if ((value = valueof(value, ++index2, values2)) != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
990
|
+
max2 = value;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
return max2;
|
|
977
995
|
}
|
|
978
996
|
var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
|
|
979
997
|
const freeGlobal$2 = freeGlobal$1;
|
|
@@ -5528,14 +5546,14 @@ class ZodString extends ZodType {
|
|
|
5528
5546
|
return min;
|
|
5529
5547
|
}
|
|
5530
5548
|
get maxLength() {
|
|
5531
|
-
let
|
|
5549
|
+
let max2 = null;
|
|
5532
5550
|
for (const ch of this._def.checks) {
|
|
5533
5551
|
if (ch.kind === "max") {
|
|
5534
|
-
if (
|
|
5535
|
-
|
|
5552
|
+
if (max2 === null || ch.value < max2)
|
|
5553
|
+
max2 = ch.value;
|
|
5536
5554
|
}
|
|
5537
5555
|
}
|
|
5538
|
-
return
|
|
5556
|
+
return max2;
|
|
5539
5557
|
}
|
|
5540
5558
|
}
|
|
5541
5559
|
ZodString.create = (params) => {
|
|
@@ -5750,20 +5768,20 @@ class ZodNumber extends ZodType {
|
|
|
5750
5768
|
return min;
|
|
5751
5769
|
}
|
|
5752
5770
|
get maxValue() {
|
|
5753
|
-
let
|
|
5771
|
+
let max2 = null;
|
|
5754
5772
|
for (const ch of this._def.checks) {
|
|
5755
5773
|
if (ch.kind === "max") {
|
|
5756
|
-
if (
|
|
5757
|
-
|
|
5774
|
+
if (max2 === null || ch.value < max2)
|
|
5775
|
+
max2 = ch.value;
|
|
5758
5776
|
}
|
|
5759
5777
|
}
|
|
5760
|
-
return
|
|
5778
|
+
return max2;
|
|
5761
5779
|
}
|
|
5762
5780
|
get isInt() {
|
|
5763
5781
|
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$4.isInteger(ch.value));
|
|
5764
5782
|
}
|
|
5765
5783
|
get isFinite() {
|
|
5766
|
-
let
|
|
5784
|
+
let max2 = null, min = null;
|
|
5767
5785
|
for (const ch of this._def.checks) {
|
|
5768
5786
|
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
5769
5787
|
return true;
|
|
@@ -5771,11 +5789,11 @@ class ZodNumber extends ZodType {
|
|
|
5771
5789
|
if (min === null || ch.value > min)
|
|
5772
5790
|
min = ch.value;
|
|
5773
5791
|
} else if (ch.kind === "max") {
|
|
5774
|
-
if (
|
|
5775
|
-
|
|
5792
|
+
if (max2 === null || ch.value < max2)
|
|
5793
|
+
max2 = ch.value;
|
|
5776
5794
|
}
|
|
5777
5795
|
}
|
|
5778
|
-
return Number.isFinite(min) && Number.isFinite(
|
|
5796
|
+
return Number.isFinite(min) && Number.isFinite(max2);
|
|
5779
5797
|
}
|
|
5780
5798
|
}
|
|
5781
5799
|
ZodNumber.create = (params) => {
|
|
@@ -5933,14 +5951,14 @@ class ZodBigInt extends ZodType {
|
|
|
5933
5951
|
return min;
|
|
5934
5952
|
}
|
|
5935
5953
|
get maxValue() {
|
|
5936
|
-
let
|
|
5954
|
+
let max2 = null;
|
|
5937
5955
|
for (const ch of this._def.checks) {
|
|
5938
5956
|
if (ch.kind === "max") {
|
|
5939
|
-
if (
|
|
5940
|
-
|
|
5957
|
+
if (max2 === null || ch.value < max2)
|
|
5958
|
+
max2 = ch.value;
|
|
5941
5959
|
}
|
|
5942
5960
|
}
|
|
5943
|
-
return
|
|
5961
|
+
return max2;
|
|
5944
5962
|
}
|
|
5945
5963
|
}
|
|
5946
5964
|
ZodBigInt.create = (params) => {
|
|
@@ -6068,14 +6086,14 @@ class ZodDate extends ZodType {
|
|
|
6068
6086
|
return min != null ? new Date(min) : null;
|
|
6069
6087
|
}
|
|
6070
6088
|
get maxDate() {
|
|
6071
|
-
let
|
|
6089
|
+
let max2 = null;
|
|
6072
6090
|
for (const ch of this._def.checks) {
|
|
6073
6091
|
if (ch.kind === "max") {
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6092
|
+
if (max2 === null || ch.value < max2)
|
|
6093
|
+
max2 = ch.value;
|
|
6076
6094
|
}
|
|
6077
6095
|
}
|
|
6078
|
-
return
|
|
6096
|
+
return max2 != null ? new Date(max2) : null;
|
|
6079
6097
|
}
|
|
6080
6098
|
}
|
|
6081
6099
|
ZodDate.create = (params) => {
|
|
@@ -10434,7 +10452,7 @@ var toComparators_1 = toComparators$1;
|
|
|
10434
10452
|
const SemVer$4 = semver;
|
|
10435
10453
|
const Range$7 = requireRange();
|
|
10436
10454
|
const maxSatisfying$1 = (versions, range2, options) => {
|
|
10437
|
-
let
|
|
10455
|
+
let max2 = null;
|
|
10438
10456
|
let maxSV = null;
|
|
10439
10457
|
let rangeObj = null;
|
|
10440
10458
|
try {
|
|
@@ -10444,13 +10462,13 @@ const maxSatisfying$1 = (versions, range2, options) => {
|
|
|
10444
10462
|
}
|
|
10445
10463
|
versions.forEach((v) => {
|
|
10446
10464
|
if (rangeObj.test(v)) {
|
|
10447
|
-
if (!
|
|
10448
|
-
|
|
10449
|
-
maxSV = new SemVer$4(
|
|
10465
|
+
if (!max2 || maxSV.compare(v) === -1) {
|
|
10466
|
+
max2 = v;
|
|
10467
|
+
maxSV = new SemVer$4(max2, options);
|
|
10450
10468
|
}
|
|
10451
10469
|
}
|
|
10452
10470
|
});
|
|
10453
|
-
return
|
|
10471
|
+
return max2;
|
|
10454
10472
|
};
|
|
10455
10473
|
var maxSatisfying_1 = maxSatisfying$1;
|
|
10456
10474
|
const SemVer$3 = semver;
|
|
@@ -10635,17 +10653,17 @@ var simplify = (versions, range2, options) => {
|
|
|
10635
10653
|
set3.push([first, null]);
|
|
10636
10654
|
}
|
|
10637
10655
|
const ranges2 = [];
|
|
10638
|
-
for (const [min,
|
|
10639
|
-
if (min ===
|
|
10656
|
+
for (const [min, max2] of set3) {
|
|
10657
|
+
if (min === max2) {
|
|
10640
10658
|
ranges2.push(min);
|
|
10641
|
-
} else if (!
|
|
10659
|
+
} else if (!max2 && min === v[0]) {
|
|
10642
10660
|
ranges2.push("*");
|
|
10643
|
-
} else if (!
|
|
10661
|
+
} else if (!max2) {
|
|
10644
10662
|
ranges2.push(`>=${min}`);
|
|
10645
10663
|
} else if (min === v[0]) {
|
|
10646
|
-
ranges2.push(`<=${
|
|
10664
|
+
ranges2.push(`<=${max2}`);
|
|
10647
10665
|
} else {
|
|
10648
|
-
ranges2.push(`${min} - ${
|
|
10666
|
+
ranges2.push(`${min} - ${max2}`);
|
|
10649
10667
|
}
|
|
10650
10668
|
}
|
|
10651
10669
|
const simplified = ranges2.join(" || ");
|
|
@@ -10939,7 +10957,9 @@ const FileType$1 = {
|
|
|
10939
10957
|
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
|
10940
10958
|
OBS_SETS_CSV: "obsSets.csv",
|
|
10941
10959
|
OBS_SETS_JSON: "obsSets.json",
|
|
10960
|
+
// OME-Zarr
|
|
10942
10961
|
IMAGE_OME_ZARR: "image.ome-zarr",
|
|
10962
|
+
OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
|
|
10943
10963
|
// AnnData
|
|
10944
10964
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
|
10945
10965
|
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
|
@@ -11423,7 +11443,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11423
11443
|
CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
|
|
11424
11444
|
CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
|
|
11425
11445
|
CoordinationType$1.IMAGE_CHANNEL,
|
|
11446
|
+
CoordinationType$1.IMAGE_LAYER,
|
|
11426
11447
|
CoordinationType$1.SEGMENTATION_CHANNEL,
|
|
11448
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
|
11427
11449
|
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
|
11428
11450
|
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
|
11429
11451
|
CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
|
|
@@ -11441,6 +11463,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11441
11463
|
CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
|
|
11442
11464
|
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
|
11443
11465
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
11466
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
11467
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
11468
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
11444
11469
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
11445
11470
|
CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
|
|
11446
11471
|
CoordinationType$1.LEGEND_VISIBLE,
|
|
@@ -11757,30 +11782,39 @@ const omeCoordinateTransformations = z.array(z.union([
|
|
|
11757
11782
|
scale: z.array(z.number())
|
|
11758
11783
|
})
|
|
11759
11784
|
]));
|
|
11760
|
-
z.object({
|
|
11785
|
+
const imageOmeTiffSchema = z.object({
|
|
11761
11786
|
offsetsUrl: z.string().optional(),
|
|
11762
11787
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11763
11788
|
});
|
|
11789
|
+
imageOmeTiffSchema.extend({
|
|
11790
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11791
|
+
});
|
|
11764
11792
|
const imageOmeZarrSchema = z.object({
|
|
11765
11793
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11766
11794
|
});
|
|
11767
11795
|
imageOmeZarrSchema.extend({
|
|
11796
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11797
|
+
});
|
|
11798
|
+
const imageSpatialdataSchema = imageOmeZarrSchema.extend({
|
|
11768
11799
|
path: z.string()
|
|
11769
11800
|
});
|
|
11770
|
-
z.object({
|
|
11801
|
+
const obsSegmentationsSpatialdataSchema = z.object({
|
|
11802
|
+
// TODO: should this also extend the imageOmeZarrSchema?
|
|
11803
|
+
// TODO: should this be renamed labelsSpatialdataSchema?
|
|
11804
|
+
// TODO: support obsTypesFromChannelNames?
|
|
11771
11805
|
path: z.string()
|
|
11772
11806
|
});
|
|
11773
11807
|
z.object({
|
|
11774
11808
|
path: z.string()
|
|
11775
11809
|
});
|
|
11776
|
-
z.object({
|
|
11810
|
+
const obsSpotsSpatialdataSchema = z.object({
|
|
11777
11811
|
path: z.string(),
|
|
11778
11812
|
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
11779
11813
|
});
|
|
11780
|
-
annDataObsFeatureMatrix.extend({
|
|
11814
|
+
const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
11781
11815
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
11782
11816
|
});
|
|
11783
|
-
z.object({
|
|
11817
|
+
const obsSetsSpatialdataSchema = z.object({
|
|
11784
11818
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
11785
11819
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
11786
11820
|
obsSets: annDataObsSets
|
|
@@ -11843,6 +11877,19 @@ z.object({
|
|
|
11843
11877
|
z.array(annDataConvenienceObsEmbeddingItem)
|
|
11844
11878
|
])
|
|
11845
11879
|
}).partial();
|
|
11880
|
+
z.object({
|
|
11881
|
+
// TODO: should `image` be a special schema
|
|
11882
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11883
|
+
image: imageSpatialdataSchema,
|
|
11884
|
+
// TODO: should this be a special schema
|
|
11885
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11886
|
+
labels: obsSegmentationsSpatialdataSchema,
|
|
11887
|
+
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
11888
|
+
obsSpots: obsSpotsSpatialdataSchema,
|
|
11889
|
+
// TODO: obsPoints
|
|
11890
|
+
// TODO: obsLocations
|
|
11891
|
+
obsSets: obsSetsSpatialdataSchema
|
|
11892
|
+
}).partial();
|
|
11846
11893
|
z.object({
|
|
11847
11894
|
obsLabelsTypes: z.array(z.string()).optional(),
|
|
11848
11895
|
embeddingTypes: z.array(z.string()).optional()
|
|
@@ -12216,14 +12263,14 @@ var tinycolor = { exports: {} };
|
|
|
12216
12263
|
r2 = bound01(r2, 255);
|
|
12217
12264
|
g2 = bound01(g2, 255);
|
|
12218
12265
|
b = bound01(b, 255);
|
|
12219
|
-
var
|
|
12220
|
-
var h, s2, l2 = (
|
|
12221
|
-
if (
|
|
12266
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12267
|
+
var h, s2, l2 = (max2 + min) / 2;
|
|
12268
|
+
if (max2 == min) {
|
|
12222
12269
|
h = s2 = 0;
|
|
12223
12270
|
} else {
|
|
12224
|
-
var d =
|
|
12225
|
-
s2 = l2 > 0.5 ? d / (2 -
|
|
12226
|
-
switch (
|
|
12271
|
+
var d = max2 - min;
|
|
12272
|
+
s2 = l2 > 0.5 ? d / (2 - max2 - min) : d / (max2 + min);
|
|
12273
|
+
switch (max2) {
|
|
12227
12274
|
case r2:
|
|
12228
12275
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12229
12276
|
break;
|
|
@@ -12271,14 +12318,14 @@ var tinycolor = { exports: {} };
|
|
|
12271
12318
|
r2 = bound01(r2, 255);
|
|
12272
12319
|
g2 = bound01(g2, 255);
|
|
12273
12320
|
b = bound01(b, 255);
|
|
12274
|
-
var
|
|
12275
|
-
var h, s2, v =
|
|
12276
|
-
var d =
|
|
12277
|
-
s2 =
|
|
12278
|
-
if (
|
|
12321
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12322
|
+
var h, s2, v = max2;
|
|
12323
|
+
var d = max2 - min;
|
|
12324
|
+
s2 = max2 === 0 ? 0 : d / max2;
|
|
12325
|
+
if (max2 == min) {
|
|
12279
12326
|
h = 0;
|
|
12280
12327
|
} else {
|
|
12281
|
-
switch (
|
|
12328
|
+
switch (max2) {
|
|
12282
12329
|
case r2:
|
|
12283
12330
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12284
12331
|
break;
|
|
@@ -12675,19 +12722,19 @@ var tinycolor = { exports: {} };
|
|
|
12675
12722
|
}
|
|
12676
12723
|
return a2;
|
|
12677
12724
|
}
|
|
12678
|
-
function bound01(n2,
|
|
12725
|
+
function bound01(n2, max2) {
|
|
12679
12726
|
if (isOnePointZero(n2)) {
|
|
12680
12727
|
n2 = "100%";
|
|
12681
12728
|
}
|
|
12682
12729
|
var processPercent = isPercentage(n2);
|
|
12683
|
-
n2 = mathMin(
|
|
12730
|
+
n2 = mathMin(max2, mathMax(0, parseFloat(n2)));
|
|
12684
12731
|
if (processPercent) {
|
|
12685
|
-
n2 = parseInt(n2 *
|
|
12732
|
+
n2 = parseInt(n2 * max2, 10) / 100;
|
|
12686
12733
|
}
|
|
12687
|
-
if (Math2.abs(n2 -
|
|
12734
|
+
if (Math2.abs(n2 - max2) < 1e-6) {
|
|
12688
12735
|
return 1;
|
|
12689
12736
|
}
|
|
12690
|
-
return n2 %
|
|
12737
|
+
return n2 % max2 / parseFloat(max2);
|
|
12691
12738
|
}
|
|
12692
12739
|
function clamp01(val) {
|
|
12693
12740
|
return mathMin(1, mathMax(0, val));
|
|
@@ -13903,10 +13950,10 @@ var json2csv_umd = { exports: {} };
|
|
|
13903
13950
|
};
|
|
13904
13951
|
Buffer3.prototype.inspect = function inspect2() {
|
|
13905
13952
|
var str = "";
|
|
13906
|
-
var
|
|
13953
|
+
var max2 = INSPECT_MAX_BYTES;
|
|
13907
13954
|
if (this.length > 0) {
|
|
13908
|
-
str = this.toString("hex", 0,
|
|
13909
|
-
if (this.length >
|
|
13955
|
+
str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
|
|
13956
|
+
if (this.length > max2)
|
|
13910
13957
|
str += " ... ";
|
|
13911
13958
|
}
|
|
13912
13959
|
return "<Buffer " + str + ">";
|
|
@@ -14472,10 +14519,10 @@ var json2csv_umd = { exports: {} };
|
|
|
14472
14519
|
checkOffset(offset5, 8, this.length);
|
|
14473
14520
|
return read(this, offset5, false, 52, 8);
|
|
14474
14521
|
};
|
|
14475
|
-
function checkInt(buf, value, offset5, ext,
|
|
14522
|
+
function checkInt(buf, value, offset5, ext, max2, min) {
|
|
14476
14523
|
if (!internalIsBuffer(buf))
|
|
14477
14524
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
14478
|
-
if (value >
|
|
14525
|
+
if (value > max2 || value < min)
|
|
14479
14526
|
throw new RangeError('"value" argument is out of bounds');
|
|
14480
14527
|
if (offset5 + ext > buf.length)
|
|
14481
14528
|
throw new RangeError("Index out of range");
|
|
@@ -14700,7 +14747,7 @@ var json2csv_umd = { exports: {} };
|
|
|
14700
14747
|
}
|
|
14701
14748
|
return offset5 + 4;
|
|
14702
14749
|
};
|
|
14703
|
-
function checkIEEE754(buf, value, offset5, ext,
|
|
14750
|
+
function checkIEEE754(buf, value, offset5, ext, max2, min) {
|
|
14704
14751
|
if (offset5 + ext > buf.length)
|
|
14705
14752
|
throw new RangeError("Index out of range");
|
|
14706
14753
|
if (offset5 < 0)
|
|
@@ -29931,8 +29978,8 @@ function acos$1(radians2, result) {
|
|
|
29931
29978
|
function atan$1(radians2, result) {
|
|
29932
29979
|
return map(radians2, (angle2) => Math.atan(angle2), result);
|
|
29933
29980
|
}
|
|
29934
|
-
function clamp$3(value, min,
|
|
29935
|
-
return map(value, (value2) => Math.max(min, Math.min(
|
|
29981
|
+
function clamp$3(value, min, max2) {
|
|
29982
|
+
return map(value, (value2) => Math.max(min, Math.min(max2, value2)));
|
|
29936
29983
|
}
|
|
29937
29984
|
function lerp$5(a2, b, t2) {
|
|
29938
29985
|
if (isArray$1(a2)) {
|
|
@@ -30219,9 +30266,9 @@ class MathArray extends _extendableBuiltin(Array) {
|
|
|
30219
30266
|
divideScalar(a2) {
|
|
30220
30267
|
return this.multiplyByScalar(1 / a2);
|
|
30221
30268
|
}
|
|
30222
|
-
clampScalar(min,
|
|
30269
|
+
clampScalar(min, max2) {
|
|
30223
30270
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
30224
|
-
this[i2] = Math.min(Math.max(this[i2], min),
|
|
30271
|
+
this[i2] = Math.min(Math.max(this[i2], min), max2);
|
|
30225
30272
|
}
|
|
30226
30273
|
return this.check();
|
|
30227
30274
|
}
|
|
@@ -36354,8 +36401,8 @@ function mod$1(value, divisor) {
|
|
|
36354
36401
|
function lerp(start, end, step) {
|
|
36355
36402
|
return step * end + (1 - step) * start;
|
|
36356
36403
|
}
|
|
36357
|
-
function clamp$2(x2, min,
|
|
36358
|
-
return x2 < min ? min : x2 >
|
|
36404
|
+
function clamp$2(x2, min, max2) {
|
|
36405
|
+
return x2 < min ? min : x2 > max2 ? max2 : x2;
|
|
36359
36406
|
}
|
|
36360
36407
|
function ieLog2(x2) {
|
|
36361
36408
|
return Math.log(x2) * Math.LOG2E;
|
|
@@ -46076,17 +46123,17 @@ class DataColumn {
|
|
|
46076
46123
|
const len2 = numInstances * size;
|
|
46077
46124
|
if (value && len2 && value.length >= len2) {
|
|
46078
46125
|
const min = new Array(size).fill(Infinity);
|
|
46079
|
-
const
|
|
46126
|
+
const max2 = new Array(size).fill(-Infinity);
|
|
46080
46127
|
for (let i2 = 0; i2 < len2; ) {
|
|
46081
46128
|
for (let j = 0; j < size; j++) {
|
|
46082
46129
|
const v = value[i2++];
|
|
46083
46130
|
if (v < min[j])
|
|
46084
46131
|
min[j] = v;
|
|
46085
|
-
if (v >
|
|
46086
|
-
|
|
46132
|
+
if (v > max2[j])
|
|
46133
|
+
max2[j] = v;
|
|
46087
46134
|
}
|
|
46088
46135
|
}
|
|
46089
|
-
result = [min,
|
|
46136
|
+
result = [min, max2];
|
|
46090
46137
|
}
|
|
46091
46138
|
}
|
|
46092
46139
|
this.state.bounds = result;
|
|
@@ -72167,10 +72214,10 @@ class GroupNode extends ScenegraphNode {
|
|
|
72167
72214
|
if (!bounds2) {
|
|
72168
72215
|
return;
|
|
72169
72216
|
}
|
|
72170
|
-
const [min,
|
|
72171
|
-
const center2 = new Vector3(min).add(
|
|
72217
|
+
const [min, max2] = bounds2;
|
|
72218
|
+
const center2 = new Vector3(min).add(max2).divide([2, 2, 2]);
|
|
72172
72219
|
worldMatrix.transformAsPoint(center2, center2);
|
|
72173
|
-
const halfSize = new Vector3(
|
|
72220
|
+
const halfSize = new Vector3(max2).subtract(min).divide([2, 2, 2]);
|
|
72174
72221
|
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
72175
72222
|
for (let v = 0; v < 8; v++) {
|
|
72176
72223
|
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
@@ -81119,7 +81166,7 @@ class Tile {
|
|
|
81119
81166
|
const { errors } = this;
|
|
81120
81167
|
let numVertices = 0;
|
|
81121
81168
|
let numTriangles = 0;
|
|
81122
|
-
const
|
|
81169
|
+
const max2 = size - 1;
|
|
81123
81170
|
indices.fill(0);
|
|
81124
81171
|
function countElements(ax, ay, bx, by, cx, cy) {
|
|
81125
81172
|
const mx = ax + bx >> 1;
|
|
@@ -81134,8 +81181,8 @@ class Tile {
|
|
|
81134
81181
|
numTriangles++;
|
|
81135
81182
|
}
|
|
81136
81183
|
}
|
|
81137
|
-
countElements(0, 0,
|
|
81138
|
-
countElements(
|
|
81184
|
+
countElements(0, 0, max2, max2, max2, 0);
|
|
81185
|
+
countElements(max2, max2, 0, 0, 0, max2);
|
|
81139
81186
|
const vertices = new Uint16Array(numVertices * 2);
|
|
81140
81187
|
const triangles = new Uint32Array(numTriangles * 3);
|
|
81141
81188
|
let triIndex = 0;
|
|
@@ -81160,8 +81207,8 @@ class Tile {
|
|
|
81160
81207
|
triangles[triIndex++] = c2;
|
|
81161
81208
|
}
|
|
81162
81209
|
}
|
|
81163
|
-
processTriangle(0, 0,
|
|
81164
|
-
processTriangle(
|
|
81210
|
+
processTriangle(0, 0, max2, max2, max2, 0);
|
|
81211
|
+
processTriangle(max2, max2, 0, 0, 0, max2);
|
|
81165
81212
|
return { vertices, triangles };
|
|
81166
81213
|
}
|
|
81167
81214
|
}
|
|
@@ -121175,16 +121222,16 @@ function addDecoder(cases, importFn) {
|
|
|
121175
121222
|
}
|
|
121176
121223
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121177
121224
|
}
|
|
121178
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121179
|
-
addDecoder(5, () => import("./lzw-
|
|
121225
|
+
addDecoder([void 0, 1], () => import("./raw-dd940ebd.js").then((m2) => m2.default));
|
|
121226
|
+
addDecoder(5, () => import("./lzw-0fc42bf7.js").then((m2) => m2.default));
|
|
121180
121227
|
addDecoder(6, () => {
|
|
121181
121228
|
throw new Error("old style JPEG compression is not supported.");
|
|
121182
121229
|
});
|
|
121183
|
-
addDecoder(7, () => import("./jpeg-
|
|
121184
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121185
|
-
addDecoder(32773, () => import("./packbits-
|
|
121186
|
-
addDecoder(34887, () => import("./lerc-
|
|
121187
|
-
addDecoder(50001, () => import("./webimage-
|
|
121230
|
+
addDecoder(7, () => import("./jpeg-8db09338.js").then((m2) => m2.default));
|
|
121231
|
+
addDecoder([8, 32946], () => import("./deflate-77caba00.js").then((m2) => m2.default));
|
|
121232
|
+
addDecoder(32773, () => import("./packbits-25bf12f6.js").then((m2) => m2.default));
|
|
121233
|
+
addDecoder(34887, () => import("./lerc-e0aaacab.js").then((m2) => m2.default));
|
|
121234
|
+
addDecoder(50001, () => import("./webimage-3b65bcee.js").then((m2) => m2.default));
|
|
121188
121235
|
function decodeRowAcc(row, stride) {
|
|
121189
121236
|
let length2 = row.length - stride;
|
|
121190
121237
|
let offset5 = 0;
|
|
@@ -124733,9 +124780,9 @@ const buf2binstring = (buf, len2) => {
|
|
|
124733
124780
|
}
|
|
124734
124781
|
return result;
|
|
124735
124782
|
};
|
|
124736
|
-
var buf2string = (buf,
|
|
124783
|
+
var buf2string = (buf, max2) => {
|
|
124737
124784
|
let i2, out;
|
|
124738
|
-
const len2 =
|
|
124785
|
+
const len2 = max2 || buf.length;
|
|
124739
124786
|
const utf16buf = new Array(len2 * 2);
|
|
124740
124787
|
for (out = 0, i2 = 0; i2 < len2; ) {
|
|
124741
124788
|
let c2 = buf[i2++];
|
|
@@ -124768,22 +124815,22 @@ var buf2string = (buf, max) => {
|
|
|
124768
124815
|
}
|
|
124769
124816
|
return buf2binstring(utf16buf, out);
|
|
124770
124817
|
};
|
|
124771
|
-
var utf8border = (buf,
|
|
124772
|
-
|
|
124773
|
-
if (
|
|
124774
|
-
|
|
124818
|
+
var utf8border = (buf, max2) => {
|
|
124819
|
+
max2 = max2 || buf.length;
|
|
124820
|
+
if (max2 > buf.length) {
|
|
124821
|
+
max2 = buf.length;
|
|
124775
124822
|
}
|
|
124776
|
-
let pos =
|
|
124823
|
+
let pos = max2 - 1;
|
|
124777
124824
|
while (pos >= 0 && (buf[pos] & 192) === 128) {
|
|
124778
124825
|
pos--;
|
|
124779
124826
|
}
|
|
124780
124827
|
if (pos < 0) {
|
|
124781
|
-
return
|
|
124828
|
+
return max2;
|
|
124782
124829
|
}
|
|
124783
124830
|
if (pos === 0) {
|
|
124784
|
-
return
|
|
124831
|
+
return max2;
|
|
124785
124832
|
}
|
|
124786
|
-
return pos + _utf8len[buf[pos]] >
|
|
124833
|
+
return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
|
|
124787
124834
|
};
|
|
124788
124835
|
var strings = {
|
|
124789
124836
|
string2buf,
|
|
@@ -125333,7 +125380,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125333
125380
|
const bits = opts2.bits;
|
|
125334
125381
|
let len2 = 0;
|
|
125335
125382
|
let sym = 0;
|
|
125336
|
-
let min = 0,
|
|
125383
|
+
let min = 0, max2 = 0;
|
|
125337
125384
|
let root2 = 0;
|
|
125338
125385
|
let curr = 0;
|
|
125339
125386
|
let drop = 0;
|
|
@@ -125360,21 +125407,21 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125360
125407
|
count2[lens2[lens_index + sym]]++;
|
|
125361
125408
|
}
|
|
125362
125409
|
root2 = bits;
|
|
125363
|
-
for (
|
|
125364
|
-
if (count2[
|
|
125410
|
+
for (max2 = MAXBITS; max2 >= 1; max2--) {
|
|
125411
|
+
if (count2[max2] !== 0) {
|
|
125365
125412
|
break;
|
|
125366
125413
|
}
|
|
125367
125414
|
}
|
|
125368
|
-
if (root2 >
|
|
125369
|
-
root2 =
|
|
125415
|
+
if (root2 > max2) {
|
|
125416
|
+
root2 = max2;
|
|
125370
125417
|
}
|
|
125371
|
-
if (
|
|
125418
|
+
if (max2 === 0) {
|
|
125372
125419
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
125373
125420
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
125374
125421
|
opts2.bits = 1;
|
|
125375
125422
|
return 0;
|
|
125376
125423
|
}
|
|
125377
|
-
for (min = 1; min <
|
|
125424
|
+
for (min = 1; min < max2; min++) {
|
|
125378
125425
|
if (count2[min] !== 0) {
|
|
125379
125426
|
break;
|
|
125380
125427
|
}
|
|
@@ -125390,7 +125437,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125390
125437
|
return -1;
|
|
125391
125438
|
}
|
|
125392
125439
|
}
|
|
125393
|
-
if (left > 0 && (type === CODES ||
|
|
125440
|
+
if (left > 0 && (type === CODES || max2 !== 1)) {
|
|
125394
125441
|
return -1;
|
|
125395
125442
|
}
|
|
125396
125443
|
offs[1] = 0;
|
|
@@ -125459,7 +125506,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125459
125506
|
}
|
|
125460
125507
|
sym++;
|
|
125461
125508
|
if (--count2[len2] === 0) {
|
|
125462
|
-
if (len2 ===
|
|
125509
|
+
if (len2 === max2) {
|
|
125463
125510
|
break;
|
|
125464
125511
|
}
|
|
125465
125512
|
len2 = lens2[lens_index + work[sym]];
|
|
@@ -125471,7 +125518,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125471
125518
|
next += min;
|
|
125472
125519
|
curr = len2 - drop;
|
|
125473
125520
|
left = 1 << curr;
|
|
125474
|
-
while (curr + drop <
|
|
125521
|
+
while (curr + drop < max2) {
|
|
125475
125522
|
left -= count2[curr + drop];
|
|
125476
125523
|
if (left <= 0) {
|
|
125477
125524
|
break;
|
|
@@ -132205,21 +132252,21 @@ void main() {
|
|
|
132205
132252
|
}
|
|
132206
132253
|
`;
|
|
132207
132254
|
function normalize(arr) {
|
|
132208
|
-
const [min,
|
|
132209
|
-
const ratio = 255 / (
|
|
132255
|
+
const [min, max2] = extent$1(arr);
|
|
132256
|
+
const ratio = 255 / (max2 - min);
|
|
132210
132257
|
const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min) * ratio)));
|
|
132211
132258
|
return data;
|
|
132212
132259
|
}
|
|
132213
|
-
function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, texSize) {
|
|
132260
|
+
function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, texSize) {
|
|
132214
132261
|
let totalValuesLength = 0;
|
|
132215
132262
|
let totalColorsLength = 0;
|
|
132216
132263
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
132217
|
-
var _a2, _b, _c, _d
|
|
132264
|
+
var _a2, _b, _c, _d;
|
|
132218
132265
|
if (isSetColorMode) {
|
|
132219
|
-
|
|
132220
|
-
|
|
132266
|
+
totalColorsLength += (((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.setColors) == null ? void 0 : _b.length) || 0) * 3;
|
|
132267
|
+
totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
|
|
132221
132268
|
} else {
|
|
132222
|
-
totalValuesLength += ((
|
|
132269
|
+
totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
|
|
132223
132270
|
}
|
|
132224
132271
|
});
|
|
132225
132272
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
|
@@ -132237,12 +132284,20 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
132237
132284
|
let indexOffset = 0;
|
|
132238
132285
|
let colorOffset = 0;
|
|
132239
132286
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
132287
|
+
const matrixObsIndex = multiMatrixObsIndex[channelIndex];
|
|
132288
|
+
const bitmaskValueIsIndex = matrixObsIndex === null;
|
|
132240
132289
|
if (isSetColorMode) {
|
|
132241
132290
|
const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
|
|
132242
132291
|
if (setColorIndices && setColors && obsIndex) {
|
|
132243
132292
|
for (let i2 = 0; i2 < obsIndex.length; i2++) {
|
|
132244
|
-
|
|
132245
|
-
|
|
132293
|
+
let obsId = String(i2 + 1);
|
|
132294
|
+
let obsI = i2;
|
|
132295
|
+
if (!bitmaskValueIsIndex) {
|
|
132296
|
+
obsId = obsIndex[i2];
|
|
132297
|
+
obsI = parseInt(obsId) - 1;
|
|
132298
|
+
}
|
|
132299
|
+
const colorIndex = setColorIndices.get(obsId);
|
|
132300
|
+
totalData[indexOffset + obsI] = colorIndex === void 0 ? 0 : colorIndex + 1;
|
|
132246
132301
|
}
|
|
132247
132302
|
for (let i2 = 0; i2 < setColors.length; i2++) {
|
|
132248
132303
|
const { color: [r2, g2, b] } = setColors[i2];
|
|
@@ -132257,7 +132312,16 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
132257
132312
|
colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
|
|
132258
132313
|
} else {
|
|
132259
132314
|
const featureArr = multiFeatureValues[channelIndex];
|
|
132260
|
-
|
|
132315
|
+
const normalizedFeatureArr = normalize(featureArr);
|
|
132316
|
+
if (!bitmaskValueIsIndex && matrixObsIndex) {
|
|
132317
|
+
for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
|
|
132318
|
+
const obsId = matrixObsIndex[i2];
|
|
132319
|
+
const obsI = parseInt(obsId) - 1;
|
|
132320
|
+
totalData[indexOffset + obsI] = normalizedFeatureArr[i2];
|
|
132321
|
+
}
|
|
132322
|
+
} else {
|
|
132323
|
+
totalData.set(normalizedFeatureArr, indexOffset);
|
|
132324
|
+
}
|
|
132261
132325
|
indicesOffsets.push(indexOffset);
|
|
132262
132326
|
indexOffset += featureArr.length;
|
|
132263
132327
|
colorsOffsets.push(colorOffset);
|
|
@@ -132284,6 +132348,17 @@ function padWithDefault(arr, defaultValue2, padWidth) {
|
|
|
132284
132348
|
function getColor(arr) {
|
|
132285
132349
|
return arr ? arr.map((v) => v / 255) : [0, 0, 0];
|
|
132286
132350
|
}
|
|
132351
|
+
function isEqualShallow(prevArr, nextArr) {
|
|
132352
|
+
if (prevArr === nextArr) {
|
|
132353
|
+
return true;
|
|
132354
|
+
}
|
|
132355
|
+
if (Array.isArray(prevArr) && Array.isArray(nextArr)) {
|
|
132356
|
+
if (prevArr.length === nextArr.length) {
|
|
132357
|
+
return !prevArr.some((v, i2) => v !== nextArr[i2] && (!Array.isArray(v) && !Array.isArray(nextArr[i2]) || (v.length > 0 || nextArr[i2].length > 0)));
|
|
132358
|
+
}
|
|
132359
|
+
}
|
|
132360
|
+
return prevArr === nextArr;
|
|
132361
|
+
}
|
|
132287
132362
|
const defaultProps$1 = {
|
|
132288
132363
|
channelStrokeWidths: { type: "array", value: null, compare: true },
|
|
132289
132364
|
channelsFilled: { type: "array", value: null, compare: true },
|
|
@@ -132293,6 +132368,7 @@ const defaultProps$1 = {
|
|
|
132293
132368
|
colormap: { type: "string", value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
132294
132369
|
expressionData: { type: "object", value: null, compare: true },
|
|
132295
132370
|
multiFeatureValues: { type: "array", value: null, compare: true },
|
|
132371
|
+
multiMatrixObsIndex: { type: "array", value: null, compare: true },
|
|
132296
132372
|
setColorValues: { type: "array", value: null, compare: true },
|
|
132297
132373
|
channelFeatureValueColormaps: { type: "array", value: null, compare: true },
|
|
132298
132374
|
channelFeatureValueColormapRanges: { type: "array", value: null, compare: true },
|
|
@@ -132339,9 +132415,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
132339
132415
|
}
|
|
132340
132416
|
updateState({ props: props2, oldProps, changeFlags }) {
|
|
132341
132417
|
super.updateState({ props: props2, oldProps, changeFlags });
|
|
132342
|
-
if (props2.multiFeatureValues
|
|
132343
|
-
const { multiFeatureValues, setColorValues, channelIsSetColorMode } = this.props;
|
|
132344
|
-
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode);
|
|
132418
|
+
if (!isEqualShallow(props2.multiFeatureValues, oldProps.multiFeatureValues) || !isEqualShallow(props2.multiMatrixObsIndex, oldProps.multiMatrixObsIndex) || !isEqualShallow(props2.setColorValues, oldProps.setColorValues) || !isEqualShallow(props2.channelIsSetColorMode, oldProps.channelIsSetColorMode)) {
|
|
132419
|
+
const { multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode } = this.props;
|
|
132420
|
+
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode);
|
|
132345
132421
|
this.setState({
|
|
132346
132422
|
valueTex,
|
|
132347
132423
|
colorTex,
|
|
@@ -132493,9 +132569,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
132493
132569
|
type: GL$1.FLOAT
|
|
132494
132570
|
});
|
|
132495
132571
|
}
|
|
132496
|
-
multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode) {
|
|
132572
|
+
multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode) {
|
|
132497
132573
|
const isWebGL2On = isWebGL2$1(this.context.gl);
|
|
132498
|
-
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
132574
|
+
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
132499
132575
|
return [
|
|
132500
132576
|
// Color indices texture
|
|
132501
132577
|
new Texture2D(this.context.gl, {
|
|
@@ -133770,13 +133846,13 @@ var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
|
133770
133846
|
const refType$1 = refType;
|
|
133771
133847
|
function clamp$1(value) {
|
|
133772
133848
|
var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
133773
|
-
var
|
|
133849
|
+
var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
133774
133850
|
{
|
|
133775
|
-
if (value < min || value >
|
|
133776
|
-
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(
|
|
133851
|
+
if (value < min || value > max2) {
|
|
133852
|
+
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max2, "]."));
|
|
133777
133853
|
}
|
|
133778
133854
|
}
|
|
133779
|
-
return Math.min(Math.max(min, value),
|
|
133855
|
+
return Math.min(Math.max(min, value), max2);
|
|
133780
133856
|
}
|
|
133781
133857
|
function hexToRgb(color) {
|
|
133782
133858
|
color = color.substr(1);
|
|
@@ -146750,8 +146826,8 @@ const ValueLabel$1 = withStyles2(styles$5, {
|
|
|
146750
146826
|
function asc(a2, b) {
|
|
146751
146827
|
return a2 - b;
|
|
146752
146828
|
}
|
|
146753
|
-
function clamp(value, min,
|
|
146754
|
-
return Math.min(Math.max(min, value),
|
|
146829
|
+
function clamp(value, min, max2) {
|
|
146830
|
+
return Math.min(Math.max(min, value), max2);
|
|
146755
146831
|
}
|
|
146756
146832
|
function findClosest(values2, currentValue) {
|
|
146757
146833
|
var _values$reduce = values2.reduce(function(acc, value, index2) {
|
|
@@ -146784,11 +146860,11 @@ function trackFinger(event, touchId) {
|
|
|
146784
146860
|
y: event.clientY
|
|
146785
146861
|
};
|
|
146786
146862
|
}
|
|
146787
|
-
function valueToPercent(value, min,
|
|
146788
|
-
return (value - min) * 100 / (
|
|
146863
|
+
function valueToPercent(value, min, max2) {
|
|
146864
|
+
return (value - min) * 100 / (max2 - min);
|
|
146789
146865
|
}
|
|
146790
|
-
function percentToValue(percent2, min,
|
|
146791
|
-
return (
|
|
146866
|
+
function percentToValue(percent2, min, max2) {
|
|
146867
|
+
return (max2 - min) * percent2 + min;
|
|
146792
146868
|
}
|
|
146793
146869
|
function getDecimalPrecision(num) {
|
|
146794
146870
|
if (Math.abs(num) < 1) {
|
|
@@ -147076,7 +147152,7 @@ var styles$4 = function styles17(theme) {
|
|
|
147076
147152
|
};
|
|
147077
147153
|
};
|
|
147078
147154
|
var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
147079
|
-
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max,
|
|
147155
|
+
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max, max2 = _props$max === void 0 ? 100 : _props$max, _props$min = props2.min, min = _props$min === void 0 ? 0 : _props$min, name2 = props2.name, onChange = props2.onChange, onChangeCommitted = props2.onChangeCommitted, onMouseDown = props2.onMouseDown, _props$orientation = props2.orientation, orientation = _props$orientation === void 0 ? "horizontal" : _props$orientation, _props$scale = props2.scale, scale2 = _props$scale === void 0 ? Identity : _props$scale, _props$step = props2.step, step = _props$step === void 0 ? 1 : _props$step, _props$ThumbComponent = props2.ThumbComponent, ThumbComponent = _props$ThumbComponent === void 0 ? "span" : _props$ThumbComponent, _props$track = props2.track, track = _props$track === void 0 ? "normal" : _props$track, valueProp = props2.value, _props$ValueLabelComp = props2.ValueLabelComponent, ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel$1 : _props$ValueLabelComp, _props$valueLabelDisp = props2.valueLabelDisplay, valueLabelDisplay = _props$valueLabelDisp === void 0 ? "off" : _props$valueLabelDisp, _props$valueLabelForm = props2.valueLabelFormat, valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, other = _objectWithoutProperties(props2, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
|
|
147080
147156
|
var theme = useTheme();
|
|
147081
147157
|
var touchId = React.useRef();
|
|
147082
147158
|
var _React$useState = React.useState(-1), active = _React$useState[0], setActive = _React$useState[1];
|
|
@@ -147089,9 +147165,9 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147089
147165
|
var range2 = Array.isArray(valueDerived);
|
|
147090
147166
|
var values2 = range2 ? valueDerived.slice().sort(asc) : [valueDerived];
|
|
147091
147167
|
values2 = values2.map(function(value) {
|
|
147092
|
-
return clamp(value, min,
|
|
147168
|
+
return clamp(value, min, max2);
|
|
147093
147169
|
});
|
|
147094
|
-
var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((
|
|
147170
|
+
var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((max2 - min) / step) + 1)).map(function(_, index2) {
|
|
147095
147171
|
return {
|
|
147096
147172
|
value: min + step * index2
|
|
147097
147173
|
};
|
|
@@ -147126,7 +147202,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147126
147202
|
var handleKeyDown2 = useEventCallback(function(event) {
|
|
147127
147203
|
var index2 = Number(event.currentTarget.getAttribute("data-index"));
|
|
147128
147204
|
var value = values2[index2];
|
|
147129
|
-
var tenPercents = (
|
|
147205
|
+
var tenPercents = (max2 - min) / 10;
|
|
147130
147206
|
var marksValues = marks.map(function(mark) {
|
|
147131
147207
|
return mark.value;
|
|
147132
147208
|
});
|
|
@@ -147139,7 +147215,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147139
147215
|
newValue = min;
|
|
147140
147216
|
break;
|
|
147141
147217
|
case "End":
|
|
147142
|
-
newValue =
|
|
147218
|
+
newValue = max2;
|
|
147143
147219
|
break;
|
|
147144
147220
|
case "PageUp":
|
|
147145
147221
|
if (step) {
|
|
@@ -147174,7 +147250,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147174
147250
|
if (step) {
|
|
147175
147251
|
newValue = roundValueToStep(newValue, step, min);
|
|
147176
147252
|
}
|
|
147177
|
-
newValue = clamp(newValue, min,
|
|
147253
|
+
newValue = clamp(newValue, min, max2);
|
|
147178
147254
|
if (range2) {
|
|
147179
147255
|
var previousValue = newValue;
|
|
147180
147256
|
newValue = setValueIndex({
|
|
@@ -147216,7 +147292,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147216
147292
|
percent2 = 1 - percent2;
|
|
147217
147293
|
}
|
|
147218
147294
|
var newValue;
|
|
147219
|
-
newValue = percentToValue(percent2, min,
|
|
147295
|
+
newValue = percentToValue(percent2, min, max2);
|
|
147220
147296
|
if (step) {
|
|
147221
147297
|
newValue = roundValueToStep(newValue, step, min);
|
|
147222
147298
|
} else {
|
|
@@ -147226,7 +147302,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147226
147302
|
var closestIndex = findClosest(marksValues, newValue);
|
|
147227
147303
|
newValue = marksValues[closestIndex];
|
|
147228
147304
|
}
|
|
147229
|
-
newValue = clamp(newValue, min,
|
|
147305
|
+
newValue = clamp(newValue, min, max2);
|
|
147230
147306
|
var activeIndex = 0;
|
|
147231
147307
|
if (range2) {
|
|
147232
147308
|
if (!move) {
|
|
@@ -147355,8 +147431,8 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147355
147431
|
doc.addEventListener("mousemove", handleTouchMove);
|
|
147356
147432
|
doc.addEventListener("mouseup", handleTouchEnd);
|
|
147357
147433
|
});
|
|
147358
|
-
var trackOffset = valueToPercent(range2 ? values2[0] : min, min,
|
|
147359
|
-
var trackLeap = valueToPercent(values2[values2.length - 1], min,
|
|
147434
|
+
var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max2);
|
|
147435
|
+
var trackLeap = valueToPercent(values2[values2.length - 1], min, max2) - trackOffset;
|
|
147360
147436
|
var trackStyle = _extends$1({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));
|
|
147361
147437
|
return /* @__PURE__ */ React.createElement(Component2, _extends$1({
|
|
147362
147438
|
ref: handleRef,
|
|
@@ -147374,7 +147450,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147374
147450
|
name: name2,
|
|
147375
147451
|
type: "hidden"
|
|
147376
147452
|
}), marks.map(function(mark, index2) {
|
|
147377
|
-
var percent2 = valueToPercent(mark.value, min,
|
|
147453
|
+
var percent2 = valueToPercent(mark.value, min, max2);
|
|
147378
147454
|
var style = axisProps[axis].offset(percent2);
|
|
147379
147455
|
var markActive;
|
|
147380
147456
|
if (track === false) {
|
|
@@ -147395,7 +147471,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147395
147471
|
className: clsx(classes.markLabel, markActive && classes.markLabelActive)
|
|
147396
147472
|
}, mark.label) : null);
|
|
147397
147473
|
}), values2.map(function(value, index2) {
|
|
147398
|
-
var percent2 = valueToPercent(value, min,
|
|
147474
|
+
var percent2 = valueToPercent(value, min, max2);
|
|
147399
147475
|
var style = axisProps[axis].offset(percent2);
|
|
147400
147476
|
return /* @__PURE__ */ React.createElement(ValueLabelComponent, {
|
|
147401
147477
|
key: index2,
|
|
@@ -147415,7 +147491,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147415
147491
|
"aria-label": getAriaLabel ? getAriaLabel(index2) : ariaLabel,
|
|
147416
147492
|
"aria-labelledby": ariaLabelledby,
|
|
147417
147493
|
"aria-orientation": orientation,
|
|
147418
|
-
"aria-valuemax": scale2(
|
|
147494
|
+
"aria-valuemax": scale2(max2),
|
|
147419
147495
|
"aria-valuemin": scale2(min),
|
|
147420
147496
|
"aria-valuenow": scale2(value),
|
|
147421
147497
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale2(value), index2) : ariaValuetext,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-46421b0b.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/utils": "3.3.
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/constants-internal": "3.3.3",
|
|
24
|
+
"@vitessce/sets-utils": "3.3.3",
|
|
25
|
+
"@vitessce/utils": "3.3.3",
|
|
26
|
+
"@vitessce/scatterplot": "3.3.3",
|
|
27
|
+
"@vitessce/vit-s": "3.3.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|