@vitessce/json 3.5.7 → 3.5.8
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-e49cbccb.js → deflate-3d6b2462.js} +1 -1
- package/dist/{index-efd42ba9.js → index-df48af39.js} +824 -870
- package/dist/index.js +1 -1
- package/dist/{jpeg-3d7c28a2.js → jpeg-c498508c.js} +1 -1
- package/dist/{lerc-1440114b.js → lerc-5613fd3d.js} +1 -1
- package/dist/{lzw-df413c46.js → lzw-40a46f03.js} +1 -1
- package/dist/{packbits-b9360a21.js → packbits-86cc820a.js} +1 -1
- package/dist/{raw-216dbf06.js → raw-8900d89e.js} +1 -1
- package/dist/{webimage-a9f9d4aa.js → webimage-9dcbbafd.js} +1 -1
- package/dist/zstd-561fda0e.js +778 -0
- package/package.json +12 -12
- package/dist/zstd-ec5a40b8.js +0 -808
|
@@ -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, _stride, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _order, _inverseOrder, _shape2, _strides, _metadata, _metadata2, _a2, _b, _overrides, _use_suffix_request, _merge_init, merge_init_fn, _overrides2, _refs, _opts, _overrides3;
|
|
30
30
|
import "react";
|
|
31
31
|
function _mergeNamespaces(n3, m) {
|
|
32
32
|
for (var i2 = 0; i2 < m.length; i2++) {
|
|
@@ -388,6 +388,11 @@ var loglevel = { exports: {} };
|
|
|
388
388
|
})(loglevel);
|
|
389
389
|
var loglevelExports = loglevel.exports;
|
|
390
390
|
const log$6 = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
|
|
391
|
+
const DEFAULT_DEBUG_MODE = false;
|
|
392
|
+
let GLOBAL_DEBUG_MODE = DEFAULT_DEBUG_MODE;
|
|
393
|
+
function getDebugMode() {
|
|
394
|
+
return GLOBAL_DEBUG_MODE;
|
|
395
|
+
}
|
|
391
396
|
class LoaderValidationError extends AbstractLoaderError {
|
|
392
397
|
constructor(datasetType, datasetFileType, datasetUrl, reason) {
|
|
393
398
|
super(`Error while validating ${datasetType}.`);
|
|
@@ -451,8 +456,13 @@ const ViewType$1 = {
|
|
|
451
456
|
FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
|
|
452
457
|
DOT_PLOT: "dotPlot",
|
|
453
458
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
459
|
+
VOLCANO_PLOT: "volcanoPlot",
|
|
460
|
+
OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
|
|
461
|
+
FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
|
|
454
462
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
463
|
+
COMPARATIVE_HEADING: "comparativeHeading",
|
|
455
464
|
LINK_CONTROLLER: "linkController",
|
|
465
|
+
NEUROGLANCER: "neuroglancer",
|
|
456
466
|
DUAL_SCATTERPLOT: "dualScatterplot",
|
|
457
467
|
TREEMAP: "treemap"
|
|
458
468
|
};
|
|
@@ -470,7 +480,11 @@ const DataType$2 = {
|
|
|
470
480
|
OBS_POINTS: "obsPoints",
|
|
471
481
|
OBS_LOCATIONS: "obsLocations",
|
|
472
482
|
SAMPLE_SETS: "sampleSets",
|
|
473
|
-
SAMPLE_EDGES: "sampleEdges"
|
|
483
|
+
SAMPLE_EDGES: "sampleEdges",
|
|
484
|
+
COMPARISON_METADATA: "comparisonMetadata",
|
|
485
|
+
FEATURE_STATS: "featureStats",
|
|
486
|
+
FEATURE_SET_STATS: "featureSetStats",
|
|
487
|
+
OBS_SET_STATS: "obsSetStats"
|
|
474
488
|
};
|
|
475
489
|
const FileType$1 = {
|
|
476
490
|
// Joint file types
|
|
@@ -509,6 +523,10 @@ const FileType$1 = {
|
|
|
509
523
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
510
524
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
|
511
525
|
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
|
526
|
+
COMPARISON_METADATA_ANNDATA_ZARR: "comparisonMetadata.anndata.zarr",
|
|
527
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR: "comparativeFeatureStats.anndata.zarr",
|
|
528
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR: "comparativeFeatureSetStats.anndata.zarr",
|
|
529
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR: "comparativeObsSetStats.anndata.zarr",
|
|
512
530
|
// AnnData - zipped
|
|
513
531
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
|
514
532
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
|
@@ -522,6 +540,10 @@ const FileType$1 = {
|
|
|
522
540
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
523
541
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
524
542
|
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
|
543
|
+
COMPARISON_METADATA_ANNDATA_ZARR_ZIP: "comparisonMetadata.anndata.zarr.zip",
|
|
544
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureStats.anndata.zarr.zip",
|
|
545
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureSetStats.anndata.zarr.zip",
|
|
546
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeObsSetStats.anndata.zarr.zip",
|
|
525
547
|
// AnnData - h5ad via reference spec
|
|
526
548
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
527
549
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
@@ -535,6 +557,10 @@ const FileType$1 = {
|
|
|
535
557
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
536
558
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
537
559
|
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
|
560
|
+
COMPARISON_METADATA_ANNDATA_H5AD: "comparisonMetadata.anndata.h5ad",
|
|
561
|
+
COMPARATIVE_FEATURE_STATS_ANNDATA_H5AD: "comparativeFeatureStats.anndata.h5ad",
|
|
562
|
+
COMPARATIVE_FEATURE_SET_STATS_ANNDATA_H5AD: "comparativeFeatureSetStats.anndata.h5ad",
|
|
563
|
+
COMPARATIVE_OBS_SET_STATS_ANNDATA_H5AD: "comparativeObsSetStats.anndata.h5ad",
|
|
538
564
|
// SpatialData
|
|
539
565
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
540
566
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -733,6 +759,11 @@ const CoordinationType$1 = {
|
|
|
733
759
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
734
760
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
735
761
|
CONTOUR_COLOR: "contourColor",
|
|
762
|
+
// For volcano plot:
|
|
763
|
+
FEATURE_POINT_SIGNIFICANCE_THRESHOLD: "featurePointSignificanceThreshold",
|
|
764
|
+
FEATURE_LABEL_SIGNIFICANCE_THRESHOLD: "featureLabelSignificanceThreshold",
|
|
765
|
+
FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
|
|
766
|
+
FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
|
|
736
767
|
// Treemap
|
|
737
768
|
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
738
769
|
};
|
|
@@ -4840,7 +4871,7 @@ var reTrimStart = /^\s+/;
|
|
|
4840
4871
|
function baseTrim(string) {
|
|
4841
4872
|
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
4842
4873
|
}
|
|
4843
|
-
function isObject$
|
|
4874
|
+
function isObject$6(value) {
|
|
4844
4875
|
var type2 = typeof value;
|
|
4845
4876
|
return value != null && (type2 == "object" || type2 == "function");
|
|
4846
4877
|
}
|
|
@@ -4856,9 +4887,9 @@ function toNumber$1(value) {
|
|
|
4856
4887
|
if (isSymbol$1(value)) {
|
|
4857
4888
|
return NAN$1;
|
|
4858
4889
|
}
|
|
4859
|
-
if (isObject$
|
|
4890
|
+
if (isObject$6(value)) {
|
|
4860
4891
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
4861
|
-
value = isObject$
|
|
4892
|
+
value = isObject$6(other) ? other + "" : other;
|
|
4862
4893
|
}
|
|
4863
4894
|
if (typeof value != "string") {
|
|
4864
4895
|
return value === 0 ? value : +value;
|
|
@@ -4883,8 +4914,8 @@ function identity$6(value) {
|
|
|
4883
4914
|
return value;
|
|
4884
4915
|
}
|
|
4885
4916
|
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
4886
|
-
function isFunction$
|
|
4887
|
-
if (!isObject$
|
|
4917
|
+
function isFunction$4(value) {
|
|
4918
|
+
if (!isObject$6(value)) {
|
|
4888
4919
|
return false;
|
|
4889
4920
|
}
|
|
4890
4921
|
var tag2 = baseGetTag(value);
|
|
@@ -4923,10 +4954,10 @@ var reIsNative = RegExp(
|
|
|
4923
4954
|
"^" + funcToString.call(hasOwnProperty$d).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
4924
4955
|
);
|
|
4925
4956
|
function baseIsNative(value) {
|
|
4926
|
-
if (!isObject$
|
|
4957
|
+
if (!isObject$6(value) || isMasked(value)) {
|
|
4927
4958
|
return false;
|
|
4928
4959
|
}
|
|
4929
|
-
var pattern = isFunction$
|
|
4960
|
+
var pattern = isFunction$4(value) ? reIsNative : reIsHostCtor;
|
|
4930
4961
|
return pattern.test(toSource(value));
|
|
4931
4962
|
}
|
|
4932
4963
|
function getValue$1(object2, key) {
|
|
@@ -4943,7 +4974,7 @@ var baseCreate = function() {
|
|
|
4943
4974
|
function object2() {
|
|
4944
4975
|
}
|
|
4945
4976
|
return function(proto) {
|
|
4946
|
-
if (!isObject$
|
|
4977
|
+
if (!isObject$6(proto)) {
|
|
4947
4978
|
return {};
|
|
4948
4979
|
}
|
|
4949
4980
|
if (objectCreate) {
|
|
@@ -5035,10 +5066,10 @@ function isLength(value) {
|
|
|
5035
5066
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$3;
|
|
5036
5067
|
}
|
|
5037
5068
|
function isArrayLike(value) {
|
|
5038
|
-
return value != null && isLength(value.length) && !isFunction$
|
|
5069
|
+
return value != null && isLength(value.length) && !isFunction$4(value);
|
|
5039
5070
|
}
|
|
5040
5071
|
function isIterateeCall(value, index2, object2) {
|
|
5041
|
-
if (!isObject$
|
|
5072
|
+
if (!isObject$6(object2)) {
|
|
5042
5073
|
return false;
|
|
5043
5074
|
}
|
|
5044
5075
|
var type2 = typeof index2;
|
|
@@ -5164,7 +5195,7 @@ function nativeKeysIn(object2) {
|
|
|
5164
5195
|
var objectProto$7 = Object.prototype;
|
|
5165
5196
|
var hasOwnProperty$8 = objectProto$7.hasOwnProperty;
|
|
5166
5197
|
function baseKeysIn(object2) {
|
|
5167
|
-
if (!isObject$
|
|
5198
|
+
if (!isObject$6(object2)) {
|
|
5168
5199
|
return nativeKeysIn(object2);
|
|
5169
5200
|
}
|
|
5170
5201
|
var isProto = isPrototype(object2), result = [];
|
|
@@ -5584,7 +5615,7 @@ function baseClone(value, bitmask, customizer, key, object2, stack2) {
|
|
|
5584
5615
|
if (result !== void 0) {
|
|
5585
5616
|
return result;
|
|
5586
5617
|
}
|
|
5587
|
-
if (!isObject$
|
|
5618
|
+
if (!isObject$6(value)) {
|
|
5588
5619
|
return value;
|
|
5589
5620
|
}
|
|
5590
5621
|
var isArr = isArray$5(value);
|
|
@@ -6869,9 +6900,9 @@ var debug_1 = debug$2;
|
|
|
6869
6900
|
const re2 = exports2.re = [];
|
|
6870
6901
|
const src = exports2.src = [];
|
|
6871
6902
|
const t2 = exports2.t = {};
|
|
6872
|
-
let
|
|
6903
|
+
let R = 0;
|
|
6873
6904
|
const createToken = (name2, value, isGlobal) => {
|
|
6874
|
-
const index2 =
|
|
6905
|
+
const index2 = R++;
|
|
6875
6906
|
debug2(name2, index2, value);
|
|
6876
6907
|
t2[name2] = index2;
|
|
6877
6908
|
src[index2] = value;
|
|
@@ -9197,6 +9228,42 @@ const annDataConvenienceObsEmbeddingItem = z.object({
|
|
|
9197
9228
|
dims: z.array(z.number()).optional(),
|
|
9198
9229
|
embeddingType: z.string()
|
|
9199
9230
|
});
|
|
9231
|
+
z.object({
|
|
9232
|
+
path: z.string().describe("Path to the comparison metadata, such as /uns/comparison_metadata")
|
|
9233
|
+
});
|
|
9234
|
+
z.object({
|
|
9235
|
+
// TODO: implement a featureStats.anndata.zarr loader
|
|
9236
|
+
// which does not depend on comparisonMetadata
|
|
9237
|
+
// (instead, would point directly to the root of
|
|
9238
|
+
// the dataframe containing a set of diff exp results)
|
|
9239
|
+
// path: z.string().describe('Path to the dataframe containing the results.'),
|
|
9240
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9241
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the feature index, if different than the default dataframe index."),
|
|
9242
|
+
pValueColumn: z.string(),
|
|
9243
|
+
foldChangeColumn: z.string(),
|
|
9244
|
+
pValueTransformation: z.enum(["minuslog10"]).optional(),
|
|
9245
|
+
pValueAdjusted: z.boolean().optional(),
|
|
9246
|
+
foldChangeTransformation: z.enum(["log2"]).optional()
|
|
9247
|
+
});
|
|
9248
|
+
z.object({
|
|
9249
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9250
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the feature set index, if different than the default dataframe index."),
|
|
9251
|
+
termColumn: z.string().optional(),
|
|
9252
|
+
pValueColumn: z.string(),
|
|
9253
|
+
pValueAdjusted: z.boolean().optional(),
|
|
9254
|
+
analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, pertpy_hypergeometric.")
|
|
9255
|
+
});
|
|
9256
|
+
z.object({
|
|
9257
|
+
metadataPath: z.string().describe("Path to the comparison metadata."),
|
|
9258
|
+
indexColumn: z.string().optional().describe("Provide a column to use for the obs set index, if different than the default dataframe index."),
|
|
9259
|
+
interceptExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
|
|
9260
|
+
effectExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
|
|
9261
|
+
foldChangeColumn: z.string().describe("The log-fold change is then calculated between this expected sample and the expected sample with no active covariates from the intercept section."),
|
|
9262
|
+
foldChangeTransformation: z.enum(["log2"]).optional(),
|
|
9263
|
+
isCredibleEffectColumn: z.string().describe("Column which annotates effects as being credible or not (boolean)."),
|
|
9264
|
+
covariateColumn: z.string().describe("Column which defines the covariate used in the analysis."),
|
|
9265
|
+
analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, sccoda_df.")
|
|
9266
|
+
});
|
|
9200
9267
|
const annDataObsLabels = annDataObs;
|
|
9201
9268
|
const annDataFeatureLabels = annDataObs;
|
|
9202
9269
|
const annDataSampleEdges = annDataObs;
|
|
@@ -9699,7 +9766,7 @@ function point(coordinates2, properties, options) {
|
|
|
9699
9766
|
if (coordinates2.length < 2) {
|
|
9700
9767
|
throw new Error("coordinates must be at least 2 numbers long");
|
|
9701
9768
|
}
|
|
9702
|
-
if (!isNumber$
|
|
9769
|
+
if (!isNumber$2(coordinates2[0]) || !isNumber$2(coordinates2[1])) {
|
|
9703
9770
|
throw new Error("coordinates must contain numbers");
|
|
9704
9771
|
}
|
|
9705
9772
|
var geom = {
|
|
@@ -9900,10 +9967,10 @@ function convertArea(area2, originalUnit, finalUnit) {
|
|
|
9900
9967
|
}
|
|
9901
9968
|
return area2 / startFactor * finalFactor;
|
|
9902
9969
|
}
|
|
9903
|
-
function isNumber$
|
|
9970
|
+
function isNumber$2(num) {
|
|
9904
9971
|
return !isNaN(num) && num !== null && !Array.isArray(num);
|
|
9905
9972
|
}
|
|
9906
|
-
function isObject$
|
|
9973
|
+
function isObject$5(input) {
|
|
9907
9974
|
return !!input && input.constructor === Object;
|
|
9908
9975
|
}
|
|
9909
9976
|
function validateBBox(bbox2) {
|
|
@@ -9917,7 +9984,7 @@ function validateBBox(bbox2) {
|
|
|
9917
9984
|
throw new Error("bbox must be an Array of 4 or 6 numbers");
|
|
9918
9985
|
}
|
|
9919
9986
|
bbox2.forEach(function(num) {
|
|
9920
|
-
if (!isNumber$
|
|
9987
|
+
if (!isNumber$2(num)) {
|
|
9921
9988
|
throw new Error("bbox must only contain numbers");
|
|
9922
9989
|
}
|
|
9923
9990
|
});
|
|
@@ -9943,8 +10010,8 @@ const es$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
9943
10010
|
featureCollection: featureCollection$1,
|
|
9944
10011
|
geometry: geometry$1,
|
|
9945
10012
|
geometryCollection,
|
|
9946
|
-
isNumber: isNumber$
|
|
9947
|
-
isObject: isObject$
|
|
10013
|
+
isNumber: isNumber$2,
|
|
10014
|
+
isObject: isObject$5,
|
|
9948
10015
|
lengthToDegrees,
|
|
9949
10016
|
lengthToRadians,
|
|
9950
10017
|
lineString,
|
|
@@ -10386,7 +10453,7 @@ function lineReduce$1(geojson, callback, initialValue) {
|
|
|
10386
10453
|
}
|
|
10387
10454
|
function findSegment$1(geojson, options) {
|
|
10388
10455
|
options = options || {};
|
|
10389
|
-
if (!isObject$
|
|
10456
|
+
if (!isObject$5(options))
|
|
10390
10457
|
throw new Error("options is invalid");
|
|
10391
10458
|
var featureIndex = options.featureIndex || 0;
|
|
10392
10459
|
var multiFeatureIndex = options.multiFeatureIndex || 0;
|
|
@@ -10478,7 +10545,7 @@ function findSegment$1(geojson, options) {
|
|
|
10478
10545
|
}
|
|
10479
10546
|
function findPoint$1(geojson, options) {
|
|
10480
10547
|
options = options || {};
|
|
10481
|
-
if (!isObject$
|
|
10548
|
+
if (!isObject$5(options))
|
|
10482
10549
|
throw new Error("options is invalid");
|
|
10483
10550
|
var featureIndex = options.featureIndex || 0;
|
|
10484
10551
|
var multiFeatureIndex = options.multiFeatureIndex || 0;
|
|
@@ -11336,14 +11403,14 @@ var tinycolor = { exports: {} };
|
|
|
11336
11403
|
},
|
|
11337
11404
|
getLuminance: function() {
|
|
11338
11405
|
var rgb = this.toRgb();
|
|
11339
|
-
var RsRGB, GsRGB, BsRGB,
|
|
11406
|
+
var RsRGB, GsRGB, BsRGB, R, G2, B2;
|
|
11340
11407
|
RsRGB = rgb.r / 255;
|
|
11341
11408
|
GsRGB = rgb.g / 255;
|
|
11342
11409
|
BsRGB = rgb.b / 255;
|
|
11343
11410
|
if (RsRGB <= 0.03928) {
|
|
11344
|
-
|
|
11411
|
+
R = RsRGB / 12.92;
|
|
11345
11412
|
} else {
|
|
11346
|
-
|
|
11413
|
+
R = Math2.pow((RsRGB + 0.055) / 1.055, 2.4);
|
|
11347
11414
|
}
|
|
11348
11415
|
if (GsRGB <= 0.03928) {
|
|
11349
11416
|
G2 = GsRGB / 12.92;
|
|
@@ -11355,7 +11422,7 @@ var tinycolor = { exports: {} };
|
|
|
11355
11422
|
} else {
|
|
11356
11423
|
B2 = Math2.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
11357
11424
|
}
|
|
11358
|
-
return 0.2126 *
|
|
11425
|
+
return 0.2126 * R + 0.7152 * G2 + 0.0722 * B2;
|
|
11359
11426
|
},
|
|
11360
11427
|
setAlpha: function(value) {
|
|
11361
11428
|
this._a = boundAlpha(value);
|
|
@@ -12327,7 +12394,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12327
12394
|
}
|
|
12328
12395
|
this._maxListeners = this._maxListeners || void 0;
|
|
12329
12396
|
};
|
|
12330
|
-
EventEmitter2.prototype.setMaxListeners = function
|
|
12397
|
+
EventEmitter2.prototype.setMaxListeners = function setMaxListeners(n3) {
|
|
12331
12398
|
if (typeof n3 !== "number" || n3 < 0 || isNaN(n3))
|
|
12332
12399
|
throw new TypeError('"n" argument must be a positive number');
|
|
12333
12400
|
this._maxListeners = n3;
|
|
@@ -12338,7 +12405,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12338
12405
|
return EventEmitter2.defaultMaxListeners;
|
|
12339
12406
|
return that._maxListeners;
|
|
12340
12407
|
}
|
|
12341
|
-
EventEmitter2.prototype.getMaxListeners = function
|
|
12408
|
+
EventEmitter2.prototype.getMaxListeners = function getMaxListeners() {
|
|
12342
12409
|
return $getMaxListeners(this);
|
|
12343
12410
|
};
|
|
12344
12411
|
function emitNone(handler, isFn, self2) {
|
|
@@ -12346,9 +12413,9 @@ var json2csv_umd = { exports: {} };
|
|
|
12346
12413
|
handler.call(self2);
|
|
12347
12414
|
else {
|
|
12348
12415
|
var len2 = handler.length;
|
|
12349
|
-
var
|
|
12416
|
+
var listeners = arrayClone(handler, len2);
|
|
12350
12417
|
for (var i2 = 0; i2 < len2; ++i2)
|
|
12351
|
-
|
|
12418
|
+
listeners[i2].call(self2);
|
|
12352
12419
|
}
|
|
12353
12420
|
}
|
|
12354
12421
|
function emitOne(handler, isFn, self2, arg1) {
|
|
@@ -12356,9 +12423,9 @@ var json2csv_umd = { exports: {} };
|
|
|
12356
12423
|
handler.call(self2, arg1);
|
|
12357
12424
|
else {
|
|
12358
12425
|
var len2 = handler.length;
|
|
12359
|
-
var
|
|
12426
|
+
var listeners = arrayClone(handler, len2);
|
|
12360
12427
|
for (var i2 = 0; i2 < len2; ++i2)
|
|
12361
|
-
|
|
12428
|
+
listeners[i2].call(self2, arg1);
|
|
12362
12429
|
}
|
|
12363
12430
|
}
|
|
12364
12431
|
function emitTwo(handler, isFn, self2, arg1, arg2) {
|
|
@@ -12366,9 +12433,9 @@ var json2csv_umd = { exports: {} };
|
|
|
12366
12433
|
handler.call(self2, arg1, arg2);
|
|
12367
12434
|
else {
|
|
12368
12435
|
var len2 = handler.length;
|
|
12369
|
-
var
|
|
12436
|
+
var listeners = arrayClone(handler, len2);
|
|
12370
12437
|
for (var i2 = 0; i2 < len2; ++i2)
|
|
12371
|
-
|
|
12438
|
+
listeners[i2].call(self2, arg1, arg2);
|
|
12372
12439
|
}
|
|
12373
12440
|
}
|
|
12374
12441
|
function emitThree(handler, isFn, self2, arg1, arg2, arg3) {
|
|
@@ -12376,9 +12443,9 @@ var json2csv_umd = { exports: {} };
|
|
|
12376
12443
|
handler.call(self2, arg1, arg2, arg3);
|
|
12377
12444
|
else {
|
|
12378
12445
|
var len2 = handler.length;
|
|
12379
|
-
var
|
|
12446
|
+
var listeners = arrayClone(handler, len2);
|
|
12380
12447
|
for (var i2 = 0; i2 < len2; ++i2)
|
|
12381
|
-
|
|
12448
|
+
listeners[i2].call(self2, arg1, arg2, arg3);
|
|
12382
12449
|
}
|
|
12383
12450
|
}
|
|
12384
12451
|
function emitMany(handler, isFn, self2, args) {
|
|
@@ -12386,12 +12453,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12386
12453
|
handler.apply(self2, args);
|
|
12387
12454
|
else {
|
|
12388
12455
|
var len2 = handler.length;
|
|
12389
|
-
var
|
|
12456
|
+
var listeners = arrayClone(handler, len2);
|
|
12390
12457
|
for (var i2 = 0; i2 < len2; ++i2)
|
|
12391
|
-
|
|
12458
|
+
listeners[i2].apply(self2, args);
|
|
12392
12459
|
}
|
|
12393
12460
|
}
|
|
12394
|
-
EventEmitter2.prototype.emit = function
|
|
12461
|
+
EventEmitter2.prototype.emit = function emit(type3) {
|
|
12395
12462
|
var er, handler, len2, args, i2, events2, domain2;
|
|
12396
12463
|
var doError = type3 === "error";
|
|
12397
12464
|
events2 = this._events;
|
|
@@ -12444,7 +12511,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12444
12511
|
}
|
|
12445
12512
|
return true;
|
|
12446
12513
|
};
|
|
12447
|
-
function
|
|
12514
|
+
function _addListener(target, type3, listener, prepend) {
|
|
12448
12515
|
var m;
|
|
12449
12516
|
var events2;
|
|
12450
12517
|
var existing;
|
|
@@ -12496,14 +12563,14 @@ var json2csv_umd = { exports: {} };
|
|
|
12496
12563
|
function emitWarning(e2) {
|
|
12497
12564
|
typeof console.warn === "function" ? console.warn(e2) : console.log(e2);
|
|
12498
12565
|
}
|
|
12499
|
-
EventEmitter2.prototype.addListener = function
|
|
12500
|
-
return
|
|
12566
|
+
EventEmitter2.prototype.addListener = function addListener(type3, listener) {
|
|
12567
|
+
return _addListener(this, type3, listener, false);
|
|
12501
12568
|
};
|
|
12502
12569
|
EventEmitter2.prototype.on = EventEmitter2.prototype.addListener;
|
|
12503
|
-
EventEmitter2.prototype.prependListener = function
|
|
12504
|
-
return
|
|
12570
|
+
EventEmitter2.prototype.prependListener = function prependListener2(type3, listener) {
|
|
12571
|
+
return _addListener(this, type3, listener, true);
|
|
12505
12572
|
};
|
|
12506
|
-
function
|
|
12573
|
+
function _onceWrap(target, type3, listener) {
|
|
12507
12574
|
var fired = false;
|
|
12508
12575
|
function g2() {
|
|
12509
12576
|
target.removeListener(type3, g2);
|
|
@@ -12515,19 +12582,19 @@ var json2csv_umd = { exports: {} };
|
|
|
12515
12582
|
g2.listener = listener;
|
|
12516
12583
|
return g2;
|
|
12517
12584
|
}
|
|
12518
|
-
EventEmitter2.prototype.once = function
|
|
12585
|
+
EventEmitter2.prototype.once = function once(type3, listener) {
|
|
12519
12586
|
if (typeof listener !== "function")
|
|
12520
12587
|
throw new TypeError('"listener" argument must be a function');
|
|
12521
|
-
this.on(type3,
|
|
12588
|
+
this.on(type3, _onceWrap(this, type3, listener));
|
|
12522
12589
|
return this;
|
|
12523
12590
|
};
|
|
12524
|
-
EventEmitter2.prototype.prependOnceListener = function
|
|
12591
|
+
EventEmitter2.prototype.prependOnceListener = function prependOnceListener(type3, listener) {
|
|
12525
12592
|
if (typeof listener !== "function")
|
|
12526
12593
|
throw new TypeError('"listener" argument must be a function');
|
|
12527
|
-
this.prependListener(type3,
|
|
12594
|
+
this.prependListener(type3, _onceWrap(this, type3, listener));
|
|
12528
12595
|
return this;
|
|
12529
12596
|
};
|
|
12530
|
-
EventEmitter2.prototype.removeListener = function
|
|
12597
|
+
EventEmitter2.prototype.removeListener = function removeListener(type3, listener) {
|
|
12531
12598
|
var list, events2, position, i2, originalListener;
|
|
12532
12599
|
if (typeof listener !== "function")
|
|
12533
12600
|
throw new TypeError('"listener" argument must be a function');
|
|
@@ -12565,15 +12632,15 @@ var json2csv_umd = { exports: {} };
|
|
|
12565
12632
|
delete events2[type3];
|
|
12566
12633
|
}
|
|
12567
12634
|
} else {
|
|
12568
|
-
|
|
12635
|
+
spliceOne(list, position);
|
|
12569
12636
|
}
|
|
12570
12637
|
if (events2.removeListener)
|
|
12571
12638
|
this.emit("removeListener", type3, originalListener || listener);
|
|
12572
12639
|
}
|
|
12573
12640
|
return this;
|
|
12574
12641
|
};
|
|
12575
|
-
EventEmitter2.prototype.removeAllListeners = function
|
|
12576
|
-
var
|
|
12642
|
+
EventEmitter2.prototype.removeAllListeners = function removeAllListeners(type3) {
|
|
12643
|
+
var listeners, events2;
|
|
12577
12644
|
events2 = this._events;
|
|
12578
12645
|
if (!events2)
|
|
12579
12646
|
return this;
|
|
@@ -12602,17 +12669,17 @@ var json2csv_umd = { exports: {} };
|
|
|
12602
12669
|
this._eventsCount = 0;
|
|
12603
12670
|
return this;
|
|
12604
12671
|
}
|
|
12605
|
-
|
|
12606
|
-
if (typeof
|
|
12607
|
-
this.removeListener(type3,
|
|
12608
|
-
} else if (
|
|
12672
|
+
listeners = events2[type3];
|
|
12673
|
+
if (typeof listeners === "function") {
|
|
12674
|
+
this.removeListener(type3, listeners);
|
|
12675
|
+
} else if (listeners) {
|
|
12609
12676
|
do {
|
|
12610
|
-
this.removeListener(type3,
|
|
12611
|
-
} while (
|
|
12677
|
+
this.removeListener(type3, listeners[listeners.length - 1]);
|
|
12678
|
+
} while (listeners[0]);
|
|
12612
12679
|
}
|
|
12613
12680
|
return this;
|
|
12614
12681
|
};
|
|
12615
|
-
EventEmitter2.prototype.listeners = function
|
|
12682
|
+
EventEmitter2.prototype.listeners = function listeners(type3) {
|
|
12616
12683
|
var evlistener;
|
|
12617
12684
|
var ret;
|
|
12618
12685
|
var events2 = this._events;
|
|
@@ -12625,7 +12692,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12625
12692
|
else if (typeof evlistener === "function")
|
|
12626
12693
|
ret = [evlistener.listener || evlistener];
|
|
12627
12694
|
else
|
|
12628
|
-
ret =
|
|
12695
|
+
ret = unwrapListeners(evlistener);
|
|
12629
12696
|
}
|
|
12630
12697
|
return ret;
|
|
12631
12698
|
};
|
|
@@ -12633,11 +12700,11 @@ var json2csv_umd = { exports: {} };
|
|
|
12633
12700
|
if (typeof emitter.listenerCount === "function") {
|
|
12634
12701
|
return emitter.listenerCount(type3);
|
|
12635
12702
|
} else {
|
|
12636
|
-
return
|
|
12703
|
+
return listenerCount.call(emitter, type3);
|
|
12637
12704
|
}
|
|
12638
12705
|
};
|
|
12639
|
-
EventEmitter2.prototype.listenerCount =
|
|
12640
|
-
function
|
|
12706
|
+
EventEmitter2.prototype.listenerCount = listenerCount;
|
|
12707
|
+
function listenerCount(type3) {
|
|
12641
12708
|
var events2 = this._events;
|
|
12642
12709
|
if (events2) {
|
|
12643
12710
|
var evlistener = events2[type3];
|
|
@@ -12649,21 +12716,21 @@ var json2csv_umd = { exports: {} };
|
|
|
12649
12716
|
}
|
|
12650
12717
|
return 0;
|
|
12651
12718
|
}
|
|
12652
|
-
EventEmitter2.prototype.eventNames = function
|
|
12719
|
+
EventEmitter2.prototype.eventNames = function eventNames() {
|
|
12653
12720
|
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
|
12654
12721
|
};
|
|
12655
|
-
function
|
|
12722
|
+
function spliceOne(list, index2) {
|
|
12656
12723
|
for (var i2 = index2, k = i2 + 1, n3 = list.length; k < n3; i2 += 1, k += 1)
|
|
12657
12724
|
list[i2] = list[k];
|
|
12658
12725
|
list.pop();
|
|
12659
12726
|
}
|
|
12660
|
-
function
|
|
12727
|
+
function arrayClone(arr, i2) {
|
|
12661
12728
|
var copy2 = new Array(i2);
|
|
12662
12729
|
while (i2--)
|
|
12663
12730
|
copy2[i2] = arr[i2];
|
|
12664
12731
|
return copy2;
|
|
12665
12732
|
}
|
|
12666
|
-
function
|
|
12733
|
+
function unwrapListeners(arr) {
|
|
12667
12734
|
var ret = new Array(arr.length);
|
|
12668
12735
|
for (var i2 = 0; i2 < ret.length; ++i2) {
|
|
12669
12736
|
ret[i2] = arr[i2].listener || arr[i2];
|
|
@@ -14995,7 +15062,7 @@ var json2csv_umd = { exports: {} };
|
|
|
14995
15062
|
Readable.ReadableState = ReadableState;
|
|
14996
15063
|
var debug2 = debuglog("stream");
|
|
14997
15064
|
inherits$1(Readable, EventEmitter2);
|
|
14998
|
-
function
|
|
15065
|
+
function prependListener(emitter, event, fn) {
|
|
14999
15066
|
if (typeof emitter.prependListener === "function") {
|
|
15000
15067
|
return emitter.prependListener(event, fn);
|
|
15001
15068
|
} else {
|
|
@@ -15349,7 +15416,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15349
15416
|
if (listenerCount$1(dest, "error") === 0)
|
|
15350
15417
|
dest.emit("error", er);
|
|
15351
15418
|
}
|
|
15352
|
-
|
|
15419
|
+
prependListener(dest, "error", onerror);
|
|
15353
15420
|
function onclose() {
|
|
15354
15421
|
dest.removeListener("finish", onfinish);
|
|
15355
15422
|
unpipe();
|
|
@@ -18226,7 +18293,7 @@ class MoleculesJsonAsObsLabelsLoader extends JsonLoader {
|
|
|
18226
18293
|
return Promise.resolve(new LoaderResult(result, url));
|
|
18227
18294
|
}
|
|
18228
18295
|
}
|
|
18229
|
-
function assert$
|
|
18296
|
+
function assert$f(condition, message) {
|
|
18230
18297
|
if (!condition) {
|
|
18231
18298
|
throw new Error("math.gl assertion ".concat(message));
|
|
18232
18299
|
}
|
|
@@ -18243,7 +18310,7 @@ const config$3 = {
|
|
|
18243
18310
|
};
|
|
18244
18311
|
function configure(options) {
|
|
18245
18312
|
for (const key in options) {
|
|
18246
|
-
assert$
|
|
18313
|
+
assert$f(key in config$3);
|
|
18247
18314
|
config$3[key] = options[key];
|
|
18248
18315
|
}
|
|
18249
18316
|
return config$3;
|
|
@@ -18693,11 +18760,11 @@ class Vector extends MathArray {
|
|
|
18693
18760
|
return this.distanceSquared(vector);
|
|
18694
18761
|
}
|
|
18695
18762
|
getComponent(i2) {
|
|
18696
|
-
assert$
|
|
18763
|
+
assert$f(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
18697
18764
|
return checkNumber(this[i2]);
|
|
18698
18765
|
}
|
|
18699
18766
|
setComponent(i2, value) {
|
|
18700
|
-
assert$
|
|
18767
|
+
assert$f(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
18701
18768
|
this[i2] = value;
|
|
18702
18769
|
return this.check();
|
|
18703
18770
|
}
|
|
@@ -21882,7 +21949,7 @@ const esm$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
21882
21949
|
_SphericalCoordinates: SphericalCoordinates,
|
|
21883
21950
|
acos: acos$2,
|
|
21884
21951
|
asin: asin$2,
|
|
21885
|
-
assert: assert$
|
|
21952
|
+
assert: assert$f,
|
|
21886
21953
|
atan: atan$2,
|
|
21887
21954
|
clamp: clamp$2,
|
|
21888
21955
|
clone: clone$8,
|
|
@@ -21935,7 +22002,7 @@ var DEFAULT_CONFIG = {
|
|
|
21935
22002
|
// null = randomly seed
|
|
21936
22003
|
randomSeed: null
|
|
21937
22004
|
};
|
|
21938
|
-
function isNumber(x2) {
|
|
22005
|
+
function isNumber$1(x2) {
|
|
21939
22006
|
return typeof x2 === "number";
|
|
21940
22007
|
}
|
|
21941
22008
|
function isBigNumber(x2) {
|
|
@@ -21990,7 +22057,7 @@ function isResultSet(x2) {
|
|
|
21990
22057
|
function isHelp(x2) {
|
|
21991
22058
|
return x2 && x2.constructor.prototype.isHelp === true || false;
|
|
21992
22059
|
}
|
|
21993
|
-
function isFunction$
|
|
22060
|
+
function isFunction$3(x2) {
|
|
21994
22061
|
return typeof x2 === "function";
|
|
21995
22062
|
}
|
|
21996
22063
|
function isDate$1(x2) {
|
|
@@ -21999,13 +22066,13 @@ function isDate$1(x2) {
|
|
|
21999
22066
|
function isRegExp(x2) {
|
|
22000
22067
|
return x2 instanceof RegExp;
|
|
22001
22068
|
}
|
|
22002
|
-
function isObject$
|
|
22069
|
+
function isObject$4(x2) {
|
|
22003
22070
|
return !!(x2 && typeof x2 === "object" && x2.constructor === Object && !isComplex(x2) && !isFraction(x2));
|
|
22004
22071
|
}
|
|
22005
22072
|
function isNull(x2) {
|
|
22006
22073
|
return x2 === null;
|
|
22007
22074
|
}
|
|
22008
|
-
function isUndefined(x2) {
|
|
22075
|
+
function isUndefined$1(x2) {
|
|
22009
22076
|
return x2 === void 0;
|
|
22010
22077
|
}
|
|
22011
22078
|
function isAccessorNode(x2) {
|
|
@@ -23056,9 +23123,9 @@ function format$3(value, options) {
|
|
|
23056
23123
|
if (options.notation) {
|
|
23057
23124
|
notation = options.notation;
|
|
23058
23125
|
}
|
|
23059
|
-
if (isNumber(options)) {
|
|
23126
|
+
if (isNumber$1(options)) {
|
|
23060
23127
|
precision = options;
|
|
23061
|
-
} else if (isNumber(options.precision)) {
|
|
23128
|
+
} else if (isNumber$1(options.precision)) {
|
|
23062
23129
|
precision = options.precision;
|
|
23063
23130
|
}
|
|
23064
23131
|
if (options.wordSize) {
|
|
@@ -23126,7 +23193,7 @@ function toEngineering$1(value, precision) {
|
|
|
23126
23193
|
var e2 = rounded.exponent;
|
|
23127
23194
|
var c = rounded.coefficients;
|
|
23128
23195
|
var newExp = e2 % 3 === 0 ? e2 : e2 < 0 ? e2 - 3 - e2 % 3 : e2 - e2 % 3;
|
|
23129
|
-
if (isNumber(precision)) {
|
|
23196
|
+
if (isNumber$1(precision)) {
|
|
23130
23197
|
while (precision > c.length || e2 - newExp + 1 > c.length) {
|
|
23131
23198
|
c.push(0);
|
|
23132
23199
|
}
|
|
@@ -23143,7 +23210,7 @@ function toEngineering$1(value, precision) {
|
|
|
23143
23210
|
expDiff--;
|
|
23144
23211
|
}
|
|
23145
23212
|
var decimals = c.slice(decimalIdx).join("");
|
|
23146
|
-
var decimalVal = isNumber(precision) && decimals.length || decimals.match(/[1-9]/) ? "." + decimals : "";
|
|
23213
|
+
var decimalVal = isNumber$1(precision) && decimals.length || decimals.match(/[1-9]/) ? "." + decimals : "";
|
|
23147
23214
|
var str = c.slice(0, decimalIdx).join("") + decimalVal + "e" + (e2 >= 0 ? "+" : "") + newExp.toString();
|
|
23148
23215
|
return rounded.sign + str;
|
|
23149
23216
|
}
|
|
@@ -23526,7 +23593,7 @@ function validate$1(array, size2) {
|
|
|
23526
23593
|
}
|
|
23527
23594
|
}
|
|
23528
23595
|
function validateIndex(index2, length2) {
|
|
23529
|
-
if (!isNumber(index2) || !isInteger(index2)) {
|
|
23596
|
+
if (!isNumber$1(index2) || !isInteger(index2)) {
|
|
23530
23597
|
throw new TypeError("Index must be an integer (value: " + index2 + ")");
|
|
23531
23598
|
}
|
|
23532
23599
|
if (index2 < 0 || typeof length2 === "number" && index2 >= length2) {
|
|
@@ -23541,7 +23608,7 @@ function resize(array, size2, defaultValue2) {
|
|
|
23541
23608
|
throw new Error("Resizing to scalar is not supported");
|
|
23542
23609
|
}
|
|
23543
23610
|
size2.forEach(function(value) {
|
|
23544
|
-
if (!isNumber(value) || !isInteger(value) || value < 0) {
|
|
23611
|
+
if (!isNumber$1(value) || !isInteger(value) || value < 0) {
|
|
23545
23612
|
throw new TypeError("Invalid size, must contain positive integers (size: " + format$1(size2) + ")");
|
|
23546
23613
|
}
|
|
23547
23614
|
});
|
|
@@ -23837,7 +23904,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
23837
23904
|
typed2.types = [
|
|
23838
23905
|
{
|
|
23839
23906
|
name: "number",
|
|
23840
|
-
test: isNumber
|
|
23907
|
+
test: isNumber$1
|
|
23841
23908
|
},
|
|
23842
23909
|
{
|
|
23843
23910
|
name: "Complex",
|
|
@@ -23901,7 +23968,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
23901
23968
|
},
|
|
23902
23969
|
{
|
|
23903
23970
|
name: "function",
|
|
23904
|
-
test: isFunction$
|
|
23971
|
+
test: isFunction$3
|
|
23905
23972
|
},
|
|
23906
23973
|
{
|
|
23907
23974
|
name: "Date",
|
|
@@ -23917,7 +23984,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
23917
23984
|
},
|
|
23918
23985
|
{
|
|
23919
23986
|
name: "undefined",
|
|
23920
|
-
test: isUndefined
|
|
23987
|
+
test: isUndefined$1
|
|
23921
23988
|
},
|
|
23922
23989
|
{
|
|
23923
23990
|
name: "AccessorNode",
|
|
@@ -23985,7 +24052,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
23985
24052
|
},
|
|
23986
24053
|
{
|
|
23987
24054
|
name: "Object",
|
|
23988
|
-
test: isObject$
|
|
24055
|
+
test: isObject$4
|
|
23989
24056
|
}
|
|
23990
24057
|
// order 'Object' last, it matches on other classes too
|
|
23991
24058
|
];
|
|
@@ -27557,7 +27624,7 @@ var createComplexClass = /* @__PURE__ */ factory(name$V, dependencies$O, () => {
|
|
|
27557
27624
|
var re2 = this.re;
|
|
27558
27625
|
var strRe = format$3(this.re, options);
|
|
27559
27626
|
var strIm = format$3(this.im, options);
|
|
27560
|
-
var precision = isNumber(options) ? options : options ? options.precision : null;
|
|
27627
|
+
var precision = isNumber$1(options) ? options : options ? options.precision : null;
|
|
27561
27628
|
if (precision !== null) {
|
|
27562
27629
|
var epsilon3 = Math.pow(10, -precision);
|
|
27563
27630
|
if (Math.abs(re2 / im) < epsilon3) {
|
|
@@ -27607,11 +27674,11 @@ var createComplexClass = /* @__PURE__ */ factory(name$V, dependencies$O, () => {
|
|
|
27607
27674
|
case 2: {
|
|
27608
27675
|
var r2 = arguments[0];
|
|
27609
27676
|
var phi = arguments[1];
|
|
27610
|
-
if (isNumber(r2)) {
|
|
27677
|
+
if (isNumber$1(r2)) {
|
|
27611
27678
|
if (isUnit(phi) && phi.hasBase("ANGLE")) {
|
|
27612
27679
|
phi = phi.toNumber("rad");
|
|
27613
27680
|
}
|
|
27614
|
-
if (isNumber(phi)) {
|
|
27681
|
+
if (isNumber$1(phi)) {
|
|
27615
27682
|
return new Complex$1({
|
|
27616
27683
|
r: r2,
|
|
27617
27684
|
phi
|
|
@@ -28744,7 +28811,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
28744
28811
|
if (isBigNumber(k)) {
|
|
28745
28812
|
k = k.toNumber();
|
|
28746
28813
|
}
|
|
28747
|
-
if (!isNumber(k) || !isInteger(k)) {
|
|
28814
|
+
if (!isNumber$1(k) || !isInteger(k)) {
|
|
28748
28815
|
throw new TypeError("The parameter k must be an integer number");
|
|
28749
28816
|
}
|
|
28750
28817
|
} else {
|
|
@@ -28776,7 +28843,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
28776
28843
|
if (isBigNumber(s2)) {
|
|
28777
28844
|
s2 = s2.toNumber();
|
|
28778
28845
|
}
|
|
28779
|
-
if (!isNumber(s2) || !isInteger(s2) || s2 < 1) {
|
|
28846
|
+
if (!isNumber$1(s2) || !isInteger(s2) || s2 < 1) {
|
|
28780
28847
|
throw new Error("Size values must be positive integers");
|
|
28781
28848
|
}
|
|
28782
28849
|
return s2;
|
|
@@ -28785,7 +28852,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
28785
28852
|
if (isBigNumber(k)) {
|
|
28786
28853
|
k = k.toNumber();
|
|
28787
28854
|
}
|
|
28788
|
-
if (!isNumber(k) || !isInteger(k)) {
|
|
28855
|
+
if (!isNumber$1(k) || !isInteger(k)) {
|
|
28789
28856
|
throw new TypeError("The parameter k must be an integer number");
|
|
28790
28857
|
}
|
|
28791
28858
|
} else {
|
|
@@ -28836,7 +28903,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
28836
28903
|
return new DenseMatrix2(json);
|
|
28837
28904
|
};
|
|
28838
28905
|
DenseMatrix2.prototype.swapRows = function(i2, j) {
|
|
28839
|
-
if (!isNumber(i2) || !isInteger(i2) || !isNumber(j) || !isInteger(j)) {
|
|
28906
|
+
if (!isNumber$1(i2) || !isInteger(i2) || !isNumber$1(j) || !isInteger(j)) {
|
|
28840
28907
|
throw new Error("Row index must be positive integers");
|
|
28841
28908
|
}
|
|
28842
28909
|
if (this._size.length !== 2) {
|
|
@@ -29322,7 +29389,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29322
29389
|
throw new Error("Only two dimensions matrix are supported");
|
|
29323
29390
|
}
|
|
29324
29391
|
sizeArray.forEach(function(value) {
|
|
29325
|
-
if (!isNumber(value) || !isInteger(value) || value < 0) {
|
|
29392
|
+
if (!isNumber$1(value) || !isInteger(value) || value < 0) {
|
|
29326
29393
|
throw new TypeError("Invalid size, must contain positive integers (size: " + format$1(sizeArray) + ")");
|
|
29327
29394
|
}
|
|
29328
29395
|
});
|
|
@@ -29403,7 +29470,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29403
29470
|
throw new Error("Sparse matrices can only be reshaped in two dimensions");
|
|
29404
29471
|
}
|
|
29405
29472
|
sizes.forEach(function(value) {
|
|
29406
|
-
if (!isNumber(value) || !isInteger(value) || value <= -2 || value === 0) {
|
|
29473
|
+
if (!isNumber$1(value) || !isInteger(value) || value <= -2 || value === 0) {
|
|
29407
29474
|
throw new TypeError("Invalid size, must contain positive integers or -1 (size: " + format$1(sizes) + ")");
|
|
29408
29475
|
}
|
|
29409
29476
|
});
|
|
@@ -29626,7 +29693,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29626
29693
|
if (isBigNumber(k)) {
|
|
29627
29694
|
k = k.toNumber();
|
|
29628
29695
|
}
|
|
29629
|
-
if (!isNumber(k) || !isInteger(k)) {
|
|
29696
|
+
if (!isNumber$1(k) || !isInteger(k)) {
|
|
29630
29697
|
throw new TypeError("The parameter k must be an integer number");
|
|
29631
29698
|
}
|
|
29632
29699
|
} else {
|
|
@@ -29675,7 +29742,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29675
29742
|
if (isBigNumber(s2)) {
|
|
29676
29743
|
s2 = s2.toNumber();
|
|
29677
29744
|
}
|
|
29678
|
-
if (!isNumber(s2) || !isInteger(s2) || s2 < 1) {
|
|
29745
|
+
if (!isNumber$1(s2) || !isInteger(s2) || s2 < 1) {
|
|
29679
29746
|
throw new Error("Size values must be positive integers");
|
|
29680
29747
|
}
|
|
29681
29748
|
return s2;
|
|
@@ -29684,7 +29751,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29684
29751
|
if (isBigNumber(k)) {
|
|
29685
29752
|
k = k.toNumber();
|
|
29686
29753
|
}
|
|
29687
|
-
if (!isNumber(k) || !isInteger(k)) {
|
|
29754
|
+
if (!isNumber$1(k) || !isInteger(k)) {
|
|
29688
29755
|
throw new TypeError("The parameter k must be an integer number");
|
|
29689
29756
|
}
|
|
29690
29757
|
} else {
|
|
@@ -29745,7 +29812,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
29745
29812
|
});
|
|
29746
29813
|
};
|
|
29747
29814
|
SparseMatrix2.prototype.swapRows = function(i2, j) {
|
|
29748
|
-
if (!isNumber(i2) || !isInteger(i2) || !isNumber(j) || !isInteger(j)) {
|
|
29815
|
+
if (!isNumber$1(i2) || !isInteger(i2) || !isNumber$1(j) || !isInteger(j)) {
|
|
29749
29816
|
throw new Error("Row index must be positive integers");
|
|
29750
29817
|
}
|
|
29751
29818
|
if (this._size.length !== 2) {
|
|
@@ -36943,7 +37010,7 @@ var unit = /* @__PURE__ */ createUnitFunction({
|
|
|
36943
37010
|
Unit,
|
|
36944
37011
|
typed
|
|
36945
37012
|
});
|
|
36946
|
-
function assert$
|
|
37013
|
+
function assert$e(condition, message) {
|
|
36947
37014
|
if (!condition) {
|
|
36948
37015
|
throw new Error(message || "loader assertion failed.");
|
|
36949
37016
|
}
|
|
@@ -36952,7 +37019,7 @@ const isBrowser$3 = Boolean(typeof process !== "object" || String(process) !== "
|
|
|
36952
37019
|
const matches$1 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
36953
37020
|
matches$1 && parseFloat(matches$1[1]) || 0;
|
|
36954
37021
|
const VERSION$b = "3.2.10";
|
|
36955
|
-
function assert$
|
|
37022
|
+
function assert$d(condition, message) {
|
|
36956
37023
|
if (!condition) {
|
|
36957
37024
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
36958
37025
|
}
|
|
@@ -36994,12 +37061,12 @@ class WorkerJob {
|
|
|
36994
37061
|
});
|
|
36995
37062
|
}
|
|
36996
37063
|
done(value) {
|
|
36997
|
-
assert$
|
|
37064
|
+
assert$d(this.isRunning);
|
|
36998
37065
|
this.isRunning = false;
|
|
36999
37066
|
this._resolve(value);
|
|
37000
37067
|
}
|
|
37001
37068
|
error(error2) {
|
|
37002
|
-
assert$
|
|
37069
|
+
assert$d(this.isRunning);
|
|
37003
37070
|
this.isRunning = false;
|
|
37004
37071
|
this._reject(error2);
|
|
37005
37072
|
}
|
|
@@ -37008,7 +37075,7 @@ let Worker$1 = class Worker2 {
|
|
|
37008
37075
|
};
|
|
37009
37076
|
const workerURLCache = /* @__PURE__ */ new Map();
|
|
37010
37077
|
function getLoadableWorkerURL(props) {
|
|
37011
|
-
assert$
|
|
37078
|
+
assert$d(props.source && !props.url || !props.source && props.url);
|
|
37012
37079
|
let workerURL = workerURLCache.get(props.source || props.url);
|
|
37013
37080
|
if (!workerURL) {
|
|
37014
37081
|
if (props.url) {
|
|
@@ -37020,7 +37087,7 @@ function getLoadableWorkerURL(props) {
|
|
|
37020
37087
|
workerURLCache.set(props.source, workerURL);
|
|
37021
37088
|
}
|
|
37022
37089
|
}
|
|
37023
|
-
assert$
|
|
37090
|
+
assert$d(workerURL);
|
|
37024
37091
|
return workerURL;
|
|
37025
37092
|
}
|
|
37026
37093
|
function getLoadableWorkerURLFromURL(url) {
|
|
@@ -37094,7 +37161,7 @@ class WorkerThread {
|
|
|
37094
37161
|
source,
|
|
37095
37162
|
url
|
|
37096
37163
|
} = props;
|
|
37097
|
-
assert$
|
|
37164
|
+
assert$d(source || url);
|
|
37098
37165
|
this.name = name2;
|
|
37099
37166
|
this.source = source;
|
|
37100
37167
|
this.url = url;
|
|
@@ -37379,11 +37446,11 @@ function getWorkerURL(worker, options = {}) {
|
|
|
37379
37446
|
const versionTag = version2 ? "@".concat(version2) : "";
|
|
37380
37447
|
url = "https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag, "/dist/").concat(workerFile);
|
|
37381
37448
|
}
|
|
37382
|
-
assert$
|
|
37449
|
+
assert$d(url);
|
|
37383
37450
|
return url;
|
|
37384
37451
|
}
|
|
37385
37452
|
function validateWorkerVersion(worker, coreVersion = VERSION$b) {
|
|
37386
|
-
assert$
|
|
37453
|
+
assert$d(worker, "no worker provided");
|
|
37387
37454
|
const workerVersion = worker.version;
|
|
37388
37455
|
if (!coreVersion || !workerVersion) {
|
|
37389
37456
|
return false;
|
|
@@ -37411,7 +37478,7 @@ function getLibraryUrl(library, moduleName, options) {
|
|
|
37411
37478
|
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
|
|
37412
37479
|
}
|
|
37413
37480
|
if (options.CDN) {
|
|
37414
|
-
assert$
|
|
37481
|
+
assert$d(options.CDN.startsWith("http"));
|
|
37415
37482
|
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION$a, "/dist/libs/").concat(library);
|
|
37416
37483
|
}
|
|
37417
37484
|
if (isWorker) {
|
|
@@ -37624,8 +37691,8 @@ function sliceArrayBuffer(arrayBuffer2, byteOffset, byteLength) {
|
|
|
37624
37691
|
return arrayCopy.buffer;
|
|
37625
37692
|
}
|
|
37626
37693
|
function padToNBytes(byteLength, padding) {
|
|
37627
|
-
assert$
|
|
37628
|
-
assert$
|
|
37694
|
+
assert$e(byteLength >= 0);
|
|
37695
|
+
assert$e(padding > 0);
|
|
37629
37696
|
return byteLength + (padding - 1) & ~(padding - 1);
|
|
37630
37697
|
}
|
|
37631
37698
|
function copyToArray(source, target, targetOffset) {
|
|
@@ -37972,16 +38039,16 @@ function dirname(url) {
|
|
|
37972
38039
|
return slashIndex >= 0 ? url.substr(0, slashIndex) : "";
|
|
37973
38040
|
}
|
|
37974
38041
|
const isBoolean = (x2) => typeof x2 === "boolean";
|
|
37975
|
-
const isFunction$
|
|
37976
|
-
const isObject$
|
|
37977
|
-
const isPureObject = (x2) => isObject$
|
|
38042
|
+
const isFunction$2 = (x2) => typeof x2 === "function";
|
|
38043
|
+
const isObject$3 = (x2) => x2 !== null && typeof x2 === "object";
|
|
38044
|
+
const isPureObject = (x2) => isObject$3(x2) && x2.constructor === {}.constructor;
|
|
37978
38045
|
const isIterable = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
|
|
37979
38046
|
const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
|
|
37980
38047
|
const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
|
|
37981
38048
|
const isBlob$1 = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
|
|
37982
38049
|
const isBuffer$1 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
|
|
37983
|
-
const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$
|
|
37984
|
-
const isReadableNodeStream = (x2) => isObject$
|
|
38050
|
+
const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$3(x2) && isFunction$2(x2.tee) && isFunction$2(x2.cancel) && isFunction$2(x2.getReader);
|
|
38051
|
+
const isReadableNodeStream = (x2) => isObject$3(x2) && isFunction$2(x2.read) && isFunction$2(x2.pipe) && isBoolean(x2.readable);
|
|
37985
38052
|
const isReadableStream = (x2) => isReadableDOMStream(x2) || isReadableNodeStream(x2);
|
|
37986
38053
|
const DATA_URL_PATTERN = /^data:([-\w.]+\/[-\w.+]+)(;|,)/;
|
|
37987
38054
|
const MIME_TYPE_PATTERN = /^([-\w.]+\/[-\w.+]+)/;
|
|
@@ -38323,7 +38390,7 @@ function autobind(obj) {
|
|
|
38323
38390
|
}
|
|
38324
38391
|
}
|
|
38325
38392
|
}
|
|
38326
|
-
function assert$
|
|
38393
|
+
function assert$c(condition, message) {
|
|
38327
38394
|
if (!condition) {
|
|
38328
38395
|
throw new Error(message || "Assertion failed");
|
|
38329
38396
|
}
|
|
@@ -38436,7 +38503,7 @@ class Log {
|
|
|
38436
38503
|
}
|
|
38437
38504
|
}
|
|
38438
38505
|
assert(condition, message) {
|
|
38439
|
-
assert$
|
|
38506
|
+
assert$c(condition, message);
|
|
38440
38507
|
}
|
|
38441
38508
|
warn(message) {
|
|
38442
38509
|
return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);
|
|
@@ -38555,7 +38622,7 @@ class Log {
|
|
|
38555
38622
|
opts: opts2
|
|
38556
38623
|
});
|
|
38557
38624
|
method = method || opts2.method;
|
|
38558
|
-
assert$
|
|
38625
|
+
assert$c(method);
|
|
38559
38626
|
opts2.total = this.getTotal();
|
|
38560
38627
|
opts2.delta = this.getDelta();
|
|
38561
38628
|
this._deltaTs = getHiResTimestamp();
|
|
@@ -38589,7 +38656,7 @@ function normalizeLogLevel(logLevel) {
|
|
|
38589
38656
|
default:
|
|
38590
38657
|
return 0;
|
|
38591
38658
|
}
|
|
38592
|
-
assert$
|
|
38659
|
+
assert$c(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
38593
38660
|
return resolvedLevel;
|
|
38594
38661
|
}
|
|
38595
38662
|
function normalizeArguments(opts2) {
|
|
@@ -38617,7 +38684,7 @@ function normalizeArguments(opts2) {
|
|
|
38617
38684
|
opts2.message = opts2.message();
|
|
38618
38685
|
}
|
|
38619
38686
|
const messageType = typeof opts2.message;
|
|
38620
|
-
assert$
|
|
38687
|
+
assert$c(messageType === "string" || messageType === "object");
|
|
38621
38688
|
return Object.assign(opts2, {
|
|
38622
38689
|
args
|
|
38623
38690
|
}, opts2.opts);
|
|
@@ -38781,7 +38848,7 @@ function getFetchFunction(options, context) {
|
|
|
38781
38848
|
if (typeof fetchOptions.fetch === "function") {
|
|
38782
38849
|
return fetchOptions.fetch;
|
|
38783
38850
|
}
|
|
38784
|
-
if (isObject$
|
|
38851
|
+
if (isObject$3(fetchOptions.fetch)) {
|
|
38785
38852
|
return (url) => fetchFile(url, fetchOptions);
|
|
38786
38853
|
}
|
|
38787
38854
|
if (context !== null && context !== void 0 && context.fetch) {
|
|
@@ -38802,7 +38869,7 @@ function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, l
|
|
|
38802
38869
|
const loaderName = id || "Top level";
|
|
38803
38870
|
const prefix = id ? "".concat(id, ".") : "";
|
|
38804
38871
|
for (const key in options) {
|
|
38805
|
-
const isSubOptions = !id && isObject$
|
|
38872
|
+
const isSubOptions = !id && isObject$3(options[key]);
|
|
38806
38873
|
const isBaseUriOption = key === "baseUri" && !id;
|
|
38807
38874
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
38808
38875
|
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
@@ -38878,8 +38945,8 @@ function isLoaderObject(loader) {
|
|
|
38878
38945
|
}
|
|
38879
38946
|
function normalizeLoader(loader) {
|
|
38880
38947
|
var _loader2, _loader3;
|
|
38881
|
-
assert$
|
|
38882
|
-
assert$
|
|
38948
|
+
assert$e(loader, "null loader");
|
|
38949
|
+
assert$e(isLoaderObject(loader), "invalid loader");
|
|
38883
38950
|
let options;
|
|
38884
38951
|
if (Array.isArray(loader)) {
|
|
38885
38952
|
options = loader[1];
|
|
@@ -39278,7 +39345,7 @@ function getLoadersFromContext(loaders, context) {
|
|
|
39278
39345
|
return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;
|
|
39279
39346
|
}
|
|
39280
39347
|
async function parse$5(data, loaders, options, context) {
|
|
39281
|
-
assert$
|
|
39348
|
+
assert$d(!context || typeof context === "object");
|
|
39282
39349
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
39283
39350
|
context = void 0;
|
|
39284
39351
|
options = loaders;
|
|
@@ -39340,7 +39407,7 @@ async function parseWithLoader(loader, data, options, context) {
|
|
|
39340
39407
|
if (loader.parse) {
|
|
39341
39408
|
return await loader.parse(data, options, context, loader);
|
|
39342
39409
|
}
|
|
39343
|
-
assert$
|
|
39410
|
+
assert$d(!loader.parseSync);
|
|
39344
39411
|
throw new Error("".concat(loader.id, " loader - no parser found and worker is disabled"));
|
|
39345
39412
|
}
|
|
39346
39413
|
async function load(url, loaders, options, context) {
|
|
@@ -39616,7 +39683,7 @@ async function parseToNodeImage(arrayBuffer2, options) {
|
|
|
39616
39683
|
mimeType
|
|
39617
39684
|
} = getBinaryImageMetadata(arrayBuffer2) || {};
|
|
39618
39685
|
const _parseImageNode2 = globalThis._parseImageNode;
|
|
39619
|
-
assert$
|
|
39686
|
+
assert$e(_parseImageNode2);
|
|
39620
39687
|
return await _parseImageNode2(arrayBuffer2, mimeType);
|
|
39621
39688
|
}
|
|
39622
39689
|
async function parseImage(arrayBuffer2, options, context) {
|
|
@@ -39639,7 +39706,7 @@ async function parseImage(arrayBuffer2, options, context) {
|
|
|
39639
39706
|
image2 = await parseToNodeImage(arrayBuffer2);
|
|
39640
39707
|
break;
|
|
39641
39708
|
default:
|
|
39642
|
-
assert$
|
|
39709
|
+
assert$e(false);
|
|
39643
39710
|
}
|
|
39644
39711
|
if (imageType === "data") {
|
|
39645
39712
|
image2 = getImageData(image2);
|
|
@@ -39862,7 +39929,7 @@ const deckGlobal = globalThis.deck;
|
|
|
39862
39929
|
const log$2 = new Log({
|
|
39863
39930
|
id: "luma.gl"
|
|
39864
39931
|
});
|
|
39865
|
-
function assert$
|
|
39932
|
+
function assert$b(condition, message) {
|
|
39866
39933
|
if (!condition) {
|
|
39867
39934
|
throw new Error(message || "luma.gl: assertion failed.");
|
|
39868
39935
|
}
|
|
@@ -39888,11 +39955,11 @@ function getWebGL2Context(gl) {
|
|
|
39888
39955
|
return isWebGL2$1(gl) ? gl : null;
|
|
39889
39956
|
}
|
|
39890
39957
|
function assertWebGLContext(gl) {
|
|
39891
|
-
assert$
|
|
39958
|
+
assert$b(isWebGL(gl), ERR_CONTEXT);
|
|
39892
39959
|
return gl;
|
|
39893
39960
|
}
|
|
39894
39961
|
function assertWebGL2Context(gl) {
|
|
39895
|
-
assert$
|
|
39962
|
+
assert$b(isWebGL2$1(gl), ERR_WEBGL2);
|
|
39896
39963
|
return gl;
|
|
39897
39964
|
}
|
|
39898
39965
|
const glErrorShadow = {};
|
|
@@ -40258,7 +40325,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
40258
40325
|
suffix: "OES"
|
|
40259
40326
|
},
|
|
40260
40327
|
createVertexArray: () => {
|
|
40261
|
-
assert$
|
|
40328
|
+
assert$b(false, ERR_VAO_NOT_SUPPORTED);
|
|
40262
40329
|
},
|
|
40263
40330
|
deleteVertexArray: () => {
|
|
40264
40331
|
},
|
|
@@ -40271,7 +40338,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
40271
40338
|
suffix: "ANGLE"
|
|
40272
40339
|
},
|
|
40273
40340
|
vertexAttribDivisor(location, divisor) {
|
|
40274
|
-
assert$
|
|
40341
|
+
assert$b(divisor === 0, "WebGL instanced rendering not supported");
|
|
40275
40342
|
},
|
|
40276
40343
|
drawElementsInstanced: () => {
|
|
40277
40344
|
},
|
|
@@ -40283,7 +40350,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
40283
40350
|
suffix: "WEBGL"
|
|
40284
40351
|
},
|
|
40285
40352
|
drawBuffers: () => {
|
|
40286
|
-
assert$
|
|
40353
|
+
assert$b(false);
|
|
40287
40354
|
}
|
|
40288
40355
|
},
|
|
40289
40356
|
[EXT_disjoint_timer_query]: {
|
|
@@ -40291,13 +40358,13 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
40291
40358
|
suffix: "EXT"
|
|
40292
40359
|
},
|
|
40293
40360
|
createQuery: () => {
|
|
40294
|
-
assert$
|
|
40361
|
+
assert$b(false);
|
|
40295
40362
|
},
|
|
40296
40363
|
deleteQuery: () => {
|
|
40297
|
-
assert$
|
|
40364
|
+
assert$b(false);
|
|
40298
40365
|
},
|
|
40299
40366
|
beginQuery: () => {
|
|
40300
|
-
assert$
|
|
40367
|
+
assert$b(false);
|
|
40301
40368
|
},
|
|
40302
40369
|
endQuery: () => {
|
|
40303
40370
|
},
|
|
@@ -40430,7 +40497,7 @@ function polyfillExtension(gl, _ref2) {
|
|
|
40430
40497
|
target2
|
|
40431
40498
|
} = _ref2;
|
|
40432
40499
|
const defaults = WEBGL2_CONTEXT_POLYFILLS[extension];
|
|
40433
|
-
assert$
|
|
40500
|
+
assert$b(defaults);
|
|
40434
40501
|
const {
|
|
40435
40502
|
meta: meta2 = {}
|
|
40436
40503
|
} = defaults;
|
|
@@ -40899,7 +40966,7 @@ class GLState {
|
|
|
40899
40966
|
this.stateStack.push({});
|
|
40900
40967
|
}
|
|
40901
40968
|
pop() {
|
|
40902
|
-
assert$
|
|
40969
|
+
assert$b(this.stateStack.length > 0);
|
|
40903
40970
|
const oldValues = this.stateStack[this.stateStack.length - 1];
|
|
40904
40971
|
setParameters(this.gl, oldValues);
|
|
40905
40972
|
this.stateStack.pop();
|
|
@@ -40909,7 +40976,7 @@ class GLState {
|
|
|
40909
40976
|
let oldValue;
|
|
40910
40977
|
const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];
|
|
40911
40978
|
for (const key in values2) {
|
|
40912
|
-
assert$
|
|
40979
|
+
assert$b(key !== void 0);
|
|
40913
40980
|
const value = values2[key];
|
|
40914
40981
|
const cached = this.cache[key];
|
|
40915
40982
|
if (!deepArrayEqual(value, cached)) {
|
|
@@ -40933,7 +41000,7 @@ function trackContextState(gl) {
|
|
|
40933
41000
|
enable: enable2 = true,
|
|
40934
41001
|
copyState
|
|
40935
41002
|
} = options;
|
|
40936
|
-
assert$
|
|
41003
|
+
assert$b(copyState !== void 0);
|
|
40937
41004
|
if (!gl.state) {
|
|
40938
41005
|
const {
|
|
40939
41006
|
polyfillContext: polyfillContext2
|
|
@@ -40964,11 +41031,11 @@ function pushContextState(gl) {
|
|
|
40964
41031
|
gl.state.push();
|
|
40965
41032
|
}
|
|
40966
41033
|
function popContextState(gl) {
|
|
40967
|
-
assert$
|
|
41034
|
+
assert$b(gl.state);
|
|
40968
41035
|
gl.state.pop();
|
|
40969
41036
|
}
|
|
40970
41037
|
function setParameters(gl, values2) {
|
|
40971
|
-
assert$
|
|
41038
|
+
assert$b(isWebGL(gl), "setParameters requires a WebGL context");
|
|
40972
41039
|
if (isObjectEmpty$1(values2)) {
|
|
40973
41040
|
return;
|
|
40974
41041
|
}
|
|
@@ -41099,7 +41166,7 @@ const CONTEXT_DEFAULTS = {
|
|
|
41099
41166
|
};
|
|
41100
41167
|
function createGLContext() {
|
|
41101
41168
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
41102
|
-
assert$
|
|
41169
|
+
assert$b(isBrowser, "createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils");
|
|
41103
41170
|
options = Object.assign({}, CONTEXT_DEFAULTS, options);
|
|
41104
41171
|
const {
|
|
41105
41172
|
width,
|
|
@@ -41334,7 +41401,7 @@ function requestAnimationFrame$1(callback) {
|
|
|
41334
41401
|
function cancelAnimationFrame(timerId) {
|
|
41335
41402
|
return typeof window !== "undefined" && window.cancelAnimationFrame ? window.cancelAnimationFrame(timerId) : clearTimeout(timerId);
|
|
41336
41403
|
}
|
|
41337
|
-
function assert$
|
|
41404
|
+
function assert$a(condition, message) {
|
|
41338
41405
|
if (!condition) {
|
|
41339
41406
|
throw new Error(message || "luma.gl: assertion failed.");
|
|
41340
41407
|
}
|
|
@@ -41349,7 +41416,7 @@ function getKeyValue(gl, name2) {
|
|
|
41349
41416
|
}
|
|
41350
41417
|
name2 = name2.replace(/^.*\./, "");
|
|
41351
41418
|
const value = gl[name2];
|
|
41352
|
-
assert$
|
|
41419
|
+
assert$a(value !== void 0, "Accessing undefined constant GL.".concat(name2));
|
|
41353
41420
|
return value;
|
|
41354
41421
|
}
|
|
41355
41422
|
function getKey(gl, value) {
|
|
@@ -41369,7 +41436,7 @@ function uid() {
|
|
|
41369
41436
|
return "".concat(id, "-").concat(count2);
|
|
41370
41437
|
}
|
|
41371
41438
|
function isPowerOfTwo(n3) {
|
|
41372
|
-
assert$
|
|
41439
|
+
assert$a(typeof n3 === "number", "Input must be a number");
|
|
41373
41440
|
return n3 && (n3 & n3 - 1) === 0;
|
|
41374
41441
|
}
|
|
41375
41442
|
function isObjectEmpty(obj) {
|
|
@@ -41461,7 +41528,7 @@ let Resource$1 = class Resource {
|
|
|
41461
41528
|
getParameter(pname) {
|
|
41462
41529
|
let opts2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
41463
41530
|
pname = getKeyValue(this.gl, pname);
|
|
41464
|
-
assert$
|
|
41531
|
+
assert$a(pname);
|
|
41465
41532
|
const parameters = this.constructor.PARAMETERS || {};
|
|
41466
41533
|
const parameter = parameters[pname];
|
|
41467
41534
|
if (parameter) {
|
|
@@ -41501,7 +41568,7 @@ let Resource$1 = class Resource {
|
|
|
41501
41568
|
}
|
|
41502
41569
|
setParameter(pname, value) {
|
|
41503
41570
|
pname = getKeyValue(this.gl, pname);
|
|
41504
|
-
assert$
|
|
41571
|
+
assert$a(pname);
|
|
41505
41572
|
const parameters = this.constructor.PARAMETERS || {};
|
|
41506
41573
|
const parameter = parameters[pname];
|
|
41507
41574
|
if (parameter) {
|
|
@@ -41731,7 +41798,7 @@ class Accessor {
|
|
|
41731
41798
|
return ArrayType.BYTES_PER_ELEMENT;
|
|
41732
41799
|
}
|
|
41733
41800
|
static getBytesPerVertex(accessor) {
|
|
41734
|
-
assert$
|
|
41801
|
+
assert$a(accessor.size);
|
|
41735
41802
|
const ArrayType = getTypedArrayFromGLType(accessor.type || 5126);
|
|
41736
41803
|
return ArrayType.BYTES_PER_ELEMENT * accessor.size;
|
|
41737
41804
|
}
|
|
@@ -41904,7 +41971,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
41904
41971
|
srcOffset = 0
|
|
41905
41972
|
} = props;
|
|
41906
41973
|
const byteLength = props.byteLength || props.length;
|
|
41907
|
-
assert$
|
|
41974
|
+
assert$a(data);
|
|
41908
41975
|
const target = this.gl.webgl2 ? 36663 : this.target;
|
|
41909
41976
|
this.gl.bindBuffer(target, this.handle);
|
|
41910
41977
|
if (srcOffset !== 0 || byteLength !== void 0) {
|
|
@@ -41961,7 +42028,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
41961
42028
|
}
|
|
41962
42029
|
const copyElementCount = Math.min(sourceAvailableElementCount, dstAvailableElementCount);
|
|
41963
42030
|
length2 = length2 || copyElementCount;
|
|
41964
|
-
assert$
|
|
42031
|
+
assert$a(length2 <= copyElementCount);
|
|
41965
42032
|
dstData = dstData || new ArrayType(dstElementCount);
|
|
41966
42033
|
this.gl.bindBuffer(36662, this.handle);
|
|
41967
42034
|
this.gl.getBufferSubData(36662, srcByteOffset, dstData, dstOffset, length2);
|
|
@@ -41979,7 +42046,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
41979
42046
|
if (size2 !== void 0) {
|
|
41980
42047
|
this.gl.bindBufferRange(target, index2, this.handle, offset, size2);
|
|
41981
42048
|
} else {
|
|
41982
|
-
assert$
|
|
42049
|
+
assert$a(offset === 0);
|
|
41983
42050
|
this.gl.bindBufferBase(target, index2, this.handle);
|
|
41984
42051
|
}
|
|
41985
42052
|
} else {
|
|
@@ -42021,7 +42088,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
42021
42088
|
_setData(data) {
|
|
42022
42089
|
let offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
42023
42090
|
let byteLength = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : data.byteLength + offset;
|
|
42024
|
-
assert$
|
|
42091
|
+
assert$a(ArrayBuffer.isView(data));
|
|
42025
42092
|
this._trackDeallocatedMemory();
|
|
42026
42093
|
const target = this._getTarget();
|
|
42027
42094
|
this.gl.bindBuffer(target, this.handle);
|
|
@@ -42032,7 +42099,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
42032
42099
|
this.bytesUsed = byteLength;
|
|
42033
42100
|
this._trackAllocatedMemory(byteLength);
|
|
42034
42101
|
const type2 = getGLTypeFromTypedArray(data);
|
|
42035
|
-
assert$
|
|
42102
|
+
assert$a(type2);
|
|
42036
42103
|
this.setAccessor(new Accessor(this.accessor, {
|
|
42037
42104
|
type: type2
|
|
42038
42105
|
}));
|
|
@@ -42040,7 +42107,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
42040
42107
|
}
|
|
42041
42108
|
_setByteLength(byteLength) {
|
|
42042
42109
|
let usage = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.usage;
|
|
42043
|
-
assert$
|
|
42110
|
+
assert$a(byteLength >= 0);
|
|
42044
42111
|
this._trackDeallocatedMemory();
|
|
42045
42112
|
let data = byteLength;
|
|
42046
42113
|
if (byteLength === 0) {
|
|
@@ -42472,7 +42539,7 @@ class Texture extends Resource$1 {
|
|
|
42472
42539
|
}
|
|
42473
42540
|
break;
|
|
42474
42541
|
default:
|
|
42475
|
-
assert$
|
|
42542
|
+
assert$a(false, "Unknown image data type");
|
|
42476
42543
|
}
|
|
42477
42544
|
});
|
|
42478
42545
|
if (dataType === "compressed") {
|
|
@@ -42520,7 +42587,7 @@ class Texture extends Resource$1 {
|
|
|
42520
42587
|
width,
|
|
42521
42588
|
height
|
|
42522
42589
|
}));
|
|
42523
|
-
assert$
|
|
42590
|
+
assert$a(this.depth === 0, "texSubImage not supported for 3D textures");
|
|
42524
42591
|
if (!data) {
|
|
42525
42592
|
data = pixels;
|
|
42526
42593
|
}
|
|
@@ -42694,9 +42761,9 @@ class Texture extends Resource$1 {
|
|
|
42694
42761
|
height
|
|
42695
42762
|
};
|
|
42696
42763
|
}
|
|
42697
|
-
assert$
|
|
42698
|
-
assert$
|
|
42699
|
-
assert$
|
|
42764
|
+
assert$a(size2, "Could not deduced texture size");
|
|
42765
|
+
assert$a(width === void 0 || size2.width === width, "Deduced texture width does not match supplied width");
|
|
42766
|
+
assert$a(height === void 0 || size2.height === height, "Deduced texture height does not match supplied height");
|
|
42700
42767
|
return size2;
|
|
42701
42768
|
}
|
|
42702
42769
|
_createHandle() {
|
|
@@ -42729,7 +42796,7 @@ class Texture extends Resource$1 {
|
|
|
42729
42796
|
break;
|
|
42730
42797
|
case 4096:
|
|
42731
42798
|
case 4097:
|
|
42732
|
-
assert$
|
|
42799
|
+
assert$a(false);
|
|
42733
42800
|
break;
|
|
42734
42801
|
default:
|
|
42735
42802
|
this.gl.texParameteri(this.target, pname, param);
|
|
@@ -42779,7 +42846,7 @@ class Texture extends Resource$1 {
|
|
|
42779
42846
|
}
|
|
42780
42847
|
let pathPrefix = "";
|
|
42781
42848
|
function loadImage$1(url, opts2) {
|
|
42782
|
-
assert$
|
|
42849
|
+
assert$a(typeof url === "string");
|
|
42783
42850
|
url = pathPrefix + url;
|
|
42784
42851
|
return new Promise((resolve2, reject) => {
|
|
42785
42852
|
try {
|
|
@@ -43189,7 +43256,7 @@ class Renderbuffer extends Resource$1 {
|
|
|
43189
43256
|
height = 1,
|
|
43190
43257
|
samples = 0
|
|
43191
43258
|
} = _ref2;
|
|
43192
|
-
assert$
|
|
43259
|
+
assert$a(format2, "Needs format");
|
|
43193
43260
|
this._trackDeallocatedMemory();
|
|
43194
43261
|
this.gl.bindRenderbuffer(36161, this.handle);
|
|
43195
43262
|
if (samples !== 0 && isWebGL2$1(this.gl)) {
|
|
@@ -43279,7 +43346,7 @@ function clear(gl) {
|
|
|
43279
43346
|
parameters.clearStencil = depth;
|
|
43280
43347
|
}
|
|
43281
43348
|
}
|
|
43282
|
-
assert$
|
|
43349
|
+
assert$a(clearFlags !== 0, ERR_ARGUMENTS);
|
|
43283
43350
|
withParameters(gl, parameters, () => {
|
|
43284
43351
|
gl.clear(clearFlags);
|
|
43285
43352
|
});
|
|
@@ -43320,7 +43387,7 @@ function clearBuffer(gl) {
|
|
|
43320
43387
|
gl.clearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
|
|
43321
43388
|
break;
|
|
43322
43389
|
default:
|
|
43323
|
-
assert$
|
|
43390
|
+
assert$a(false, ERR_ARGUMENTS);
|
|
43324
43391
|
}
|
|
43325
43392
|
});
|
|
43326
43393
|
}
|
|
@@ -43340,7 +43407,7 @@ function glFormatToComponents(format2) {
|
|
|
43340
43407
|
case 34836:
|
|
43341
43408
|
return 4;
|
|
43342
43409
|
default:
|
|
43343
|
-
assert$
|
|
43410
|
+
assert$a(false);
|
|
43344
43411
|
return 0;
|
|
43345
43412
|
}
|
|
43346
43413
|
}
|
|
@@ -43355,7 +43422,7 @@ function glTypeToBytes(type2) {
|
|
|
43355
43422
|
case 5126:
|
|
43356
43423
|
return 4;
|
|
43357
43424
|
default:
|
|
43358
|
-
assert$
|
|
43425
|
+
assert$a(false);
|
|
43359
43426
|
return 0;
|
|
43360
43427
|
}
|
|
43361
43428
|
}
|
|
@@ -43377,7 +43444,7 @@ function readPixelsToArray(source) {
|
|
|
43377
43444
|
framebuffer,
|
|
43378
43445
|
deleteFramebuffer
|
|
43379
43446
|
} = getFramebuffer$1(source);
|
|
43380
|
-
assert$
|
|
43447
|
+
assert$a(framebuffer);
|
|
43381
43448
|
const {
|
|
43382
43449
|
gl,
|
|
43383
43450
|
handle,
|
|
@@ -43388,7 +43455,7 @@ function readPixelsToArray(source) {
|
|
|
43388
43455
|
if (sourceAttachment === 36064 && handle === null) {
|
|
43389
43456
|
sourceAttachment = 1028;
|
|
43390
43457
|
}
|
|
43391
|
-
assert$
|
|
43458
|
+
assert$a(attachments[sourceAttachment]);
|
|
43392
43459
|
sourceType = sourceType || attachments[sourceAttachment].type;
|
|
43393
43460
|
target = getPixelArray(target, sourceType, sourceFormat, sourceWidth, sourceHeight);
|
|
43394
43461
|
sourceType = sourceType || getGLTypeFromTypedArray(target);
|
|
@@ -43415,7 +43482,7 @@ function readPixelsToBuffer(source, _ref) {
|
|
|
43415
43482
|
framebuffer,
|
|
43416
43483
|
deleteFramebuffer
|
|
43417
43484
|
} = getFramebuffer$1(source);
|
|
43418
|
-
assert$
|
|
43485
|
+
assert$a(framebuffer);
|
|
43419
43486
|
sourceWidth = sourceWidth || framebuffer.width;
|
|
43420
43487
|
sourceHeight = sourceHeight || framebuffer.height;
|
|
43421
43488
|
const gl2 = assertWebGL2Context(framebuffer.gl);
|
|
@@ -43504,7 +43571,7 @@ function copyToTexture(source, target) {
|
|
|
43504
43571
|
framebuffer,
|
|
43505
43572
|
deleteFramebuffer
|
|
43506
43573
|
} = getFramebuffer$1(source);
|
|
43507
|
-
assert$
|
|
43574
|
+
assert$a(framebuffer);
|
|
43508
43575
|
const {
|
|
43509
43576
|
gl,
|
|
43510
43577
|
handle
|
|
@@ -43514,7 +43581,7 @@ function copyToTexture(source, target) {
|
|
|
43514
43581
|
targetY = targetY || 0;
|
|
43515
43582
|
targetZ = targetZ || 0;
|
|
43516
43583
|
const prevHandle = gl.bindFramebuffer(36160, handle);
|
|
43517
|
-
assert$
|
|
43584
|
+
assert$a(target);
|
|
43518
43585
|
let texture = null;
|
|
43519
43586
|
if (target instanceof Texture) {
|
|
43520
43587
|
texture = target;
|
|
@@ -43669,7 +43736,7 @@ function isFeatureSupported(gl, cap) {
|
|
|
43669
43736
|
}
|
|
43670
43737
|
function queryFeature(gl, cap) {
|
|
43671
43738
|
const feature2 = WEBGL_FEATURES$1[cap];
|
|
43672
|
-
assert$
|
|
43739
|
+
assert$a(feature2, cap);
|
|
43673
43740
|
let isSupported;
|
|
43674
43741
|
const featureDefinition = isWebGL2$1(gl) ? feature2[1] || feature2[0] : feature2[0];
|
|
43675
43742
|
if (typeof featureDefinition === "function") {
|
|
@@ -43684,7 +43751,7 @@ function queryFeature(gl, cap) {
|
|
|
43684
43751
|
} else if (typeof featureDefinition === "boolean") {
|
|
43685
43752
|
isSupported = featureDefinition;
|
|
43686
43753
|
} else {
|
|
43687
|
-
assert$
|
|
43754
|
+
assert$a(false);
|
|
43688
43755
|
}
|
|
43689
43756
|
return isSupported;
|
|
43690
43757
|
}
|
|
@@ -43761,7 +43828,7 @@ class Framebuffer extends Resource$1 {
|
|
|
43761
43828
|
readBuffer = void 0,
|
|
43762
43829
|
drawBuffers = void 0
|
|
43763
43830
|
} = _ref;
|
|
43764
|
-
assert$
|
|
43831
|
+
assert$a(width >= 0 && height >= 0, "Width and height need to be integers");
|
|
43765
43832
|
this.width = width;
|
|
43766
43833
|
this.height = height;
|
|
43767
43834
|
if (attachments) {
|
|
@@ -43825,7 +43892,7 @@ class Framebuffer extends Resource$1 {
|
|
|
43825
43892
|
height
|
|
43826
43893
|
} = options;
|
|
43827
43894
|
if (this.handle === null) {
|
|
43828
|
-
assert$
|
|
43895
|
+
assert$a(width === void 0 && height === void 0);
|
|
43829
43896
|
this.width = this.gl.drawingBufferWidth;
|
|
43830
43897
|
this.height = this.gl.drawingBufferHeight;
|
|
43831
43898
|
return this;
|
|
@@ -43863,7 +43930,7 @@ class Framebuffer extends Resource$1 {
|
|
|
43863
43930
|
Object.assign(newAttachments, attachments);
|
|
43864
43931
|
const prevHandle = this.gl.bindFramebuffer(36160, this.handle);
|
|
43865
43932
|
for (const key in newAttachments) {
|
|
43866
|
-
assert$
|
|
43933
|
+
assert$a(key !== void 0, "Misspelled framebuffer binding point?");
|
|
43867
43934
|
const attachment = Number(key);
|
|
43868
43935
|
const descriptor = newAttachments[attachment];
|
|
43869
43936
|
let object2 = descriptor;
|
|
@@ -44099,7 +44166,7 @@ class Framebuffer extends Resource$1 {
|
|
|
44099
44166
|
});
|
|
44100
44167
|
this.ownResources.push(defaultAttachments[36096]);
|
|
44101
44168
|
} else if (stencil) {
|
|
44102
|
-
assert$
|
|
44169
|
+
assert$a(false);
|
|
44103
44170
|
}
|
|
44104
44171
|
return defaultAttachments;
|
|
44105
44172
|
}
|
|
@@ -44151,7 +44218,7 @@ class Framebuffer extends Resource$1 {
|
|
|
44151
44218
|
gl.framebufferTexture2D(36160, attachment, 3553, texture.handle, level);
|
|
44152
44219
|
break;
|
|
44153
44220
|
default:
|
|
44154
|
-
assert$
|
|
44221
|
+
assert$a(false, "Illegal texture type");
|
|
44155
44222
|
}
|
|
44156
44223
|
gl.bindTexture(texture.target, null);
|
|
44157
44224
|
this.attachments[attachment] = texture;
|
|
@@ -44161,7 +44228,7 @@ class Framebuffer extends Resource$1 {
|
|
|
44161
44228
|
if (gl2) {
|
|
44162
44229
|
gl2.readBuffer(readBuffer);
|
|
44163
44230
|
} else {
|
|
44164
|
-
assert$
|
|
44231
|
+
assert$a(readBuffer === 36064 || readBuffer === 1029, ERR_MULTIPLE_RENDERTARGETS);
|
|
44165
44232
|
}
|
|
44166
44233
|
this.readBuffer = readBuffer;
|
|
44167
44234
|
}
|
|
@@ -44177,7 +44244,7 @@ class Framebuffer extends Resource$1 {
|
|
|
44177
44244
|
if (ext) {
|
|
44178
44245
|
ext.drawBuffersWEBGL(drawBuffers);
|
|
44179
44246
|
} else {
|
|
44180
|
-
assert$
|
|
44247
|
+
assert$a(drawBuffers.length === 1 && (drawBuffers[0] === 36064 || drawBuffers[0] === 1029), ERR_MULTIPLE_RENDERTARGETS);
|
|
44181
44248
|
}
|
|
44182
44249
|
}
|
|
44183
44250
|
this.drawBuffers = drawBuffers;
|
|
@@ -44222,7 +44289,7 @@ function _getFrameBufferStatus(status) {
|
|
|
44222
44289
|
const FRAMEBUFFER_ATTACHMENT_PARAMETERS = [36049, 36048, 33296, 33298, 33299, 33300, 33301, 33302, 33303];
|
|
44223
44290
|
Framebuffer.ATTACHMENT_PARAMETERS = FRAMEBUFFER_ATTACHMENT_PARAMETERS;
|
|
44224
44291
|
function cloneTextureFrom(refTexture, overrides) {
|
|
44225
|
-
assert$
|
|
44292
|
+
assert$a(refTexture instanceof Texture2D || refTexture instanceof TextureCube || refTexture instanceof Texture3D);
|
|
44226
44293
|
const TextureType = refTexture.constructor;
|
|
44227
44294
|
const {
|
|
44228
44295
|
gl,
|
|
@@ -44371,13 +44438,13 @@ class Shader extends Resource$1 {
|
|
|
44371
44438
|
case 35632:
|
|
44372
44439
|
return "fragment-shader";
|
|
44373
44440
|
default:
|
|
44374
|
-
assert$
|
|
44441
|
+
assert$a(false);
|
|
44375
44442
|
return "unknown";
|
|
44376
44443
|
}
|
|
44377
44444
|
}
|
|
44378
44445
|
constructor(gl, props) {
|
|
44379
44446
|
assertWebGLContext(gl);
|
|
44380
|
-
assert$
|
|
44447
|
+
assert$a(typeof props.source === "string", ERR_SOURCE);
|
|
44381
44448
|
const id = getShaderName$1(props.source, null) || props.id || uid("unnamed ".concat(Shader.getTypeName(props.shaderType)));
|
|
44382
44449
|
super(gl, {
|
|
44383
44450
|
id
|
|
@@ -44665,7 +44732,7 @@ function getArraySetter(functionName, toArray, size2, uniformSetter) {
|
|
|
44665
44732
|
cacheLength = length2;
|
|
44666
44733
|
update = true;
|
|
44667
44734
|
} else {
|
|
44668
|
-
assert$
|
|
44735
|
+
assert$a(cacheLength === length2, "Uniform length cannot change.");
|
|
44669
44736
|
for (let i2 = 0; i2 < length2; ++i2) {
|
|
44670
44737
|
if (arrayValue[i2] !== cache2[i2]) {
|
|
44671
44738
|
update = true;
|
|
@@ -44766,7 +44833,7 @@ function getPrimitiveDrawMode(drawMode) {
|
|
|
44766
44833
|
case GL_TRIANGLE_FAN:
|
|
44767
44834
|
return GL_TRIANGLES;
|
|
44768
44835
|
default:
|
|
44769
|
-
assert$
|
|
44836
|
+
assert$a(false);
|
|
44770
44837
|
return 0;
|
|
44771
44838
|
}
|
|
44772
44839
|
}
|
|
@@ -44955,8 +45022,8 @@ class Program extends Resource$1 {
|
|
|
44955
45022
|
id: "".concat(props.id, "-fs"),
|
|
44956
45023
|
source: fs2
|
|
44957
45024
|
}) : fs2;
|
|
44958
|
-
assert$
|
|
44959
|
-
assert$
|
|
45025
|
+
assert$a(this.vs instanceof VertexShader);
|
|
45026
|
+
assert$a(this.fs instanceof FragmentShader);
|
|
44960
45027
|
this.uniforms = {};
|
|
44961
45028
|
this._textureUniforms = {};
|
|
44962
45029
|
if (varyings && varyings.length > 0) {
|
|
@@ -45010,7 +45077,7 @@ class Program extends Resource$1 {
|
|
|
45010
45077
|
const message = "mode=".concat(getKey(this.gl, drawMode), " verts=").concat(vertexCount, " ") + "instances=".concat(instanceCount, " indexType=").concat(getKey(this.gl, indexType), " ") + "isInstanced=".concat(isInstanced, " isIndexed=").concat(isIndexed, " ") + "Framebuffer=".concat(fb);
|
|
45011
45078
|
log$2.log(logPriority, message)();
|
|
45012
45079
|
}
|
|
45013
|
-
assert$
|
|
45080
|
+
assert$a(vertexArray);
|
|
45014
45081
|
this.gl.useProgram(this.handle);
|
|
45015
45082
|
if (!this._areTexturesRenderable() || vertexCount === 0 || isInstanced && instanceCount === 0) {
|
|
45016
45083
|
return false;
|
|
@@ -45223,7 +45290,7 @@ class Query extends Resource$1 {
|
|
|
45223
45290
|
supported = supported && hasTimerQuery;
|
|
45224
45291
|
break;
|
|
45225
45292
|
default:
|
|
45226
|
-
assert$
|
|
45293
|
+
assert$a(false);
|
|
45227
45294
|
}
|
|
45228
45295
|
}
|
|
45229
45296
|
return supported;
|
|
@@ -45540,7 +45607,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45540
45607
|
VertexArrayObject._setConstantUintArray(gl, location, array);
|
|
45541
45608
|
break;
|
|
45542
45609
|
default:
|
|
45543
|
-
assert$
|
|
45610
|
+
assert$a(false);
|
|
45544
45611
|
}
|
|
45545
45612
|
}
|
|
45546
45613
|
constructor(gl) {
|
|
@@ -45575,7 +45642,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45575
45642
|
}
|
|
45576
45643
|
setElementBuffer() {
|
|
45577
45644
|
let elementBuffer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
45578
|
-
assert$
|
|
45645
|
+
assert$a(!elementBuffer || elementBuffer.target === 34963, ERR_ELEMENTS);
|
|
45579
45646
|
this.bind(() => {
|
|
45580
45647
|
this.gl.bindBuffer(34963, elementBuffer ? elementBuffer.handle : null);
|
|
45581
45648
|
});
|
|
@@ -45602,7 +45669,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45602
45669
|
this.bind(() => {
|
|
45603
45670
|
gl.bindBuffer(34962, buffer2.handle);
|
|
45604
45671
|
if (integer) {
|
|
45605
|
-
assert$
|
|
45672
|
+
assert$a(isWebGL2$1(gl));
|
|
45606
45673
|
gl2.vertexAttribIPointer(location, size2, type2, stride, offset);
|
|
45607
45674
|
} else {
|
|
45608
45675
|
gl.vertexAttribPointer(location, size2, type2, normalized, stride, offset);
|
|
@@ -45676,11 +45743,11 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45676
45743
|
gl.vertexAttrib4fv(location, array);
|
|
45677
45744
|
break;
|
|
45678
45745
|
default:
|
|
45679
|
-
assert$
|
|
45746
|
+
assert$a(false);
|
|
45680
45747
|
}
|
|
45681
45748
|
}
|
|
45682
45749
|
static _setConstantIntArray(gl, location, array) {
|
|
45683
|
-
assert$
|
|
45750
|
+
assert$a(isWebGL2$1(gl));
|
|
45684
45751
|
switch (array.length) {
|
|
45685
45752
|
case 1:
|
|
45686
45753
|
gl.vertexAttribI1iv(location, array);
|
|
@@ -45695,11 +45762,11 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45695
45762
|
gl.vertexAttribI4iv(location, array);
|
|
45696
45763
|
break;
|
|
45697
45764
|
default:
|
|
45698
|
-
assert$
|
|
45765
|
+
assert$a(false);
|
|
45699
45766
|
}
|
|
45700
45767
|
}
|
|
45701
45768
|
static _setConstantUintArray(gl, location, array) {
|
|
45702
|
-
assert$
|
|
45769
|
+
assert$a(isWebGL2$1(gl));
|
|
45703
45770
|
switch (array.length) {
|
|
45704
45771
|
case 1:
|
|
45705
45772
|
gl.vertexAttribI1uiv(location, array);
|
|
@@ -45714,7 +45781,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45714
45781
|
gl.vertexAttribI4uiv(location, array);
|
|
45715
45782
|
break;
|
|
45716
45783
|
default:
|
|
45717
|
-
assert$
|
|
45784
|
+
assert$a(false);
|
|
45718
45785
|
}
|
|
45719
45786
|
}
|
|
45720
45787
|
_createHandle() {
|
|
@@ -45732,7 +45799,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
45732
45799
|
let {
|
|
45733
45800
|
location
|
|
45734
45801
|
} = _ref;
|
|
45735
|
-
assert$
|
|
45802
|
+
assert$a(Number.isFinite(location));
|
|
45736
45803
|
return this.bind(() => {
|
|
45737
45804
|
switch (pname) {
|
|
45738
45805
|
case 34373:
|
|
@@ -45936,7 +46003,7 @@ class VertexArray {
|
|
|
45936
46003
|
size: size2,
|
|
45937
46004
|
type: type2
|
|
45938
46005
|
} = accessor;
|
|
45939
|
-
assert$
|
|
46006
|
+
assert$a(Number.isFinite(size2) && Number.isFinite(type2));
|
|
45940
46007
|
return {
|
|
45941
46008
|
location,
|
|
45942
46009
|
accessor
|
|
@@ -46112,7 +46179,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
46112
46179
|
uniforms,
|
|
46113
46180
|
undefinedOnly = false
|
|
46114
46181
|
} = _ref;
|
|
46115
|
-
assert$
|
|
46182
|
+
assert$a(program);
|
|
46116
46183
|
const SHADER_MODULE_UNIFORM_REGEXP = ".*_.*";
|
|
46117
46184
|
const PROJECT_MODULE_UNIFORM_REGEXP = ".*Matrix";
|
|
46118
46185
|
const uniformLocations = program._uniformSetters;
|
|
@@ -46399,7 +46466,7 @@ class AnimationLoop {
|
|
|
46399
46466
|
this._setDisplay(null);
|
|
46400
46467
|
}
|
|
46401
46468
|
setNeedsRedraw(reason) {
|
|
46402
|
-
assert$
|
|
46469
|
+
assert$a(typeof reason === "string");
|
|
46403
46470
|
this.needsRedraw = this.needsRedraw || reason;
|
|
46404
46471
|
return this;
|
|
46405
46472
|
}
|
|
@@ -46748,7 +46815,7 @@ class AnimationLoop {
|
|
|
46748
46815
|
}
|
|
46749
46816
|
const VERTEX_SHADER$1 = "vs";
|
|
46750
46817
|
const FRAGMENT_SHADER$1 = "fs";
|
|
46751
|
-
function assert$
|
|
46818
|
+
function assert$9(condition, message) {
|
|
46752
46819
|
if (!condition) {
|
|
46753
46820
|
throw new Error(message || "shadertools: assertion failed.");
|
|
46754
46821
|
}
|
|
@@ -46825,7 +46892,7 @@ class ShaderModule {
|
|
|
46825
46892
|
vertexShader: vertexShader2,
|
|
46826
46893
|
fragmentShader: fragmentShader2
|
|
46827
46894
|
} = _ref;
|
|
46828
|
-
assert$
|
|
46895
|
+
assert$9(typeof name2 === "string");
|
|
46829
46896
|
this.name = name2;
|
|
46830
46897
|
this.vs = vs2 || vertexShader2;
|
|
46831
46898
|
this.fs = fs2 || fragmentShader2;
|
|
@@ -46848,7 +46915,7 @@ class ShaderModule {
|
|
|
46848
46915
|
moduleSource = this.fs || "";
|
|
46849
46916
|
break;
|
|
46850
46917
|
default:
|
|
46851
|
-
assert$
|
|
46918
|
+
assert$9(false);
|
|
46852
46919
|
}
|
|
46853
46920
|
return "#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi, "_"), "\n").concat(moduleSource, "// END MODULE_").concat(this.name, "\n\n");
|
|
46854
46921
|
}
|
|
@@ -46895,7 +46962,7 @@ class ShaderModule {
|
|
|
46895
46962
|
const propDef = propTypes[key];
|
|
46896
46963
|
if (key in opts2 && !propDef.private) {
|
|
46897
46964
|
if (propDef.validate) {
|
|
46898
|
-
assert$
|
|
46965
|
+
assert$9(propDef.validate(opts2[key], propDef), "".concat(this.name, ": invalid ").concat(key));
|
|
46899
46966
|
}
|
|
46900
46967
|
uniforms[key] = opts2[key];
|
|
46901
46968
|
} else {
|
|
@@ -46979,8 +47046,8 @@ function instantiateModules(modules, seen) {
|
|
|
46979
47046
|
if (module2 instanceof ShaderModule) {
|
|
46980
47047
|
return module2;
|
|
46981
47048
|
}
|
|
46982
|
-
assert$
|
|
46983
|
-
assert$
|
|
47049
|
+
assert$9(typeof module2 !== "string", "Shader module use by name is deprecated. Import shader module '".concat(module2, "' and use it directly."));
|
|
47050
|
+
assert$9(module2.name, "shader module has no name");
|
|
46984
47051
|
module2 = new ShaderModule(module2);
|
|
46985
47052
|
module2.dependencies = instantiateModules(module2.dependencies);
|
|
46986
47053
|
return module2;
|
|
@@ -47044,7 +47111,7 @@ const compiledGlslExtensions = {};
|
|
|
47044
47111
|
function canCompileGLGSExtension(gl, cap) {
|
|
47045
47112
|
let opts2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
47046
47113
|
const feature2 = WEBGL_FEATURES[cap];
|
|
47047
|
-
assert$
|
|
47114
|
+
assert$9(feature2, cap);
|
|
47048
47115
|
if (!isOldIE(opts2)) {
|
|
47049
47116
|
return true;
|
|
47050
47117
|
}
|
|
@@ -47064,10 +47131,10 @@ function canCompileGLGSExtension(gl, cap) {
|
|
|
47064
47131
|
}
|
|
47065
47132
|
function getFeature(gl, cap) {
|
|
47066
47133
|
const feature2 = WEBGL_FEATURES[cap];
|
|
47067
|
-
assert$
|
|
47134
|
+
assert$9(feature2, cap);
|
|
47068
47135
|
const extensionName = isWebGL2(gl) ? feature2[1] || feature2[0] : feature2[0];
|
|
47069
47136
|
const value = typeof extensionName === "string" ? Boolean(gl.getExtension(extensionName)) : extensionName;
|
|
47070
|
-
assert$
|
|
47137
|
+
assert$9(value === false || value === true);
|
|
47071
47138
|
return value;
|
|
47072
47139
|
}
|
|
47073
47140
|
function hasFeatures(gl, features) {
|
|
@@ -47169,7 +47236,7 @@ function injectShader(source, type2, inject2) {
|
|
|
47169
47236
|
}
|
|
47170
47237
|
function combineInjects(injects) {
|
|
47171
47238
|
const result = {};
|
|
47172
|
-
assert$
|
|
47239
|
+
assert$9(Array.isArray(injects) && injects.length > 1);
|
|
47173
47240
|
injects.forEach((inject2) => {
|
|
47174
47241
|
for (const key in inject2) {
|
|
47175
47242
|
result[key] = result[key] ? "".concat(result[key], "\n").concat(inject2[key]) : inject2[key];
|
|
@@ -47266,7 +47333,7 @@ function assembleShader(gl, _ref) {
|
|
|
47266
47333
|
prologue = true,
|
|
47267
47334
|
log: log3
|
|
47268
47335
|
} = _ref;
|
|
47269
|
-
assert$
|
|
47336
|
+
assert$9(typeof source === "string", "shader source must be a string");
|
|
47270
47337
|
const isVertex = type2 === VERTEX_SHADER$1;
|
|
47271
47338
|
const sourceLines = source.split("\n");
|
|
47272
47339
|
let glslVersion = 100;
|
|
@@ -47483,7 +47550,7 @@ function typeToChannelSuffix(type2) {
|
|
|
47483
47550
|
case "vec4":
|
|
47484
47551
|
return "xyzw";
|
|
47485
47552
|
default:
|
|
47486
|
-
assert$
|
|
47553
|
+
assert$9(false);
|
|
47487
47554
|
return null;
|
|
47488
47555
|
}
|
|
47489
47556
|
}
|
|
@@ -47498,7 +47565,7 @@ function typeToChannelCount(type2) {
|
|
|
47498
47565
|
case "vec4":
|
|
47499
47566
|
return 4;
|
|
47500
47567
|
default:
|
|
47501
|
-
assert$
|
|
47568
|
+
assert$9(false);
|
|
47502
47569
|
return null;
|
|
47503
47570
|
}
|
|
47504
47571
|
}
|
|
@@ -47513,7 +47580,7 @@ function convertToVec4(variable, type2) {
|
|
|
47513
47580
|
case "vec4":
|
|
47514
47581
|
return variable;
|
|
47515
47582
|
default:
|
|
47516
|
-
assert$
|
|
47583
|
+
assert$9(false);
|
|
47517
47584
|
return null;
|
|
47518
47585
|
}
|
|
47519
47586
|
}
|
|
@@ -47988,7 +48055,7 @@ function getBuffersFromGeometry(gl, geometry2, options) {
|
|
|
47988
48055
|
}
|
|
47989
48056
|
if (indices) {
|
|
47990
48057
|
const data = indices.value || indices;
|
|
47991
|
-
assert$
|
|
48058
|
+
assert$a(data instanceof Uint16Array || data instanceof Uint32Array, 'attribute array for "indices" must be of integer type');
|
|
47992
48059
|
const accessor = {
|
|
47993
48060
|
size: 1,
|
|
47994
48061
|
isIndexed: indices.isIndexed === void 0 ? true : indices.isIndexed
|
|
@@ -48030,7 +48097,7 @@ function inferAttributeAccessor(attributeName, attribute) {
|
|
|
48030
48097
|
attribute.size = attribute.size || 2;
|
|
48031
48098
|
break;
|
|
48032
48099
|
}
|
|
48033
|
-
assert$
|
|
48100
|
+
assert$a(Number.isFinite(attribute.size), "attribute ".concat(attributeName, " needs size"));
|
|
48034
48101
|
}
|
|
48035
48102
|
const LOG_DRAW_PRIORITY = 2;
|
|
48036
48103
|
const LOG_DRAW_TIMEOUT = 1e4;
|
|
@@ -48044,7 +48111,7 @@ class Model {
|
|
|
48044
48111
|
const {
|
|
48045
48112
|
id = uid("model")
|
|
48046
48113
|
} = props;
|
|
48047
|
-
assert$
|
|
48114
|
+
assert$a(isWebGL(gl));
|
|
48048
48115
|
this.id = id;
|
|
48049
48116
|
this.gl = gl;
|
|
48050
48117
|
this.id = props.id || uid("Model");
|
|
@@ -48096,7 +48163,7 @@ class Model {
|
|
|
48096
48163
|
this.isInstanced = props.isInstanced || props.instanced || props.instanceCount > 0;
|
|
48097
48164
|
this._setModelProps(props);
|
|
48098
48165
|
this.geometry = {};
|
|
48099
|
-
assert$
|
|
48166
|
+
assert$a(this.drawMode !== void 0 && Number.isFinite(this.vertexCount), ERR_MODEL_PARAMS);
|
|
48100
48167
|
}
|
|
48101
48168
|
setProps(props) {
|
|
48102
48169
|
this._setModelProps(props);
|
|
@@ -48162,12 +48229,12 @@ class Model {
|
|
|
48162
48229
|
return this;
|
|
48163
48230
|
}
|
|
48164
48231
|
setVertexCount(vertexCount) {
|
|
48165
|
-
assert$
|
|
48232
|
+
assert$a(Number.isFinite(vertexCount));
|
|
48166
48233
|
this.vertexCount = vertexCount;
|
|
48167
48234
|
return this;
|
|
48168
48235
|
}
|
|
48169
48236
|
setInstanceCount(instanceCount) {
|
|
48170
|
-
assert$
|
|
48237
|
+
assert$a(Number.isFinite(instanceCount));
|
|
48171
48238
|
this.instanceCount = instanceCount;
|
|
48172
48239
|
return this;
|
|
48173
48240
|
}
|
|
@@ -48364,7 +48431,7 @@ class Model {
|
|
|
48364
48431
|
this._programManagerState = this.programManager.stateHash;
|
|
48365
48432
|
this._managedProgram = true;
|
|
48366
48433
|
}
|
|
48367
|
-
assert$
|
|
48434
|
+
assert$a(program instanceof Program, "Model needs a program");
|
|
48368
48435
|
this._programDirty = false;
|
|
48369
48436
|
if (program === this.program) {
|
|
48370
48437
|
return;
|
|
@@ -48392,7 +48459,7 @@ class Model {
|
|
|
48392
48459
|
}
|
|
48393
48460
|
_setAnimationProps(animationProps) {
|
|
48394
48461
|
if (this.animated) {
|
|
48395
|
-
assert$
|
|
48462
|
+
assert$a(animationProps, "Model.draw(): animated uniforms but no animationProps");
|
|
48396
48463
|
}
|
|
48397
48464
|
}
|
|
48398
48465
|
_setFeedbackBuffers() {
|
|
@@ -48550,7 +48617,7 @@ class BufferTransform {
|
|
|
48550
48617
|
this._setupBuffers(props);
|
|
48551
48618
|
this.varyings = props.varyings || Object.keys(this.bindings[this.currentIndex].feedbackBuffers);
|
|
48552
48619
|
if (this.varyings.length > 0) {
|
|
48553
|
-
assert$
|
|
48620
|
+
assert$a(isWebGL2$1(this.gl));
|
|
48554
48621
|
}
|
|
48555
48622
|
}
|
|
48556
48623
|
_getFeedbackBuffers(props) {
|
|
@@ -48650,7 +48717,7 @@ class BufferTransform {
|
|
|
48650
48717
|
const dstName = this.feedbackMap[srcName];
|
|
48651
48718
|
sourceBuffers[srcName] = opts2.feedbackBuffers[dstName];
|
|
48652
48719
|
feedbackBuffers[dstName] = opts2.sourceBuffers[srcName];
|
|
48653
|
-
assert$
|
|
48720
|
+
assert$a(feedbackBuffers[dstName] instanceof Buffer$1);
|
|
48654
48721
|
}
|
|
48655
48722
|
return {
|
|
48656
48723
|
sourceBuffers,
|
|
@@ -48707,7 +48774,7 @@ function updateForTextures(_ref) {
|
|
|
48707
48774
|
}
|
|
48708
48775
|
});
|
|
48709
48776
|
if (targetTextureVarying) {
|
|
48710
|
-
assert$
|
|
48777
|
+
assert$a(targetTexture);
|
|
48711
48778
|
const sizeName = "".concat(SIZE_UNIFORM_PREFIX).concat(targetTextureVarying);
|
|
48712
48779
|
const uniformDeclaration = "uniform vec2 ".concat(sizeName, ";\n");
|
|
48713
48780
|
const posInstructions = " vec2 ".concat(VS_POS_VARIABLE, " = transform_getPos(").concat(sizeName, ");\n gl_Position = vec4(").concat(VS_POS_VARIABLE, ", 0, 1.);\n");
|
|
@@ -49178,7 +49245,7 @@ class Transform {
|
|
|
49178
49245
|
for (const resourceTransform of resourceTransforms) {
|
|
49179
49246
|
swapped = swapped || resourceTransform.swap();
|
|
49180
49247
|
}
|
|
49181
|
-
assert$
|
|
49248
|
+
assert$a(swapped, "Nothing to swap");
|
|
49182
49249
|
}
|
|
49183
49250
|
getBuffer() {
|
|
49184
49251
|
let varyingName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
@@ -49242,7 +49309,7 @@ class Transform {
|
|
|
49242
49309
|
if (canCreateTextureTransform(props)) {
|
|
49243
49310
|
this.textureTransform = new TextureTransform(gl, props);
|
|
49244
49311
|
}
|
|
49245
|
-
assert$
|
|
49312
|
+
assert$a(this.bufferTransform || this.textureTransform, "must provide source/feedback buffers or source/target textures");
|
|
49246
49313
|
}
|
|
49247
49314
|
_updateDrawOptions(opts2) {
|
|
49248
49315
|
let updatedOpts = Object.assign({}, opts2);
|
|
@@ -49321,12 +49388,12 @@ class Geometry {
|
|
|
49321
49388
|
attribute = ArrayBuffer.isView(attribute) ? {
|
|
49322
49389
|
value: attribute
|
|
49323
49390
|
} : attribute;
|
|
49324
|
-
assert$
|
|
49391
|
+
assert$a(ArrayBuffer.isView(attribute.value), "".concat(this._print(attributeName), ": must be typed array or object with value as typed array"));
|
|
49325
49392
|
if ((attributeName === "POSITION" || attributeName === "positions") && !attribute.size) {
|
|
49326
49393
|
attribute.size = 3;
|
|
49327
49394
|
}
|
|
49328
49395
|
if (attributeName === "indices") {
|
|
49329
|
-
assert$
|
|
49396
|
+
assert$a(!this.indices);
|
|
49330
49397
|
this.indices = attribute;
|
|
49331
49398
|
} else {
|
|
49332
49399
|
this.attributes[attributeName] = attribute;
|
|
@@ -49354,7 +49421,7 @@ class Geometry {
|
|
|
49354
49421
|
vertexCount = Math.min(vertexCount, value.length / size2);
|
|
49355
49422
|
}
|
|
49356
49423
|
}
|
|
49357
|
-
assert$
|
|
49424
|
+
assert$a(Number.isFinite(vertexCount));
|
|
49358
49425
|
return vertexCount;
|
|
49359
49426
|
}
|
|
49360
49427
|
}
|
|
@@ -50137,7 +50204,7 @@ const esm$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
50137
50204
|
TransformFeedback,
|
|
50138
50205
|
TruncatedConeGeometry,
|
|
50139
50206
|
VertexShader,
|
|
50140
|
-
assert: assert$
|
|
50207
|
+
assert: assert$a,
|
|
50141
50208
|
clear,
|
|
50142
50209
|
cloneTextureFrom,
|
|
50143
50210
|
copyToTexture,
|
|
@@ -50464,7 +50531,7 @@ function ieLog2(x2) {
|
|
|
50464
50531
|
return Math.log(x2) * Math.LOG2E;
|
|
50465
50532
|
}
|
|
50466
50533
|
const log2 = Math.log2 || ieLog2;
|
|
50467
|
-
function assert$
|
|
50534
|
+
function assert$8(condition, message) {
|
|
50468
50535
|
if (!condition) {
|
|
50469
50536
|
throw new Error(message || "@math.gl/web-mercator: assertion failed.");
|
|
50470
50537
|
}
|
|
@@ -50485,8 +50552,8 @@ function scaleToZoom(scale2) {
|
|
|
50485
50552
|
}
|
|
50486
50553
|
function lngLatToWorld(lngLat) {
|
|
50487
50554
|
const [lng, lat] = lngLat;
|
|
50488
|
-
assert$
|
|
50489
|
-
assert$
|
|
50555
|
+
assert$8(Number.isFinite(lng));
|
|
50556
|
+
assert$8(Number.isFinite(lat) && lat >= -90 && lat <= 90, "invalid latitude");
|
|
50490
50557
|
const lambda22 = lng * DEGREES_TO_RADIANS$6;
|
|
50491
50558
|
const phi2 = lat * DEGREES_TO_RADIANS$6;
|
|
50492
50559
|
const x2 = TILE_SIZE$6 * (lambda22 + PI) / (2 * PI);
|
|
@@ -50503,7 +50570,7 @@ function getMeterZoom(options) {
|
|
|
50503
50570
|
const {
|
|
50504
50571
|
latitude
|
|
50505
50572
|
} = options;
|
|
50506
|
-
assert$
|
|
50573
|
+
assert$8(Number.isFinite(latitude));
|
|
50507
50574
|
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS$6);
|
|
50508
50575
|
return scaleToZoom(EARTH_CIRCUMFERENCE$1 * latCosine) - 9;
|
|
50509
50576
|
}
|
|
@@ -50517,7 +50584,7 @@ function getDistanceScales$1(options) {
|
|
|
50517
50584
|
longitude,
|
|
50518
50585
|
highPrecision = false
|
|
50519
50586
|
} = options;
|
|
50520
|
-
assert$
|
|
50587
|
+
assert$8(Number.isFinite(latitude) && Number.isFinite(longitude));
|
|
50521
50588
|
const worldSize = TILE_SIZE$6;
|
|
50522
50589
|
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS$6);
|
|
50523
50590
|
const unitsPerDegreeX = worldSize / 360;
|
|
@@ -50633,12 +50700,12 @@ function fovyToAltitude(fovy) {
|
|
|
50633
50700
|
}
|
|
50634
50701
|
function worldToPixels(xyz, pixelProjectionMatrix) {
|
|
50635
50702
|
const [x2, y2, z2 = 0] = xyz;
|
|
50636
|
-
assert$
|
|
50703
|
+
assert$8(Number.isFinite(x2) && Number.isFinite(y2) && Number.isFinite(z2));
|
|
50637
50704
|
return transformVector$1(pixelProjectionMatrix, [x2, y2, z2, 1]);
|
|
50638
50705
|
}
|
|
50639
50706
|
function pixelsToWorld(xyz, pixelUnprojectionMatrix, targetZ = 0) {
|
|
50640
50707
|
const [x2, y2, z2] = xyz;
|
|
50641
|
-
assert$
|
|
50708
|
+
assert$8(Number.isFinite(x2) && Number.isFinite(y2), "invalid pixel coordinate");
|
|
50642
50709
|
if (Number.isFinite(z2)) {
|
|
50643
50710
|
const coord = transformVector$1(pixelUnprojectionMatrix, [x2, y2, z2, 1]);
|
|
50644
50711
|
return coord;
|
|
@@ -50665,7 +50732,7 @@ function fitBounds(options) {
|
|
|
50665
50732
|
const se = lngLatToWorld([east, clamp(south, -MAX_LATITUDE, MAX_LATITUDE)]);
|
|
50666
50733
|
const size2 = [Math.max(Math.abs(se[0] - nw[0]), minExtent), Math.max(Math.abs(se[1] - nw[1]), minExtent)];
|
|
50667
50734
|
const targetSize = [width - padding.left - padding.right - Math.abs(offset[0]) * 2, height - padding.top - padding.bottom - Math.abs(offset[1]) * 2];
|
|
50668
|
-
assert$
|
|
50735
|
+
assert$8(targetSize[0] > 0 && targetSize[1] > 0);
|
|
50669
50736
|
const scaleX2 = targetSize[0] / size2[0];
|
|
50670
50737
|
const scaleY2 = targetSize[1] / size2[1];
|
|
50671
50738
|
const offsetX = (padding.right - padding.left) / 2 / scaleX2;
|
|
@@ -50673,7 +50740,7 @@ function fitBounds(options) {
|
|
|
50673
50740
|
const center2 = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];
|
|
50674
50741
|
const centerLngLat = worldToLngLat(center2);
|
|
50675
50742
|
const zoom = Math.min(maxZoom, log2(Math.abs(Math.min(scaleX2, scaleY2))));
|
|
50676
|
-
assert$
|
|
50743
|
+
assert$8(Number.isFinite(zoom));
|
|
50677
50744
|
return {
|
|
50678
50745
|
longitude: centerLngLat[0],
|
|
50679
50746
|
latitude: centerLngLat[1],
|
|
@@ -50689,7 +50756,7 @@ function getPaddingObject(padding = 0) {
|
|
|
50689
50756
|
right: padding
|
|
50690
50757
|
};
|
|
50691
50758
|
}
|
|
50692
|
-
assert$
|
|
50759
|
+
assert$8(Number.isFinite(padding.top) && Number.isFinite(padding.bottom) && Number.isFinite(padding.left) && Number.isFinite(padding.right));
|
|
50693
50760
|
return padding;
|
|
50694
50761
|
}
|
|
50695
50762
|
const DEGREES_TO_RADIANS$5 = Math.PI / 180;
|
|
@@ -53522,7 +53589,7 @@ function parsePosition(value) {
|
|
|
53522
53589
|
function getPosition$1(position, extent2) {
|
|
53523
53590
|
return position.relative ? Math.round(position.position * extent2) : position.position;
|
|
53524
53591
|
}
|
|
53525
|
-
function assert$
|
|
53592
|
+
function assert$7(condition, message) {
|
|
53526
53593
|
if (!condition) {
|
|
53527
53594
|
throw new Error(message || "deck.gl: assertion failed.");
|
|
53528
53595
|
}
|
|
@@ -53546,7 +53613,7 @@ class View {
|
|
|
53546
53613
|
padding = null,
|
|
53547
53614
|
viewportInstance
|
|
53548
53615
|
} = props || {};
|
|
53549
|
-
assert$
|
|
53616
|
+
assert$7(!viewportInstance || viewportInstance instanceof Viewport);
|
|
53550
53617
|
this.viewportInstance = viewportInstance;
|
|
53551
53618
|
this.id = id || this.constructor.displayName || "view";
|
|
53552
53619
|
this.props = {
|
|
@@ -53920,7 +53987,7 @@ class TransitionInterpolator {
|
|
|
53920
53987
|
}
|
|
53921
53988
|
this._requiredProps.forEach((propName) => {
|
|
53922
53989
|
const value = props[propName];
|
|
53923
|
-
assert$
|
|
53990
|
+
assert$7(Number.isFinite(value) || Array.isArray(value), "".concat(propName, " is required for transition"));
|
|
53924
53991
|
});
|
|
53925
53992
|
}
|
|
53926
53993
|
}
|
|
@@ -54169,9 +54236,9 @@ class Controller {
|
|
|
54169
54236
|
updateTransition() {
|
|
54170
54237
|
this.transitionManager.updateTransition();
|
|
54171
54238
|
}
|
|
54172
|
-
toggleEvents(
|
|
54239
|
+
toggleEvents(eventNames, enabled) {
|
|
54173
54240
|
if (this.eventManager) {
|
|
54174
|
-
|
|
54241
|
+
eventNames.forEach((eventName) => {
|
|
54175
54242
|
if (this._events[eventName] !== enabled) {
|
|
54176
54243
|
this._events[eventName] = enabled;
|
|
54177
54244
|
if (enabled) {
|
|
@@ -54665,9 +54732,9 @@ class MapState extends ViewState {
|
|
|
54665
54732
|
startZoom,
|
|
54666
54733
|
normalize: normalize2 = true
|
|
54667
54734
|
} = options;
|
|
54668
|
-
assert$
|
|
54669
|
-
assert$
|
|
54670
|
-
assert$
|
|
54735
|
+
assert$7(Number.isFinite(longitude));
|
|
54736
|
+
assert$7(Number.isFinite(latitude));
|
|
54737
|
+
assert$7(Number.isFinite(zoom));
|
|
54671
54738
|
super({
|
|
54672
54739
|
width,
|
|
54673
54740
|
height,
|
|
@@ -57622,18 +57689,18 @@ var hammer$1 = { exports: {} };
|
|
|
57622
57689
|
emit: function(input) {
|
|
57623
57690
|
var self2 = this;
|
|
57624
57691
|
var state = this.state;
|
|
57625
|
-
function
|
|
57692
|
+
function emit(event) {
|
|
57626
57693
|
self2.manager.emit(event, input);
|
|
57627
57694
|
}
|
|
57628
57695
|
if (state < STATE_ENDED) {
|
|
57629
|
-
|
|
57696
|
+
emit(self2.options.event + stateStr(state));
|
|
57630
57697
|
}
|
|
57631
|
-
|
|
57698
|
+
emit(self2.options.event);
|
|
57632
57699
|
if (input.additionalEvent) {
|
|
57633
|
-
|
|
57700
|
+
emit(input.additionalEvent);
|
|
57634
57701
|
}
|
|
57635
57702
|
if (state >= STATE_ENDED) {
|
|
57636
|
-
|
|
57703
|
+
emit(self2.options.event + stateStr(state));
|
|
57637
57704
|
}
|
|
57638
57705
|
},
|
|
57639
57706
|
/**
|
|
@@ -58993,7 +59060,7 @@ class EventRegistrar {
|
|
|
58993
59060
|
isEmpty() {
|
|
58994
59061
|
return !this._active;
|
|
58995
59062
|
}
|
|
58996
|
-
add(type2, handler, options,
|
|
59063
|
+
add(type2, handler, options, once = false, passive = false) {
|
|
58997
59064
|
const { handlers, handlersByElement } = this;
|
|
58998
59065
|
let opts2 = DEFAULT_OPTIONS$2;
|
|
58999
59066
|
if (typeof options === "string" || options && options.addEventListener) {
|
|
@@ -59012,7 +59079,7 @@ class EventRegistrar {
|
|
|
59012
59079
|
srcElement: opts2.srcElement,
|
|
59013
59080
|
priority: opts2.priority
|
|
59014
59081
|
};
|
|
59015
|
-
if (
|
|
59082
|
+
if (once) {
|
|
59016
59083
|
entry.once = true;
|
|
59017
59084
|
}
|
|
59018
59085
|
if (passive) {
|
|
@@ -59060,7 +59127,7 @@ class EventRegistrar {
|
|
|
59060
59127
|
};
|
|
59061
59128
|
const entriesToRemove = [];
|
|
59062
59129
|
for (let i2 = 0; i2 < entries.length; i2++) {
|
|
59063
|
-
const { type: type2, handler, once
|
|
59130
|
+
const { type: type2, handler, once } = entries[i2];
|
|
59064
59131
|
handler({
|
|
59065
59132
|
...event,
|
|
59066
59133
|
// @ts-ignore
|
|
@@ -59068,7 +59135,7 @@ class EventRegistrar {
|
|
|
59068
59135
|
stopPropagation,
|
|
59069
59136
|
stopImmediatePropagation
|
|
59070
59137
|
});
|
|
59071
|
-
if (
|
|
59138
|
+
if (once) {
|
|
59072
59139
|
entriesToRemove.push(entries[i2]);
|
|
59073
59140
|
}
|
|
59074
59141
|
if (immediatePropagationStopped) {
|
|
@@ -59249,11 +59316,11 @@ class EventManager {
|
|
|
59249
59316
|
/**
|
|
59250
59317
|
* Process the event registration for a single event + handler.
|
|
59251
59318
|
*/
|
|
59252
|
-
_addEventHandler(event, handler, opts2,
|
|
59319
|
+
_addEventHandler(event, handler, opts2, once, passive) {
|
|
59253
59320
|
if (typeof event !== "string") {
|
|
59254
59321
|
opts2 = handler;
|
|
59255
59322
|
for (const eventName in event) {
|
|
59256
|
-
this._addEventHandler(eventName, event[eventName], opts2,
|
|
59323
|
+
this._addEventHandler(eventName, event[eventName], opts2, once, passive);
|
|
59257
59324
|
}
|
|
59258
59325
|
return;
|
|
59259
59326
|
}
|
|
@@ -59268,7 +59335,7 @@ class EventManager {
|
|
|
59268
59335
|
manager.on(eventAlias, eventRegistrar.handleEvent);
|
|
59269
59336
|
}
|
|
59270
59337
|
}
|
|
59271
|
-
eventRegistrar.add(event, handler, opts2,
|
|
59338
|
+
eventRegistrar.add(event, handler, opts2, once, passive);
|
|
59272
59339
|
if (!eventRegistrar.isEmpty()) {
|
|
59273
59340
|
this._toggleRecognizer(eventRegistrar.recognizerName, true);
|
|
59274
59341
|
}
|
|
@@ -59594,11 +59661,11 @@ class Deck {
|
|
|
59594
59661
|
return this.viewManager !== null;
|
|
59595
59662
|
}
|
|
59596
59663
|
getViews() {
|
|
59597
|
-
assert$
|
|
59664
|
+
assert$7(this.viewManager);
|
|
59598
59665
|
return this.viewManager.views;
|
|
59599
59666
|
}
|
|
59600
59667
|
getViewports(rect) {
|
|
59601
|
-
assert$
|
|
59668
|
+
assert$7(this.viewManager);
|
|
59602
59669
|
return this.viewManager.getViewports(rect);
|
|
59603
59670
|
}
|
|
59604
59671
|
pickObject(opts2) {
|
|
@@ -59627,7 +59694,7 @@ class Deck {
|
|
|
59627
59694
|
}
|
|
59628
59695
|
}
|
|
59629
59696
|
_pick(method, statKey, opts2) {
|
|
59630
|
-
assert$
|
|
59697
|
+
assert$7(this.deckPicker);
|
|
59631
59698
|
const {
|
|
59632
59699
|
stats
|
|
59633
59700
|
} = this;
|
|
@@ -59648,7 +59715,7 @@ class Deck {
|
|
|
59648
59715
|
let canvas = props.canvas;
|
|
59649
59716
|
if (typeof canvas === "string") {
|
|
59650
59717
|
canvas = document.getElementById(canvas);
|
|
59651
|
-
assert$
|
|
59718
|
+
assert$7(canvas);
|
|
59652
59719
|
}
|
|
59653
59720
|
if (!canvas) {
|
|
59654
59721
|
canvas = document.createElement("canvas");
|
|
@@ -60887,7 +60954,7 @@ class Attribute extends DataColumn {
|
|
|
60887
60954
|
};
|
|
60888
60955
|
}
|
|
60889
60956
|
const binaryValue = buffer2;
|
|
60890
|
-
assert$
|
|
60957
|
+
assert$7(ArrayBuffer.isView(binaryValue.value), "invalid ".concat(settings.accessor));
|
|
60891
60958
|
const needsNormalize = Boolean(binaryValue.size) && binaryValue.size !== this.size;
|
|
60892
60959
|
state.binaryAccessor = getAccessorFromBuffer(binaryValue.value, {
|
|
60893
60960
|
size: binaryValue.size || this.size,
|
|
@@ -60941,7 +61008,7 @@ class Attribute extends DataColumn {
|
|
|
60941
61008
|
transform: transform2
|
|
60942
61009
|
} = settings;
|
|
60943
61010
|
const accessorFunc = state.binaryAccessor || (typeof accessor === "function" ? accessor : props[accessor]);
|
|
60944
|
-
assert$
|
|
61011
|
+
assert$7(typeof accessorFunc === "function", 'accessor "'.concat(accessor, '" is not a function'));
|
|
60945
61012
|
let i2 = attribute.getVertexOffset(startRow);
|
|
60946
61013
|
const {
|
|
60947
61014
|
iterable,
|
|
@@ -61989,7 +62056,7 @@ function getPropTypes(props) {
|
|
|
61989
62056
|
const ERR_NOT_OBJECT = "count(): argument not an object";
|
|
61990
62057
|
const ERR_NOT_CONTAINER = "count(): argument not a container";
|
|
61991
62058
|
function count(container) {
|
|
61992
|
-
if (!isObject$
|
|
62059
|
+
if (!isObject$2(container)) {
|
|
61993
62060
|
throw new Error(ERR_NOT_OBJECT);
|
|
61994
62061
|
}
|
|
61995
62062
|
if (typeof container.count === "function") {
|
|
@@ -62009,7 +62076,7 @@ function count(container) {
|
|
|
62009
62076
|
function isPlainObject(value) {
|
|
62010
62077
|
return value !== null && typeof value === "object" && value.constructor === Object;
|
|
62011
62078
|
}
|
|
62012
|
-
function isObject$
|
|
62079
|
+
function isObject$2(value) {
|
|
62013
62080
|
return value !== null && typeof value === "object";
|
|
62014
62081
|
}
|
|
62015
62082
|
function mergeShaders(target, source) {
|
|
@@ -62893,7 +62960,7 @@ class Layer extends Component {
|
|
|
62893
62960
|
return "".concat(className, "({id: '").concat(this.props.id, "'})");
|
|
62894
62961
|
}
|
|
62895
62962
|
project(xyz) {
|
|
62896
|
-
assert$
|
|
62963
|
+
assert$7(this.internalState);
|
|
62897
62964
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
62898
62965
|
const worldPosition = getWorldPosition(xyz, {
|
|
62899
62966
|
viewport,
|
|
@@ -62905,12 +62972,12 @@ class Layer extends Component {
|
|
|
62905
62972
|
return xyz.length === 2 ? [x2, y2] : [x2, y2, z2];
|
|
62906
62973
|
}
|
|
62907
62974
|
unproject(xy) {
|
|
62908
|
-
assert$
|
|
62975
|
+
assert$7(this.internalState);
|
|
62909
62976
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
62910
62977
|
return viewport.unproject(xy);
|
|
62911
62978
|
}
|
|
62912
62979
|
projectPosition(xyz, params) {
|
|
62913
|
-
assert$
|
|
62980
|
+
assert$7(this.internalState);
|
|
62914
62981
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
62915
62982
|
return projectPosition(xyz, {
|
|
62916
62983
|
viewport,
|
|
@@ -62995,7 +63062,7 @@ class Layer extends Component {
|
|
|
62995
63062
|
return target;
|
|
62996
63063
|
}
|
|
62997
63064
|
decodePickingColor(color) {
|
|
62998
|
-
assert$
|
|
63065
|
+
assert$7(color instanceof Uint8Array);
|
|
62999
63066
|
const [i1, i2, i3] = color;
|
|
63000
63067
|
const index2 = i1 + i2 * 256 + i3 * 65536 - 1;
|
|
63001
63068
|
return index2;
|
|
@@ -63291,8 +63358,8 @@ class Layer extends Component {
|
|
|
63291
63358
|
});
|
|
63292
63359
|
}
|
|
63293
63360
|
_initialize() {
|
|
63294
|
-
assert$
|
|
63295
|
-
assert$
|
|
63361
|
+
assert$7(!this.internalState);
|
|
63362
|
+
assert$7(Number.isFinite(this.props.coordinateSystem));
|
|
63296
63363
|
debug(TRACE_INITIALIZE, this);
|
|
63297
63364
|
const attributeManager = this._getAttributeManager();
|
|
63298
63365
|
if (attributeManager) {
|
|
@@ -64427,7 +64494,7 @@ class Tesselator {
|
|
|
64427
64494
|
this.buffers = buffers;
|
|
64428
64495
|
this.normalize = normalize2;
|
|
64429
64496
|
if (geometryBuffer) {
|
|
64430
|
-
assert$
|
|
64497
|
+
assert$7(data.startIndices);
|
|
64431
64498
|
this.getGeometry = this.getGeometryFromBuffer(geometryBuffer);
|
|
64432
64499
|
if (!normalize2) {
|
|
64433
64500
|
buffers.positions = geometryBuffer;
|
|
@@ -64608,7 +64675,7 @@ const esm$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
64608
64675
|
_flatten: flatten,
|
|
64609
64676
|
_memoize: memoize$1,
|
|
64610
64677
|
_mergeShaders: mergeShaders,
|
|
64611
|
-
assert: assert$
|
|
64678
|
+
assert: assert$7,
|
|
64612
64679
|
createIterable,
|
|
64613
64680
|
fp64LowPart,
|
|
64614
64681
|
gouraudLighting,
|
|
@@ -72531,7 +72598,7 @@ class Plane {
|
|
|
72531
72598
|
this.fromNormalDistance(normal, distance2);
|
|
72532
72599
|
}
|
|
72533
72600
|
fromNormalDistance(normal, distance2) {
|
|
72534
|
-
assert$
|
|
72601
|
+
assert$f(Number.isFinite(distance2));
|
|
72535
72602
|
this.normal.from(normal).normalize();
|
|
72536
72603
|
this.distance = distance2;
|
|
72537
72604
|
return this;
|
|
@@ -72545,7 +72612,7 @@ class Plane {
|
|
|
72545
72612
|
}
|
|
72546
72613
|
fromCoefficients(a2, b, c, d) {
|
|
72547
72614
|
this.normal.set(a2, b, c);
|
|
72548
|
-
assert$
|
|
72615
|
+
assert$f(equals$3(this.normal.len(), 1));
|
|
72549
72616
|
this.distance = d;
|
|
72550
72617
|
return this;
|
|
72551
72618
|
}
|
|
@@ -72619,7 +72686,7 @@ class CullingVolume {
|
|
|
72619
72686
|
return intersect2;
|
|
72620
72687
|
}
|
|
72621
72688
|
computeVisibilityWithPlaneMask(boundingVolume, parentPlaneMask) {
|
|
72622
|
-
assert$
|
|
72689
|
+
assert$f(Number.isFinite(parentPlaneMask), "parentPlaneMask is required.");
|
|
72623
72690
|
if (parentPlaneMask === CullingVolume.MASK_OUTSIDE || parentPlaneMask === CullingVolume.MASK_INSIDE) {
|
|
72624
72691
|
return parentPlaneMask;
|
|
72625
72692
|
}
|
|
@@ -86111,17 +86178,17 @@ class ScenegraphNode {
|
|
|
86111
86178
|
return null;
|
|
86112
86179
|
}
|
|
86113
86180
|
setPosition(position) {
|
|
86114
|
-
assert$
|
|
86181
|
+
assert$a(position.length === 3, "setPosition requires vector argument");
|
|
86115
86182
|
this.position = position;
|
|
86116
86183
|
return this;
|
|
86117
86184
|
}
|
|
86118
86185
|
setRotation(rotation2) {
|
|
86119
|
-
assert$
|
|
86186
|
+
assert$a(rotation2.length === 3, "setRotation requires vector argument");
|
|
86120
86187
|
this.rotation = rotation2;
|
|
86121
86188
|
return this;
|
|
86122
86189
|
}
|
|
86123
86190
|
setScale(scale2) {
|
|
86124
|
-
assert$
|
|
86191
|
+
assert$a(scale2.length === 3, "setScale requires vector argument");
|
|
86125
86192
|
this.scale = scale2;
|
|
86126
86193
|
return this;
|
|
86127
86194
|
}
|
|
@@ -86184,7 +86251,7 @@ class ScenegraphNode {
|
|
|
86184
86251
|
return this;
|
|
86185
86252
|
}
|
|
86186
86253
|
getCoordinateUniforms(viewMatrix2, modelMatrix2) {
|
|
86187
|
-
assert$
|
|
86254
|
+
assert$a(viewMatrix2);
|
|
86188
86255
|
modelMatrix2 = modelMatrix2 || this.matrix;
|
|
86189
86256
|
const worldMatrix = new Matrix4(viewMatrix2).multiplyRight(modelMatrix2);
|
|
86190
86257
|
const worldInverse = worldMatrix.invert();
|
|
@@ -86421,7 +86488,7 @@ function interpolate$1(time, _ref2, target, path) {
|
|
|
86421
86488
|
log$2.warn("Bad animation path ".concat(path))();
|
|
86422
86489
|
}
|
|
86423
86490
|
}
|
|
86424
|
-
assert$
|
|
86491
|
+
assert$a(target[path].length === output[previousIndex].length);
|
|
86425
86492
|
const previousTime = input[previousIndex];
|
|
86426
86493
|
const nextTime = input[nextIndex];
|
|
86427
86494
|
switch (interpolation) {
|
|
@@ -87354,7 +87421,7 @@ const BasisLoader = {
|
|
|
87354
87421
|
...BasisWorkerLoader,
|
|
87355
87422
|
parse: parseBasis
|
|
87356
87423
|
};
|
|
87357
|
-
function assert$
|
|
87424
|
+
function assert$6(condition, message) {
|
|
87358
87425
|
if (!condition) {
|
|
87359
87426
|
throw new Error(message || "assert failed: gltf");
|
|
87360
87427
|
}
|
|
@@ -87372,10 +87439,10 @@ function resolveUrl(url, options) {
|
|
|
87372
87439
|
}
|
|
87373
87440
|
function getTypedArrayForBufferView(json, buffers, bufferViewIndex) {
|
|
87374
87441
|
const bufferView = json.bufferViews[bufferViewIndex];
|
|
87375
|
-
assert$
|
|
87442
|
+
assert$6(bufferView);
|
|
87376
87443
|
const bufferIndex = bufferView.buffer;
|
|
87377
87444
|
const binChunk = buffers[bufferIndex];
|
|
87378
|
-
assert$
|
|
87445
|
+
assert$6(binChunk);
|
|
87379
87446
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
87380
87447
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
87381
87448
|
}
|
|
@@ -87424,7 +87491,7 @@ function getAccessorArrayTypeAndLength(accessor, bufferView) {
|
|
|
87424
87491
|
const bytesPerComponent = ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE[accessor.componentType];
|
|
87425
87492
|
const length2 = accessor.count * components;
|
|
87426
87493
|
const byteLength = accessor.count * components * bytesPerComponent;
|
|
87427
|
-
assert$
|
|
87494
|
+
assert$6(byteLength >= 0 && byteLength <= bufferView.byteLength);
|
|
87428
87495
|
return {
|
|
87429
87496
|
ArrayType,
|
|
87430
87497
|
length: length2,
|
|
@@ -87533,7 +87600,7 @@ class GLTFScenegraph {
|
|
|
87533
87600
|
bufferView = this.getBufferView(bufferView);
|
|
87534
87601
|
const bufferIndex = bufferView.buffer;
|
|
87535
87602
|
const binChunk = this.gltf.buffers[bufferIndex];
|
|
87536
|
-
assert$
|
|
87603
|
+
assert$6(binChunk);
|
|
87537
87604
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
87538
87605
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
87539
87606
|
}
|
|
@@ -87583,14 +87650,14 @@ class GLTFScenegraph {
|
|
|
87583
87650
|
return extension;
|
|
87584
87651
|
}
|
|
87585
87652
|
addExtension(extensionName, extensionData = {}) {
|
|
87586
|
-
assert$
|
|
87653
|
+
assert$6(extensionData);
|
|
87587
87654
|
this.json.extensions = this.json.extensions || {};
|
|
87588
87655
|
this.json.extensions[extensionName] = extensionData;
|
|
87589
87656
|
this.registerUsedExtension(extensionName);
|
|
87590
87657
|
return extensionData;
|
|
87591
87658
|
}
|
|
87592
87659
|
addRequiredExtension(extensionName, extensionData = {}) {
|
|
87593
|
-
assert$
|
|
87660
|
+
assert$6(extensionData);
|
|
87594
87661
|
this.addExtension(extensionName, extensionData);
|
|
87595
87662
|
this.registerRequiredExtension(extensionName);
|
|
87596
87663
|
return extensionData;
|
|
@@ -87698,7 +87765,7 @@ class GLTFScenegraph {
|
|
|
87698
87765
|
}
|
|
87699
87766
|
addBufferView(buffer2) {
|
|
87700
87767
|
const byteLength = buffer2.byteLength;
|
|
87701
|
-
assert$
|
|
87768
|
+
assert$6(Number.isFinite(byteLength));
|
|
87702
87769
|
this.sourceBuffers = this.sourceBuffers || [];
|
|
87703
87770
|
this.sourceBuffers.push(buffer2);
|
|
87704
87771
|
const glTFBufferView = {
|
|
@@ -88053,7 +88120,7 @@ function getMeshBoundingBox(attributes) {
|
|
|
88053
88120
|
}
|
|
88054
88121
|
return [[minX, minY, minZ], [maxX, maxY, maxZ]];
|
|
88055
88122
|
}
|
|
88056
|
-
function assert$
|
|
88123
|
+
function assert$5(condition, message) {
|
|
88057
88124
|
if (!condition) {
|
|
88058
88125
|
throw new Error(message || "loader assertion failed.");
|
|
88059
88126
|
}
|
|
@@ -88062,7 +88129,7 @@ class Schema {
|
|
|
88062
88129
|
constructor(fields, metadata) {
|
|
88063
88130
|
_defineProperty$e(this, "fields", void 0);
|
|
88064
88131
|
_defineProperty$e(this, "metadata", void 0);
|
|
88065
|
-
assert$
|
|
88132
|
+
assert$5(Array.isArray(fields));
|
|
88066
88133
|
checkNames(fields);
|
|
88067
88134
|
this.fields = fields;
|
|
88068
88135
|
this.metadata = metadata || /* @__PURE__ */ new Map();
|
|
@@ -89052,7 +89119,7 @@ async function encode$2(gltfData) {
|
|
|
89052
89119
|
} = gltfScenegraph;
|
|
89053
89120
|
if (json.lights) {
|
|
89054
89121
|
const extension = gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);
|
|
89055
|
-
assert$
|
|
89122
|
+
assert$6(!extension.lights);
|
|
89056
89123
|
extension.lights = json.lights;
|
|
89057
89124
|
delete json.lights;
|
|
89058
89125
|
}
|
|
@@ -89470,7 +89537,7 @@ class GLTFPostProcessor {
|
|
|
89470
89537
|
images = [],
|
|
89471
89538
|
baseUri = ""
|
|
89472
89539
|
} = gltf;
|
|
89473
|
-
assert$
|
|
89540
|
+
assert$6(json);
|
|
89474
89541
|
this.baseUri = baseUri;
|
|
89475
89542
|
this.json = json;
|
|
89476
89543
|
this.buffers = buffers;
|
|
@@ -89796,18 +89863,18 @@ function parseGLBSync(glb, arrayBuffer2, byteOffset = 0, options = {}) {
|
|
|
89796
89863
|
}
|
|
89797
89864
|
}
|
|
89798
89865
|
function parseGLBV1(glb, dataView, byteOffset) {
|
|
89799
|
-
assert$
|
|
89866
|
+
assert$e(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);
|
|
89800
89867
|
const contentLength = dataView.getUint32(byteOffset + 0, LE);
|
|
89801
89868
|
const contentFormat = dataView.getUint32(byteOffset + 4, LE);
|
|
89802
89869
|
byteOffset += GLB_CHUNK_HEADER_SIZE;
|
|
89803
|
-
assert$
|
|
89870
|
+
assert$e(contentFormat === GLB_V1_CONTENT_FORMAT_JSON);
|
|
89804
89871
|
parseJSONChunk(glb, dataView, byteOffset, contentLength);
|
|
89805
89872
|
byteOffset += contentLength;
|
|
89806
89873
|
byteOffset += parseBINChunk(glb, dataView, byteOffset, glb.header.byteLength);
|
|
89807
89874
|
return byteOffset;
|
|
89808
89875
|
}
|
|
89809
89876
|
function parseGLBV2(glb, dataView, byteOffset, options) {
|
|
89810
|
-
assert$
|
|
89877
|
+
assert$e(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);
|
|
89811
89878
|
parseGLBChunksSync(glb, dataView, byteOffset, options);
|
|
89812
89879
|
return byteOffset + glb.header.byteLength;
|
|
89813
89880
|
}
|
|
@@ -89887,11 +89954,11 @@ function parseGLTFContainerSync(gltf, data, byteOffset, options) {
|
|
|
89887
89954
|
} else if (data instanceof ArrayBuffer) {
|
|
89888
89955
|
const glb = {};
|
|
89889
89956
|
byteOffset = parseGLBSync(glb, data, byteOffset, options.glb);
|
|
89890
|
-
assert$
|
|
89957
|
+
assert$6(glb.type === "glTF", "Invalid GLB magic string ".concat(glb.type));
|
|
89891
89958
|
gltf._glb = glb;
|
|
89892
89959
|
gltf.json = glb.json;
|
|
89893
89960
|
} else {
|
|
89894
|
-
assert$
|
|
89961
|
+
assert$6(false, "GLTF: must be ArrayBuffer or string");
|
|
89895
89962
|
}
|
|
89896
89963
|
const buffers = gltf.json.buffers || [];
|
|
89897
89964
|
gltf.buffers = new Array(buffers.length).fill(null);
|
|
@@ -89917,7 +89984,7 @@ async function loadBuffers(gltf, options, context) {
|
|
|
89917
89984
|
const {
|
|
89918
89985
|
fetch: fetch2
|
|
89919
89986
|
} = context;
|
|
89920
|
-
assert$
|
|
89987
|
+
assert$6(fetch2);
|
|
89921
89988
|
const uri2 = resolveUrl(buffer2.uri, options);
|
|
89922
89989
|
const response = await (context === null || context === void 0 ? void 0 : (_context$fetch = context.fetch) === null || _context$fetch === void 0 ? void 0 : _context$fetch.call(context, uri2));
|
|
89923
89990
|
const arrayBuffer2 = await (response === null || response === void 0 ? void 0 : (_response$arrayBuffer = response.arrayBuffer) === null || _response$arrayBuffer === void 0 ? void 0 : _response$arrayBuffer.call(response));
|
|
@@ -89970,7 +90037,7 @@ async function loadImage(gltf, image2, index2, options, context) {
|
|
|
89970
90037
|
const array = getTypedArrayForBufferView(gltf.json, gltf.buffers, image2.bufferView);
|
|
89971
90038
|
arrayBuffer2 = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
|
|
89972
90039
|
}
|
|
89973
|
-
assert$
|
|
90040
|
+
assert$6(arrayBuffer2, "glTF image has no data");
|
|
89974
90041
|
let parsedImage = await parse2(arrayBuffer2, [ImageLoader, BasisLoader], {
|
|
89975
90042
|
mimeType: image2.mimeType,
|
|
89976
90043
|
basis: options.basis || {
|
|
@@ -90657,7 +90724,7 @@ const scratchVector2 = new Vector3();
|
|
|
90657
90724
|
const scratchVector3 = new Vector3();
|
|
90658
90725
|
function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) {
|
|
90659
90726
|
const thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis];
|
|
90660
|
-
assert$
|
|
90727
|
+
assert$f(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));
|
|
90661
90728
|
let firstAxisVector;
|
|
90662
90729
|
let secondAxisVector;
|
|
90663
90730
|
let thirdAxisVector;
|
|
@@ -90733,9 +90800,9 @@ class Ellipsoid {
|
|
|
90733
90800
|
_defineProperty$e(this, "maximumRadius", void 0);
|
|
90734
90801
|
_defineProperty$e(this, "centerToleranceSquared", _MathUtils.EPSILON1);
|
|
90735
90802
|
_defineProperty$e(this, "squaredXOverSquaredZ", void 0);
|
|
90736
|
-
assert$
|
|
90737
|
-
assert$
|
|
90738
|
-
assert$
|
|
90803
|
+
assert$f(x2 >= 0);
|
|
90804
|
+
assert$f(y2 >= 0);
|
|
90805
|
+
assert$f(z2 >= 0);
|
|
90739
90806
|
this.radii = new Vector3(x2, y2, z2);
|
|
90740
90807
|
this.radiiSquared = new Vector3(x2 * x2, y2 * y2, z2 * z2);
|
|
90741
90808
|
this.radiiToTheFourth = new Vector3(x2 * x2 * x2 * x2, y2 * y2 * y2 * y2, z2 * z2 * z2 * z2);
|
|
@@ -90819,8 +90886,8 @@ class Ellipsoid {
|
|
|
90819
90886
|
return scratchPosition$1.from(position).scale(this.radii).to(result);
|
|
90820
90887
|
}
|
|
90821
90888
|
getSurfaceNormalIntersectionWithZAxis(position, buffer2 = 0, result = [0, 0, 0]) {
|
|
90822
|
-
assert$
|
|
90823
|
-
assert$
|
|
90889
|
+
assert$f(equals$3(this.radii.x, this.radii.y, _MathUtils.EPSILON15));
|
|
90890
|
+
assert$f(this.radii.z > 0);
|
|
90824
90891
|
scratchPosition$1.from(position);
|
|
90825
90892
|
const z2 = scratchPosition$1.z * (1 - this.squaredXOverSquaredZ);
|
|
90826
90893
|
if (Math.abs(z2) >= this.radii.z - buffer2) {
|
|
@@ -90960,8 +91027,8 @@ class TilesetCache {
|
|
|
90960
91027
|
}
|
|
90961
91028
|
}
|
|
90962
91029
|
function calculateTransformProps(tileHeader, tile) {
|
|
90963
|
-
assert$
|
|
90964
|
-
assert$
|
|
91030
|
+
assert$e(tileHeader);
|
|
91031
|
+
assert$e(tile);
|
|
90965
91032
|
const {
|
|
90966
91033
|
rtcCenter,
|
|
90967
91034
|
gltfUpAxis
|
|
@@ -91195,7 +91262,7 @@ const scratchScale = new Vector3();
|
|
|
91195
91262
|
const scratchNorthWest = new Vector3();
|
|
91196
91263
|
const scratchSouthEast = new Vector3();
|
|
91197
91264
|
function createBoundingVolume(boundingVolumeHeader, transform2, result) {
|
|
91198
|
-
assert$
|
|
91265
|
+
assert$e(boundingVolumeHeader, "3D Tile: boundingVolume must be defined");
|
|
91199
91266
|
if (boundingVolumeHeader.box) {
|
|
91200
91267
|
return createBox(boundingVolumeHeader.box, transform2, result);
|
|
91201
91268
|
}
|
|
@@ -91371,11 +91438,11 @@ class ManagedArray {
|
|
|
91371
91438
|
return this._array;
|
|
91372
91439
|
}
|
|
91373
91440
|
get(index2) {
|
|
91374
|
-
assert$
|
|
91441
|
+
assert$e(index2 < this._array.length);
|
|
91375
91442
|
return this._array[index2];
|
|
91376
91443
|
}
|
|
91377
91444
|
set(index2, element) {
|
|
91378
|
-
assert$
|
|
91445
|
+
assert$e(index2 >= 0);
|
|
91379
91446
|
if (index2 >= this.length) {
|
|
91380
91447
|
this.length = index2 + 1;
|
|
91381
91448
|
}
|
|
@@ -91409,13 +91476,13 @@ class ManagedArray {
|
|
|
91409
91476
|
return element;
|
|
91410
91477
|
}
|
|
91411
91478
|
reserve(length2) {
|
|
91412
|
-
assert$
|
|
91479
|
+
assert$e(length2 >= 0);
|
|
91413
91480
|
if (length2 > this._array.length) {
|
|
91414
91481
|
this._array.length = length2;
|
|
91415
91482
|
}
|
|
91416
91483
|
}
|
|
91417
91484
|
resize(length2) {
|
|
91418
|
-
assert$
|
|
91485
|
+
assert$e(length2 >= 0);
|
|
91419
91486
|
this.length = length2;
|
|
91420
91487
|
}
|
|
91421
91488
|
trim(length2) {
|
|
@@ -92363,7 +92430,7 @@ class Tileset3D {
|
|
|
92363
92430
|
_defineProperty$e(this, "_emptyTiles", void 0);
|
|
92364
92431
|
_defineProperty$e(this, "frameStateData", void 0);
|
|
92365
92432
|
_defineProperty$e(this, "maximumMemoryUsage", void 0);
|
|
92366
|
-
assert$
|
|
92433
|
+
assert$e(json);
|
|
92367
92434
|
this.options = {
|
|
92368
92435
|
...DEFAULT_PROPS,
|
|
92369
92436
|
...options
|
|
@@ -92654,7 +92721,7 @@ class Tileset3D {
|
|
|
92654
92721
|
}
|
|
92655
92722
|
calculateViewPropsTiles3D() {
|
|
92656
92723
|
const root2 = this.root;
|
|
92657
|
-
assert$
|
|
92724
|
+
assert$e(root2);
|
|
92658
92725
|
const {
|
|
92659
92726
|
center: center2
|
|
92660
92727
|
} = root2.boundingVolume;
|
|
@@ -92873,7 +92940,7 @@ const TILE3D_TYPE = {
|
|
|
92873
92940
|
GLTF: "glTF"
|
|
92874
92941
|
};
|
|
92875
92942
|
function getStringFromArrayBuffer(arrayBuffer2, byteOffset, byteLength) {
|
|
92876
|
-
assert$
|
|
92943
|
+
assert$e(arrayBuffer2 instanceof ArrayBuffer);
|
|
92877
92944
|
const textDecoder = new TextDecoder("utf8");
|
|
92878
92945
|
const typedArray = new Uint8Array(arrayBuffer2, byteOffset, byteLength);
|
|
92879
92946
|
const string = textDecoder.decode(typedArray);
|
|
@@ -92974,7 +93041,7 @@ class GLType {
|
|
|
92974
93041
|
return new ArrayType(buffer2, byteOffset, length2);
|
|
92975
93042
|
}
|
|
92976
93043
|
}
|
|
92977
|
-
function assert$
|
|
93044
|
+
function assert$4(condition, message) {
|
|
92978
93045
|
if (!condition) {
|
|
92979
93046
|
throw new Error("math.gl assertion failed. ".concat(message));
|
|
92980
93047
|
}
|
|
@@ -92999,7 +93066,7 @@ function signNotZero(value) {
|
|
|
92999
93066
|
return value < 0 ? -1 : 1;
|
|
93000
93067
|
}
|
|
93001
93068
|
function octDecodeInRange(x2, y2, rangeMax, result) {
|
|
93002
|
-
assert$
|
|
93069
|
+
assert$4(result);
|
|
93003
93070
|
if (x2 < 0 || x2 > rangeMax || y2 < 0 || y2 > rangeMax) {
|
|
93004
93071
|
throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(rangeMax));
|
|
93005
93072
|
}
|
|
@@ -93159,7 +93226,7 @@ function createTypedArrayFromAccessor(tile3DAccessor, buffer2, byteOffset, lengt
|
|
|
93159
93226
|
const {
|
|
93160
93227
|
componentType
|
|
93161
93228
|
} = tile3DAccessor;
|
|
93162
|
-
assert$
|
|
93229
|
+
assert$e(tile3DAccessor.componentType);
|
|
93163
93230
|
const type2 = typeof componentType === "string" ? GLType.fromName(componentType) : componentType;
|
|
93164
93231
|
const size2 = COMPONENTS_PER_ATTRIBUTE[tile3DAccessor.type];
|
|
93165
93232
|
const unpacker = UNPACKER[tile3DAccessor.type];
|
|
@@ -93362,7 +93429,7 @@ class Tile3DBatchTableParser {
|
|
|
93362
93429
|
_defineProperty$e(this, "_properties", void 0);
|
|
93363
93430
|
_defineProperty$e(this, "_binaryProperties", void 0);
|
|
93364
93431
|
_defineProperty$e(this, "_hierarchy", void 0);
|
|
93365
|
-
assert$
|
|
93432
|
+
assert$e(featureCount >= 0);
|
|
93366
93433
|
this.json = json || {};
|
|
93367
93434
|
this.binary = binary;
|
|
93368
93435
|
this.featureCount = featureCount;
|
|
@@ -93386,7 +93453,7 @@ class Tile3DBatchTableParser {
|
|
|
93386
93453
|
}
|
|
93387
93454
|
isClass(batchId, className) {
|
|
93388
93455
|
this._checkBatchId(batchId);
|
|
93389
|
-
assert$
|
|
93456
|
+
assert$e(typeof className === "string", className);
|
|
93390
93457
|
if (this._hierarchy) {
|
|
93391
93458
|
const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
|
|
93392
93459
|
const classId = hierarchy.classIds[instanceIndex];
|
|
@@ -93398,7 +93465,7 @@ class Tile3DBatchTableParser {
|
|
|
93398
93465
|
return false;
|
|
93399
93466
|
}
|
|
93400
93467
|
isExactClass(batchId, className) {
|
|
93401
|
-
assert$
|
|
93468
|
+
assert$e(typeof className === "string", className);
|
|
93402
93469
|
return this.getExactClassName(batchId) === className;
|
|
93403
93470
|
}
|
|
93404
93471
|
getExactClassName(batchId) {
|
|
@@ -93412,7 +93479,7 @@ class Tile3DBatchTableParser {
|
|
|
93412
93479
|
}
|
|
93413
93480
|
hasProperty(batchId, name2) {
|
|
93414
93481
|
this._checkBatchId(batchId);
|
|
93415
|
-
assert$
|
|
93482
|
+
assert$e(typeof name2 === "string", name2);
|
|
93416
93483
|
return defined(this._properties[name2]) || this._hasPropertyInHierarchy(batchId, name2);
|
|
93417
93484
|
}
|
|
93418
93485
|
getPropertyNames(batchId, results) {
|
|
@@ -93428,7 +93495,7 @@ class Tile3DBatchTableParser {
|
|
|
93428
93495
|
}
|
|
93429
93496
|
getProperty(batchId, name2) {
|
|
93430
93497
|
this._checkBatchId(batchId);
|
|
93431
|
-
assert$
|
|
93498
|
+
assert$e(typeof name2 === "string", name2);
|
|
93432
93499
|
if (this._binaryProperties) {
|
|
93433
93500
|
const binaryProperty = this._binaryProperties[name2];
|
|
93434
93501
|
if (defined(binaryProperty)) {
|
|
@@ -93450,7 +93517,7 @@ class Tile3DBatchTableParser {
|
|
|
93450
93517
|
setProperty(batchId, name2, value) {
|
|
93451
93518
|
const featureCount = this.featureCount;
|
|
93452
93519
|
this._checkBatchId(batchId);
|
|
93453
|
-
assert$
|
|
93520
|
+
assert$e(typeof name2 === "string", name2);
|
|
93454
93521
|
if (this._binaryProperties) {
|
|
93455
93522
|
const binaryProperty = this._binaryProperties[name2];
|
|
93456
93523
|
if (binaryProperty) {
|
|
@@ -93497,8 +93564,8 @@ class Tile3DBatchTableParser {
|
|
|
93497
93564
|
_initializeBinaryProperty(name2, property) {
|
|
93498
93565
|
if ("byteOffset" in property) {
|
|
93499
93566
|
const tile3DAccessor = property;
|
|
93500
|
-
assert$
|
|
93501
|
-
assert$
|
|
93567
|
+
assert$e(this.binary, "Property ".concat(name2, " requires a batch table binary."));
|
|
93568
|
+
assert$e(tile3DAccessor.type, "Property ".concat(name2, " requires a type."));
|
|
93502
93569
|
const accessor = createTypedArrayFromAccessor(tile3DAccessor, this.binary.buffer, this.binary.byteOffset | 0, this.featureCount);
|
|
93503
93570
|
return {
|
|
93504
93571
|
typedArray: accessor.values,
|
|
@@ -93555,7 +93622,7 @@ class Tile3DBatchTableParser {
|
|
|
93555
93622
|
const indexInClass = hierarchy.classIndexes[instanceIndex];
|
|
93556
93623
|
const propertyValues = instanceClass.instances[name2];
|
|
93557
93624
|
if (defined(propertyValues)) {
|
|
93558
|
-
assert$
|
|
93625
|
+
assert$e(instanceIndex === batchId, 'Inherited property "'.concat(name2, '" is read-only.'));
|
|
93559
93626
|
if (defined(propertyValues.typedArray)) {
|
|
93560
93627
|
this._setBinaryProperty(propertyValues, indexInClass, value);
|
|
93561
93628
|
} else {
|
|
@@ -98645,7 +98712,7 @@ function getCoords$1(coords) {
|
|
|
98645
98712
|
throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array");
|
|
98646
98713
|
}
|
|
98647
98714
|
function containsNumber$1(coordinates2) {
|
|
98648
|
-
if (coordinates2.length > 1 && isNumber$
|
|
98715
|
+
if (coordinates2.length > 1 && isNumber$2(coordinates2[0]) && isNumber$2(coordinates2[1])) {
|
|
98649
98716
|
return true;
|
|
98650
98717
|
}
|
|
98651
98718
|
if (Array.isArray(coordinates2[0]) && coordinates2[0].length) {
|
|
@@ -101468,7 +101535,7 @@ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symb
|
|
|
101468
101535
|
var toStr$1 = Object.prototype.toString;
|
|
101469
101536
|
var concat = Array.prototype.concat;
|
|
101470
101537
|
var defineDataProperty2 = defineDataProperty$1;
|
|
101471
|
-
var isFunction = function(fn) {
|
|
101538
|
+
var isFunction$1 = function(fn) {
|
|
101472
101539
|
return typeof fn === "function" && toStr$1.call(fn) === "[object Function]";
|
|
101473
101540
|
};
|
|
101474
101541
|
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
@@ -101478,7 +101545,7 @@ var defineProperty$1 = function(object2, name2, value, predicate) {
|
|
|
101478
101545
|
if (object2[name2] === value) {
|
|
101479
101546
|
return;
|
|
101480
101547
|
}
|
|
101481
|
-
} else if (!isFunction(predicate) || !predicate()) {
|
|
101548
|
+
} else if (!isFunction$1(predicate) || !predicate()) {
|
|
101482
101549
|
return;
|
|
101483
101550
|
}
|
|
101484
101551
|
}
|
|
@@ -101862,7 +101929,7 @@ function lineOverlap(line1, line2, options) {
|
|
|
101862
101929
|
options = {};
|
|
101863
101930
|
}
|
|
101864
101931
|
options = options || {};
|
|
101865
|
-
if (!isObject$
|
|
101932
|
+
if (!isObject$5(options))
|
|
101866
101933
|
throw new Error("options is invalid");
|
|
101867
101934
|
var tolerance = options.tolerance || 0;
|
|
101868
101935
|
var features = [];
|
|
@@ -102422,19 +102489,19 @@ var jsts_min = { exports: {} };
|
|
|
102422
102489
|
}, Object.defineProperties(w2, O);
|
|
102423
102490
|
var T = function(t3, e3) {
|
|
102424
102491
|
return t3.interfaces_ && t3.interfaces_().indexOf(e3) > -1;
|
|
102425
|
-
},
|
|
102492
|
+
}, R = function() {
|
|
102426
102493
|
}, P2 = { LOG_10: { configurable: true } };
|
|
102427
|
-
|
|
102494
|
+
R.prototype.interfaces_ = function() {
|
|
102428
102495
|
return [];
|
|
102429
|
-
},
|
|
102430
|
-
return
|
|
102431
|
-
},
|
|
102496
|
+
}, R.prototype.getClass = function() {
|
|
102497
|
+
return R;
|
|
102498
|
+
}, R.log10 = function(t3) {
|
|
102432
102499
|
var e3 = Math.log(t3);
|
|
102433
|
-
return v.isInfinite(e3) ? e3 : v.isNaN(e3) ? e3 : e3 /
|
|
102434
|
-
},
|
|
102500
|
+
return v.isInfinite(e3) ? e3 : v.isNaN(e3) ? e3 : e3 / R.LOG_10;
|
|
102501
|
+
}, R.min = function(t3, e3, n4, i3) {
|
|
102435
102502
|
var r3 = t3;
|
|
102436
102503
|
return e3 < r3 && (r3 = e3), n4 < r3 && (r3 = n4), i3 < r3 && (r3 = i3), r3;
|
|
102437
|
-
},
|
|
102504
|
+
}, R.clamp = function() {
|
|
102438
102505
|
if ("number" == typeof arguments[2] && "number" == typeof arguments[0] && "number" == typeof arguments[1]) {
|
|
102439
102506
|
var t3 = arguments[0], e3 = arguments[1], n4 = arguments[2];
|
|
102440
102507
|
return t3 < e3 ? e3 : t3 > n4 ? n4 : t3;
|
|
@@ -102443,9 +102510,9 @@ var jsts_min = { exports: {} };
|
|
|
102443
102510
|
var i3 = arguments[0], r3 = arguments[1], o3 = arguments[2];
|
|
102444
102511
|
return i3 < r3 ? r3 : i3 > o3 ? o3 : i3;
|
|
102445
102512
|
}
|
|
102446
|
-
},
|
|
102513
|
+
}, R.wrap = function(t3, e3) {
|
|
102447
102514
|
return t3 < 0 ? e3 - -t3 % e3 : t3 % e3;
|
|
102448
|
-
},
|
|
102515
|
+
}, R.max = function() {
|
|
102449
102516
|
if (3 === arguments.length) {
|
|
102450
102517
|
var t3 = arguments[0], e3 = arguments[1], n4 = arguments[2], i3 = t3;
|
|
102451
102518
|
return e3 > i3 && (i3 = e3), n4 > i3 && (i3 = n4), i3;
|
|
@@ -102454,11 +102521,11 @@ var jsts_min = { exports: {} };
|
|
|
102454
102521
|
var r3 = arguments[0], o3 = arguments[1], s3 = arguments[2], a3 = arguments[3], u2 = r3;
|
|
102455
102522
|
return o3 > u2 && (u2 = o3), s3 > u2 && (u2 = s3), a3 > u2 && (u2 = a3), u2;
|
|
102456
102523
|
}
|
|
102457
|
-
},
|
|
102524
|
+
}, R.average = function(t3, e3) {
|
|
102458
102525
|
return (t3 + e3) / 2;
|
|
102459
102526
|
}, P2.LOG_10.get = function() {
|
|
102460
102527
|
return Math.log(10);
|
|
102461
|
-
}, Object.defineProperties(
|
|
102528
|
+
}, Object.defineProperties(R, P2);
|
|
102462
102529
|
var D2 = function(t3) {
|
|
102463
102530
|
this.str = t3;
|
|
102464
102531
|
};
|
|
@@ -103613,7 +103680,7 @@ var jsts_min = { exports: {} };
|
|
|
103613
103680
|
}
|
|
103614
103681
|
} else
|
|
103615
103682
|
r3 = true;
|
|
103616
|
-
return r3 ?
|
|
103683
|
+
return r3 ? R.min(at.distancePointLine(t3, n4, i3), at.distancePointLine(e3, n4, i3), at.distancePointLine(n4, t3, e3), at.distancePointLine(i3, t3, e3)) : 0;
|
|
103617
103684
|
}, at.isPointInRing = function(t3, e3) {
|
|
103618
103685
|
return at.locatePointInRing(t3, e3) !== w2.EXTERIOR;
|
|
103619
103686
|
}, at.computeLength = function(t3) {
|
|
@@ -104203,8 +104270,8 @@ var jsts_min = { exports: {} };
|
|
|
104203
104270
|
(null === e3 || e3.compareTo(t3[n4]) > 0) && (e3 = t3[n4]);
|
|
104204
104271
|
return e3;
|
|
104205
104272
|
}, Lt.extract = function(t3, e3, n4) {
|
|
104206
|
-
e3 =
|
|
104207
|
-
var i3 = (n4 =
|
|
104273
|
+
e3 = R.clamp(e3, 0, t3.length);
|
|
104274
|
+
var i3 = (n4 = R.clamp(n4, -1, t3.length)) - e3 + 1;
|
|
104208
104275
|
n4 < 0 && (i3 = 0), e3 >= t3.length && (i3 = 0), n4 < e3 && (i3 = 0);
|
|
104209
104276
|
var r3 = new Array(i3).fill(null);
|
|
104210
104277
|
if (0 === i3)
|
|
@@ -109949,7 +110016,7 @@ var jsts_min = { exports: {} };
|
|
|
109949
110016
|
return f3.getResultGeometry(c2);
|
|
109950
110017
|
}
|
|
109951
110018
|
}, di.precisionScaleFactor = function(t3, e3, n4) {
|
|
109952
|
-
var i3 = t3.getEnvelopeInternal(), r3 =
|
|
110019
|
+
var i3 = t3.getEnvelopeInternal(), r3 = R.max(Math.abs(i3.getMaxX()), Math.abs(i3.getMaxY()), Math.abs(i3.getMinX()), Math.abs(i3.getMinY())) + 2 * (e3 > 0 ? e3 : 0), o3 = n4 - Math.trunc(Math.log(r3) / Math.log(10) + 1);
|
|
109953
110020
|
return Math.pow(10, o3);
|
|
109954
110021
|
}, yi.CAP_ROUND.get = function() {
|
|
109955
110022
|
return Cn.CAP_ROUND;
|
|
@@ -117340,372 +117407,216 @@ var layerMouseEvent = {};
|
|
|
117340
117407
|
exports2["default"] = LayerMouseEvent;
|
|
117341
117408
|
})(layerMouseEvent);
|
|
117342
117409
|
var nebulaLayer = {};
|
|
117343
|
-
var events = { exports: {} };
|
|
117344
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
117345
|
-
var ReflectApply$1 = R && typeof R.apply === "function" ? R.apply : function ReflectApply(target, receiver, args) {
|
|
117346
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
117347
|
-
};
|
|
117348
|
-
var ReflectOwnKeys$1;
|
|
117349
|
-
if (R && typeof R.ownKeys === "function") {
|
|
117350
|
-
ReflectOwnKeys$1 = R.ownKeys;
|
|
117351
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
117352
|
-
ReflectOwnKeys$1 = function ReflectOwnKeys2(target) {
|
|
117353
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
117354
|
-
};
|
|
117355
|
-
} else {
|
|
117356
|
-
ReflectOwnKeys$1 = function ReflectOwnKeys2(target) {
|
|
117357
|
-
return Object.getOwnPropertyNames(target);
|
|
117358
|
-
};
|
|
117359
|
-
}
|
|
117360
|
-
function ProcessEmitWarning(warning) {
|
|
117361
|
-
if (console && console.warn)
|
|
117362
|
-
console.warn(warning);
|
|
117363
|
-
}
|
|
117364
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
117365
|
-
return value !== value;
|
|
117366
|
-
};
|
|
117367
117410
|
function EventEmitter() {
|
|
117368
|
-
|
|
117411
|
+
this._events = this._events || {};
|
|
117412
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
117369
117413
|
}
|
|
117370
|
-
events
|
|
117371
|
-
events.exports.once = once2;
|
|
117414
|
+
var events = EventEmitter;
|
|
117372
117415
|
EventEmitter.EventEmitter = EventEmitter;
|
|
117373
117416
|
EventEmitter.prototype._events = void 0;
|
|
117374
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
117375
117417
|
EventEmitter.prototype._maxListeners = void 0;
|
|
117376
|
-
|
|
117377
|
-
function
|
|
117378
|
-
if (
|
|
117379
|
-
throw
|
|
117380
|
-
}
|
|
117381
|
-
}
|
|
117382
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
117383
|
-
enumerable: true,
|
|
117384
|
-
get: function() {
|
|
117385
|
-
return defaultMaxListeners;
|
|
117386
|
-
},
|
|
117387
|
-
set: function(arg) {
|
|
117388
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
117389
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
117390
|
-
}
|
|
117391
|
-
defaultMaxListeners = arg;
|
|
117392
|
-
}
|
|
117393
|
-
});
|
|
117394
|
-
EventEmitter.init = function() {
|
|
117395
|
-
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
117396
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
117397
|
-
this._eventsCount = 0;
|
|
117398
|
-
}
|
|
117399
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
117400
|
-
};
|
|
117401
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n3) {
|
|
117402
|
-
if (typeof n3 !== "number" || n3 < 0 || NumberIsNaN(n3)) {
|
|
117403
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n3 + ".");
|
|
117404
|
-
}
|
|
117418
|
+
EventEmitter.defaultMaxListeners = 10;
|
|
117419
|
+
EventEmitter.prototype.setMaxListeners = function(n3) {
|
|
117420
|
+
if (!isNumber(n3) || n3 < 0 || isNaN(n3))
|
|
117421
|
+
throw TypeError("n must be a positive number");
|
|
117405
117422
|
this._maxListeners = n3;
|
|
117406
117423
|
return this;
|
|
117407
117424
|
};
|
|
117408
|
-
function
|
|
117409
|
-
|
|
117410
|
-
|
|
117411
|
-
|
|
117412
|
-
|
|
117413
|
-
|
|
117414
|
-
|
|
117415
|
-
|
|
117416
|
-
|
|
117417
|
-
|
|
117418
|
-
|
|
117419
|
-
|
|
117420
|
-
|
|
117421
|
-
|
|
117422
|
-
|
|
117423
|
-
|
|
117424
|
-
|
|
117425
|
-
|
|
117426
|
-
if (doError) {
|
|
117427
|
-
var er;
|
|
117428
|
-
if (args.length > 0)
|
|
117429
|
-
er = args[0];
|
|
117430
|
-
if (er instanceof Error) {
|
|
117431
|
-
throw er;
|
|
117432
|
-
}
|
|
117433
|
-
var err2 = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
117434
|
-
err2.context = er;
|
|
117435
|
-
throw err2;
|
|
117436
|
-
}
|
|
117437
|
-
var handler = events2[type2];
|
|
117438
|
-
if (handler === void 0)
|
|
117425
|
+
EventEmitter.prototype.emit = function(type2) {
|
|
117426
|
+
var er, handler, len2, args, i2, listeners;
|
|
117427
|
+
if (!this._events)
|
|
117428
|
+
this._events = {};
|
|
117429
|
+
if (type2 === "error") {
|
|
117430
|
+
if (!this._events.error || isObject$1(this._events.error) && !this._events.error.length) {
|
|
117431
|
+
er = arguments[1];
|
|
117432
|
+
if (er instanceof Error) {
|
|
117433
|
+
throw er;
|
|
117434
|
+
} else {
|
|
117435
|
+
var err2 = new Error('Uncaught, unspecified "error" event. (' + er + ")");
|
|
117436
|
+
err2.context = er;
|
|
117437
|
+
throw err2;
|
|
117438
|
+
}
|
|
117439
|
+
}
|
|
117440
|
+
}
|
|
117441
|
+
handler = this._events[type2];
|
|
117442
|
+
if (isUndefined(handler))
|
|
117439
117443
|
return false;
|
|
117440
|
-
if (
|
|
117441
|
-
|
|
117442
|
-
|
|
117443
|
-
|
|
117444
|
-
|
|
117445
|
-
|
|
117446
|
-
|
|
117444
|
+
if (isFunction(handler)) {
|
|
117445
|
+
switch (arguments.length) {
|
|
117446
|
+
case 1:
|
|
117447
|
+
handler.call(this);
|
|
117448
|
+
break;
|
|
117449
|
+
case 2:
|
|
117450
|
+
handler.call(this, arguments[1]);
|
|
117451
|
+
break;
|
|
117452
|
+
case 3:
|
|
117453
|
+
handler.call(this, arguments[1], arguments[2]);
|
|
117454
|
+
break;
|
|
117455
|
+
default:
|
|
117456
|
+
args = Array.prototype.slice.call(arguments, 1);
|
|
117457
|
+
handler.apply(this, args);
|
|
117458
|
+
}
|
|
117459
|
+
} else if (isObject$1(handler)) {
|
|
117460
|
+
args = Array.prototype.slice.call(arguments, 1);
|
|
117461
|
+
listeners = handler.slice();
|
|
117462
|
+
len2 = listeners.length;
|
|
117463
|
+
for (i2 = 0; i2 < len2; i2++)
|
|
117464
|
+
listeners[i2].apply(this, args);
|
|
117447
117465
|
}
|
|
117448
117466
|
return true;
|
|
117449
117467
|
};
|
|
117450
|
-
function
|
|
117468
|
+
EventEmitter.prototype.addListener = function(type2, listener) {
|
|
117451
117469
|
var m;
|
|
117452
|
-
|
|
117453
|
-
|
|
117454
|
-
|
|
117455
|
-
|
|
117456
|
-
if (
|
|
117457
|
-
|
|
117458
|
-
|
|
117459
|
-
|
|
117460
|
-
|
|
117461
|
-
|
|
117462
|
-
|
|
117463
|
-
|
|
117464
|
-
|
|
117465
|
-
|
|
117466
|
-
|
|
117467
|
-
|
|
117468
|
-
|
|
117469
|
-
|
|
117470
|
-
|
|
117471
|
-
existing = events2[type2] = listener;
|
|
117472
|
-
++target._eventsCount;
|
|
117473
|
-
} else {
|
|
117474
|
-
if (typeof existing === "function") {
|
|
117475
|
-
existing = events2[type2] = prepend ? [listener, existing] : [existing, listener];
|
|
117476
|
-
} else if (prepend) {
|
|
117477
|
-
existing.unshift(listener);
|
|
117470
|
+
if (!isFunction(listener))
|
|
117471
|
+
throw TypeError("listener must be a function");
|
|
117472
|
+
if (!this._events)
|
|
117473
|
+
this._events = {};
|
|
117474
|
+
if (this._events.newListener)
|
|
117475
|
+
this.emit(
|
|
117476
|
+
"newListener",
|
|
117477
|
+
type2,
|
|
117478
|
+
isFunction(listener.listener) ? listener.listener : listener
|
|
117479
|
+
);
|
|
117480
|
+
if (!this._events[type2])
|
|
117481
|
+
this._events[type2] = listener;
|
|
117482
|
+
else if (isObject$1(this._events[type2]))
|
|
117483
|
+
this._events[type2].push(listener);
|
|
117484
|
+
else
|
|
117485
|
+
this._events[type2] = [this._events[type2], listener];
|
|
117486
|
+
if (isObject$1(this._events[type2]) && !this._events[type2].warned) {
|
|
117487
|
+
if (!isUndefined(this._maxListeners)) {
|
|
117488
|
+
m = this._maxListeners;
|
|
117478
117489
|
} else {
|
|
117479
|
-
|
|
117490
|
+
m = EventEmitter.defaultMaxListeners;
|
|
117480
117491
|
}
|
|
117481
|
-
m
|
|
117482
|
-
|
|
117483
|
-
|
|
117484
|
-
|
|
117485
|
-
|
|
117486
|
-
|
|
117487
|
-
|
|
117488
|
-
|
|
117489
|
-
|
|
117492
|
+
if (m && m > 0 && this._events[type2].length > m) {
|
|
117493
|
+
this._events[type2].warned = true;
|
|
117494
|
+
console.error(
|
|
117495
|
+
"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
|
|
117496
|
+
this._events[type2].length
|
|
117497
|
+
);
|
|
117498
|
+
if (typeof console.trace === "function") {
|
|
117499
|
+
console.trace();
|
|
117500
|
+
}
|
|
117490
117501
|
}
|
|
117491
117502
|
}
|
|
117492
|
-
return target;
|
|
117493
|
-
}
|
|
117494
|
-
EventEmitter.prototype.addListener = function addListener(type2, listener) {
|
|
117495
|
-
return _addListener(this, type2, listener, false);
|
|
117496
|
-
};
|
|
117497
|
-
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
117498
|
-
EventEmitter.prototype.prependListener = function prependListener(type2, listener) {
|
|
117499
|
-
return _addListener(this, type2, listener, true);
|
|
117500
|
-
};
|
|
117501
|
-
function onceWrapper() {
|
|
117502
|
-
if (!this.fired) {
|
|
117503
|
-
this.target.removeListener(this.type, this.wrapFn);
|
|
117504
|
-
this.fired = true;
|
|
117505
|
-
if (arguments.length === 0)
|
|
117506
|
-
return this.listener.call(this.target);
|
|
117507
|
-
return this.listener.apply(this.target, arguments);
|
|
117508
|
-
}
|
|
117509
|
-
}
|
|
117510
|
-
function _onceWrap(target, type2, listener) {
|
|
117511
|
-
var state = { fired: false, wrapFn: void 0, target, type: type2, listener };
|
|
117512
|
-
var wrapped = onceWrapper.bind(state);
|
|
117513
|
-
wrapped.listener = listener;
|
|
117514
|
-
state.wrapFn = wrapped;
|
|
117515
|
-
return wrapped;
|
|
117516
|
-
}
|
|
117517
|
-
EventEmitter.prototype.once = function once(type2, listener) {
|
|
117518
|
-
checkListener(listener);
|
|
117519
|
-
this.on(type2, _onceWrap(this, type2, listener));
|
|
117520
117503
|
return this;
|
|
117521
117504
|
};
|
|
117522
|
-
EventEmitter.prototype.
|
|
117523
|
-
|
|
117524
|
-
|
|
117505
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
117506
|
+
EventEmitter.prototype.once = function(type2, listener) {
|
|
117507
|
+
if (!isFunction(listener))
|
|
117508
|
+
throw TypeError("listener must be a function");
|
|
117509
|
+
var fired = false;
|
|
117510
|
+
function g2() {
|
|
117511
|
+
this.removeListener(type2, g2);
|
|
117512
|
+
if (!fired) {
|
|
117513
|
+
fired = true;
|
|
117514
|
+
listener.apply(this, arguments);
|
|
117515
|
+
}
|
|
117516
|
+
}
|
|
117517
|
+
g2.listener = listener;
|
|
117518
|
+
this.on(type2, g2);
|
|
117525
117519
|
return this;
|
|
117526
117520
|
};
|
|
117527
|
-
EventEmitter.prototype.removeListener = function
|
|
117528
|
-
var list,
|
|
117529
|
-
|
|
117530
|
-
|
|
117531
|
-
if (
|
|
117521
|
+
EventEmitter.prototype.removeListener = function(type2, listener) {
|
|
117522
|
+
var list, position, length2, i2;
|
|
117523
|
+
if (!isFunction(listener))
|
|
117524
|
+
throw TypeError("listener must be a function");
|
|
117525
|
+
if (!this._events || !this._events[type2])
|
|
117532
117526
|
return this;
|
|
117533
|
-
list =
|
|
117534
|
-
|
|
117535
|
-
|
|
117536
|
-
if (list === listener || list.listener === listener) {
|
|
117537
|
-
|
|
117538
|
-
|
|
117539
|
-
|
|
117540
|
-
|
|
117541
|
-
|
|
117542
|
-
|
|
117543
|
-
}
|
|
117544
|
-
} else if (typeof list !== "function") {
|
|
117545
|
-
position = -1;
|
|
117546
|
-
for (i2 = list.length - 1; i2 >= 0; i2--) {
|
|
117547
|
-
if (list[i2] === listener || list[i2].listener === listener) {
|
|
117548
|
-
originalListener = list[i2].listener;
|
|
117527
|
+
list = this._events[type2];
|
|
117528
|
+
length2 = list.length;
|
|
117529
|
+
position = -1;
|
|
117530
|
+
if (list === listener || isFunction(list.listener) && list.listener === listener) {
|
|
117531
|
+
delete this._events[type2];
|
|
117532
|
+
if (this._events.removeListener)
|
|
117533
|
+
this.emit("removeListener", type2, listener);
|
|
117534
|
+
} else if (isObject$1(list)) {
|
|
117535
|
+
for (i2 = length2; i2-- > 0; ) {
|
|
117536
|
+
if (list[i2] === listener || list[i2].listener && list[i2].listener === listener) {
|
|
117549
117537
|
position = i2;
|
|
117550
117538
|
break;
|
|
117551
117539
|
}
|
|
117552
117540
|
}
|
|
117553
117541
|
if (position < 0)
|
|
117554
117542
|
return this;
|
|
117555
|
-
if (
|
|
117556
|
-
list.
|
|
117557
|
-
|
|
117558
|
-
|
|
117543
|
+
if (list.length === 1) {
|
|
117544
|
+
list.length = 0;
|
|
117545
|
+
delete this._events[type2];
|
|
117546
|
+
} else {
|
|
117547
|
+
list.splice(position, 1);
|
|
117559
117548
|
}
|
|
117560
|
-
if (
|
|
117561
|
-
|
|
117562
|
-
if (events2.removeListener !== void 0)
|
|
117563
|
-
this.emit("removeListener", type2, originalListener || listener);
|
|
117549
|
+
if (this._events.removeListener)
|
|
117550
|
+
this.emit("removeListener", type2, listener);
|
|
117564
117551
|
}
|
|
117565
117552
|
return this;
|
|
117566
117553
|
};
|
|
117567
|
-
EventEmitter.prototype.
|
|
117568
|
-
|
|
117569
|
-
|
|
117570
|
-
events2 = this._events;
|
|
117571
|
-
if (events2 === void 0)
|
|
117554
|
+
EventEmitter.prototype.removeAllListeners = function(type2) {
|
|
117555
|
+
var key, listeners;
|
|
117556
|
+
if (!this._events)
|
|
117572
117557
|
return this;
|
|
117573
|
-
if (
|
|
117574
|
-
if (arguments.length === 0)
|
|
117575
|
-
this._events =
|
|
117576
|
-
|
|
117577
|
-
|
|
117578
|
-
if (--this._eventsCount === 0)
|
|
117579
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
117580
|
-
else
|
|
117581
|
-
delete events2[type2];
|
|
117582
|
-
}
|
|
117558
|
+
if (!this._events.removeListener) {
|
|
117559
|
+
if (arguments.length === 0)
|
|
117560
|
+
this._events = {};
|
|
117561
|
+
else if (this._events[type2])
|
|
117562
|
+
delete this._events[type2];
|
|
117583
117563
|
return this;
|
|
117584
117564
|
}
|
|
117585
117565
|
if (arguments.length === 0) {
|
|
117586
|
-
|
|
117587
|
-
var key;
|
|
117588
|
-
for (i2 = 0; i2 < keys3.length; ++i2) {
|
|
117589
|
-
key = keys3[i2];
|
|
117566
|
+
for (key in this._events) {
|
|
117590
117567
|
if (key === "removeListener")
|
|
117591
117568
|
continue;
|
|
117592
117569
|
this.removeAllListeners(key);
|
|
117593
117570
|
}
|
|
117594
117571
|
this.removeAllListeners("removeListener");
|
|
117595
|
-
this._events =
|
|
117596
|
-
this._eventsCount = 0;
|
|
117572
|
+
this._events = {};
|
|
117597
117573
|
return this;
|
|
117598
117574
|
}
|
|
117599
|
-
|
|
117600
|
-
if (
|
|
117601
|
-
this.removeListener(type2,
|
|
117602
|
-
} else if (
|
|
117603
|
-
|
|
117604
|
-
this.removeListener(type2,
|
|
117605
|
-
}
|
|
117575
|
+
listeners = this._events[type2];
|
|
117576
|
+
if (isFunction(listeners)) {
|
|
117577
|
+
this.removeListener(type2, listeners);
|
|
117578
|
+
} else if (listeners) {
|
|
117579
|
+
while (listeners.length)
|
|
117580
|
+
this.removeListener(type2, listeners[listeners.length - 1]);
|
|
117606
117581
|
}
|
|
117582
|
+
delete this._events[type2];
|
|
117607
117583
|
return this;
|
|
117608
117584
|
};
|
|
117609
|
-
function
|
|
117610
|
-
var
|
|
117611
|
-
if (
|
|
117612
|
-
|
|
117613
|
-
|
|
117614
|
-
|
|
117615
|
-
|
|
117616
|
-
|
|
117617
|
-
|
|
117618
|
-
return unwrap2 ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
117619
|
-
}
|
|
117620
|
-
EventEmitter.prototype.listeners = function listeners(type2) {
|
|
117621
|
-
return _listeners(this, type2, true);
|
|
117622
|
-
};
|
|
117623
|
-
EventEmitter.prototype.rawListeners = function rawListeners(type2) {
|
|
117624
|
-
return _listeners(this, type2, false);
|
|
117625
|
-
};
|
|
117626
|
-
EventEmitter.listenerCount = function(emitter, type2) {
|
|
117627
|
-
if (typeof emitter.listenerCount === "function") {
|
|
117628
|
-
return emitter.listenerCount(type2);
|
|
117629
|
-
} else {
|
|
117630
|
-
return listenerCount.call(emitter, type2);
|
|
117631
|
-
}
|
|
117585
|
+
EventEmitter.prototype.listeners = function(type2) {
|
|
117586
|
+
var ret;
|
|
117587
|
+
if (!this._events || !this._events[type2])
|
|
117588
|
+
ret = [];
|
|
117589
|
+
else if (isFunction(this._events[type2]))
|
|
117590
|
+
ret = [this._events[type2]];
|
|
117591
|
+
else
|
|
117592
|
+
ret = this._events[type2].slice();
|
|
117593
|
+
return ret;
|
|
117632
117594
|
};
|
|
117633
|
-
EventEmitter.prototype.listenerCount =
|
|
117634
|
-
|
|
117635
|
-
|
|
117636
|
-
|
|
117637
|
-
var evlistener = events2[type2];
|
|
117638
|
-
if (typeof evlistener === "function") {
|
|
117595
|
+
EventEmitter.prototype.listenerCount = function(type2) {
|
|
117596
|
+
if (this._events) {
|
|
117597
|
+
var evlistener = this._events[type2];
|
|
117598
|
+
if (isFunction(evlistener))
|
|
117639
117599
|
return 1;
|
|
117640
|
-
|
|
117600
|
+
else if (evlistener)
|
|
117641
117601
|
return evlistener.length;
|
|
117642
|
-
}
|
|
117643
117602
|
}
|
|
117644
117603
|
return 0;
|
|
117645
|
-
}
|
|
117646
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
117647
|
-
return this._eventsCount > 0 ? ReflectOwnKeys$1(this._events) : [];
|
|
117648
117604
|
};
|
|
117649
|
-
function
|
|
117650
|
-
|
|
117651
|
-
|
|
117652
|
-
|
|
117653
|
-
return
|
|
117654
|
-
}
|
|
117655
|
-
function spliceOne(list, index2) {
|
|
117656
|
-
for (; index2 + 1 < list.length; index2++)
|
|
117657
|
-
list[index2] = list[index2 + 1];
|
|
117658
|
-
list.pop();
|
|
117659
|
-
}
|
|
117660
|
-
function unwrapListeners(arr) {
|
|
117661
|
-
var ret = new Array(arr.length);
|
|
117662
|
-
for (var i2 = 0; i2 < ret.length; ++i2) {
|
|
117663
|
-
ret[i2] = arr[i2].listener || arr[i2];
|
|
117664
|
-
}
|
|
117665
|
-
return ret;
|
|
117605
|
+
EventEmitter.listenerCount = function(emitter, type2) {
|
|
117606
|
+
return emitter.listenerCount(type2);
|
|
117607
|
+
};
|
|
117608
|
+
function isFunction(arg) {
|
|
117609
|
+
return typeof arg === "function";
|
|
117666
117610
|
}
|
|
117667
|
-
function
|
|
117668
|
-
return
|
|
117669
|
-
function errorListener(err2) {
|
|
117670
|
-
emitter.removeListener(name2, resolver);
|
|
117671
|
-
reject(err2);
|
|
117672
|
-
}
|
|
117673
|
-
function resolver() {
|
|
117674
|
-
if (typeof emitter.removeListener === "function") {
|
|
117675
|
-
emitter.removeListener("error", errorListener);
|
|
117676
|
-
}
|
|
117677
|
-
resolve2([].slice.call(arguments));
|
|
117678
|
-
}
|
|
117679
|
-
eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
|
|
117680
|
-
if (name2 !== "error") {
|
|
117681
|
-
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
117682
|
-
}
|
|
117683
|
-
});
|
|
117611
|
+
function isNumber(arg) {
|
|
117612
|
+
return typeof arg === "number";
|
|
117684
117613
|
}
|
|
117685
|
-
function
|
|
117686
|
-
|
|
117687
|
-
eventTargetAgnosticAddListener(emitter, "error", handler, flags3);
|
|
117688
|
-
}
|
|
117614
|
+
function isObject$1(arg) {
|
|
117615
|
+
return typeof arg === "object" && arg !== null;
|
|
117689
117616
|
}
|
|
117690
|
-
function
|
|
117691
|
-
|
|
117692
|
-
if (flags3.once) {
|
|
117693
|
-
emitter.once(name2, listener);
|
|
117694
|
-
} else {
|
|
117695
|
-
emitter.on(name2, listener);
|
|
117696
|
-
}
|
|
117697
|
-
} else if (typeof emitter.addEventListener === "function") {
|
|
117698
|
-
emitter.addEventListener(name2, function wrapListener(arg) {
|
|
117699
|
-
if (flags3.once) {
|
|
117700
|
-
emitter.removeEventListener(name2, wrapListener);
|
|
117701
|
-
}
|
|
117702
|
-
listener(arg);
|
|
117703
|
-
});
|
|
117704
|
-
} else {
|
|
117705
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
117706
|
-
}
|
|
117617
|
+
function isUndefined(arg) {
|
|
117618
|
+
return arg === void 0;
|
|
117707
117619
|
}
|
|
117708
|
-
var eventsExports = events.exports;
|
|
117709
117620
|
var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
|
|
117710
117621
|
var rnds8 = new Uint8Array(16);
|
|
117711
117622
|
function rng() {
|
|
@@ -118071,7 +117982,7 @@ const require$$1$3 = /* @__PURE__ */ getAugmentedNamespace(esmBrowser);
|
|
|
118071
117982
|
value: true
|
|
118072
117983
|
});
|
|
118073
117984
|
exports2["default"] = void 0;
|
|
118074
|
-
var _events = _interopRequireDefault2(
|
|
117985
|
+
var _events = _interopRequireDefault2(events);
|
|
118075
117986
|
var _uuid = _interopRequireDefault2(require$$1$3);
|
|
118076
117987
|
function _interopRequireDefault2(obj) {
|
|
118077
117988
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
@@ -118555,7 +118466,7 @@ function rhumbDistance$2(from, to, options) {
|
|
|
118555
118466
|
}
|
|
118556
118467
|
function calculateRhumbDistance(origin, destination2, radius) {
|
|
118557
118468
|
radius = radius === void 0 ? helpers_1$9.earthRadius : Number(radius);
|
|
118558
|
-
var
|
|
118469
|
+
var R = radius;
|
|
118559
118470
|
var phi12 = origin[1] * Math.PI / 180;
|
|
118560
118471
|
var phi2 = destination2[1] * Math.PI / 180;
|
|
118561
118472
|
var DeltaPhi = phi2 - phi12;
|
|
@@ -118566,7 +118477,7 @@ function calculateRhumbDistance(origin, destination2, radius) {
|
|
|
118566
118477
|
var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi12 / 2 + Math.PI / 4));
|
|
118567
118478
|
var q = Math.abs(DeltaPsi) > 1e-11 ? DeltaPhi / DeltaPsi : Math.cos(phi12);
|
|
118568
118479
|
var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda);
|
|
118569
|
-
var dist = delta *
|
|
118480
|
+
var dist = delta * R;
|
|
118570
118481
|
return dist;
|
|
118571
118482
|
}
|
|
118572
118483
|
js$e.default = rhumbDistance$2;
|
|
@@ -133075,7 +132986,7 @@ var document_1 = doccy;
|
|
|
133075
132986
|
value: true
|
|
133076
132987
|
});
|
|
133077
132988
|
exports2["default"] = void 0;
|
|
133078
|
-
var _events =
|
|
132989
|
+
var _events = events;
|
|
133079
132990
|
var _document = _interopRequireDefault2(document_1);
|
|
133080
132991
|
var _core = require$$2$2;
|
|
133081
132992
|
var _deckDrawer = _interopRequireDefault2(deckDrawer);
|
|
@@ -134991,7 +134902,7 @@ class SelectionExtension extends LayerExtension {
|
|
|
134991
134902
|
SelectionExtension.extensionName = "SelectionExtension";
|
|
134992
134903
|
function uncurryThis(target) {
|
|
134993
134904
|
return (thisArg, ...args) => {
|
|
134994
|
-
return
|
|
134905
|
+
return ReflectApply(target, thisArg, args);
|
|
134995
134906
|
};
|
|
134996
134907
|
}
|
|
134997
134908
|
function uncurryThisGetter(target, key) {
|
|
@@ -135003,7 +134914,7 @@ function uncurryThisGetter(target, key) {
|
|
|
135003
134914
|
);
|
|
135004
134915
|
}
|
|
135005
134916
|
const {
|
|
135006
|
-
apply:
|
|
134917
|
+
apply: ReflectApply,
|
|
135007
134918
|
construct: ReflectConstruct,
|
|
135008
134919
|
defineProperty: ReflectDefineProperty,
|
|
135009
134920
|
get: ReflectGet,
|
|
@@ -135675,16 +135586,16 @@ async function getDecoder(fileDirectory) {
|
|
|
135675
135586
|
const Decoder = await importFn();
|
|
135676
135587
|
return new Decoder(fileDirectory);
|
|
135677
135588
|
}
|
|
135678
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
135679
|
-
addDecoder(5, () => import("./lzw-
|
|
135589
|
+
addDecoder([void 0, 1], () => import("./raw-8900d89e.js").then((m) => m.default));
|
|
135590
|
+
addDecoder(5, () => import("./lzw-40a46f03.js").then((m) => m.default));
|
|
135680
135591
|
addDecoder(6, () => {
|
|
135681
135592
|
throw new Error("old style JPEG compression is not supported.");
|
|
135682
135593
|
});
|
|
135683
|
-
addDecoder(7, () => import("./jpeg-
|
|
135684
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
135685
|
-
addDecoder(32773, () => import("./packbits-
|
|
135686
|
-
addDecoder(34887, () => import("./lerc-
|
|
135687
|
-
addDecoder(50001, () => import("./webimage-
|
|
135594
|
+
addDecoder(7, () => import("./jpeg-c498508c.js").then((m) => m.default));
|
|
135595
|
+
addDecoder([8, 32946], () => import("./deflate-3d6b2462.js").then((m) => m.default));
|
|
135596
|
+
addDecoder(32773, () => import("./packbits-86cc820a.js").then((m) => m.default));
|
|
135597
|
+
addDecoder(34887, () => import("./lerc-5613fd3d.js").then((m) => m.default));
|
|
135598
|
+
addDecoder(50001, () => import("./webimage-9dcbbafd.js").then((m) => m.default));
|
|
135688
135599
|
function copyNewSize(array, width, height, samplesPerPixel = 1) {
|
|
135689
135600
|
return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
|
|
135690
135601
|
}
|
|
@@ -138512,16 +138423,16 @@ createCommonjsModule(function(module2) {
|
|
|
138512
138423
|
if (!new Events().__proto__)
|
|
138513
138424
|
prefix = false;
|
|
138514
138425
|
}
|
|
138515
|
-
function EE(fn, context,
|
|
138426
|
+
function EE(fn, context, once) {
|
|
138516
138427
|
this.fn = fn;
|
|
138517
138428
|
this.context = context;
|
|
138518
|
-
this.once =
|
|
138429
|
+
this.once = once || false;
|
|
138519
138430
|
}
|
|
138520
|
-
function
|
|
138431
|
+
function addListener(emitter, event, fn, context, once) {
|
|
138521
138432
|
if (typeof fn !== "function") {
|
|
138522
138433
|
throw new TypeError("The listener must be a function");
|
|
138523
138434
|
}
|
|
138524
|
-
var listener = new EE(fn, context || emitter,
|
|
138435
|
+
var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
|
|
138525
138436
|
if (!emitter._events[evt])
|
|
138526
138437
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
138527
138438
|
else if (!emitter._events[evt].fn)
|
|
@@ -138540,7 +138451,7 @@ createCommonjsModule(function(module2) {
|
|
|
138540
138451
|
this._events = new Events();
|
|
138541
138452
|
this._eventsCount = 0;
|
|
138542
138453
|
}
|
|
138543
|
-
EventEmitter2.prototype.eventNames = function
|
|
138454
|
+
EventEmitter2.prototype.eventNames = function eventNames() {
|
|
138544
138455
|
var names = [], events2, name2;
|
|
138545
138456
|
if (this._eventsCount === 0)
|
|
138546
138457
|
return names;
|
|
@@ -138553,7 +138464,7 @@ createCommonjsModule(function(module2) {
|
|
|
138553
138464
|
}
|
|
138554
138465
|
return names;
|
|
138555
138466
|
};
|
|
138556
|
-
EventEmitter2.prototype.listeners = function
|
|
138467
|
+
EventEmitter2.prototype.listeners = function listeners(event) {
|
|
138557
138468
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
138558
138469
|
if (!handlers)
|
|
138559
138470
|
return [];
|
|
@@ -138564,76 +138475,76 @@ createCommonjsModule(function(module2) {
|
|
|
138564
138475
|
}
|
|
138565
138476
|
return ee;
|
|
138566
138477
|
};
|
|
138567
|
-
EventEmitter2.prototype.listenerCount = function
|
|
138568
|
-
var evt = prefix ? prefix + event : event,
|
|
138569
|
-
if (!
|
|
138478
|
+
EventEmitter2.prototype.listenerCount = function listenerCount(event) {
|
|
138479
|
+
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
138480
|
+
if (!listeners)
|
|
138570
138481
|
return 0;
|
|
138571
|
-
if (
|
|
138482
|
+
if (listeners.fn)
|
|
138572
138483
|
return 1;
|
|
138573
|
-
return
|
|
138484
|
+
return listeners.length;
|
|
138574
138485
|
};
|
|
138575
|
-
EventEmitter2.prototype.emit = function
|
|
138486
|
+
EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
138576
138487
|
var evt = prefix ? prefix + event : event;
|
|
138577
138488
|
if (!this._events[evt])
|
|
138578
138489
|
return false;
|
|
138579
|
-
var
|
|
138580
|
-
if (
|
|
138581
|
-
if (
|
|
138582
|
-
this.removeListener(event,
|
|
138490
|
+
var listeners = this._events[evt], len2 = arguments.length, args, i2;
|
|
138491
|
+
if (listeners.fn) {
|
|
138492
|
+
if (listeners.once)
|
|
138493
|
+
this.removeListener(event, listeners.fn, void 0, true);
|
|
138583
138494
|
switch (len2) {
|
|
138584
138495
|
case 1:
|
|
138585
|
-
return
|
|
138496
|
+
return listeners.fn.call(listeners.context), true;
|
|
138586
138497
|
case 2:
|
|
138587
|
-
return
|
|
138498
|
+
return listeners.fn.call(listeners.context, a1), true;
|
|
138588
138499
|
case 3:
|
|
138589
|
-
return
|
|
138500
|
+
return listeners.fn.call(listeners.context, a1, a2), true;
|
|
138590
138501
|
case 4:
|
|
138591
|
-
return
|
|
138502
|
+
return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
|
138592
138503
|
case 5:
|
|
138593
|
-
return
|
|
138504
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
|
138594
138505
|
case 6:
|
|
138595
|
-
return
|
|
138506
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
|
138596
138507
|
}
|
|
138597
138508
|
for (i2 = 1, args = new Array(len2 - 1); i2 < len2; i2++) {
|
|
138598
138509
|
args[i2 - 1] = arguments[i2];
|
|
138599
138510
|
}
|
|
138600
|
-
|
|
138511
|
+
listeners.fn.apply(listeners.context, args);
|
|
138601
138512
|
} else {
|
|
138602
|
-
var length2 =
|
|
138513
|
+
var length2 = listeners.length, j;
|
|
138603
138514
|
for (i2 = 0; i2 < length2; i2++) {
|
|
138604
|
-
if (
|
|
138605
|
-
this.removeListener(event,
|
|
138515
|
+
if (listeners[i2].once)
|
|
138516
|
+
this.removeListener(event, listeners[i2].fn, void 0, true);
|
|
138606
138517
|
switch (len2) {
|
|
138607
138518
|
case 1:
|
|
138608
|
-
|
|
138519
|
+
listeners[i2].fn.call(listeners[i2].context);
|
|
138609
138520
|
break;
|
|
138610
138521
|
case 2:
|
|
138611
|
-
|
|
138522
|
+
listeners[i2].fn.call(listeners[i2].context, a1);
|
|
138612
138523
|
break;
|
|
138613
138524
|
case 3:
|
|
138614
|
-
|
|
138525
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2);
|
|
138615
138526
|
break;
|
|
138616
138527
|
case 4:
|
|
138617
|
-
|
|
138528
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2, a3);
|
|
138618
138529
|
break;
|
|
138619
138530
|
default:
|
|
138620
138531
|
if (!args)
|
|
138621
138532
|
for (j = 1, args = new Array(len2 - 1); j < len2; j++) {
|
|
138622
138533
|
args[j - 1] = arguments[j];
|
|
138623
138534
|
}
|
|
138624
|
-
|
|
138535
|
+
listeners[i2].fn.apply(listeners[i2].context, args);
|
|
138625
138536
|
}
|
|
138626
138537
|
}
|
|
138627
138538
|
}
|
|
138628
138539
|
return true;
|
|
138629
138540
|
};
|
|
138630
138541
|
EventEmitter2.prototype.on = function on(event, fn, context) {
|
|
138631
|
-
return
|
|
138542
|
+
return addListener(this, event, fn, context, false);
|
|
138632
138543
|
};
|
|
138633
|
-
EventEmitter2.prototype.once = function
|
|
138634
|
-
return
|
|
138544
|
+
EventEmitter2.prototype.once = function once(event, fn, context) {
|
|
138545
|
+
return addListener(this, event, fn, context, true);
|
|
138635
138546
|
};
|
|
138636
|
-
EventEmitter2.prototype.removeListener = function
|
|
138547
|
+
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
138637
138548
|
var evt = prefix ? prefix + event : event;
|
|
138638
138549
|
if (!this._events[evt])
|
|
138639
138550
|
return this;
|
|
@@ -138641,15 +138552,15 @@ createCommonjsModule(function(module2) {
|
|
|
138641
138552
|
clearEvent(this, evt);
|
|
138642
138553
|
return this;
|
|
138643
138554
|
}
|
|
138644
|
-
var
|
|
138645
|
-
if (
|
|
138646
|
-
if (
|
|
138555
|
+
var listeners = this._events[evt];
|
|
138556
|
+
if (listeners.fn) {
|
|
138557
|
+
if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
|
|
138647
138558
|
clearEvent(this, evt);
|
|
138648
138559
|
}
|
|
138649
138560
|
} else {
|
|
138650
|
-
for (var i2 = 0, events2 = [], length2 =
|
|
138651
|
-
if (
|
|
138652
|
-
events2.push(
|
|
138561
|
+
for (var i2 = 0, events2 = [], length2 = listeners.length; i2 < length2; i2++) {
|
|
138562
|
+
if (listeners[i2].fn !== fn || once && !listeners[i2].once || context && listeners[i2].context !== context) {
|
|
138563
|
+
events2.push(listeners[i2]);
|
|
138653
138564
|
}
|
|
138654
138565
|
}
|
|
138655
138566
|
if (events2.length)
|
|
@@ -138659,7 +138570,7 @@ createCommonjsModule(function(module2) {
|
|
|
138659
138570
|
}
|
|
138660
138571
|
return this;
|
|
138661
138572
|
};
|
|
138662
|
-
EventEmitter2.prototype.removeAllListeners = function
|
|
138573
|
+
EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
138663
138574
|
var evt;
|
|
138664
138575
|
if (event) {
|
|
138665
138576
|
evt = prefix ? prefix + event : event;
|
|
@@ -143142,7 +143053,7 @@ var blosc_codec = function() {
|
|
|
143142
143053
|
b += Ga[z2[a2++]];
|
|
143143
143054
|
return b;
|
|
143144
143055
|
}
|
|
143145
|
-
var Q2 = {},
|
|
143056
|
+
var Q2 = {}, R = {}, S = {};
|
|
143146
143057
|
function Ha(a2) {
|
|
143147
143058
|
if (void 0 === a2)
|
|
143148
143059
|
return "_unknown";
|
|
@@ -143187,8 +143098,8 @@ var blosc_codec = function() {
|
|
|
143187
143098
|
});
|
|
143188
143099
|
var e2 = Array(a2.length), g2 = [], k = 0;
|
|
143189
143100
|
a2.forEach(function(h, l2) {
|
|
143190
|
-
|
|
143191
|
-
e2[l2] =
|
|
143101
|
+
R.hasOwnProperty(h) ? e2[l2] = R[h] : (g2.push(h), Q2.hasOwnProperty(h) || (Q2[h] = []), Q2[h].push(function() {
|
|
143102
|
+
e2[l2] = R[h];
|
|
143192
143103
|
++k;
|
|
143193
143104
|
k === g2.length && c(e2);
|
|
143194
143105
|
}));
|
|
@@ -143201,12 +143112,12 @@ var blosc_codec = function() {
|
|
|
143201
143112
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
143202
143113
|
var d = b.name;
|
|
143203
143114
|
a2 || T('type "' + d + '" must have a positive integer typeid pointer');
|
|
143204
|
-
if (
|
|
143115
|
+
if (R.hasOwnProperty(a2)) {
|
|
143205
143116
|
if (c.U)
|
|
143206
143117
|
return;
|
|
143207
143118
|
T("Cannot register type '" + d + "' twice");
|
|
143208
143119
|
}
|
|
143209
|
-
|
|
143120
|
+
R[a2] = b;
|
|
143210
143121
|
delete S[a2];
|
|
143211
143122
|
Q2.hasOwnProperty(a2) && (b = Q2[a2], delete Q2[a2], b.forEach(function(e2) {
|
|
143212
143123
|
e2();
|
|
@@ -143319,7 +143230,7 @@ var blosc_codec = function() {
|
|
|
143319
143230
|
}
|
|
143320
143231
|
function eb(a2, b) {
|
|
143321
143232
|
function c(g2) {
|
|
143322
|
-
e2[g2] ||
|
|
143233
|
+
e2[g2] || R[g2] || (S[g2] ? S[g2].forEach(c) : (d.push(g2), e2[g2] = true));
|
|
143323
143234
|
}
|
|
143324
143235
|
var d = [], e2 = {};
|
|
143325
143236
|
b.forEach(c);
|
|
@@ -143607,7 +143518,7 @@ var blosc_codec = function() {
|
|
|
143607
143518
|
}, n: Qa, x: function(a2) {
|
|
143608
143519
|
4 < a2 && (V[a2].P += 1);
|
|
143609
143520
|
}, C: function(a2, b) {
|
|
143610
|
-
var c =
|
|
143521
|
+
var c = R[a2];
|
|
143611
143522
|
void 0 === c && T("_emval_take_value has unknown type " + cb(a2));
|
|
143612
143523
|
a2 = c.readValueFromPointer(b);
|
|
143613
143524
|
return Ra(a2);
|
|
@@ -144007,7 +143918,7 @@ function parseXML(xmlString) {
|
|
|
144007
143918
|
);
|
|
144008
143919
|
return xmlToJson(doc.documentElement, { attrtibutesKey: "attr" });
|
|
144009
143920
|
}
|
|
144010
|
-
function assert$
|
|
143921
|
+
function assert$3(condition, message) {
|
|
144011
143922
|
if (!condition) {
|
|
144012
143923
|
throw new Error(`Assert failed${message ? `: ${message}` : ""}`);
|
|
144013
143924
|
}
|
|
@@ -144049,7 +143960,7 @@ function extractPhysicalSizesfromPixels(d) {
|
|
|
144049
143960
|
return physicalSizes;
|
|
144050
143961
|
}
|
|
144051
143962
|
function parsePixelDataType(dtype) {
|
|
144052
|
-
assert$
|
|
143963
|
+
assert$3(dtype in DTYPE_LOOKUP$1, `Pixel type ${dtype} not supported.`);
|
|
144053
143964
|
return DTYPE_LOOKUP$1[dtype];
|
|
144054
143965
|
}
|
|
144055
143966
|
function extractAxesFromPixels(d) {
|
|
@@ -144069,9 +143980,9 @@ function extractAxesFromPixels(d) {
|
|
|
144069
143980
|
function getShapeForBinaryDownsampleLevel(options) {
|
|
144070
143981
|
const { axes, level } = options;
|
|
144071
143982
|
const xIndex = axes.labels.indexOf("x");
|
|
144072
|
-
assert$
|
|
143983
|
+
assert$3(xIndex !== -1, "x dimension not found");
|
|
144073
143984
|
const yIndex = axes.labels.indexOf("y");
|
|
144074
|
-
assert$
|
|
143985
|
+
assert$3(yIndex !== -1, "y dimension not found");
|
|
144075
143986
|
const resolutionShape = axes.shape.slice();
|
|
144076
143987
|
resolutionShape[xIndex] = axes.shape[xIndex] >> level;
|
|
144077
143988
|
resolutionShape[yIndex] = axes.shape[yIndex] >> level;
|
|
@@ -144431,9 +144342,9 @@ function createMultifileImageDataLookup(tiffData) {
|
|
|
144431
144342
|
function keyFor({ t: t2, c, z: z2 }) {
|
|
144432
144343
|
return `t${t2}.c${c}.z${z2}`;
|
|
144433
144344
|
}
|
|
144434
|
-
assert$
|
|
144345
|
+
assert$3(tiffData, "No TiffData in OME-XML");
|
|
144435
144346
|
for (const imageData of tiffData) {
|
|
144436
|
-
assert$
|
|
144347
|
+
assert$3(isCompleteTiffDataItem(imageData), "Incomplete TiffData item");
|
|
144437
144348
|
const key = keyFor({
|
|
144438
144349
|
t: imageData["FirstT"],
|
|
144439
144350
|
c: imageData["FirstC"],
|
|
@@ -144448,7 +144359,7 @@ function createMultifileImageDataLookup(tiffData) {
|
|
|
144448
144359
|
return {
|
|
144449
144360
|
getImageDataPointer(selection) {
|
|
144450
144361
|
const entry = lookup.get(keyFor(selection));
|
|
144451
|
-
assert$
|
|
144362
|
+
assert$3(entry, `No image for selection: ${JSON.stringify(selection)}`);
|
|
144452
144363
|
return entry;
|
|
144453
144364
|
}
|
|
144454
144365
|
};
|
|
@@ -144498,7 +144409,7 @@ async function getPixelSourceOptionsForImage(metadata, config3) {
|
|
|
144498
144409
|
};
|
|
144499
144410
|
}
|
|
144500
144411
|
async function loadMultifileOmeTiff(source, options = {}) {
|
|
144501
|
-
assert$
|
|
144412
|
+
assert$3(
|
|
144502
144413
|
!(source instanceof File),
|
|
144503
144414
|
"File or Blob not supported for multifile OME-TIFF"
|
|
144504
144415
|
);
|
|
@@ -149708,11 +149619,9 @@ class BoolArray {
|
|
|
149708
149619
|
get byteLength() {
|
|
149709
149620
|
return __privateGet(this, _bytes).byteLength;
|
|
149710
149621
|
}
|
|
149711
|
-
/** @type {ArrayBuffer} */
|
|
149712
149622
|
get buffer() {
|
|
149713
149623
|
return __privateGet(this, _bytes).buffer;
|
|
149714
149624
|
}
|
|
149715
|
-
/** @type {number} */
|
|
149716
149625
|
get length() {
|
|
149717
149626
|
return __privateGet(this, _bytes).length;
|
|
149718
149627
|
}
|
|
@@ -149763,11 +149672,9 @@ class ByteStringArray {
|
|
|
149763
149672
|
get byteLength() {
|
|
149764
149673
|
return this._data.byteLength;
|
|
149765
149674
|
}
|
|
149766
|
-
/** @type {ArrayBuffer} */
|
|
149767
149675
|
get buffer() {
|
|
149768
149676
|
return this._data.buffer;
|
|
149769
149677
|
}
|
|
149770
|
-
/** @type {number} */
|
|
149771
149678
|
get length() {
|
|
149772
149679
|
return this.byteLength / this.BYTES_PER_ELEMENT;
|
|
149773
149680
|
}
|
|
@@ -149824,11 +149731,9 @@ const _UnicodeStringArray = class {
|
|
|
149824
149731
|
get byteOffset() {
|
|
149825
149732
|
return __privateGet(this, _data).byteOffset;
|
|
149826
149733
|
}
|
|
149827
|
-
/** @type {ArrayBuffer} */
|
|
149828
149734
|
get buffer() {
|
|
149829
149735
|
return __privateGet(this, _data).buffer;
|
|
149830
149736
|
}
|
|
149831
|
-
/** @type {number} */
|
|
149832
149737
|
get length() {
|
|
149833
149738
|
return __privateGet(this, _data).length / this.chars;
|
|
149834
149739
|
}
|
|
@@ -149879,53 +149784,43 @@ function byteswap_inplace(view, bytes_per_element2) {
|
|
|
149879
149784
|
}
|
|
149880
149785
|
}
|
|
149881
149786
|
}
|
|
149882
|
-
const CONSTRUCTORS = {
|
|
149883
|
-
int8: Int8Array,
|
|
149884
|
-
int16: Int16Array,
|
|
149885
|
-
int32: Int32Array,
|
|
149886
|
-
int64: globalThis.BigInt64Array,
|
|
149887
|
-
uint8: Uint8Array,
|
|
149888
|
-
uint16: Uint16Array,
|
|
149889
|
-
uint32: Uint32Array,
|
|
149890
|
-
uint64: globalThis.BigUint64Array,
|
|
149891
|
-
float32: Float32Array,
|
|
149892
|
-
float64: Float64Array,
|
|
149893
|
-
bool: BoolArray
|
|
149894
|
-
};
|
|
149895
|
-
const V2_STRING_REGEX = /v2:([US])(\d+)/;
|
|
149896
149787
|
function get_ctr(data_type) {
|
|
149897
149788
|
if (data_type === "v2:object") {
|
|
149898
149789
|
return globalThis.Array;
|
|
149899
149790
|
}
|
|
149900
|
-
let match = data_type.match(
|
|
149791
|
+
let match = data_type.match(/v2:([US])(\d+)/);
|
|
149901
149792
|
if (match) {
|
|
149902
149793
|
let [, kind, chars] = match;
|
|
149903
149794
|
return (kind === "U" ? UnicodeStringArray : ByteStringArray).bind(null, Number(chars));
|
|
149904
149795
|
}
|
|
149905
|
-
let ctr =
|
|
149906
|
-
|
|
149907
|
-
|
|
149908
|
-
|
|
149796
|
+
let ctr = {
|
|
149797
|
+
int8: Int8Array,
|
|
149798
|
+
int16: Int16Array,
|
|
149799
|
+
int32: Int32Array,
|
|
149800
|
+
int64: globalThis.BigInt64Array,
|
|
149801
|
+
uint8: Uint8Array,
|
|
149802
|
+
uint16: Uint16Array,
|
|
149803
|
+
uint32: Uint32Array,
|
|
149804
|
+
uint64: globalThis.BigUint64Array,
|
|
149805
|
+
float16: globalThis.Float16Array,
|
|
149806
|
+
float32: Float32Array,
|
|
149807
|
+
float64: Float64Array,
|
|
149808
|
+
bool: BoolArray
|
|
149809
|
+
}[data_type];
|
|
149810
|
+
assert$2(ctr, `Unknown or unsupported data_type: ${data_type}`);
|
|
149909
149811
|
return ctr;
|
|
149910
149812
|
}
|
|
149911
149813
|
function get_strides(shape, order) {
|
|
149912
|
-
|
|
149913
|
-
|
|
149914
|
-
|
|
149915
|
-
const ndim = shape.length;
|
|
149916
|
-
const stride = globalThis.Array(ndim);
|
|
149917
|
-
for (let i2 = ndim - 1, step = 1; i2 >= 0; i2--) {
|
|
149918
|
-
stride[i2] = step;
|
|
149919
|
-
step *= shape[i2];
|
|
149814
|
+
const rank2 = shape.length;
|
|
149815
|
+
if (typeof order === "string") {
|
|
149816
|
+
order = order === "C" ? Array.from({ length: rank2 }, (_, i2) => i2) : Array.from({ length: rank2 }, (_, i2) => rank2 - 1 - i2);
|
|
149920
149817
|
}
|
|
149921
|
-
|
|
149922
|
-
|
|
149923
|
-
|
|
149924
|
-
|
|
149925
|
-
|
|
149926
|
-
|
|
149927
|
-
stride[i2] = step;
|
|
149928
|
-
step *= shape[i2];
|
|
149818
|
+
assert$2(rank2 === order.length, "Order length must match the number of dimensions.");
|
|
149819
|
+
let step = 1;
|
|
149820
|
+
let stride = new Array(rank2);
|
|
149821
|
+
for (let i2 = order.length - 1; i2 >= 0; i2--) {
|
|
149822
|
+
stride[order[i2]] = step;
|
|
149823
|
+
step *= shape[order[i2]];
|
|
149929
149824
|
}
|
|
149930
149825
|
return stride;
|
|
149931
149826
|
}
|
|
@@ -149940,20 +149835,12 @@ function create_chunk_key_encoder({ name: name2, configuration }) {
|
|
|
149940
149835
|
}
|
|
149941
149836
|
throw new Error(`Unknown chunk key encoding: ${name2}`);
|
|
149942
149837
|
}
|
|
149943
|
-
function get_array_order(codecs) {
|
|
149944
|
-
var _a3;
|
|
149945
|
-
const maybe_transpose_codec = codecs.find((c) => c.name === "transpose");
|
|
149946
|
-
return ((_a3 = maybe_transpose_codec == null ? void 0 : maybe_transpose_codec.configuration) == null ? void 0 : _a3.order) === "F" ? "F" : "C";
|
|
149947
|
-
}
|
|
149948
|
-
const endian_regex = /^([<|>])(.*)$/;
|
|
149949
149838
|
function coerce_dtype(dtype) {
|
|
149950
149839
|
if (dtype === "|O") {
|
|
149951
149840
|
return { data_type: "v2:object" };
|
|
149952
149841
|
}
|
|
149953
|
-
let match = dtype.match(
|
|
149954
|
-
|
|
149955
|
-
throw new Error(`Invalid dtype: ${dtype}`);
|
|
149956
|
-
}
|
|
149842
|
+
let match = dtype.match(/^([<|>])(.*)$/);
|
|
149843
|
+
assert$2(match, `Invalid dtype: ${dtype}`);
|
|
149957
149844
|
let [, endian, rest] = match;
|
|
149958
149845
|
let data_type = {
|
|
149959
149846
|
b1: "bool",
|
|
@@ -149965,12 +149852,11 @@ function coerce_dtype(dtype) {
|
|
|
149965
149852
|
u4: "uint32",
|
|
149966
149853
|
i8: "int64",
|
|
149967
149854
|
u8: "uint64",
|
|
149855
|
+
f2: "float16",
|
|
149968
149856
|
f4: "float32",
|
|
149969
149857
|
f8: "float64"
|
|
149970
149858
|
}[rest] ?? (rest.startsWith("S") || rest.startsWith("U") ? `v2:${rest}` : void 0);
|
|
149971
|
-
|
|
149972
|
-
throw new Error(`Unsupported or unknown dtype: ${dtype}`);
|
|
149973
|
-
}
|
|
149859
|
+
assert$2(data_type, `Unsupported or unknown dtype: ${dtype}`);
|
|
149974
149860
|
if (endian === "|") {
|
|
149975
149861
|
return { data_type };
|
|
149976
149862
|
}
|
|
@@ -150048,6 +149934,40 @@ function ensure_correct_scalar(metadata) {
|
|
|
150048
149934
|
}
|
|
150049
149935
|
return metadata.fill_value;
|
|
150050
149936
|
}
|
|
149937
|
+
function rethrow_unless(error2, ...errors) {
|
|
149938
|
+
if (!errors.some((ErrorClass) => error2 instanceof ErrorClass)) {
|
|
149939
|
+
throw error2;
|
|
149940
|
+
}
|
|
149941
|
+
}
|
|
149942
|
+
function assert$2(expression, msg = "") {
|
|
149943
|
+
if (!expression) {
|
|
149944
|
+
throw new Error(msg);
|
|
149945
|
+
}
|
|
149946
|
+
}
|
|
149947
|
+
class BitroundCodec {
|
|
149948
|
+
constructor(configuration, _meta2) {
|
|
149949
|
+
__publicField(this, "kind", "array_to_array");
|
|
149950
|
+
assert$2(configuration.keepbits >= 0, "keepbits must be zero or positive");
|
|
149951
|
+
}
|
|
149952
|
+
static fromConfig(configuration, meta2) {
|
|
149953
|
+
return new BitroundCodec(configuration, meta2);
|
|
149954
|
+
}
|
|
149955
|
+
/**
|
|
149956
|
+
* Encode a chunk of data with bit-rounding.
|
|
149957
|
+
* @param _arr - The chunk to encode
|
|
149958
|
+
*/
|
|
149959
|
+
encode(_arr) {
|
|
149960
|
+
throw new Error("`BitroundCodec.encode` is not implemented. Please open an issue at https://github.com/manzt/zarrita.js/issues.");
|
|
149961
|
+
}
|
|
149962
|
+
/**
|
|
149963
|
+
* Decode a chunk of data (no-op).
|
|
149964
|
+
* @param arr - The chunk to decode
|
|
149965
|
+
* @returns The decoded chunk
|
|
149966
|
+
*/
|
|
149967
|
+
decode(arr) {
|
|
149968
|
+
return arr;
|
|
149969
|
+
}
|
|
149970
|
+
}
|
|
150051
149971
|
const LITTLE_ENDIAN_OS = system_is_little_endian();
|
|
150052
149972
|
function system_is_little_endian() {
|
|
150053
149973
|
const a2 = new Uint32Array([305419896]);
|
|
@@ -150063,7 +149983,7 @@ function bytes_per_element(TypedArray2) {
|
|
|
150063
149983
|
const _BytesCodec = class {
|
|
150064
149984
|
constructor(configuration, meta2) {
|
|
150065
149985
|
__publicField(this, "kind", "array_to_bytes");
|
|
150066
|
-
__privateAdd(this,
|
|
149986
|
+
__privateAdd(this, _stride, void 0);
|
|
150067
149987
|
__privateAdd(this, _TypedArray, void 0);
|
|
150068
149988
|
__privateAdd(this, _BYTES_PER_ELEMENT, void 0);
|
|
150069
149989
|
__privateAdd(this, _shape, void 0);
|
|
@@ -150071,7 +149991,7 @@ const _BytesCodec = class {
|
|
|
150071
149991
|
__privateSet(this, _endian, configuration == null ? void 0 : configuration.endian);
|
|
150072
149992
|
__privateSet(this, _TypedArray, get_ctr(meta2.data_type));
|
|
150073
149993
|
__privateSet(this, _shape, meta2.shape);
|
|
150074
|
-
__privateSet(this,
|
|
149994
|
+
__privateSet(this, _stride, get_strides(meta2.shape, "C"));
|
|
150075
149995
|
const sample = new (__privateGet(this, _TypedArray))(0);
|
|
150076
149996
|
__privateSet(this, _BYTES_PER_ELEMENT, sample.BYTES_PER_ELEMENT);
|
|
150077
149997
|
}
|
|
@@ -150092,12 +150012,12 @@ const _BytesCodec = class {
|
|
|
150092
150012
|
return {
|
|
150093
150013
|
data: new (__privateGet(this, _TypedArray))(bytes.buffer, bytes.byteOffset, bytes.byteLength / __privateGet(this, _BYTES_PER_ELEMENT)),
|
|
150094
150014
|
shape: __privateGet(this, _shape),
|
|
150095
|
-
stride: __privateGet(this,
|
|
150015
|
+
stride: __privateGet(this, _stride)
|
|
150096
150016
|
};
|
|
150097
150017
|
}
|
|
150098
150018
|
};
|
|
150099
150019
|
let BytesCodec = _BytesCodec;
|
|
150100
|
-
|
|
150020
|
+
_stride = new WeakMap();
|
|
150101
150021
|
_TypedArray = new WeakMap();
|
|
150102
150022
|
_BYTES_PER_ELEMENT = new WeakMap();
|
|
150103
150023
|
_shape = new WeakMap();
|
|
@@ -150117,15 +150037,9 @@ class Crc32cCodec {
|
|
|
150117
150037
|
}
|
|
150118
150038
|
}
|
|
150119
150039
|
function throw_on_nan_replacer(_key, value) {
|
|
150120
|
-
|
|
150121
|
-
|
|
150122
|
-
|
|
150123
|
-
if (value === Number.POSITIVE_INFINITY) {
|
|
150124
|
-
throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
|
|
150125
|
-
}
|
|
150126
|
-
if (value === Number.NEGATIVE_INFINITY) {
|
|
150127
|
-
throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
|
|
150128
|
-
}
|
|
150040
|
+
assert$2(!Number.isNaN(value), "JsonCodec allow_nan is false but NaN was encountered during encoding.");
|
|
150041
|
+
assert$2(value !== Number.POSITIVE_INFINITY, "JsonCodec allow_nan is false but Infinity was encountered during encoding.");
|
|
150042
|
+
assert$2(value !== Number.NEGATIVE_INFINITY, "JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
|
|
150129
150043
|
return value;
|
|
150130
150044
|
}
|
|
150131
150045
|
function sort_keys_replacer(_key, value) {
|
|
@@ -150167,13 +150081,9 @@ const _JsonCodec = class {
|
|
|
150167
150081
|
}
|
|
150168
150082
|
encode(buf) {
|
|
150169
150083
|
const { indent, encoding, ensure_ascii, check_circular, allow_nan, sort_keys } = __privateGet(this, _encoder_config);
|
|
150170
|
-
|
|
150171
|
-
throw new Error("JsonCodec does not yet support non-utf-8 encoding.");
|
|
150172
|
-
}
|
|
150084
|
+
assert$2(encoding === "utf-8", "JsonCodec does not yet support non-utf-8 encoding.");
|
|
150173
150085
|
const replacer_functions = [];
|
|
150174
|
-
|
|
150175
|
-
throw new Error("JsonCodec does not yet support skipping the check for circular references during encoding.");
|
|
150176
|
-
}
|
|
150086
|
+
assert$2(check_circular, "JsonCodec does not yet support skipping the check for circular references during encoding.");
|
|
150177
150087
|
if (!allow_nan) {
|
|
150178
150088
|
replacer_functions.push(throw_on_nan_replacer);
|
|
150179
150089
|
}
|
|
@@ -150205,15 +150115,11 @@ const _JsonCodec = class {
|
|
|
150205
150115
|
}
|
|
150206
150116
|
decode(bytes) {
|
|
150207
150117
|
const { strict } = __privateGet(this, _decoder_config);
|
|
150208
|
-
|
|
150209
|
-
throw new Error("JsonCodec does not yet support non-strict decoding.");
|
|
150210
|
-
}
|
|
150118
|
+
assert$2(strict, "JsonCodec does not yet support non-strict decoding.");
|
|
150211
150119
|
const items = json_decode_object(bytes);
|
|
150212
150120
|
const shape = items.pop();
|
|
150213
150121
|
items.pop();
|
|
150214
|
-
|
|
150215
|
-
throw new Error("0D not implemented for JsonCodec.");
|
|
150216
|
-
}
|
|
150122
|
+
assert$2(shape, "0D not implemented for JsonCodec.");
|
|
150217
150123
|
const stride = get_strides(shape, "C");
|
|
150218
150124
|
const data = items;
|
|
150219
150125
|
return { data, shape, stride };
|
|
@@ -150280,39 +150186,72 @@ function convert_array_order(src, target) {
|
|
|
150280
150186
|
}
|
|
150281
150187
|
return out;
|
|
150282
150188
|
}
|
|
150283
|
-
function get_order(
|
|
150284
|
-
|
|
150285
|
-
|
|
150286
|
-
|
|
150287
|
-
return arr.stride.every((s2, i2) => s2 === row_major_strides[i2]) ? "C" : "F";
|
|
150189
|
+
function get_order(chunk) {
|
|
150190
|
+
let rank2 = chunk.shape.length;
|
|
150191
|
+
assert$2(rank2 === chunk.stride.length, "Shape and stride must have the same length.");
|
|
150192
|
+
return chunk.stride.map((s2, i2) => ({ stride: s2, index: i2 })).sort((a2, b) => b.stride - a2.stride).map((entry) => entry.index);
|
|
150288
150193
|
}
|
|
150289
|
-
|
|
150290
|
-
|
|
150291
|
-
|
|
150194
|
+
function matches_order(chunk, target) {
|
|
150195
|
+
let source = get_order(chunk);
|
|
150196
|
+
assert$2(source.length === target.length, "Orders must match");
|
|
150197
|
+
return source.every((dim, i2) => dim === target[i2]);
|
|
150198
|
+
}
|
|
150199
|
+
const _TransposeCodec = class {
|
|
150200
|
+
constructor(configuration, meta2) {
|
|
150292
150201
|
__publicField(this, "kind", "array_to_array");
|
|
150293
|
-
this
|
|
150202
|
+
__privateAdd(this, _order, void 0);
|
|
150203
|
+
__privateAdd(this, _inverseOrder, void 0);
|
|
150204
|
+
let value = configuration.order ?? "C";
|
|
150205
|
+
let rank2 = meta2.shape.length;
|
|
150206
|
+
let order = new Array(rank2);
|
|
150207
|
+
let inverseOrder = new Array(rank2);
|
|
150208
|
+
if (value === "C") {
|
|
150209
|
+
for (let i2 = 0; i2 < rank2; ++i2) {
|
|
150210
|
+
order[i2] = i2;
|
|
150211
|
+
inverseOrder[i2] = i2;
|
|
150212
|
+
}
|
|
150213
|
+
} else if (value === "F") {
|
|
150214
|
+
for (let i2 = 0; i2 < rank2; ++i2) {
|
|
150215
|
+
order[i2] = rank2 - i2 - 1;
|
|
150216
|
+
inverseOrder[i2] = rank2 - i2 - 1;
|
|
150217
|
+
}
|
|
150218
|
+
} else {
|
|
150219
|
+
order = value;
|
|
150220
|
+
order.forEach((x2, i2) => {
|
|
150221
|
+
assert$2(inverseOrder[x2] === void 0, `Invalid permutation: ${JSON.stringify(value)}`);
|
|
150222
|
+
inverseOrder[x2] = i2;
|
|
150223
|
+
});
|
|
150224
|
+
}
|
|
150225
|
+
__privateSet(this, _order, order);
|
|
150226
|
+
__privateSet(this, _inverseOrder, inverseOrder);
|
|
150294
150227
|
}
|
|
150295
|
-
static fromConfig(configuration) {
|
|
150296
|
-
return new
|
|
150228
|
+
static fromConfig(configuration, meta2) {
|
|
150229
|
+
return new _TransposeCodec(configuration, meta2);
|
|
150297
150230
|
}
|
|
150298
150231
|
encode(arr) {
|
|
150299
|
-
|
|
150300
|
-
if (get_order(arr) === ((_a3 = this.configuration) == null ? void 0 : _a3.order)) {
|
|
150232
|
+
if (matches_order(arr, __privateGet(this, _inverseOrder))) {
|
|
150301
150233
|
return arr;
|
|
150302
150234
|
}
|
|
150303
|
-
return convert_array_order(arr, (
|
|
150235
|
+
return convert_array_order(arr, __privateGet(this, _inverseOrder));
|
|
150304
150236
|
}
|
|
150305
150237
|
decode(arr) {
|
|
150306
|
-
return
|
|
150238
|
+
return {
|
|
150239
|
+
data: arr.data,
|
|
150240
|
+
shape: arr.shape,
|
|
150241
|
+
stride: get_strides(arr.shape, __privateGet(this, _order))
|
|
150242
|
+
};
|
|
150307
150243
|
}
|
|
150308
|
-
}
|
|
150244
|
+
};
|
|
150245
|
+
let TransposeCodec = _TransposeCodec;
|
|
150246
|
+
_order = new WeakMap();
|
|
150247
|
+
_inverseOrder = new WeakMap();
|
|
150309
150248
|
const _VLenUTF8 = class {
|
|
150310
150249
|
constructor(shape) {
|
|
150311
150250
|
__publicField(this, "kind", "array_to_bytes");
|
|
150312
150251
|
__privateAdd(this, _shape2, void 0);
|
|
150313
|
-
__privateAdd(this,
|
|
150252
|
+
__privateAdd(this, _strides, void 0);
|
|
150314
150253
|
__privateSet(this, _shape2, shape);
|
|
150315
|
-
__privateSet(this,
|
|
150254
|
+
__privateSet(this, _strides, get_strides(shape, "C"));
|
|
150316
150255
|
}
|
|
150317
150256
|
static fromConfig(_, meta2) {
|
|
150318
150257
|
return new _VLenUTF8(meta2.shape);
|
|
@@ -150331,14 +150270,14 @@ const _VLenUTF8 = class {
|
|
|
150331
150270
|
data[i2] = decoder.decode(bytes.buffer.slice(pos, pos + item_length));
|
|
150332
150271
|
pos += item_length;
|
|
150333
150272
|
}
|
|
150334
|
-
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this,
|
|
150273
|
+
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this, _strides) };
|
|
150335
150274
|
}
|
|
150336
150275
|
};
|
|
150337
150276
|
let VLenUTF8 = _VLenUTF8;
|
|
150338
150277
|
_shape2 = new WeakMap();
|
|
150339
|
-
|
|
150278
|
+
_strides = new WeakMap();
|
|
150340
150279
|
function create_default_registry() {
|
|
150341
|
-
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-
|
|
150280
|
+
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-561fda0e.js").then((m) => m.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec).set("bitround", () => BitroundCodec);
|
|
150342
150281
|
}
|
|
150343
150282
|
const registry = create_default_registry();
|
|
150344
150283
|
function create_codec_pipeline(chunk_metadata) {
|
|
@@ -150374,9 +150313,7 @@ async function load_codecs(chunk_meta) {
|
|
|
150374
150313
|
let promises = chunk_meta.codecs.map(async (meta2) => {
|
|
150375
150314
|
var _a3;
|
|
150376
150315
|
let Codec = await ((_a3 = registry.get(meta2.name)) == null ? void 0 : _a3());
|
|
150377
|
-
|
|
150378
|
-
throw new Error(`Unknown codec: ${meta2.name}`);
|
|
150379
|
-
}
|
|
150316
|
+
assert$2(Codec, `Unknown codec: ${meta2.name}`);
|
|
150380
150317
|
return { Codec, meta: meta2 };
|
|
150381
150318
|
});
|
|
150382
150319
|
let array_to_array = [];
|
|
@@ -150396,9 +150333,7 @@ async function load_codecs(chunk_meta) {
|
|
|
150396
150333
|
}
|
|
150397
150334
|
}
|
|
150398
150335
|
if (!array_to_bytes) {
|
|
150399
|
-
|
|
150400
|
-
throw new Error(`Cannot encode ${chunk_meta.data_type} to bytes without a codec`);
|
|
150401
|
-
}
|
|
150336
|
+
assert$2(is_typed_array_like_meta(chunk_meta), `Cannot encode ${chunk_meta.data_type} to bytes without a codec`);
|
|
150402
150337
|
array_to_bytes = BytesCodec.fromConfig({ endian: "little" }, chunk_meta);
|
|
150403
150338
|
}
|
|
150404
150339
|
return { array_to_array, array_to_bytes, bytes_to_bytes };
|
|
@@ -150408,9 +150343,7 @@ function is_typed_array_like_meta(meta2) {
|
|
|
150408
150343
|
}
|
|
150409
150344
|
const MAX_BIG_UINT = 18446744073709551615n;
|
|
150410
150345
|
function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sharding_config) {
|
|
150411
|
-
|
|
150412
|
-
throw new Error("Store does not support range requests");
|
|
150413
|
-
}
|
|
150346
|
+
assert$2(location.store.getRange, "Store does not support range requests");
|
|
150414
150347
|
let get_range = location.store.getRange.bind(location.store);
|
|
150415
150348
|
let index_shape = shard_shape.map((d, i2) => d / sharding_config.chunk_shape[i2]);
|
|
150416
150349
|
let index_codec = create_codec_pipeline({
|
|
@@ -150476,6 +150409,11 @@ class Group extends Location {
|
|
|
150476
150409
|
}
|
|
150477
150410
|
}
|
|
150478
150411
|
_metadata = new WeakMap();
|
|
150412
|
+
function get_array_order(codecs) {
|
|
150413
|
+
var _a3;
|
|
150414
|
+
const maybe_transpose_codec = codecs.find((c) => c.name === "transpose");
|
|
150415
|
+
return ((_a3 = maybe_transpose_codec == null ? void 0 : maybe_transpose_codec.configuration) == null ? void 0 : _a3.order) ?? "C";
|
|
150416
|
+
}
|
|
150479
150417
|
const CONTEXT_MARKER = Symbol("zarrita.context");
|
|
150480
150418
|
function get_context(obj) {
|
|
150481
150419
|
return obj[CONTEXT_MARKER];
|
|
@@ -150498,8 +150436,8 @@ function create_context(location, metadata) {
|
|
|
150498
150436
|
shape: configuration.chunk_shape,
|
|
150499
150437
|
codecs: configuration.codecs
|
|
150500
150438
|
}),
|
|
150501
|
-
get_strides(shape
|
|
150502
|
-
return get_strides(shape,
|
|
150439
|
+
get_strides(shape) {
|
|
150440
|
+
return get_strides(shape, native_order2);
|
|
150503
150441
|
},
|
|
150504
150442
|
get_chunk_bytes: create_sharded_chunk_getter(location, metadata.chunk_grid.configuration.chunk_shape, shared_context.encode_chunk_key, configuration)
|
|
150505
150443
|
};
|
|
@@ -150514,8 +150452,8 @@ function create_context(location, metadata) {
|
|
|
150514
150452
|
shape: metadata.chunk_grid.configuration.chunk_shape,
|
|
150515
150453
|
codecs: metadata.codecs
|
|
150516
150454
|
}),
|
|
150517
|
-
get_strides(shape
|
|
150518
|
-
return get_strides(shape,
|
|
150455
|
+
get_strides(shape) {
|
|
150456
|
+
return get_strides(shape, native_order);
|
|
150519
150457
|
},
|
|
150520
150458
|
async get_chunk_bytes(chunk_coords, options) {
|
|
150521
150459
|
let chunk_key = shared_context.encode_chunk_key(chunk_coords);
|
|
@@ -150618,9 +150556,8 @@ async function open_v2(location, options = {}) {
|
|
|
150618
150556
|
if (options.kind === "group")
|
|
150619
150557
|
return open_group_v2(loc, attrs);
|
|
150620
150558
|
return open_array_v2(loc, attrs).catch((err2) => {
|
|
150621
|
-
|
|
150622
|
-
|
|
150623
|
-
throw err2;
|
|
150559
|
+
rethrow_unless(err2, NodeNotFoundError);
|
|
150560
|
+
return open_group_v2(loc, attrs);
|
|
150624
150561
|
});
|
|
150625
150562
|
}
|
|
150626
150563
|
async function open_array_v2(location, attrs) {
|
|
@@ -150678,10 +150615,8 @@ async function open(location, options = {}) {
|
|
|
150678
150615
|
let open_primary = version_max === "v2" ? open.v2 : open.v3;
|
|
150679
150616
|
let open_secondary = version_max === "v2" ? open.v3 : open.v2;
|
|
150680
150617
|
return open_primary(location, options).catch((err2) => {
|
|
150681
|
-
|
|
150682
|
-
|
|
150683
|
-
}
|
|
150684
|
-
throw err2;
|
|
150618
|
+
rethrow_unless(err2, NodeNotFoundError);
|
|
150619
|
+
return open_secondary(location, options);
|
|
150685
150620
|
});
|
|
150686
150621
|
}
|
|
150687
150622
|
open.v2 = open_v2;
|
|
@@ -150919,7 +150854,7 @@ async function get$1(arr, selection, opts2, setter2) {
|
|
|
150919
150854
|
shape: arr.shape,
|
|
150920
150855
|
chunk_shape: arr.chunks
|
|
150921
150856
|
});
|
|
150922
|
-
let out = setter2.prepare(new context.TypedArray(indexer.shape.reduce((a2, b) => a2 * b, 1)), indexer.shape, context.get_strides(indexer.shape
|
|
150857
|
+
let out = setter2.prepare(new context.TypedArray(indexer.shape.reduce((a2, b) => a2 * b, 1)), indexer.shape, context.get_strides(indexer.shape));
|
|
150923
150858
|
let queue = ((_a3 = opts2.create_queue) == null ? void 0 : _a3.call(opts2)) ?? create_queue();
|
|
150924
150859
|
for (const { chunk_coords, mapping } of indexer) {
|
|
150925
150860
|
queue.add(async () => {
|
|
@@ -151117,6 +151052,10 @@ function merge_init(storeOverrides, requestOverrides) {
|
|
|
151117
151052
|
}
|
|
151118
151053
|
};
|
|
151119
151054
|
}
|
|
151055
|
+
function assert$1(expression, msg = "") {
|
|
151056
|
+
if (!expression)
|
|
151057
|
+
throw new Error(msg);
|
|
151058
|
+
}
|
|
151120
151059
|
function resolve(root2, path) {
|
|
151121
151060
|
const base = typeof root2 === "string" ? new URL(root2) : root2;
|
|
151122
151061
|
if (!base.pathname.endsWith("/")) {
|
|
@@ -151127,7 +151066,7 @@ function resolve(root2, path) {
|
|
|
151127
151066
|
return resolved;
|
|
151128
151067
|
}
|
|
151129
151068
|
async function handle_response(response) {
|
|
151130
|
-
if (response.status === 404
|
|
151069
|
+
if (response.status === 404) {
|
|
151131
151070
|
return void 0;
|
|
151132
151071
|
}
|
|
151133
151072
|
if (response.status === 200 || response.status === 206) {
|
|
@@ -152062,9 +152001,7 @@ class HTTPRangeReader {
|
|
|
152062
152001
|
...__privateGet(this, _overrides2),
|
|
152063
152002
|
method: "HEAD"
|
|
152064
152003
|
});
|
|
152065
|
-
|
|
152066
|
-
throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
|
|
152067
|
-
}
|
|
152004
|
+
assert$1(req.ok, `failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
|
|
152068
152005
|
this.length = Number(req.headers.get("content-length"));
|
|
152069
152006
|
if (Number.isNaN(this.length)) {
|
|
152070
152007
|
throw Error("could not get length");
|
|
@@ -152077,9 +152014,7 @@ class HTTPRangeReader {
|
|
|
152077
152014
|
return new Uint8Array(0);
|
|
152078
152015
|
}
|
|
152079
152016
|
const req = await fetch_range(this.url, offset, size2, __privateGet(this, _overrides2));
|
|
152080
|
-
|
|
152081
|
-
throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size2}: ${req.statusText}`);
|
|
152082
|
-
}
|
|
152017
|
+
assert$1(req.ok, `failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size2}: ${req.statusText}`);
|
|
152083
152018
|
return new Uint8Array(await req.arrayBuffer());
|
|
152084
152019
|
}
|
|
152085
152020
|
}
|
|
@@ -152369,6 +152304,25 @@ _refs = new WeakMap();
|
|
|
152369
152304
|
_opts = new WeakMap();
|
|
152370
152305
|
_overrides3 = new WeakMap();
|
|
152371
152306
|
const ReferenceStore$1 = ReferenceStore;
|
|
152307
|
+
class RelaxedFetchStore extends FetchStore$1 {
|
|
152308
|
+
// This allows returning `undefined` for 403 responses,
|
|
152309
|
+
// as opposed to completely erroring.
|
|
152310
|
+
// Needed due to https://github.com/manzt/zarrita.js/pull/212
|
|
152311
|
+
// In the future, perhaps we could contribute a way to pass a
|
|
152312
|
+
// custom error handling function or additional options
|
|
152313
|
+
// to the zarrita FetchStore so that a subclass is not required.
|
|
152314
|
+
async get(key, options = {}) {
|
|
152315
|
+
var _a3;
|
|
152316
|
+
try {
|
|
152317
|
+
return await super.get(key, options);
|
|
152318
|
+
} catch (e2) {
|
|
152319
|
+
if (((_a3 = e2 == null ? void 0 : e2.message) == null ? void 0 : _a3.startsWith("Unexpected response status 403")) && !getDebugMode()) {
|
|
152320
|
+
return void 0;
|
|
152321
|
+
}
|
|
152322
|
+
throw e2;
|
|
152323
|
+
}
|
|
152324
|
+
}
|
|
152325
|
+
}
|
|
152372
152326
|
function zarrOpenRoot(url, fileType, opts2) {
|
|
152373
152327
|
let store;
|
|
152374
152328
|
if (fileType && fileType.endsWith(".zip")) {
|
|
@@ -152390,7 +152344,7 @@ function zarrOpenRoot(url, fileType, opts2) {
|
|
|
152390
152344
|
));
|
|
152391
152345
|
store = ReferenceStore$1.fromSpec(referenceSpecPromise, { target: url, overrides: opts2 == null ? void 0 : opts2.requestInit });
|
|
152392
152346
|
} else {
|
|
152393
|
-
store = new
|
|
152347
|
+
store = new RelaxedFetchStore(url, { overrides: opts2 == null ? void 0 : opts2.requestInit });
|
|
152394
152348
|
}
|
|
152395
152349
|
return root(store);
|
|
152396
152350
|
}
|