@vitessce/utils 3.2.2 → 3.3.0
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/index.js +182 -137
- package/dist-tsc/Pool.d.ts +8 -7
- package/dist-tsc/Pool.d.ts.map +1 -1
- package/dist-tsc/Pool.js +5 -3
- package/dist-tsc/components.d.ts +25 -21
- package/dist-tsc/components.d.ts.map +1 -1
- package/dist-tsc/components.js +7 -6
- package/dist-tsc/gating.d.ts +8 -8
- package/dist-tsc/gating.d.ts.map +1 -1
- package/dist-tsc/gating.js +3 -3
- package/dist-tsc/index.d.ts +5 -5
- package/dist-tsc/index.d.ts.map +1 -1
- package/dist-tsc/index.js +2 -2
- package/dist-tsc/interpolate-colors.d.ts +14 -8
- package/dist-tsc/interpolate-colors.d.ts.map +1 -1
- package/dist-tsc/interpolate-colors.js +9 -8
- package/dist-tsc/interpolate-colors.test.d.ts.map +1 -1
- package/dist-tsc/root.d.ts +8 -6
- package/dist-tsc/root.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/{Pool.js → Pool.ts} +11 -6
- package/src/{components.js → components.ts} +17 -16
- package/src/{gating.js → gating.ts} +4 -4
- package/src/index.ts +39 -0
- package/src/{interpolate-colors.test.js → interpolate-colors.test.ts} +1 -1
- package/src/{interpolate-colors.js → interpolate-colors.ts} +26 -16
- package/src/missing-types.d.ts +2 -0
- package/src/{root.js → root.ts} +7 -7
- package/src/index.js +0 -12
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
1
7
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2
8
|
function getDefaultExportFromCjs(x) {
|
|
3
9
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -1152,7 +1158,7 @@ function baseAssignIn(object, source) {
|
|
|
1152
1158
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1153
1159
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1154
1160
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1155
|
-
var
|
|
1161
|
+
var Buffer2 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
|
|
1156
1162
|
function cloneBuffer(buffer, isDeep) {
|
|
1157
1163
|
if (isDeep) {
|
|
1158
1164
|
return buffer.slice();
|
|
@@ -2389,9 +2395,9 @@ const schemePlasma$1 = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138],
|
|
|
2389
2395
|
function rgbSpline$1(spline) {
|
|
2390
2396
|
return (colors) => {
|
|
2391
2397
|
const n = colors.length;
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2398
|
+
const r = new Array(n);
|
|
2399
|
+
const g = new Array(n);
|
|
2400
|
+
const b = new Array(n);
|
|
2395
2401
|
let i;
|
|
2396
2402
|
let color;
|
|
2397
2403
|
for (i = 0; i < n; ++i) {
|
|
@@ -2400,10 +2406,10 @@ function rgbSpline$1(spline) {
|
|
|
2400
2406
|
g[i] = color[1] || 0;
|
|
2401
2407
|
b[i] = color[2] || 0;
|
|
2402
2408
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
return (t2) => [
|
|
2409
|
+
const rFunc = spline(r);
|
|
2410
|
+
const gFunc = spline(g);
|
|
2411
|
+
const bFunc = spline(b);
|
|
2412
|
+
return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
|
|
2407
2413
|
};
|
|
2408
2414
|
}
|
|
2409
2415
|
function basis$1(values) {
|
|
@@ -8985,6 +8991,7 @@ const DataType$1 = {
|
|
|
8985
8991
|
const FileType$1 = {
|
|
8986
8992
|
// Joint file types
|
|
8987
8993
|
ANNDATA_ZARR: "anndata.zarr",
|
|
8994
|
+
SPATIALDATA_ZARR: "spatialdata.zarr",
|
|
8988
8995
|
// Atomic file types
|
|
8989
8996
|
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
8990
8997
|
OBS_SPOTS_CSV: "obsSpots.csv",
|
|
@@ -9007,6 +9014,16 @@ const FileType$1 = {
|
|
|
9007
9014
|
OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
|
|
9008
9015
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
9009
9016
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
9017
|
+
// SpatialData
|
|
9018
|
+
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
9019
|
+
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
9020
|
+
SHAPES_SPATIALDATA_ZARR: "shapes.spatialdata.zarr",
|
|
9021
|
+
OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
|
|
9022
|
+
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
9023
|
+
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
9024
|
+
// TODO:
|
|
9025
|
+
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
9026
|
+
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
9010
9027
|
// MuData
|
|
9011
9028
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
9012
9029
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -9443,9 +9460,30 @@ z.object({
|
|
|
9443
9460
|
offsetsUrl: z.string().optional(),
|
|
9444
9461
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
9445
9462
|
});
|
|
9446
|
-
z.object({
|
|
9463
|
+
const imageOmeZarrSchema = z.object({
|
|
9447
9464
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
9448
9465
|
});
|
|
9466
|
+
imageOmeZarrSchema.extend({
|
|
9467
|
+
path: z.string()
|
|
9468
|
+
});
|
|
9469
|
+
z.object({
|
|
9470
|
+
path: z.string()
|
|
9471
|
+
});
|
|
9472
|
+
z.object({
|
|
9473
|
+
path: z.string()
|
|
9474
|
+
});
|
|
9475
|
+
z.object({
|
|
9476
|
+
path: z.string(),
|
|
9477
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
9478
|
+
});
|
|
9479
|
+
annDataObsFeatureMatrix.extend({
|
|
9480
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
9481
|
+
});
|
|
9482
|
+
z.object({
|
|
9483
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
9484
|
+
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
9485
|
+
obsSets: annDataObsSets
|
|
9486
|
+
});
|
|
9449
9487
|
z.object({
|
|
9450
9488
|
obsIndex: z.string(),
|
|
9451
9489
|
obsEmbedding: z.array(z.string()).length(2)
|
|
@@ -11075,28 +11113,28 @@ var json2csv_umd = { exports: {} };
|
|
|
11075
11113
|
return toString.call(arr) == "[object Array]";
|
|
11076
11114
|
};
|
|
11077
11115
|
var INSPECT_MAX_BYTES = 50;
|
|
11078
|
-
|
|
11116
|
+
Buffer3.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== void 0 ? global$1.TYPED_ARRAY_SUPPORT : true;
|
|
11079
11117
|
function kMaxLength() {
|
|
11080
|
-
return
|
|
11118
|
+
return Buffer3.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
|
|
11081
11119
|
}
|
|
11082
11120
|
function createBuffer(that, length) {
|
|
11083
11121
|
if (kMaxLength() < length) {
|
|
11084
11122
|
throw new RangeError("Invalid typed array length");
|
|
11085
11123
|
}
|
|
11086
|
-
if (
|
|
11124
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
11087
11125
|
that = new Uint8Array(length);
|
|
11088
|
-
that.__proto__ =
|
|
11126
|
+
that.__proto__ = Buffer3.prototype;
|
|
11089
11127
|
} else {
|
|
11090
11128
|
if (that === null) {
|
|
11091
|
-
that = new
|
|
11129
|
+
that = new Buffer3(length);
|
|
11092
11130
|
}
|
|
11093
11131
|
that.length = length;
|
|
11094
11132
|
}
|
|
11095
11133
|
return that;
|
|
11096
11134
|
}
|
|
11097
|
-
function
|
|
11098
|
-
if (!
|
|
11099
|
-
return new
|
|
11135
|
+
function Buffer3(arg, encodingOrOffset, length) {
|
|
11136
|
+
if (!Buffer3.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer3)) {
|
|
11137
|
+
return new Buffer3(arg, encodingOrOffset, length);
|
|
11100
11138
|
}
|
|
11101
11139
|
if (typeof arg === "number") {
|
|
11102
11140
|
if (typeof encodingOrOffset === "string") {
|
|
@@ -11108,9 +11146,9 @@ var json2csv_umd = { exports: {} };
|
|
|
11108
11146
|
}
|
|
11109
11147
|
return from(this, arg, encodingOrOffset, length);
|
|
11110
11148
|
}
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
arr.__proto__ =
|
|
11149
|
+
Buffer3.poolSize = 8192;
|
|
11150
|
+
Buffer3._augment = function(arr) {
|
|
11151
|
+
arr.__proto__ = Buffer3.prototype;
|
|
11114
11152
|
return arr;
|
|
11115
11153
|
};
|
|
11116
11154
|
function from(that, value, encodingOrOffset, length) {
|
|
@@ -11125,12 +11163,12 @@ var json2csv_umd = { exports: {} };
|
|
|
11125
11163
|
}
|
|
11126
11164
|
return fromObject(that, value);
|
|
11127
11165
|
}
|
|
11128
|
-
|
|
11166
|
+
Buffer3.from = function(value, encodingOrOffset, length) {
|
|
11129
11167
|
return from(null, value, encodingOrOffset, length);
|
|
11130
11168
|
};
|
|
11131
|
-
if (
|
|
11132
|
-
|
|
11133
|
-
|
|
11169
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
11170
|
+
Buffer3.prototype.__proto__ = Uint8Array.prototype;
|
|
11171
|
+
Buffer3.__proto__ = Uint8Array;
|
|
11134
11172
|
}
|
|
11135
11173
|
function assertSize(size) {
|
|
11136
11174
|
if (typeof size !== "number") {
|
|
@@ -11149,30 +11187,30 @@ var json2csv_umd = { exports: {} };
|
|
|
11149
11187
|
}
|
|
11150
11188
|
return createBuffer(that, size);
|
|
11151
11189
|
}
|
|
11152
|
-
|
|
11190
|
+
Buffer3.alloc = function(size, fill, encoding) {
|
|
11153
11191
|
return alloc(null, size, fill, encoding);
|
|
11154
11192
|
};
|
|
11155
11193
|
function allocUnsafe2(that, size) {
|
|
11156
11194
|
assertSize(size);
|
|
11157
11195
|
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
|
|
11158
|
-
if (!
|
|
11196
|
+
if (!Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
11159
11197
|
for (var i = 0; i < size; ++i) {
|
|
11160
11198
|
that[i] = 0;
|
|
11161
11199
|
}
|
|
11162
11200
|
}
|
|
11163
11201
|
return that;
|
|
11164
11202
|
}
|
|
11165
|
-
|
|
11203
|
+
Buffer3.allocUnsafe = function(size) {
|
|
11166
11204
|
return allocUnsafe2(null, size);
|
|
11167
11205
|
};
|
|
11168
|
-
|
|
11206
|
+
Buffer3.allocUnsafeSlow = function(size) {
|
|
11169
11207
|
return allocUnsafe2(null, size);
|
|
11170
11208
|
};
|
|
11171
11209
|
function fromString(that, string, encoding) {
|
|
11172
11210
|
if (typeof encoding !== "string" || encoding === "") {
|
|
11173
11211
|
encoding = "utf8";
|
|
11174
11212
|
}
|
|
11175
|
-
if (!
|
|
11213
|
+
if (!Buffer3.isEncoding(encoding)) {
|
|
11176
11214
|
throw new TypeError('"encoding" must be a valid string encoding');
|
|
11177
11215
|
}
|
|
11178
11216
|
var length = byteLength(string, encoding) | 0;
|
|
@@ -11206,9 +11244,9 @@ var json2csv_umd = { exports: {} };
|
|
|
11206
11244
|
} else {
|
|
11207
11245
|
array = new Uint8Array(array, byteOffset, length);
|
|
11208
11246
|
}
|
|
11209
|
-
if (
|
|
11247
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
11210
11248
|
that = array;
|
|
11211
|
-
that.__proto__ =
|
|
11249
|
+
that.__proto__ = Buffer3.prototype;
|
|
11212
11250
|
} else {
|
|
11213
11251
|
that = fromArrayLike(that, array);
|
|
11214
11252
|
}
|
|
@@ -11243,11 +11281,11 @@ var json2csv_umd = { exports: {} };
|
|
|
11243
11281
|
}
|
|
11244
11282
|
return length | 0;
|
|
11245
11283
|
}
|
|
11246
|
-
|
|
11284
|
+
Buffer3.isBuffer = isBuffer2;
|
|
11247
11285
|
function internalIsBuffer(b) {
|
|
11248
11286
|
return !!(b != null && b._isBuffer);
|
|
11249
11287
|
}
|
|
11250
|
-
|
|
11288
|
+
Buffer3.compare = function compare2(a, b) {
|
|
11251
11289
|
if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
|
|
11252
11290
|
throw new TypeError("Arguments must be Buffers");
|
|
11253
11291
|
}
|
|
@@ -11268,7 +11306,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11268
11306
|
return 1;
|
|
11269
11307
|
return 0;
|
|
11270
11308
|
};
|
|
11271
|
-
|
|
11309
|
+
Buffer3.isEncoding = function isEncoding(encoding) {
|
|
11272
11310
|
switch (String(encoding).toLowerCase()) {
|
|
11273
11311
|
case "hex":
|
|
11274
11312
|
case "utf8":
|
|
@@ -11286,12 +11324,12 @@ var json2csv_umd = { exports: {} };
|
|
|
11286
11324
|
return false;
|
|
11287
11325
|
}
|
|
11288
11326
|
};
|
|
11289
|
-
|
|
11327
|
+
Buffer3.concat = function concat(list, length) {
|
|
11290
11328
|
if (!isArray2(list)) {
|
|
11291
11329
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
11292
11330
|
}
|
|
11293
11331
|
if (list.length === 0) {
|
|
11294
|
-
return
|
|
11332
|
+
return Buffer3.alloc(0);
|
|
11295
11333
|
}
|
|
11296
11334
|
var i;
|
|
11297
11335
|
if (length === void 0) {
|
|
@@ -11300,7 +11338,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11300
11338
|
length += list[i].length;
|
|
11301
11339
|
}
|
|
11302
11340
|
}
|
|
11303
|
-
var buffer =
|
|
11341
|
+
var buffer = Buffer3.allocUnsafe(length);
|
|
11304
11342
|
var pos = 0;
|
|
11305
11343
|
for (i = 0; i < list.length; ++i) {
|
|
11306
11344
|
var buf = list[i];
|
|
@@ -11353,7 +11391,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11353
11391
|
}
|
|
11354
11392
|
}
|
|
11355
11393
|
}
|
|
11356
|
-
|
|
11394
|
+
Buffer3.byteLength = byteLength;
|
|
11357
11395
|
function slowToString(encoding, start, end) {
|
|
11358
11396
|
var loweredCase = false;
|
|
11359
11397
|
if (start === void 0 || start < 0) {
|
|
@@ -11402,13 +11440,13 @@ var json2csv_umd = { exports: {} };
|
|
|
11402
11440
|
}
|
|
11403
11441
|
}
|
|
11404
11442
|
}
|
|
11405
|
-
|
|
11443
|
+
Buffer3.prototype._isBuffer = true;
|
|
11406
11444
|
function swap(b, n, m) {
|
|
11407
11445
|
var i = b[n];
|
|
11408
11446
|
b[n] = b[m];
|
|
11409
11447
|
b[m] = i;
|
|
11410
11448
|
}
|
|
11411
|
-
|
|
11449
|
+
Buffer3.prototype.swap16 = function swap16() {
|
|
11412
11450
|
var len = this.length;
|
|
11413
11451
|
if (len % 2 !== 0) {
|
|
11414
11452
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
@@ -11418,7 +11456,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11418
11456
|
}
|
|
11419
11457
|
return this;
|
|
11420
11458
|
};
|
|
11421
|
-
|
|
11459
|
+
Buffer3.prototype.swap32 = function swap32() {
|
|
11422
11460
|
var len = this.length;
|
|
11423
11461
|
if (len % 4 !== 0) {
|
|
11424
11462
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
@@ -11429,7 +11467,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11429
11467
|
}
|
|
11430
11468
|
return this;
|
|
11431
11469
|
};
|
|
11432
|
-
|
|
11470
|
+
Buffer3.prototype.swap64 = function swap64() {
|
|
11433
11471
|
var len = this.length;
|
|
11434
11472
|
if (len % 8 !== 0) {
|
|
11435
11473
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
@@ -11442,7 +11480,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11442
11480
|
}
|
|
11443
11481
|
return this;
|
|
11444
11482
|
};
|
|
11445
|
-
|
|
11483
|
+
Buffer3.prototype.toString = function toString2() {
|
|
11446
11484
|
var length = this.length | 0;
|
|
11447
11485
|
if (length === 0)
|
|
11448
11486
|
return "";
|
|
@@ -11450,14 +11488,14 @@ var json2csv_umd = { exports: {} };
|
|
|
11450
11488
|
return utf8Slice(this, 0, length);
|
|
11451
11489
|
return slowToString.apply(this, arguments);
|
|
11452
11490
|
};
|
|
11453
|
-
|
|
11491
|
+
Buffer3.prototype.equals = function equals(b) {
|
|
11454
11492
|
if (!internalIsBuffer(b))
|
|
11455
11493
|
throw new TypeError("Argument must be a Buffer");
|
|
11456
11494
|
if (this === b)
|
|
11457
11495
|
return true;
|
|
11458
|
-
return
|
|
11496
|
+
return Buffer3.compare(this, b) === 0;
|
|
11459
11497
|
};
|
|
11460
|
-
|
|
11498
|
+
Buffer3.prototype.inspect = function inspect2() {
|
|
11461
11499
|
var str = "";
|
|
11462
11500
|
var max = INSPECT_MAX_BYTES;
|
|
11463
11501
|
if (this.length > 0) {
|
|
@@ -11467,7 +11505,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11467
11505
|
}
|
|
11468
11506
|
return "<Buffer " + str + ">";
|
|
11469
11507
|
};
|
|
11470
|
-
|
|
11508
|
+
Buffer3.prototype.compare = function compare2(target, start, end, thisStart, thisEnd) {
|
|
11471
11509
|
if (!internalIsBuffer(target)) {
|
|
11472
11510
|
throw new TypeError("Argument must be a Buffer");
|
|
11473
11511
|
}
|
|
@@ -11548,7 +11586,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11548
11586
|
return -1;
|
|
11549
11587
|
}
|
|
11550
11588
|
if (typeof val === "string") {
|
|
11551
|
-
val =
|
|
11589
|
+
val = Buffer3.from(val, encoding);
|
|
11552
11590
|
}
|
|
11553
11591
|
if (internalIsBuffer(val)) {
|
|
11554
11592
|
if (val.length === 0) {
|
|
@@ -11557,7 +11595,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11557
11595
|
return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
|
|
11558
11596
|
} else if (typeof val === "number") {
|
|
11559
11597
|
val = val & 255;
|
|
11560
|
-
if (
|
|
11598
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === "function") {
|
|
11561
11599
|
if (dir) {
|
|
11562
11600
|
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
|
|
11563
11601
|
} else {
|
|
@@ -11623,13 +11661,13 @@ var json2csv_umd = { exports: {} };
|
|
|
11623
11661
|
}
|
|
11624
11662
|
return -1;
|
|
11625
11663
|
}
|
|
11626
|
-
|
|
11664
|
+
Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {
|
|
11627
11665
|
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
11628
11666
|
};
|
|
11629
|
-
|
|
11667
|
+
Buffer3.prototype.indexOf = function indexOf2(val, byteOffset, encoding) {
|
|
11630
11668
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
11631
11669
|
};
|
|
11632
|
-
|
|
11670
|
+
Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
|
|
11633
11671
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
11634
11672
|
};
|
|
11635
11673
|
function hexWrite(buf, string, offset, length) {
|
|
@@ -11672,7 +11710,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11672
11710
|
function ucs2Write(buf, string, offset, length) {
|
|
11673
11711
|
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
11674
11712
|
}
|
|
11675
|
-
|
|
11713
|
+
Buffer3.prototype.write = function write2(string, offset, length, encoding) {
|
|
11676
11714
|
if (offset === void 0) {
|
|
11677
11715
|
encoding = "utf8";
|
|
11678
11716
|
length = this.length;
|
|
@@ -11732,7 +11770,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11732
11770
|
}
|
|
11733
11771
|
}
|
|
11734
11772
|
};
|
|
11735
|
-
|
|
11773
|
+
Buffer3.prototype.toJSON = function toJSON() {
|
|
11736
11774
|
return {
|
|
11737
11775
|
type: "Buffer",
|
|
11738
11776
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
@@ -11857,7 +11895,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11857
11895
|
}
|
|
11858
11896
|
return res;
|
|
11859
11897
|
}
|
|
11860
|
-
|
|
11898
|
+
Buffer3.prototype.slice = function slice(start, end) {
|
|
11861
11899
|
var len = this.length;
|
|
11862
11900
|
start = ~~start;
|
|
11863
11901
|
end = end === void 0 ? len : ~~end;
|
|
@@ -11878,12 +11916,12 @@ var json2csv_umd = { exports: {} };
|
|
|
11878
11916
|
if (end < start)
|
|
11879
11917
|
end = start;
|
|
11880
11918
|
var newBuf;
|
|
11881
|
-
if (
|
|
11919
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
11882
11920
|
newBuf = this.subarray(start, end);
|
|
11883
|
-
newBuf.__proto__ =
|
|
11921
|
+
newBuf.__proto__ = Buffer3.prototype;
|
|
11884
11922
|
} else {
|
|
11885
11923
|
var sliceLen = end - start;
|
|
11886
|
-
newBuf = new
|
|
11924
|
+
newBuf = new Buffer3(sliceLen, void 0);
|
|
11887
11925
|
for (var i = 0; i < sliceLen; ++i) {
|
|
11888
11926
|
newBuf[i] = this[i + start];
|
|
11889
11927
|
}
|
|
@@ -11896,7 +11934,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11896
11934
|
if (offset + ext > length)
|
|
11897
11935
|
throw new RangeError("Trying to access beyond buffer length");
|
|
11898
11936
|
}
|
|
11899
|
-
|
|
11937
|
+
Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
|
|
11900
11938
|
offset = offset | 0;
|
|
11901
11939
|
byteLength2 = byteLength2 | 0;
|
|
11902
11940
|
if (!noAssert)
|
|
@@ -11909,7 +11947,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11909
11947
|
}
|
|
11910
11948
|
return val;
|
|
11911
11949
|
};
|
|
11912
|
-
|
|
11950
|
+
Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {
|
|
11913
11951
|
offset = offset | 0;
|
|
11914
11952
|
byteLength2 = byteLength2 | 0;
|
|
11915
11953
|
if (!noAssert) {
|
|
@@ -11922,32 +11960,32 @@ var json2csv_umd = { exports: {} };
|
|
|
11922
11960
|
}
|
|
11923
11961
|
return val;
|
|
11924
11962
|
};
|
|
11925
|
-
|
|
11963
|
+
Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {
|
|
11926
11964
|
if (!noAssert)
|
|
11927
11965
|
checkOffset(offset, 1, this.length);
|
|
11928
11966
|
return this[offset];
|
|
11929
11967
|
};
|
|
11930
|
-
|
|
11968
|
+
Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
|
|
11931
11969
|
if (!noAssert)
|
|
11932
11970
|
checkOffset(offset, 2, this.length);
|
|
11933
11971
|
return this[offset] | this[offset + 1] << 8;
|
|
11934
11972
|
};
|
|
11935
|
-
|
|
11973
|
+
Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
|
|
11936
11974
|
if (!noAssert)
|
|
11937
11975
|
checkOffset(offset, 2, this.length);
|
|
11938
11976
|
return this[offset] << 8 | this[offset + 1];
|
|
11939
11977
|
};
|
|
11940
|
-
|
|
11978
|
+
Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
|
|
11941
11979
|
if (!noAssert)
|
|
11942
11980
|
checkOffset(offset, 4, this.length);
|
|
11943
11981
|
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
11944
11982
|
};
|
|
11945
|
-
|
|
11983
|
+
Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
|
|
11946
11984
|
if (!noAssert)
|
|
11947
11985
|
checkOffset(offset, 4, this.length);
|
|
11948
11986
|
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
11949
11987
|
};
|
|
11950
|
-
|
|
11988
|
+
Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
|
|
11951
11989
|
offset = offset | 0;
|
|
11952
11990
|
byteLength2 = byteLength2 | 0;
|
|
11953
11991
|
if (!noAssert)
|
|
@@ -11963,7 +12001,7 @@ var json2csv_umd = { exports: {} };
|
|
|
11963
12001
|
val -= Math.pow(2, 8 * byteLength2);
|
|
11964
12002
|
return val;
|
|
11965
12003
|
};
|
|
11966
|
-
|
|
12004
|
+
Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
|
|
11967
12005
|
offset = offset | 0;
|
|
11968
12006
|
byteLength2 = byteLength2 | 0;
|
|
11969
12007
|
if (!noAssert)
|
|
@@ -11979,51 +12017,51 @@ var json2csv_umd = { exports: {} };
|
|
|
11979
12017
|
val -= Math.pow(2, 8 * byteLength2);
|
|
11980
12018
|
return val;
|
|
11981
12019
|
};
|
|
11982
|
-
|
|
12020
|
+
Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {
|
|
11983
12021
|
if (!noAssert)
|
|
11984
12022
|
checkOffset(offset, 1, this.length);
|
|
11985
12023
|
if (!(this[offset] & 128))
|
|
11986
12024
|
return this[offset];
|
|
11987
12025
|
return (255 - this[offset] + 1) * -1;
|
|
11988
12026
|
};
|
|
11989
|
-
|
|
12027
|
+
Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
|
|
11990
12028
|
if (!noAssert)
|
|
11991
12029
|
checkOffset(offset, 2, this.length);
|
|
11992
12030
|
var val = this[offset] | this[offset + 1] << 8;
|
|
11993
12031
|
return val & 32768 ? val | 4294901760 : val;
|
|
11994
12032
|
};
|
|
11995
|
-
|
|
12033
|
+
Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
|
|
11996
12034
|
if (!noAssert)
|
|
11997
12035
|
checkOffset(offset, 2, this.length);
|
|
11998
12036
|
var val = this[offset + 1] | this[offset] << 8;
|
|
11999
12037
|
return val & 32768 ? val | 4294901760 : val;
|
|
12000
12038
|
};
|
|
12001
|
-
|
|
12039
|
+
Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
|
|
12002
12040
|
if (!noAssert)
|
|
12003
12041
|
checkOffset(offset, 4, this.length);
|
|
12004
12042
|
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
12005
12043
|
};
|
|
12006
|
-
|
|
12044
|
+
Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
|
|
12007
12045
|
if (!noAssert)
|
|
12008
12046
|
checkOffset(offset, 4, this.length);
|
|
12009
12047
|
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
12010
12048
|
};
|
|
12011
|
-
|
|
12049
|
+
Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
|
|
12012
12050
|
if (!noAssert)
|
|
12013
12051
|
checkOffset(offset, 4, this.length);
|
|
12014
12052
|
return read(this, offset, true, 23, 4);
|
|
12015
12053
|
};
|
|
12016
|
-
|
|
12054
|
+
Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
|
|
12017
12055
|
if (!noAssert)
|
|
12018
12056
|
checkOffset(offset, 4, this.length);
|
|
12019
12057
|
return read(this, offset, false, 23, 4);
|
|
12020
12058
|
};
|
|
12021
|
-
|
|
12059
|
+
Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
|
|
12022
12060
|
if (!noAssert)
|
|
12023
12061
|
checkOffset(offset, 8, this.length);
|
|
12024
12062
|
return read(this, offset, true, 52, 8);
|
|
12025
12063
|
};
|
|
12026
|
-
|
|
12064
|
+
Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
|
|
12027
12065
|
if (!noAssert)
|
|
12028
12066
|
checkOffset(offset, 8, this.length);
|
|
12029
12067
|
return read(this, offset, false, 52, 8);
|
|
@@ -12036,7 +12074,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12036
12074
|
if (offset + ext > buf.length)
|
|
12037
12075
|
throw new RangeError("Index out of range");
|
|
12038
12076
|
}
|
|
12039
|
-
|
|
12077
|
+
Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
|
|
12040
12078
|
value = +value;
|
|
12041
12079
|
offset = offset | 0;
|
|
12042
12080
|
byteLength2 = byteLength2 | 0;
|
|
@@ -12052,7 +12090,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12052
12090
|
}
|
|
12053
12091
|
return offset + byteLength2;
|
|
12054
12092
|
};
|
|
12055
|
-
|
|
12093
|
+
Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {
|
|
12056
12094
|
value = +value;
|
|
12057
12095
|
offset = offset | 0;
|
|
12058
12096
|
byteLength2 = byteLength2 | 0;
|
|
@@ -12068,12 +12106,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12068
12106
|
}
|
|
12069
12107
|
return offset + byteLength2;
|
|
12070
12108
|
};
|
|
12071
|
-
|
|
12109
|
+
Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
|
|
12072
12110
|
value = +value;
|
|
12073
12111
|
offset = offset | 0;
|
|
12074
12112
|
if (!noAssert)
|
|
12075
12113
|
checkInt(this, value, offset, 1, 255, 0);
|
|
12076
|
-
if (!
|
|
12114
|
+
if (!Buffer3.TYPED_ARRAY_SUPPORT)
|
|
12077
12115
|
value = Math.floor(value);
|
|
12078
12116
|
this[offset] = value & 255;
|
|
12079
12117
|
return offset + 1;
|
|
@@ -12085,12 +12123,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12085
12123
|
buf[offset + i] = (value & 255 << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
|
|
12086
12124
|
}
|
|
12087
12125
|
}
|
|
12088
|
-
|
|
12126
|
+
Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
|
|
12089
12127
|
value = +value;
|
|
12090
12128
|
offset = offset | 0;
|
|
12091
12129
|
if (!noAssert)
|
|
12092
12130
|
checkInt(this, value, offset, 2, 65535, 0);
|
|
12093
|
-
if (
|
|
12131
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12094
12132
|
this[offset] = value & 255;
|
|
12095
12133
|
this[offset + 1] = value >>> 8;
|
|
12096
12134
|
} else {
|
|
@@ -12098,12 +12136,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12098
12136
|
}
|
|
12099
12137
|
return offset + 2;
|
|
12100
12138
|
};
|
|
12101
|
-
|
|
12139
|
+
Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
|
|
12102
12140
|
value = +value;
|
|
12103
12141
|
offset = offset | 0;
|
|
12104
12142
|
if (!noAssert)
|
|
12105
12143
|
checkInt(this, value, offset, 2, 65535, 0);
|
|
12106
|
-
if (
|
|
12144
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12107
12145
|
this[offset] = value >>> 8;
|
|
12108
12146
|
this[offset + 1] = value & 255;
|
|
12109
12147
|
} else {
|
|
@@ -12118,12 +12156,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12118
12156
|
buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 255;
|
|
12119
12157
|
}
|
|
12120
12158
|
}
|
|
12121
|
-
|
|
12159
|
+
Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
|
|
12122
12160
|
value = +value;
|
|
12123
12161
|
offset = offset | 0;
|
|
12124
12162
|
if (!noAssert)
|
|
12125
12163
|
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
12126
|
-
if (
|
|
12164
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12127
12165
|
this[offset + 3] = value >>> 24;
|
|
12128
12166
|
this[offset + 2] = value >>> 16;
|
|
12129
12167
|
this[offset + 1] = value >>> 8;
|
|
@@ -12133,12 +12171,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12133
12171
|
}
|
|
12134
12172
|
return offset + 4;
|
|
12135
12173
|
};
|
|
12136
|
-
|
|
12174
|
+
Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
|
|
12137
12175
|
value = +value;
|
|
12138
12176
|
offset = offset | 0;
|
|
12139
12177
|
if (!noAssert)
|
|
12140
12178
|
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
12141
|
-
if (
|
|
12179
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12142
12180
|
this[offset] = value >>> 24;
|
|
12143
12181
|
this[offset + 1] = value >>> 16;
|
|
12144
12182
|
this[offset + 2] = value >>> 8;
|
|
@@ -12148,7 +12186,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12148
12186
|
}
|
|
12149
12187
|
return offset + 4;
|
|
12150
12188
|
};
|
|
12151
|
-
|
|
12189
|
+
Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {
|
|
12152
12190
|
value = +value;
|
|
12153
12191
|
offset = offset | 0;
|
|
12154
12192
|
if (!noAssert) {
|
|
@@ -12167,7 +12205,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12167
12205
|
}
|
|
12168
12206
|
return offset + byteLength2;
|
|
12169
12207
|
};
|
|
12170
|
-
|
|
12208
|
+
Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {
|
|
12171
12209
|
value = +value;
|
|
12172
12210
|
offset = offset | 0;
|
|
12173
12211
|
if (!noAssert) {
|
|
@@ -12186,24 +12224,24 @@ var json2csv_umd = { exports: {} };
|
|
|
12186
12224
|
}
|
|
12187
12225
|
return offset + byteLength2;
|
|
12188
12226
|
};
|
|
12189
|
-
|
|
12227
|
+
Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
|
|
12190
12228
|
value = +value;
|
|
12191
12229
|
offset = offset | 0;
|
|
12192
12230
|
if (!noAssert)
|
|
12193
12231
|
checkInt(this, value, offset, 1, 127, -128);
|
|
12194
|
-
if (!
|
|
12232
|
+
if (!Buffer3.TYPED_ARRAY_SUPPORT)
|
|
12195
12233
|
value = Math.floor(value);
|
|
12196
12234
|
if (value < 0)
|
|
12197
12235
|
value = 255 + value + 1;
|
|
12198
12236
|
this[offset] = value & 255;
|
|
12199
12237
|
return offset + 1;
|
|
12200
12238
|
};
|
|
12201
|
-
|
|
12239
|
+
Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
|
|
12202
12240
|
value = +value;
|
|
12203
12241
|
offset = offset | 0;
|
|
12204
12242
|
if (!noAssert)
|
|
12205
12243
|
checkInt(this, value, offset, 2, 32767, -32768);
|
|
12206
|
-
if (
|
|
12244
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12207
12245
|
this[offset] = value & 255;
|
|
12208
12246
|
this[offset + 1] = value >>> 8;
|
|
12209
12247
|
} else {
|
|
@@ -12211,12 +12249,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12211
12249
|
}
|
|
12212
12250
|
return offset + 2;
|
|
12213
12251
|
};
|
|
12214
|
-
|
|
12252
|
+
Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
|
|
12215
12253
|
value = +value;
|
|
12216
12254
|
offset = offset | 0;
|
|
12217
12255
|
if (!noAssert)
|
|
12218
12256
|
checkInt(this, value, offset, 2, 32767, -32768);
|
|
12219
|
-
if (
|
|
12257
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12220
12258
|
this[offset] = value >>> 8;
|
|
12221
12259
|
this[offset + 1] = value & 255;
|
|
12222
12260
|
} else {
|
|
@@ -12224,12 +12262,12 @@ var json2csv_umd = { exports: {} };
|
|
|
12224
12262
|
}
|
|
12225
12263
|
return offset + 2;
|
|
12226
12264
|
};
|
|
12227
|
-
|
|
12265
|
+
Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
|
|
12228
12266
|
value = +value;
|
|
12229
12267
|
offset = offset | 0;
|
|
12230
12268
|
if (!noAssert)
|
|
12231
12269
|
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
12232
|
-
if (
|
|
12270
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12233
12271
|
this[offset] = value & 255;
|
|
12234
12272
|
this[offset + 1] = value >>> 8;
|
|
12235
12273
|
this[offset + 2] = value >>> 16;
|
|
@@ -12239,14 +12277,14 @@ var json2csv_umd = { exports: {} };
|
|
|
12239
12277
|
}
|
|
12240
12278
|
return offset + 4;
|
|
12241
12279
|
};
|
|
12242
|
-
|
|
12280
|
+
Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
|
|
12243
12281
|
value = +value;
|
|
12244
12282
|
offset = offset | 0;
|
|
12245
12283
|
if (!noAssert)
|
|
12246
12284
|
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
12247
12285
|
if (value < 0)
|
|
12248
12286
|
value = 4294967295 + value + 1;
|
|
12249
|
-
if (
|
|
12287
|
+
if (Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12250
12288
|
this[offset] = value >>> 24;
|
|
12251
12289
|
this[offset + 1] = value >>> 16;
|
|
12252
12290
|
this[offset + 2] = value >>> 8;
|
|
@@ -12269,10 +12307,10 @@ var json2csv_umd = { exports: {} };
|
|
|
12269
12307
|
write(buf, value, offset, littleEndian, 23, 4);
|
|
12270
12308
|
return offset + 4;
|
|
12271
12309
|
}
|
|
12272
|
-
|
|
12310
|
+
Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
|
|
12273
12311
|
return writeFloat(this, value, offset, true, noAssert);
|
|
12274
12312
|
};
|
|
12275
|
-
|
|
12313
|
+
Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
|
|
12276
12314
|
return writeFloat(this, value, offset, false, noAssert);
|
|
12277
12315
|
};
|
|
12278
12316
|
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
@@ -12282,13 +12320,13 @@ var json2csv_umd = { exports: {} };
|
|
|
12282
12320
|
write(buf, value, offset, littleEndian, 52, 8);
|
|
12283
12321
|
return offset + 8;
|
|
12284
12322
|
}
|
|
12285
|
-
|
|
12323
|
+
Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
|
|
12286
12324
|
return writeDouble(this, value, offset, true, noAssert);
|
|
12287
12325
|
};
|
|
12288
|
-
|
|
12326
|
+
Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
|
|
12289
12327
|
return writeDouble(this, value, offset, false, noAssert);
|
|
12290
12328
|
};
|
|
12291
|
-
|
|
12329
|
+
Buffer3.prototype.copy = function copy(target, targetStart, start, end) {
|
|
12292
12330
|
if (!start)
|
|
12293
12331
|
start = 0;
|
|
12294
12332
|
if (!end && end !== 0)
|
|
@@ -12321,7 +12359,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12321
12359
|
for (i = len - 1; i >= 0; --i) {
|
|
12322
12360
|
target[i + targetStart] = this[i + start];
|
|
12323
12361
|
}
|
|
12324
|
-
} else if (len < 1e3 || !
|
|
12362
|
+
} else if (len < 1e3 || !Buffer3.TYPED_ARRAY_SUPPORT) {
|
|
12325
12363
|
for (i = 0; i < len; ++i) {
|
|
12326
12364
|
target[i + targetStart] = this[i + start];
|
|
12327
12365
|
}
|
|
@@ -12334,7 +12372,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12334
12372
|
}
|
|
12335
12373
|
return len;
|
|
12336
12374
|
};
|
|
12337
|
-
|
|
12375
|
+
Buffer3.prototype.fill = function fill(val, start, end, encoding) {
|
|
12338
12376
|
if (typeof val === "string") {
|
|
12339
12377
|
if (typeof start === "string") {
|
|
12340
12378
|
encoding = start;
|
|
@@ -12353,7 +12391,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12353
12391
|
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
12354
12392
|
throw new TypeError("encoding must be a string");
|
|
12355
12393
|
}
|
|
12356
|
-
if (typeof encoding === "string" && !
|
|
12394
|
+
if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
|
|
12357
12395
|
throw new TypeError("Unknown encoding: " + encoding);
|
|
12358
12396
|
}
|
|
12359
12397
|
} else if (typeof val === "number") {
|
|
@@ -12375,7 +12413,7 @@ var json2csv_umd = { exports: {} };
|
|
|
12375
12413
|
this[i] = val;
|
|
12376
12414
|
}
|
|
12377
12415
|
} else {
|
|
12378
|
-
var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new
|
|
12416
|
+
var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer3(val, encoding).toString());
|
|
12379
12417
|
var len = bytes.length;
|
|
12380
12418
|
for (i = 0; i < end - start; ++i) {
|
|
12381
12419
|
this[i + start] = bytes[i % len];
|
|
@@ -13087,10 +13125,10 @@ var json2csv_umd = { exports: {} };
|
|
|
13087
13125
|
};
|
|
13088
13126
|
BufferList.prototype.concat = function(n) {
|
|
13089
13127
|
if (this.length === 0)
|
|
13090
|
-
return
|
|
13128
|
+
return Buffer3.alloc(0);
|
|
13091
13129
|
if (this.length === 1)
|
|
13092
13130
|
return this.head.data;
|
|
13093
|
-
var ret =
|
|
13131
|
+
var ret = Buffer3.allocUnsafe(n >>> 0);
|
|
13094
13132
|
var p = this.head;
|
|
13095
13133
|
var i = 0;
|
|
13096
13134
|
while (p) {
|
|
@@ -13100,7 +13138,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13100
13138
|
}
|
|
13101
13139
|
return ret;
|
|
13102
13140
|
};
|
|
13103
|
-
var isBufferEncoding =
|
|
13141
|
+
var isBufferEncoding = Buffer3.isEncoding || function(encoding) {
|
|
13104
13142
|
switch (encoding && encoding.toLowerCase()) {
|
|
13105
13143
|
case "hex":
|
|
13106
13144
|
case "utf8":
|
|
@@ -13143,7 +13181,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13143
13181
|
this.write = passThroughWrite;
|
|
13144
13182
|
return;
|
|
13145
13183
|
}
|
|
13146
|
-
this.charBuffer = new
|
|
13184
|
+
this.charBuffer = new Buffer3(6);
|
|
13147
13185
|
this.charReceived = 0;
|
|
13148
13186
|
this.charLength = 0;
|
|
13149
13187
|
}
|
|
@@ -13296,7 +13334,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13296
13334
|
if (!state.objectMode && typeof chunk === "string") {
|
|
13297
13335
|
encoding = encoding || state.defaultEncoding;
|
|
13298
13336
|
if (encoding !== state.encoding) {
|
|
13299
|
-
chunk =
|
|
13337
|
+
chunk = Buffer3.from(chunk, encoding);
|
|
13300
13338
|
encoding = "";
|
|
13301
13339
|
}
|
|
13302
13340
|
}
|
|
@@ -13839,7 +13877,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13839
13877
|
return ret;
|
|
13840
13878
|
}
|
|
13841
13879
|
function copyFromBuffer(n, list) {
|
|
13842
|
-
var ret =
|
|
13880
|
+
var ret = Buffer3.allocUnsafe(n);
|
|
13843
13881
|
var p = list.head;
|
|
13844
13882
|
var c = 1;
|
|
13845
13883
|
p.data.copy(ret);
|
|
@@ -13979,7 +14017,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13979
14017
|
var er = false;
|
|
13980
14018
|
if (chunk === null) {
|
|
13981
14019
|
er = new TypeError("May not write null values to stream");
|
|
13982
|
-
} else if (!
|
|
14020
|
+
} else if (!Buffer3.isBuffer(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) {
|
|
13983
14021
|
er = new TypeError("Invalid non-string/buffer chunk");
|
|
13984
14022
|
}
|
|
13985
14023
|
if (er) {
|
|
@@ -13996,7 +14034,7 @@ var json2csv_umd = { exports: {} };
|
|
|
13996
14034
|
cb = encoding;
|
|
13997
14035
|
encoding = null;
|
|
13998
14036
|
}
|
|
13999
|
-
if (
|
|
14037
|
+
if (Buffer3.isBuffer(chunk))
|
|
14000
14038
|
encoding = "buffer";
|
|
14001
14039
|
else if (!encoding)
|
|
14002
14040
|
encoding = state.defaultEncoding;
|
|
@@ -14032,13 +14070,13 @@ var json2csv_umd = { exports: {} };
|
|
|
14032
14070
|
};
|
|
14033
14071
|
function decodeChunk(state, chunk, encoding) {
|
|
14034
14072
|
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") {
|
|
14035
|
-
chunk =
|
|
14073
|
+
chunk = Buffer3.from(chunk, encoding);
|
|
14036
14074
|
}
|
|
14037
14075
|
return chunk;
|
|
14038
14076
|
}
|
|
14039
14077
|
function writeOrBuffer(stream, state, chunk, encoding, cb) {
|
|
14040
14078
|
chunk = decodeChunk(state, chunk, encoding);
|
|
14041
|
-
if (
|
|
14079
|
+
if (Buffer3.isBuffer(chunk))
|
|
14042
14080
|
encoding = "buffer";
|
|
14043
14081
|
var len = state.objectMode ? 1 : chunk.length;
|
|
14044
14082
|
state.length += len;
|
|
@@ -15274,7 +15312,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15274
15312
|
this.tState = START;
|
|
15275
15313
|
this.value = void 0;
|
|
15276
15314
|
this.string = void 0;
|
|
15277
|
-
this.stringBuffer =
|
|
15315
|
+
this.stringBuffer = Buffer3.alloc ? Buffer3.alloc(STRING_BUFFER_SIZE) : new Buffer3(STRING_BUFFER_SIZE);
|
|
15278
15316
|
this.stringBufferOffset = 0;
|
|
15279
15317
|
this.unicode = void 0;
|
|
15280
15318
|
this.highSurrogate = void 0;
|
|
@@ -15284,7 +15322,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15284
15322
|
this.state = VALUE;
|
|
15285
15323
|
this.bytes_remaining = 0;
|
|
15286
15324
|
this.bytes_in_sequence = 0;
|
|
15287
|
-
this.temp_buffs = { "2": new
|
|
15325
|
+
this.temp_buffs = { "2": new Buffer3(2), "3": new Buffer3(3), "4": new Buffer3(4) };
|
|
15288
15326
|
this.offset = -1;
|
|
15289
15327
|
}
|
|
15290
15328
|
Parser.toknam = function(code) {
|
|
@@ -15337,7 +15375,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15337
15375
|
};
|
|
15338
15376
|
proto.write = function(buffer) {
|
|
15339
15377
|
if (typeof buffer === "string")
|
|
15340
|
-
buffer = new
|
|
15378
|
+
buffer = new Buffer3(buffer);
|
|
15341
15379
|
var n;
|
|
15342
15380
|
for (var i = 0, l = buffer.length; i < l; i++) {
|
|
15343
15381
|
if (this.tState === START) {
|
|
@@ -15412,7 +15450,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15412
15450
|
this.string += this.stringBuffer.toString("utf8", 0, this.stringBufferOffset);
|
|
15413
15451
|
this.stringBufferOffset = 0;
|
|
15414
15452
|
this.onToken(STRING, this.string);
|
|
15415
|
-
this.offset +=
|
|
15453
|
+
this.offset += Buffer3.byteLength(this.string, "utf8") + 1;
|
|
15416
15454
|
this.string = void 0;
|
|
15417
15455
|
} else if (n === 92) {
|
|
15418
15456
|
this.tState = STRING2;
|
|
@@ -15461,16 +15499,16 @@ var json2csv_umd = { exports: {} };
|
|
|
15461
15499
|
var intVal = parseInt(this.unicode, 16);
|
|
15462
15500
|
this.unicode = void 0;
|
|
15463
15501
|
if (this.highSurrogate !== void 0 && intVal >= 56320 && intVal < 57343 + 1) {
|
|
15464
|
-
this.appendStringBuf(new
|
|
15502
|
+
this.appendStringBuf(new Buffer3(String.fromCharCode(this.highSurrogate, intVal)));
|
|
15465
15503
|
this.highSurrogate = void 0;
|
|
15466
15504
|
} else if (this.highSurrogate === void 0 && intVal >= 55296 && intVal < 56319 + 1) {
|
|
15467
15505
|
this.highSurrogate = intVal;
|
|
15468
15506
|
} else {
|
|
15469
15507
|
if (this.highSurrogate !== void 0) {
|
|
15470
|
-
this.appendStringBuf(new
|
|
15508
|
+
this.appendStringBuf(new Buffer3(String.fromCharCode(this.highSurrogate)));
|
|
15471
15509
|
this.highSurrogate = void 0;
|
|
15472
15510
|
}
|
|
15473
|
-
this.appendStringBuf(new
|
|
15511
|
+
this.appendStringBuf(new Buffer3(String.fromCharCode(intVal)));
|
|
15474
15512
|
}
|
|
15475
15513
|
this.tState = STRING1;
|
|
15476
15514
|
}
|
|
@@ -16060,9 +16098,9 @@ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [2
|
|
|
16060
16098
|
function rgbSpline(spline) {
|
|
16061
16099
|
return (colors) => {
|
|
16062
16100
|
const n = colors.length;
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16101
|
+
const r = new Array(n);
|
|
16102
|
+
const g = new Array(n);
|
|
16103
|
+
const b = new Array(n);
|
|
16066
16104
|
let i;
|
|
16067
16105
|
let color;
|
|
16068
16106
|
for (i = 0; i < n; ++i) {
|
|
@@ -16071,10 +16109,10 @@ function rgbSpline(spline) {
|
|
|
16071
16109
|
g[i] = color[1] || 0;
|
|
16072
16110
|
b[i] = color[2] || 0;
|
|
16073
16111
|
}
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
return (t2) => [
|
|
16112
|
+
const rFunc = spline(r);
|
|
16113
|
+
const gFunc = spline(g);
|
|
16114
|
+
const bFunc = spline(b);
|
|
16115
|
+
return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
|
|
16078
16116
|
};
|
|
16079
16117
|
}
|
|
16080
16118
|
function basis(values) {
|
|
@@ -16109,24 +16147,31 @@ function getCellColors(params) {
|
|
|
16109
16147
|
theme
|
|
16110
16148
|
} = params;
|
|
16111
16149
|
if (cellSetSelection && cellSets) {
|
|
16112
|
-
return treeToCellColorsBySetNames(
|
|
16150
|
+
return treeToCellColorsBySetNames(
|
|
16151
|
+
cellSets,
|
|
16152
|
+
cellSetSelection,
|
|
16153
|
+
cellSetColor,
|
|
16154
|
+
theme
|
|
16155
|
+
);
|
|
16113
16156
|
}
|
|
16114
16157
|
if (obsIndex && theme) {
|
|
16115
16158
|
return new Map(obsIndex.map((o) => [o, getDefaultColor$1(theme)]));
|
|
16116
16159
|
}
|
|
16117
16160
|
return /* @__PURE__ */ new Map();
|
|
16118
16161
|
}
|
|
16119
|
-
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 :
|
|
16162
|
+
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 : 1;
|
|
16120
16163
|
class Pool {
|
|
16121
16164
|
/**
|
|
16122
16165
|
* @constructor
|
|
16123
16166
|
* @param {object} Worker The worker class to be used for processing.
|
|
16124
16167
|
*/
|
|
16125
16168
|
constructor(createWorker) {
|
|
16169
|
+
__publicField(this, "workers");
|
|
16170
|
+
__publicField(this, "idleWorkers");
|
|
16171
|
+
__publicField(this, "waitQueue");
|
|
16126
16172
|
this.workers = [];
|
|
16127
16173
|
this.idleWorkers = [];
|
|
16128
16174
|
this.waitQueue = [];
|
|
16129
|
-
this.decoder = null;
|
|
16130
16175
|
for (let i = 0; i < defaultPoolSize; ++i) {
|
|
16131
16176
|
const w = createWorker();
|
|
16132
16177
|
this.workers.push(w);
|
|
@@ -16151,7 +16196,7 @@ class Pool {
|
|
|
16151
16196
|
}
|
|
16152
16197
|
async finishTask(currentWorker) {
|
|
16153
16198
|
const waiter = this.waitQueue.pop();
|
|
16154
|
-
if (waiter) {
|
|
16199
|
+
if (waiter && waiter.resolve) {
|
|
16155
16200
|
waiter.resolve(currentWorker);
|
|
16156
16201
|
} else {
|
|
16157
16202
|
this.idleWorkers.push(currentWorker);
|