@vitessce/gl 2.0.3 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{deflate.04b04545.mjs → deflate-36830437.js} +2 -2
- package/dist/{index.9aaafdeb.mjs → index-d34ff949.js} +13285 -10710
- package/dist/index.js +33 -0
- package/dist/{jpeg.060c9bc0.mjs → jpeg-a66190dc.js} +1 -1
- package/dist/{lerc.62b02b29.mjs → lerc-21af7ec8.js} +76 -5
- package/dist/{lzw.19cdd4de.mjs → lzw-76194936.js} +1 -1
- package/dist/{packbits.03fc75de.mjs → packbits-bf7850c4.js} +1 -1
- package/dist/{pako.esm.0e57f323.mjs → pako.esm-68f84e2a.js} +97 -15
- package/dist/{raw.739ce163.mjs → raw-05d82ade.js} +1 -1
- package/dist/{webimage.4e868fb9.mjs → webimage-1ceac06a.js} +1 -1
- package/dist-tsc/BitmaskLayer.d.ts +74 -0
- package/dist-tsc/BitmaskLayer.d.ts.map +1 -0
- package/dist-tsc/BitmaskLayer.js +142 -0
- package/dist-tsc/HeatmapBitmapLayer.d.ts +93 -0
- package/dist-tsc/HeatmapBitmapLayer.d.ts.map +1 -0
- package/dist-tsc/HeatmapBitmapLayer.js +123 -0
- package/dist-tsc/HeatmapCompositeTextLayer.d.ts +11 -0
- package/dist-tsc/HeatmapCompositeTextLayer.d.ts.map +1 -0
- package/dist-tsc/HeatmapCompositeTextLayer.js +129 -0
- package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts +93 -0
- package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts.map +1 -0
- package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.js +129 -0
- package/dist-tsc/PixelatedBitmapLayer.d.ts +10 -0
- package/dist-tsc/PixelatedBitmapLayer.d.ts.map +1 -0
- package/dist-tsc/PixelatedBitmapLayer.js +26 -0
- package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts +62 -0
- package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts.map +1 -0
- package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.js +105 -0
- package/dist-tsc/ScaledExpressionExtension/index.d.ts +3 -0
- package/dist-tsc/ScaledExpressionExtension/index.d.ts.map +1 -0
- package/dist-tsc/ScaledExpressionExtension/index.js +2 -0
- package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts +17 -0
- package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts.map +1 -0
- package/dist-tsc/ScaledExpressionExtension/shader-module.js +32 -0
- package/dist-tsc/SelectionExtension/SelectionExtension.d.ts +18 -0
- package/dist-tsc/SelectionExtension/SelectionExtension.d.ts.map +1 -0
- package/dist-tsc/SelectionExtension/SelectionExtension.js +31 -0
- package/dist-tsc/SelectionExtension/index.d.ts +3 -0
- package/dist-tsc/SelectionExtension/index.d.ts.map +1 -0
- package/dist-tsc/SelectionExtension/index.js +2 -0
- package/dist-tsc/SelectionExtension/shader-module.d.ts +12 -0
- package/dist-tsc/SelectionExtension/shader-module.d.ts.map +1 -0
- package/dist-tsc/SelectionExtension/shader-module.js +20 -0
- package/dist-tsc/SelectionLayer.d.ts +15 -0
- package/dist-tsc/SelectionLayer.d.ts.map +1 -0
- package/dist-tsc/SelectionLayer.js +157 -0
- package/dist-tsc/bitmask-layer-shaders.d.ts +3 -0
- package/dist-tsc/bitmask-layer-shaders.d.ts.map +1 -0
- package/dist-tsc/bitmask-layer-shaders.js +90 -0
- package/dist-tsc/constants.d.ts +8 -0
- package/dist-tsc/constants.d.ts.map +1 -0
- package/dist-tsc/constants.js +11 -0
- package/dist-tsc/deck.d.ts +2 -0
- package/dist-tsc/deck.d.ts.map +1 -0
- package/dist-tsc/deck.js +4 -0
- package/dist-tsc/glsl/index.d.ts +2 -0
- package/dist-tsc/glsl/index.d.ts.map +1 -0
- package/dist-tsc/glsl/index.js +340 -0
- package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts +13 -0
- package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts.map +1 -0
- package/dist-tsc/heatmap-bitmap-layer-shaders.js +109 -0
- package/dist-tsc/heatmap-constants.d.ts +20 -0
- package/dist-tsc/heatmap-constants.d.ts.map +1 -0
- package/dist-tsc/heatmap-constants.js +27 -0
- package/dist-tsc/index.d.ts +14 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +16 -13
- package/dist-tsc/luma.d.ts +2 -0
- package/dist-tsc/luma.d.ts.map +1 -0
- package/dist-tsc/luma.js +2 -0
- package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts +13 -0
- package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts.map +1 -0
- package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.js +143 -0
- package/dist-tsc/selection-utils.d.ts +19 -0
- package/dist-tsc/selection-utils.d.ts.map +1 -0
- package/dist-tsc/selection-utils.js +92 -0
- package/dist-tsc/viv.d.ts +2 -0
- package/dist-tsc/viv.d.ts.map +1 -0
- package/dist-tsc/viv.js +3 -0
- package/package.json +16 -7
- package/src/BitmaskLayer.js +14 -4
- package/src/HeatmapBitmapLayer.js +3 -3
- package/src/HeatmapCompositeTextLayer.js +1 -1
- package/src/PaddedExpressionHeatmapBitmapLayer.js +3 -3
- package/src/PixelatedBitmapLayer.js +1 -1
- package/src/ScaledExpressionExtension/ScaledExpressionExtension.js +2 -2
- package/src/ScaledExpressionExtension/index.js +1 -1
- package/src/ScaledExpressionExtension/shader-module.js +1 -1
- package/src/SelectionExtension/SelectionExtension.js +1 -1
- package/src/SelectionExtension/index.js +1 -1
- package/src/SelectionLayer.js +1 -12
- package/src/bitmask-layer-shaders.js +1 -1
- package/src/heatmap-bitmap-layer-shaders.js +1 -1
- package/src/index.js +16 -13
- package/src/padded-expression-heatmap-bitmap-layer-shaders.js +1 -1
- package/src/selection-utils.js +1 -1
- package/dist/index.mjs +0 -33
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { f as distEs6 } from "./index-d34ff949.js";
|
|
2
|
+
import { n, m, A, q, p, o, i, C, k, D, G, e, H, c, M, j, l, d, P, S, h, T, s, b, r, v } from "./index-d34ff949.js";
|
|
3
|
+
import "react";
|
|
4
|
+
const SELECTION_TYPE = distEs6.SELECTION_TYPE;
|
|
5
|
+
export {
|
|
6
|
+
n as AXIS_FONT_FAMILY,
|
|
7
|
+
m as AXIS_LABEL_TEXT_SIZE,
|
|
8
|
+
A as AXIS_MARGIN,
|
|
9
|
+
q as AXIS_MAX_SIZE,
|
|
10
|
+
p as AXIS_MIN_SIZE,
|
|
11
|
+
o as AXIS_PADDING,
|
|
12
|
+
i as BitmaskLayer,
|
|
13
|
+
C as COLOR_BAR_SIZE,
|
|
14
|
+
k as DATA_TEXTURE_SIZE,
|
|
15
|
+
D as DEFAULT_GL_OPTIONS,
|
|
16
|
+
G as GLSL_COLORMAPS,
|
|
17
|
+
e as GLSL_COLORMAP_DEFAULT,
|
|
18
|
+
H as HeatmapBitmapLayer,
|
|
19
|
+
c as HeatmapCompositeTextLayer,
|
|
20
|
+
M as MAX_ROW_AGG,
|
|
21
|
+
j as MIN_ROW_AGG,
|
|
22
|
+
l as PIXELATED_TEXTURE_PARAMETERS,
|
|
23
|
+
d as PaddedExpressionHeatmapBitmapLayer,
|
|
24
|
+
P as PixelatedBitmapLayer,
|
|
25
|
+
SELECTION_TYPE,
|
|
26
|
+
S as ScaledExpressionExtension,
|
|
27
|
+
h as SelectionExtension,
|
|
28
|
+
T as TILE_SIZE,
|
|
29
|
+
s as deck,
|
|
30
|
+
b as getSelectionLayers,
|
|
31
|
+
r as luma,
|
|
32
|
+
v as viv
|
|
33
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as inflate_1 } from "./pako.esm.
|
|
2
|
-
import { B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index.
|
|
1
|
+
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-d34ff949.js";
|
|
3
3
|
import "react";
|
|
4
4
|
var LercDecode = { exports: {} };
|
|
5
5
|
(function(module) {
|
|
@@ -362,6 +362,8 @@ var LercDecode = { exports: {} };
|
|
|
362
362
|
}();
|
|
363
363
|
var Lerc2Decode = function() {
|
|
364
364
|
var BitStuffer = {
|
|
365
|
+
//methods ending with 2 are for the new byte order used by Lerc2.3 and above.
|
|
366
|
+
//originalUnstuff is used to unpack Huffman code table. code is duplicated to unstuffx for performance reasons.
|
|
365
367
|
unstuff: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {
|
|
366
368
|
var bitMask = (1 << bitsPerPixel) - 1;
|
|
367
369
|
var i = 0, o;
|
|
@@ -572,6 +574,7 @@ var LercDecode = { exports: {} };
|
|
|
572
574
|
};
|
|
573
575
|
var Lerc2Helpers = {
|
|
574
576
|
HUFFMAN_LUT_BITS_MAX: 12,
|
|
577
|
+
//use 2^12 lut, treat it like constant
|
|
575
578
|
computeChecksumFletcher32: function(input) {
|
|
576
579
|
var sum1 = 65535, sum2 = 65535;
|
|
577
580
|
var len = input.length;
|
|
@@ -1382,6 +1385,9 @@ var LercDecode = { exports: {} };
|
|
|
1382
1385
|
data.pixels.resultPixels = Lerc2Helpers.swapDimensionOrder(data.pixels.resultPixels, numPixels, numDims, OutPixelTypeArray);
|
|
1383
1386
|
}
|
|
1384
1387
|
},
|
|
1388
|
+
/*****************
|
|
1389
|
+
* private methods (helper methods)
|
|
1390
|
+
*****************/
|
|
1385
1391
|
formatFileInfo: function(data) {
|
|
1386
1392
|
return {
|
|
1387
1393
|
"fileIdentifierString": data.headerInfo.fileIdentifierString,
|
|
@@ -1401,6 +1407,7 @@ var LercDecode = { exports: {} };
|
|
|
1401
1407
|
"pixels": {
|
|
1402
1408
|
"numBlocksX": data.pixels.numBlocksX,
|
|
1403
1409
|
"numBlocksY": data.pixels.numBlocksY,
|
|
1410
|
+
//"numBytes": data.pixels.numBytes,
|
|
1404
1411
|
"maxValue": data.headerInfo.zMax,
|
|
1405
1412
|
"minValue": data.headerInfo.zMin,
|
|
1406
1413
|
"noDataValue": data.noDataValue
|
|
@@ -1688,14 +1695,48 @@ var LercDecode = { exports: {} };
|
|
|
1688
1695
|
this.right = right;
|
|
1689
1696
|
};
|
|
1690
1697
|
var Lerc2Decode2 = {
|
|
1698
|
+
/*
|
|
1699
|
+
* ********removed options compared to LERC1. We can bring some of them back if needed.
|
|
1700
|
+
* removed pixel type. LERC2 is typed and doesn't require user to give pixel type
|
|
1701
|
+
* changed encodedMaskData to maskData. LERC2 's js version make it faster to use maskData directly.
|
|
1702
|
+
* removed returnMask. mask is used by LERC2 internally and is cost free. In case of user input mask, it's returned as well and has neglible cost.
|
|
1703
|
+
* removed nodatavalue. Because LERC2 pixels are typed, nodatavalue will sacrify a useful value for many types (8bit, 16bit) etc,
|
|
1704
|
+
* user has to be knowledgable enough about raster and their data to avoid usability issues. so nodata value is simply removed now.
|
|
1705
|
+
* We can add it back later if their's a clear requirement.
|
|
1706
|
+
* removed encodedMask. This option was not implemented in LercDecode. It can be done after decoding (less efficient)
|
|
1707
|
+
* removed computeUsedBitDepths.
|
|
1708
|
+
*
|
|
1709
|
+
*
|
|
1710
|
+
* response changes compared to LERC1
|
|
1711
|
+
* 1. encodedMaskData is not available
|
|
1712
|
+
* 2. noDataValue is optional (returns only if user's noDataValue is with in the valid data type range)
|
|
1713
|
+
* 3. maskData is always available
|
|
1714
|
+
*/
|
|
1715
|
+
/*****************
|
|
1716
|
+
* public properties
|
|
1717
|
+
******************/
|
|
1718
|
+
//HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, not configurable
|
|
1719
|
+
/*****************
|
|
1720
|
+
* public methods
|
|
1721
|
+
*****************/
|
|
1722
|
+
/**
|
|
1723
|
+
* Decode a LERC2 byte stream and return an object containing the pixel data and optional metadata.
|
|
1724
|
+
*
|
|
1725
|
+
* @param {ArrayBuffer} input The LERC input byte stream
|
|
1726
|
+
* @param {object} [options] options Decoding options
|
|
1727
|
+
* @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid LERC file is expected at that position
|
|
1728
|
+
* @param {boolean} [options.returnFileInfo] If true, the return value will have a fileInfo property that contains metadata obtained from the LERC headers and the decoding process
|
|
1729
|
+
* @param {boolean} [options.returnPixelInterleavedDims] If true, returned dimensions are pixel-interleaved, a.k.a [p1_dim0, p1_dim1, p1_dimn, p2_dim0...], default is [p1_dim0, p2_dim0, ..., p1_dim1, p2_dim1...]
|
|
1730
|
+
*/
|
|
1691
1731
|
decode: function(input, options) {
|
|
1692
1732
|
options = options || {};
|
|
1693
1733
|
var noDataValue = options.noDataValue;
|
|
1694
1734
|
var i = 0, data = {};
|
|
1695
1735
|
data.ptr = options.inputOffset || 0;
|
|
1696
1736
|
data.pixels = {};
|
|
1697
|
-
if (!Lerc2Helpers.readHeaderInfo(input, data))
|
|
1698
|
-
;
|
|
1737
|
+
if (!Lerc2Helpers.readHeaderInfo(input, data)) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1699
1740
|
var headerInfo = data.headerInfo;
|
|
1700
1741
|
var fileVersion = headerInfo.fileVersion;
|
|
1701
1742
|
var OutPixelTypeArray = Lerc2Helpers.getDataTypeArray(headerInfo.imageType);
|
|
@@ -1773,6 +1814,7 @@ var LercDecode = { exports: {} };
|
|
|
1773
1814
|
maxValues: headerInfo.maxValues
|
|
1774
1815
|
},
|
|
1775
1816
|
maskData: data.pixels.resultMask
|
|
1817
|
+
//noDataValue: noDataValue
|
|
1776
1818
|
};
|
|
1777
1819
|
if (data.pixels.resultMask && Lerc2Helpers.isValidPixelValue(headerInfo.imageType, noDataValue)) {
|
|
1778
1820
|
var mask = data.pixels.resultMask;
|
|
@@ -1814,6 +1856,25 @@ var LercDecode = { exports: {} };
|
|
|
1814
1856
|
return b[0] === 1;
|
|
1815
1857
|
}();
|
|
1816
1858
|
var Lerc2 = {
|
|
1859
|
+
/************wrapper**********************************************/
|
|
1860
|
+
/**
|
|
1861
|
+
* A wrapper for decoding both LERC1 and LERC2 byte streams capable of handling multiband pixel blocks for various pixel types.
|
|
1862
|
+
*
|
|
1863
|
+
* @alias module:Lerc
|
|
1864
|
+
* @param {ArrayBuffer} input The LERC input byte stream
|
|
1865
|
+
* @param {object} [options] The decoding options below are optional.
|
|
1866
|
+
* @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position.
|
|
1867
|
+
* @param {string} [options.pixelType] (LERC1 only) Default value is F32. Valid pixel types for input are U8/S8/S16/U16/S32/U32/F32.
|
|
1868
|
+
* @param {number} [options.noDataValue] (LERC1 only). It is recommended to use the returned mask instead of setting this value.
|
|
1869
|
+
* @param {boolean} [options.returnPixelInterleavedDims] (nDim LERC2 only) If true, returned dimensions are pixel-interleaved, a.k.a [p1_dim0, p1_dim1, p1_dimn, p2_dim0...], default is [p1_dim0, p2_dim0, ..., p1_dim1, p2_dim1...]
|
|
1870
|
+
* @returns {{width, height, pixels, pixelType, mask, statistics}}
|
|
1871
|
+
* @property {number} width Width of decoded image.
|
|
1872
|
+
* @property {number} height Height of decoded image.
|
|
1873
|
+
* @property {array} pixels [band1, band2, …] Each band is a typed array of width*height.
|
|
1874
|
+
* @property {string} pixelType The type of pixels represented in the output.
|
|
1875
|
+
* @property {mask} mask Typed array with a size of width*height, or null if all pixels are valid.
|
|
1876
|
+
* @property {array} statistics [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values
|
|
1877
|
+
**/
|
|
1817
1878
|
decode: function(encodedData, options) {
|
|
1818
1879
|
if (!isPlatformLittleEndian) {
|
|
1819
1880
|
throw "Big endian system is not supported.";
|
|
@@ -1845,14 +1906,23 @@ var LercDecode = { exports: {} };
|
|
|
1845
1906
|
while (inputOffset < eof) {
|
|
1846
1907
|
var result = lerc.decode(encodedData, {
|
|
1847
1908
|
inputOffset,
|
|
1909
|
+
//for both lerc1 and lerc2
|
|
1848
1910
|
encodedMaskData,
|
|
1911
|
+
//lerc1 only
|
|
1849
1912
|
maskData,
|
|
1913
|
+
//lerc2 only
|
|
1850
1914
|
returnMask: iPlane === 0 ? true : false,
|
|
1915
|
+
//lerc1 only
|
|
1851
1916
|
returnEncodedMask: iPlane === 0 ? true : false,
|
|
1917
|
+
//lerc1 only
|
|
1852
1918
|
returnFileInfo: true,
|
|
1919
|
+
//for both lerc1 and lerc2
|
|
1853
1920
|
returnPixelInterleavedDims: options.returnPixelInterleavedDims,
|
|
1921
|
+
//for ndim lerc2 only
|
|
1854
1922
|
pixelType: options.pixelType || null,
|
|
1923
|
+
//lerc1 only
|
|
1855
1924
|
noDataValue: options.noDataValue || null
|
|
1925
|
+
//lerc1 only
|
|
1856
1926
|
});
|
|
1857
1927
|
inputOffset = result.fileInfo.eofOffset;
|
|
1858
1928
|
maskData = result.maskData;
|
|
@@ -1905,7 +1975,8 @@ var LercDecode = { exports: {} };
|
|
|
1905
1975
|
}
|
|
1906
1976
|
})();
|
|
1907
1977
|
})(LercDecode);
|
|
1908
|
-
|
|
1978
|
+
var LercDecodeExports = LercDecode.exports;
|
|
1979
|
+
const Lerc = /* @__PURE__ */ getDefaultExportFromCjs(LercDecodeExports);
|
|
1909
1980
|
class LercDecoder extends BaseDecoder {
|
|
1910
1981
|
constructor(fileDirectory) {
|
|
1911
1982
|
super();
|
|
@@ -27,9 +27,18 @@ const END_BLOCK = 256;
|
|
|
27
27
|
const REP_3_6 = 16;
|
|
28
28
|
const REPZ_3_10 = 17;
|
|
29
29
|
const REPZ_11_138 = 18;
|
|
30
|
-
const extra_lbits =
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const extra_lbits = (
|
|
31
|
+
/* extra bits for each length code */
|
|
32
|
+
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
|
|
33
|
+
);
|
|
34
|
+
const extra_dbits = (
|
|
35
|
+
/* extra bits for each distance code */
|
|
36
|
+
new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
|
|
37
|
+
);
|
|
38
|
+
const extra_blbits = (
|
|
39
|
+
/* extra bits for each bit length code */
|
|
40
|
+
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
|
|
41
|
+
);
|
|
33
42
|
const bl_order = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
34
43
|
const DIST_CODE_LEN = 512;
|
|
35
44
|
const static_ltree = new Array((L_CODES$1 + 2) * 2);
|
|
@@ -79,7 +88,12 @@ const send_bits = (s, value, length) => {
|
|
|
79
88
|
}
|
|
80
89
|
};
|
|
81
90
|
const send_code = (s, c, tree) => {
|
|
82
|
-
send_bits(
|
|
91
|
+
send_bits(
|
|
92
|
+
s,
|
|
93
|
+
tree[c * 2],
|
|
94
|
+
tree[c * 2 + 1]
|
|
95
|
+
/*.Len*/
|
|
96
|
+
);
|
|
83
97
|
};
|
|
84
98
|
const bi_reverse = (code, len) => {
|
|
85
99
|
let res = 0;
|
|
@@ -368,19 +382,44 @@ const build_tree = (s, desc) => {
|
|
|
368
382
|
}
|
|
369
383
|
node = elems;
|
|
370
384
|
do {
|
|
371
|
-
n = s.heap[
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
385
|
+
n = s.heap[
|
|
386
|
+
1
|
|
387
|
+
/*SMALLEST*/
|
|
388
|
+
];
|
|
389
|
+
s.heap[
|
|
390
|
+
1
|
|
391
|
+
/*SMALLEST*/
|
|
392
|
+
] = s.heap[s.heap_len--];
|
|
393
|
+
pqdownheap(
|
|
394
|
+
s,
|
|
395
|
+
tree,
|
|
396
|
+
1
|
|
397
|
+
/*SMALLEST*/
|
|
398
|
+
);
|
|
399
|
+
m = s.heap[
|
|
400
|
+
1
|
|
401
|
+
/*SMALLEST*/
|
|
402
|
+
];
|
|
375
403
|
s.heap[--s.heap_max] = n;
|
|
376
404
|
s.heap[--s.heap_max] = m;
|
|
377
405
|
tree[node * 2] = tree[n * 2] + tree[m * 2];
|
|
378
406
|
s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
|
|
379
407
|
tree[n * 2 + 1] = tree[m * 2 + 1] = node;
|
|
380
|
-
s.heap[
|
|
381
|
-
|
|
408
|
+
s.heap[
|
|
409
|
+
1
|
|
410
|
+
/*SMALLEST*/
|
|
411
|
+
] = node++;
|
|
412
|
+
pqdownheap(
|
|
413
|
+
s,
|
|
414
|
+
tree,
|
|
415
|
+
1
|
|
416
|
+
/*SMALLEST*/
|
|
417
|
+
);
|
|
382
418
|
} while (s.heap_len >= 2);
|
|
383
|
-
s.heap[--s.heap_max] = s.heap[
|
|
419
|
+
s.heap[--s.heap_max] = s.heap[
|
|
420
|
+
1
|
|
421
|
+
/*SMALLEST*/
|
|
422
|
+
];
|
|
384
423
|
gen_bitlen(s, desc);
|
|
385
424
|
gen_codes(tree, max_code, s.bl_count);
|
|
386
425
|
};
|
|
@@ -640,16 +679,26 @@ const crc32 = (crc, buf, len, pos) => {
|
|
|
640
679
|
var crc32_1 = crc32;
|
|
641
680
|
var messages = {
|
|
642
681
|
2: "need dictionary",
|
|
682
|
+
/* Z_NEED_DICT 2 */
|
|
643
683
|
1: "stream end",
|
|
684
|
+
/* Z_STREAM_END 1 */
|
|
644
685
|
0: "",
|
|
686
|
+
/* Z_OK 0 */
|
|
645
687
|
"-1": "file error",
|
|
688
|
+
/* Z_ERRNO (-1) */
|
|
646
689
|
"-2": "stream error",
|
|
690
|
+
/* Z_STREAM_ERROR (-2) */
|
|
647
691
|
"-3": "data error",
|
|
692
|
+
/* Z_DATA_ERROR (-3) */
|
|
648
693
|
"-4": "insufficient memory",
|
|
694
|
+
/* Z_MEM_ERROR (-4) */
|
|
649
695
|
"-5": "buffer error",
|
|
696
|
+
/* Z_BUF_ERROR (-5) */
|
|
650
697
|
"-6": "incompatible version"
|
|
698
|
+
/* Z_VERSION_ERROR (-6) */
|
|
651
699
|
};
|
|
652
700
|
var constants$2 = {
|
|
701
|
+
/* Allowed flush values; see deflate() and inflate() below for details */
|
|
653
702
|
Z_NO_FLUSH: 0,
|
|
654
703
|
Z_PARTIAL_FLUSH: 1,
|
|
655
704
|
Z_SYNC_FLUSH: 2,
|
|
@@ -657,6 +706,9 @@ var constants$2 = {
|
|
|
657
706
|
Z_FINISH: 4,
|
|
658
707
|
Z_BLOCK: 5,
|
|
659
708
|
Z_TREES: 6,
|
|
709
|
+
/* Return codes for the compression/decompression functions. Negative values
|
|
710
|
+
* are errors, positive values are used for special but normal events.
|
|
711
|
+
*/
|
|
660
712
|
Z_OK: 0,
|
|
661
713
|
Z_STREAM_END: 1,
|
|
662
714
|
Z_NEED_DICT: 2,
|
|
@@ -665,6 +717,8 @@ var constants$2 = {
|
|
|
665
717
|
Z_DATA_ERROR: -3,
|
|
666
718
|
Z_MEM_ERROR: -4,
|
|
667
719
|
Z_BUF_ERROR: -5,
|
|
720
|
+
//Z_VERSION_ERROR: -6,
|
|
721
|
+
/* compression levels */
|
|
668
722
|
Z_NO_COMPRESSION: 0,
|
|
669
723
|
Z_BEST_SPEED: 1,
|
|
670
724
|
Z_BEST_COMPRESSION: 9,
|
|
@@ -674,10 +728,14 @@ var constants$2 = {
|
|
|
674
728
|
Z_RLE: 3,
|
|
675
729
|
Z_FIXED: 4,
|
|
676
730
|
Z_DEFAULT_STRATEGY: 0,
|
|
731
|
+
/* Possible values of the data_type field (though see inflate()) */
|
|
677
732
|
Z_BINARY: 0,
|
|
678
733
|
Z_TEXT: 1,
|
|
734
|
+
//Z_ASCII: 1, // = Z_TEXT (deprecated)
|
|
679
735
|
Z_UNKNOWN: 2,
|
|
736
|
+
/* The deflate compression method */
|
|
680
737
|
Z_DEFLATED: 8
|
|
738
|
+
//Z_NULL: null // Use -1 or null inline, depending on var type
|
|
681
739
|
};
|
|
682
740
|
const { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;
|
|
683
741
|
const {
|
|
@@ -1195,16 +1253,27 @@ function Config(good_length, max_lazy, nice_length, max_chain, func) {
|
|
|
1195
1253
|
this.func = func;
|
|
1196
1254
|
}
|
|
1197
1255
|
const configuration_table = [
|
|
1256
|
+
/* good lazy nice chain */
|
|
1198
1257
|
new Config(0, 0, 0, 0, deflate_stored),
|
|
1258
|
+
/* 0 store only */
|
|
1199
1259
|
new Config(4, 4, 8, 4, deflate_fast),
|
|
1260
|
+
/* 1 max speed, no lazy matches */
|
|
1200
1261
|
new Config(4, 5, 16, 8, deflate_fast),
|
|
1262
|
+
/* 2 */
|
|
1201
1263
|
new Config(4, 6, 32, 32, deflate_fast),
|
|
1264
|
+
/* 3 */
|
|
1202
1265
|
new Config(4, 4, 16, 16, deflate_slow),
|
|
1266
|
+
/* 4 lazy matches */
|
|
1203
1267
|
new Config(8, 16, 32, 32, deflate_slow),
|
|
1268
|
+
/* 5 */
|
|
1204
1269
|
new Config(8, 16, 128, 128, deflate_slow),
|
|
1270
|
+
/* 6 */
|
|
1205
1271
|
new Config(8, 32, 128, 256, deflate_slow),
|
|
1272
|
+
/* 7 */
|
|
1206
1273
|
new Config(32, 128, 258, 1024, deflate_slow),
|
|
1274
|
+
/* 8 */
|
|
1207
1275
|
new Config(32, 258, 258, 4096, deflate_slow)
|
|
1276
|
+
/* 9 max compression */
|
|
1208
1277
|
];
|
|
1209
1278
|
const lm_init = (s) => {
|
|
1210
1279
|
s.window_size = 2 * s.w_size;
|
|
@@ -2247,6 +2316,7 @@ const CODES$1 = 0;
|
|
|
2247
2316
|
const LENS$1 = 1;
|
|
2248
2317
|
const DISTS$1 = 2;
|
|
2249
2318
|
const lbase = new Uint16Array([
|
|
2319
|
+
/* Length codes 257..285 base */
|
|
2250
2320
|
3,
|
|
2251
2321
|
4,
|
|
2252
2322
|
5,
|
|
@@ -2280,6 +2350,7 @@ const lbase = new Uint16Array([
|
|
|
2280
2350
|
0
|
|
2281
2351
|
]);
|
|
2282
2352
|
const lext = new Uint8Array([
|
|
2353
|
+
/* Length codes 257..285 extra */
|
|
2283
2354
|
16,
|
|
2284
2355
|
16,
|
|
2285
2356
|
16,
|
|
@@ -2313,6 +2384,7 @@ const lext = new Uint8Array([
|
|
|
2313
2384
|
78
|
|
2314
2385
|
]);
|
|
2315
2386
|
const dbase = new Uint16Array([
|
|
2387
|
+
/* Distance codes 0..29 base */
|
|
2316
2388
|
1,
|
|
2317
2389
|
2,
|
|
2318
2390
|
3,
|
|
@@ -2347,6 +2419,7 @@ const dbase = new Uint16Array([
|
|
|
2347
2419
|
0
|
|
2348
2420
|
]);
|
|
2349
2421
|
const dext = new Uint8Array([
|
|
2422
|
+
/* Distance codes 0..29 extra */
|
|
2350
2423
|
16,
|
|
2351
2424
|
16,
|
|
2352
2425
|
16,
|
|
@@ -2799,7 +2872,10 @@ const inflate$2 = (strm, flush) => {
|
|
|
2799
2872
|
const hbuf = new Uint8Array(4);
|
|
2800
2873
|
let opts;
|
|
2801
2874
|
let n;
|
|
2802
|
-
const order =
|
|
2875
|
+
const order = (
|
|
2876
|
+
/* permutation of code lengths */
|
|
2877
|
+
new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
|
|
2878
|
+
);
|
|
2803
2879
|
if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
|
|
2804
2880
|
return Z_STREAM_ERROR$1;
|
|
2805
2881
|
}
|
|
@@ -2848,7 +2924,8 @@ const inflate$2 = (strm, flush) => {
|
|
|
2848
2924
|
if (state.head) {
|
|
2849
2925
|
state.head.done = false;
|
|
2850
2926
|
}
|
|
2851
|
-
if (!(state.wrap & 1) ||
|
|
2927
|
+
if (!(state.wrap & 1) || /* check if zlib header allowed */
|
|
2928
|
+
(((hold & 255) << 8) + (hold >> 8)) % 31) {
|
|
2852
2929
|
strm.msg = "incorrect header check";
|
|
2853
2930
|
state.mode = BAD;
|
|
2854
2931
|
break;
|
|
@@ -2988,8 +3065,11 @@ const inflate$2 = (strm, flush) => {
|
|
|
2988
3065
|
state.head.extra.set(
|
|
2989
3066
|
input.subarray(
|
|
2990
3067
|
next,
|
|
3068
|
+
// extra field is limited to 65536 bytes
|
|
3069
|
+
// - no need for additional size check
|
|
2991
3070
|
next + copy
|
|
2992
3071
|
),
|
|
3072
|
+
/*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
|
|
2993
3073
|
len
|
|
2994
3074
|
);
|
|
2995
3075
|
}
|
|
@@ -3604,7 +3684,8 @@ const inflate$2 = (strm, flush) => {
|
|
|
3604
3684
|
strm.total_out += _out;
|
|
3605
3685
|
state.total += _out;
|
|
3606
3686
|
if (_out) {
|
|
3607
|
-
strm.adler = state.check =
|
|
3687
|
+
strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
|
|
3688
|
+
state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out);
|
|
3608
3689
|
}
|
|
3609
3690
|
_out = left;
|
|
3610
3691
|
if ((state.flags ? hold : zswap32(hold)) !== state.check) {
|
|
@@ -3664,7 +3745,8 @@ const inflate$2 = (strm, flush) => {
|
|
|
3664
3745
|
strm.total_out += _out;
|
|
3665
3746
|
state.total += _out;
|
|
3666
3747
|
if (state.wrap && _out) {
|
|
3667
|
-
strm.adler = state.check =
|
|
3748
|
+
strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
|
|
3749
|
+
state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out);
|
|
3668
3750
|
}
|
|
3669
3751
|
strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
|
|
3670
3752
|
if ((_in === 0 && _out === 0 || flush === Z_FINISH$1) && ret === Z_OK$1) {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare const BitmaskLayer_base: new (...props: import(".pnpm/@vivjs+types@0.13.7/node_modules/@vivjs/types").Viv<{
|
|
2
|
+
contrastLimits: number[][];
|
|
3
|
+
channelsVisible: boolean[];
|
|
4
|
+
dtype: string;
|
|
5
|
+
domain?: number[] | undefined;
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
onHover?: Function | undefined;
|
|
8
|
+
onClick?: Function | undefined;
|
|
9
|
+
modelMatrix?: Object | undefined;
|
|
10
|
+
interpolation?: number | undefined;
|
|
11
|
+
}, string[]>[]) => any;
|
|
12
|
+
/**
|
|
13
|
+
* A BitmapLayer that performs aggregation in the fragment shader,
|
|
14
|
+
* and renders its texture from a Uint8Array rather than an ImageData.
|
|
15
|
+
*/
|
|
16
|
+
declare class BitmaskLayer extends BitmaskLayer_base {
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
getShaders(): {
|
|
19
|
+
fs: string;
|
|
20
|
+
vs: string;
|
|
21
|
+
modules: any[];
|
|
22
|
+
defines: {
|
|
23
|
+
COLORMAP_FUNC: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
updateState({ props, oldProps, changeFlags }: {
|
|
27
|
+
props: any;
|
|
28
|
+
oldProps: any;
|
|
29
|
+
changeFlags: any;
|
|
30
|
+
}): void;
|
|
31
|
+
setColorTexture(): void;
|
|
32
|
+
draw(opts: any): void;
|
|
33
|
+
/**
|
|
34
|
+
* This function creates textures from the data
|
|
35
|
+
*/
|
|
36
|
+
dataToTexture(data: any, width: any, height: any): any;
|
|
37
|
+
}
|
|
38
|
+
declare namespace BitmaskLayer {
|
|
39
|
+
export const layerName: string;
|
|
40
|
+
export { defaultProps };
|
|
41
|
+
}
|
|
42
|
+
export default BitmaskLayer;
|
|
43
|
+
declare namespace defaultProps {
|
|
44
|
+
namespace hoveredCell {
|
|
45
|
+
const type: string;
|
|
46
|
+
const value: null;
|
|
47
|
+
const compare: boolean;
|
|
48
|
+
}
|
|
49
|
+
namespace cellColorData {
|
|
50
|
+
const type_1: string;
|
|
51
|
+
export { type_1 as type };
|
|
52
|
+
const value_1: null;
|
|
53
|
+
export { value_1 as value };
|
|
54
|
+
const compare_1: number;
|
|
55
|
+
export { compare_1 as compare };
|
|
56
|
+
}
|
|
57
|
+
namespace colormap {
|
|
58
|
+
const type_2: string;
|
|
59
|
+
export { type_2 as type };
|
|
60
|
+
export { GLSL_COLORMAP_DEFAULT as value };
|
|
61
|
+
const compare_2: boolean;
|
|
62
|
+
export { compare_2 as compare };
|
|
63
|
+
}
|
|
64
|
+
namespace expressionData {
|
|
65
|
+
const type_3: string;
|
|
66
|
+
export { type_3 as type };
|
|
67
|
+
const value_2: null;
|
|
68
|
+
export { value_2 as value };
|
|
69
|
+
const compare_3: number;
|
|
70
|
+
export { compare_3 as compare };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
|
|
74
|
+
//# sourceMappingURL=BitmaskLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitmaskLayer.d.ts","sourceRoot":"","sources":["../src/BitmaskLayer.js"],"names":[],"mappings":";;;;;;;;;;;AAgCA;;;GAGG;AACH;;IAEE;;;;;;;MAYC;IAED;;;;aA4BC;IAED,wBA0BC;IAED,sBAmCC;IAED;;OAEG;IACH,uDAqBC;CACF"}
|