@urban-toolkit/autk-db 2.0.0 → 2.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/autk-db.js +25 -25
- package/dist/autk-db.js.map +1 -1
- package/dist/{basedecoder-DaTXO39b.js → basedecoder-B2p-79Pg.js} +3 -3
- package/dist/basedecoder-B2p-79Pg.js.map +1 -0
- package/dist/deflate-DdI6yhy3.js +12 -0
- package/dist/deflate-DdI6yhy3.js.map +1 -0
- package/dist/globals-QF85DtAk.js.map +1 -1
- package/dist/{jpeg-DckFSoVK.js → jpeg-ClN7e6im.js} +3 -3
- package/dist/jpeg-ClN7e6im.js.map +1 -0
- package/dist/{lerc-BCdGEeLp.js → lerc-B8cSax8j.js} +4 -4
- package/dist/lerc-B8cSax8j.js.map +1 -0
- package/dist/{lzw-B3twMQgz.js → lzw-Cr5E_zhd.js} +3 -3
- package/dist/lzw-Cr5E_zhd.js.map +1 -0
- package/dist/{packbits-pbHfk2l8.js → packbits-sD0-qSEu.js} +3 -3
- package/dist/packbits-sD0-qSEu.js.map +1 -0
- package/dist/{pako.esm-Crx1NgSq.js → pako.esm-x6ItERqe.js} +2 -2
- package/dist/pako.esm-x6ItERqe.js.map +1 -0
- package/dist/raw-DuoIrg1T.js +11 -0
- package/dist/raw-DuoIrg1T.js.map +1 -0
- package/dist/{webimage-OC9EEb5f.js → webimage-CCNehbhp.js} +3 -3
- package/dist/webimage-CCNehbhp.js.map +1 -0
- package/dist/{zstd-rpfNjbfx.js → zstd-CWaVrHII.js} +3 -3
- package/dist/zstd-CWaVrHII.js.map +1 -0
- package/package.json +1 -1
- package/dist/basedecoder-DaTXO39b.js.map +0 -1
- package/dist/deflate-DT_oTgqy.js +0 -12
- package/dist/deflate-DT_oTgqy.js.map +0 -1
- package/dist/jpeg-DckFSoVK.js.map +0 -1
- package/dist/lerc-BCdGEeLp.js.map +0 -1
- package/dist/lzw-B3twMQgz.js.map +0 -1
- package/dist/packbits-pbHfk2l8.js.map +0 -1
- package/dist/pako.esm-Crx1NgSq.js.map +0 -1
- package/dist/raw-BpEIWqGM.js +0 -11
- package/dist/raw-BpEIWqGM.js.map +0 -1
- package/dist/webimage-OC9EEb5f.js.map +0 -1
- package/dist/zstd-rpfNjbfx.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/geotiff/dist-module/predictor.js
|
|
1
|
+
//#region ../node_modules/geotiff/dist-module/predictor.js
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
let n = e.length - t, r = 0;
|
|
4
4
|
do {
|
|
@@ -43,7 +43,7 @@ function n(n, r, i, a, o, s) {
|
|
|
43
43
|
return n;
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region node_modules/geotiff/dist-module/compression/basedecoder.js
|
|
46
|
+
//#region ../node_modules/geotiff/dist-module/compression/basedecoder.js
|
|
47
47
|
var r = class {
|
|
48
48
|
constructor(e) {
|
|
49
49
|
this.parameters = e;
|
|
@@ -59,4 +59,4 @@ var r = class {
|
|
|
59
59
|
//#endregion
|
|
60
60
|
export { r as t };
|
|
61
61
|
|
|
62
|
-
//# sourceMappingURL=basedecoder-
|
|
62
|
+
//# sourceMappingURL=basedecoder-B2p-79Pg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basedecoder-B2p-79Pg.js","names":[],"sources":["../../node_modules/geotiff/dist-module/predictor.js","../../node_modules/geotiff/dist-module/compression/basedecoder.js"],"sourcesContent":["/**\n * @param {Uint8Array|Uint16Array|Uint32Array} row\n * @param {number} stride\n */\nfunction decodeRowAcc(row, stride) {\n let length = row.length - stride;\n let offset = 0;\n do {\n for (let i = stride; i > 0; i--) {\n row[offset + stride] += row[offset];\n offset++;\n }\n length -= stride;\n } while (length > 0);\n}\n/**\n * @param {Uint8Array} row\n * @param {number} stride\n * @param {number} bytesPerSample\n */\nfunction decodeRowFloatingPoint(row, stride, bytesPerSample) {\n let index = 0;\n let count = row.length;\n const wc = count / bytesPerSample;\n while (count > stride) {\n for (let i = stride; i > 0; --i) {\n row[index + stride] += row[index];\n ++index;\n }\n count -= stride;\n }\n const copy = row.slice();\n for (let i = 0; i < wc; ++i) {\n for (let b = 0; b < bytesPerSample; ++b) {\n row[(bytesPerSample * i) + b] = copy[((bytesPerSample - b - 1) * wc) + i];\n }\n }\n}\n/**\n * @param {ArrayBufferLike} block\n * @param {number} predictor\n * @param {number} width\n * @param {number} height\n * @param {number[]} bitsPerSample\n * @param {number} planarConfiguration\n * @returns\n */\nexport function applyPredictor(block, predictor, width, height, bitsPerSample, planarConfiguration) {\n if (!predictor || predictor === 1) {\n return block;\n }\n for (let i = 0; i < bitsPerSample.length; ++i) {\n if (bitsPerSample[i] % 8 !== 0) {\n throw new Error('When decoding with predictor, only multiple of 8 bits are supported.');\n }\n if (bitsPerSample[i] !== bitsPerSample[0]) {\n throw new Error('When decoding with predictor, all samples must have the same size.');\n }\n }\n const bytesPerSample = bitsPerSample[0] / 8;\n const stride = planarConfiguration === 2 ? 1 : bitsPerSample.length;\n for (let i = 0; i < height; ++i) {\n // Last strip will be truncated if height % stripHeight != 0\n if (i * stride * width * bytesPerSample >= block.byteLength) {\n break;\n }\n let row;\n if (predictor === 2) { // horizontal prediction\n switch (bitsPerSample[0]) {\n case 8:\n row = new Uint8Array(block, i * stride * width * bytesPerSample, stride * width * bytesPerSample);\n break;\n case 16:\n row = new Uint16Array(block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 2);\n break;\n case 32:\n row = new Uint32Array(block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 4);\n break;\n default:\n throw new Error(`Predictor 2 not allowed with ${bitsPerSample[0]} bits per sample.`);\n }\n decodeRowAcc(row, stride);\n }\n else if (predictor === 3) { // horizontal floating point\n row = new Uint8Array(block, i * stride * width * bytesPerSample, stride * width * bytesPerSample);\n decodeRowFloatingPoint(row, stride, bytesPerSample);\n }\n }\n return block;\n}\n//# sourceMappingURL=predictor.js.map","import { applyPredictor } from '../predictor.js';\n/**\n * @typedef {Object} BaseDecoderParameters\n * @property {number} tileWidth\n * @property {number} tileHeight\n * @property {number} predictor\n * @property {number|number[]|import('../geotiff.js').TypedArray} bitsPerSample\n * @property {number} planarConfiguration\n * @property {number} [samplesPerPixel]\n */\nexport default class BaseDecoder {\n /**\n * @param {BaseDecoderParameters} parameters\n */\n constructor(parameters) {\n this.parameters = parameters;\n }\n /**\n * @abstract\n * @param {ArrayBufferLike} _buffer\n * @returns {Promise<ArrayBufferLike>|ArrayBufferLike}\n */\n decodeBlock(_buffer) {\n throw new Error('decodeBlock not implemented');\n }\n /**\n * @param {ArrayBufferLike} buffer\n * @returns {Promise<ArrayBufferLike>}\n */\n async decode(buffer) {\n const decoded = await this.decodeBlock(buffer);\n const { tileWidth, tileHeight, predictor, bitsPerSample, planarConfiguration, } = this.parameters;\n if (predictor !== 1) {\n const isBitsPerSampleArray = Array.isArray(bitsPerSample) || ArrayBuffer.isView(bitsPerSample);\n const adaptedBitsPerSample = isBitsPerSampleArray ? Array.from(bitsPerSample) : [bitsPerSample];\n return applyPredictor(decoded, predictor, tileWidth, tileHeight, adaptedBitsPerSample, planarConfiguration);\n }\n return decoded;\n }\n}\n//# sourceMappingURL=basedecoder.js.map"],"x_google_ignoreList":[0,1],"mappings":";AAIA,SAAS,EAAa,GAAK,GAAQ;CAC/B,IAAI,IAAS,EAAI,SAAS,GACtB,IAAS;AACb,IAAG;AACC,OAAK,IAAI,IAAI,GAAQ,IAAI,GAAG,IAExB,CADA,EAAI,IAAS,MAAW,EAAI,IAC5B;AAEJ,OAAU;UACL,IAAS;;AAOtB,SAAS,EAAuB,GAAK,GAAQ,GAAgB;CACzD,IAAI,IAAQ,GACR,IAAQ,EAAI,QACV,IAAK,IAAQ;AACnB,QAAO,IAAQ,IAAQ;AACnB,OAAK,IAAI,IAAI,GAAQ,IAAI,GAAG,EAAE,EAE1B,CADA,EAAI,IAAQ,MAAW,EAAI,IAC3B,EA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,IAAqB,IAArB,MAAiC;CAI7B,YAAY,GAAY;AACpB,OAAK,aAAa;;CAOtB,YAAY,GAAS;AACjB,QAAU,MAAM,8BAA8B;;CAMlD,MAAM,OAAO,GAAQ;EACjB,IAAM,IAAU,MAAM,KAAK,YAAY,EAAO,EACxC,EAAE,cAAW,eAAY,cAAW,kBAAe,2BAAyB,KAAK;AAMvF,SALI,MAAc,IAKX,IAFI,EAAe,GAAS,GAAW,GAAW,GAFxB,MAAM,QAAQ,EAAc,IAAI,YAAY,OAAO,EAAc,GAC1C,MAAM,KAAK,EAAc,GAAG,CAAC,EAAc,EACR,EAAoB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as e } from "./basedecoder-B2p-79Pg.js";
|
|
2
|
+
import { t } from "./pako.esm-x6ItERqe.js";
|
|
3
|
+
//#region ../node_modules/geotiff/dist-module/compression/deflate.js
|
|
4
|
+
var n = class extends e {
|
|
5
|
+
decodeBlock(e) {
|
|
6
|
+
return t(new Uint8Array(e)).buffer;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=deflate-DdI6yhy3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deflate-DdI6yhy3.js","names":["inflate"],"sources":["../../node_modules/geotiff/dist-module/compression/deflate.js"],"sourcesContent":["import { inflate } from 'pako';\nimport BaseDecoder from './basedecoder.js';\nexport default class DeflateDecoder extends BaseDecoder {\n /** @param {ArrayBuffer} buffer */\n decodeBlock(buffer) {\n return inflate(new Uint8Array(buffer)).buffer;\n }\n}\n//# sourceMappingURL=deflate.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAqB,IAArB,cAA4C,EAAY;CAEpD,YAAY,GAAQ;AAChB,SAAOA,EAAQ,IAAI,WAAW,EAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals-QF85DtAk.js","names":[],"sources":["../node_modules/geotiff/dist-module/globals.js"],"sourcesContent":["/** @import {TypedArray} from './geotiff.js' */\nexport const fieldTypes = {\n BYTE: /** @type {1} */ (0x0001),\n ASCII: /** @type {2} */ (0x0002),\n SHORT: /** @type {3} */ (0x0003),\n LONG: /** @type {4} */ (0x0004),\n RATIONAL: /** @type {5} */ (0x0005),\n SBYTE: /** @type {6} */ (0x0006),\n UNDEFINED: /** @type {7} */ (0x0007),\n SSHORT: /** @type {8} */ (0x0008),\n SLONG: /** @type {9} */ (0x0009),\n SRATIONAL: /** @type {10} */ (0x000a),\n FLOAT: /** @type {11} */ (0x000b),\n DOUBLE: /** @type {12} */ (0x000c),\n // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n IFD: /** @type {13} */ (0x000d),\n // introduced by BigTIFF\n LONG8: /** @type {16} */ (0x0010),\n SLONG8: /** @type {17} */ (0x0011),\n IFD8: /** @type {18} */ (0x0012),\n};\n/** @typedef {keyof fieldTypes} FieldTypeName */\n/** @typedef {fieldTypes[keyof typeof fieldTypes]} FieldType */\n/** @typedef {Record<FieldTypeName, number>} FieldTypeSizes */\nexport const fieldTypeSizes = /** @type {const} */ ({\n [fieldTypes.BYTE]: 1,\n [fieldTypes.ASCII]: 1,\n [fieldTypes.SBYTE]: 1,\n [fieldTypes.UNDEFINED]: 1,\n [fieldTypes.SHORT]: 2,\n [fieldTypes.SSHORT]: 2,\n [fieldTypes.LONG]: 4,\n [fieldTypes.SLONG]: 4,\n [fieldTypes.FLOAT]: 4,\n [fieldTypes.IFD]: 4,\n [fieldTypes.RATIONAL]: 8,\n [fieldTypes.SRATIONAL]: 8,\n [fieldTypes.DOUBLE]: 8,\n [fieldTypes.LONG8]: 8,\n [fieldTypes.SLONG8]: 8,\n [fieldTypes.IFD8]: 8,\n});\n/** @typedef {fieldTypeSizes[keyof typeof fieldTypeSizes]} FieldTypeSize */\n/**\n * Get the byte size for a given field type.\n * @param {FieldType} fieldType The TIFF field type constant\n * @returns {number} The size in bytes\n * @throws {RangeError} If the field type is invalid\n */\nexport function getFieldTypeSize(fieldType) {\n const size = fieldTypeSizes[fieldType];\n if (size === undefined) {\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n return size;\n}\n/**\n * @typedef {Object} TagDictionaryEntry\n * @property {number} tag\n * @property {string} [name]\n * @property {number} [type]\n * @property {boolean} [isArray]\n * @property {boolean} [eager]\n */\nexport const tagDictionary = /** @type {const} */ ({\n NewSubfileType: { tag: 254, type: fieldTypes.LONG, eager: true },\n SubfileType: { tag: 255, type: fieldTypes.SHORT, eager: true },\n ImageWidth: { tag: 256, type: fieldTypes.SHORT, eager: true },\n ImageLength: { tag: 257, type: fieldTypes.SHORT, eager: true },\n BitsPerSample: { tag: 258, type: fieldTypes.SHORT, isArray: true, eager: true },\n Compression: { tag: 259, type: fieldTypes.SHORT, eager: true },\n PhotometricInterpretation: { tag: 262, type: fieldTypes.SHORT, eager: true },\n Threshholding: { tag: 263, type: fieldTypes.SHORT },\n CellWidth: { tag: 264, type: fieldTypes.SHORT },\n CellLength: { tag: 265, type: fieldTypes.SHORT },\n FillOrder: { tag: 266, type: fieldTypes.SHORT },\n DocumentName: { tag: 269, type: fieldTypes.ASCII },\n ImageDescription: { tag: 270, type: fieldTypes.ASCII },\n Make: { tag: 271, type: fieldTypes.ASCII },\n Model: { tag: 272, type: fieldTypes.ASCII },\n StripOffsets: { tag: 273, type: fieldTypes.SHORT, isArray: true },\n Orientation: { tag: 274, type: fieldTypes.SHORT },\n SamplesPerPixel: { tag: 277, type: fieldTypes.SHORT, eager: true },\n RowsPerStrip: { tag: 278, type: fieldTypes.SHORT, eager: true },\n StripByteCounts: { tag: 279, type: fieldTypes.LONG, isArray: true },\n MinSampleValue: { tag: 280, type: fieldTypes.SHORT, isArray: true },\n MaxSampleValue: { tag: 281, type: fieldTypes.SHORT, isArray: true },\n XResolution: { tag: 282, type: fieldTypes.RATIONAL },\n YResolution: { tag: 283, type: fieldTypes.RATIONAL },\n PlanarConfiguration: { tag: 284, type: fieldTypes.SHORT, eager: true },\n PageName: { tag: 285, type: fieldTypes.ASCII },\n XPosition: { tag: 286, type: fieldTypes.RATIONAL },\n YPosition: { tag: 287, type: fieldTypes.RATIONAL },\n FreeOffsets: { tag: 288, type: fieldTypes.LONG },\n FreeByteCounts: { tag: 289, type: fieldTypes.LONG },\n GrayResponseUnit: { tag: 290, type: fieldTypes.SHORT },\n GrayResponseCurve: { tag: 291, type: fieldTypes.SHORT, isArray: true },\n T4Options: { tag: 292, type: fieldTypes.LONG },\n T6Options: { tag: 293, type: fieldTypes.LONG },\n ResolutionUnit: { tag: 296, type: fieldTypes.SHORT },\n PageNumber: { tag: 297, type: fieldTypes.SHORT, isArray: true },\n TransferFunction: { tag: 301, type: fieldTypes.SHORT, isArray: true },\n Software: { tag: 305, type: fieldTypes.ASCII },\n DateTime: { tag: 306, type: fieldTypes.ASCII },\n Artist: { tag: 315, type: fieldTypes.ASCII },\n HostComputer: { tag: 316, type: fieldTypes.ASCII },\n Predictor: { tag: 317, type: fieldTypes.SHORT },\n WhitePoint: { tag: 318, type: fieldTypes.RATIONAL, isArray: true },\n PrimaryChromaticities: { tag: 319, type: fieldTypes.RATIONAL, isArray: true },\n ColorMap: { tag: 320, type: fieldTypes.SHORT, isArray: true },\n HalftoneHints: { tag: 321, type: fieldTypes.SHORT, isArray: true },\n TileWidth: { tag: 322, type: fieldTypes.SHORT, eager: true },\n TileLength: { tag: 323, type: fieldTypes.SHORT, eager: true },\n TileOffsets: { tag: 324, type: fieldTypes.LONG, isArray: true },\n TileByteCounts: { tag: 325, type: fieldTypes.SHORT, isArray: true },\n InkSet: { tag: 332, type: fieldTypes.SHORT },\n InkNames: { tag: 333, type: fieldTypes.ASCII },\n NumberOfInks: { tag: 334, type: fieldTypes.SHORT },\n DotRange: { tag: 336, type: fieldTypes.BYTE, isArray: true },\n TargetPrinter: { tag: 337, type: fieldTypes.ASCII },\n ExtraSamples: { tag: 338, type: fieldTypes.BYTE, isArray: true, eager: true },\n SampleFormat: { tag: 339, type: fieldTypes.SHORT, isArray: true, eager: true },\n SMinSampleValue: { tag: 340, isArray: true },\n SMaxSampleValue: { tag: 341, isArray: true },\n TransferRange: { tag: 342, type: fieldTypes.SHORT, isArray: true },\n JPEGProc: { tag: 512, type: fieldTypes.SHORT },\n JPEGInterchangeFormat: { tag: 513, type: fieldTypes.LONG },\n JPEGInterchangeFormatLngth: { tag: 514, type: fieldTypes.LONG },\n JPEGRestartInterval: { tag: 515, type: fieldTypes.SHORT },\n JPEGLosslessPredictors: { tag: 517, type: fieldTypes.SHORT, isArray: true },\n JPEGPointTransforms: { tag: 518, type: fieldTypes.SHORT, isArray: true },\n JPEGQTables: { tag: 519, type: fieldTypes.LONG, isArray: true },\n JPEGDCTables: { tag: 520, type: fieldTypes.LONG, isArray: true },\n JPEGACTables: { tag: 521, type: fieldTypes.LONG, isArray: true },\n YCbCrCoefficients: { tag: 529, type: fieldTypes.RATIONAL, isArray: true },\n YCbCrSubSampling: { tag: 530, type: fieldTypes.SHORT, isArray: true },\n YCbCrPositioning: { tag: 531, type: fieldTypes.SHORT },\n ReferenceBlackWhite: { tag: 532, type: fieldTypes.LONG, isArray: true },\n Copyright: { tag: 33432, type: fieldTypes.ASCII },\n BadFaxLines: { tag: 326 },\n CleanFaxData: { tag: 327 },\n ClipPath: { tag: 343 },\n ConsecutiveBadFaxLines: { tag: 328 },\n Decode: { tag: 433 },\n DefaultImageColor: { tag: 434 },\n Indexed: { tag: 346 },\n JPEGTables: { tag: 347, isArray: true, eager: true },\n StripRowCounts: { tag: 559, isArray: true },\n SubIFDs: { tag: 330, isArray: true },\n XClipPathUnits: { tag: 344 },\n YClipPathUnits: { tag: 345 },\n ApertureValue: { tag: 37378 },\n ColorSpace: { tag: 40961 },\n DateTimeDigitized: { tag: 36868 },\n DateTimeOriginal: { tag: 36867 },\n ExifIFD: { tag: 34665, name: 'Exif IFD', type: fieldTypes.LONG },\n ExifVersion: { tag: 36864 },\n ExposureTime: { tag: 33434 },\n FileSource: { tag: 41728 },\n Flash: { tag: 37385 },\n FlashpixVersion: { tag: 40960 },\n FNumber: { tag: 33437 },\n ImageUniqueID: { tag: 42016 },\n LightSource: { tag: 37384 },\n MakerNote: { tag: 37500 },\n ShutterSpeedValue: { tag: 37377 },\n UserComment: { tag: 37510 },\n IPTC: { tag: 33723 },\n CZ_LSMINFO: { tag: 34412 },\n ICCProfile: { tag: 34675, name: 'ICC Profile' },\n XMP: { tag: 700 },\n GDAL_METADATA: { tag: 42112 },\n GDAL_NODATA: { tag: 42113, type: fieldTypes.ASCII, eager: true },\n Photoshop: { tag: 34377 },\n ModelPixelScale: { tag: 33550, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n ModelTiepoint: { tag: 33922, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n ModelTransformation: { tag: 34264, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n GeoKeyDirectory: { tag: 34735, type: fieldTypes.SHORT, isArray: true, eager: true },\n GeoDoubleParams: { tag: 34736, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n GeoAsciiParams: { tag: 34737, type: fieldTypes.ASCII, eager: true },\n LercParameters: { tag: 50674, eager: true },\n});\n/** @typedef {keyof typeof tagDictionary} TagName */\n/** @typedef {typeof tagDictionary[keyof typeof tagDictionary]['tag']} Tag */\n/**\n * @typedef {Extract<keyof typeof tagDictionary,\n * { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n * ? K : never }[keyof typeof tagDictionary]>} EagerTagName\n */\n/**\n * @typedef {Extract<Tag, { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n * ? (typeof tagDictionary)[K]['tag'] : never }[keyof typeof tagDictionary]>} EagerTag\n */\n/** @typedef {Extract<typeof tagDictionary[keyof typeof tagDictionary], {type: any}>['type']} TagType */\n/**\n * @template {number} T\n * @typedef {T extends 2 ? string : number} GeoTiffPrimitive\n */\n/**\n * @template {TagName} T\n * @typedef {typeof tagDictionary[T]} TagDef\n */\n/**\n * @typedef {{\n * 1: number;\n * 2: string;\n * 3: number;\n * 4: number;\n * 5: number;\n * 6: number;\n * 7: ArrayBuffer;\n * 8: number;\n * 9: number;\n * 10: number;\n * 11: number;\n * 12: number;\n * 16: number;\n * 17: number;\n * 18: number;\n * }} FieldTypeMap\n */\n/**\n * @template {TagName} T\n * @typedef {TagDef<T> extends { isArray: true }\n * ? (TagDef<T> extends { type: typeof fieldTypes.DOUBLE } ? number[] :\n * TagDef<T> extends { type: typeof fieldTypes.ASCII } ? string[] :\n * TagDef<T> extends { type: typeof fieldTypes.BYTE | typeof fieldTypes.SBYTE | typeof fieldTypes.UNDEFINED }\n * ? Uint8Array | Int8Array :\n * (number[] | TypedArray))\n * : (TagDef<T> extends { type: keyof FieldTypeMap } ? FieldTypeMap[TagDef<T>['type']] : any)} TagValue\n */\n/**\n * Maps tag names to their numeric values\n * @type {Record<string, number>}\n */\nexport const tags = {};\n/**\n * Maps tag numbers to their definitions\n * @type {Record<number, { tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }>}\n */\nexport const tagDefinitions = {};\n/**\n * Registers a new field tag\n * @param {number} tag the numeric tiff tag\n * @param {string} name the name of the tag that will be reported in the IFD\n * @param {keyof fieldTypes|number|undefined} type the tags data type\n * @param {Boolean} isArray whether the tag is an array\n * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n * When false (default), tags are loaded lazily on-demand.\n * When true, all tags are loaded immediately during parsing.\n */\nexport function registerTag(tag, name, type, isArray = false, eager = false) {\n tags[name] = tag;\n tagDefinitions[tag] = { tag, name, type: typeof type === 'string' ? fieldTypes[type] : type, isArray, eager };\n}\nfor (const [key, value] of Object.entries(tagDictionary)) {\n const entry = /** @type {TagDictionaryEntry} */ (value);\n registerTag(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {number} the resolved tag ID\n */\nexport function resolveTag(tagIdentifier) {\n if (typeof tagIdentifier === 'number') {\n return tagIdentifier;\n }\n return tags[tagIdentifier];\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {{ tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }} the tag definition\n */\nexport function getTag(tagIdentifier) {\n return tagDefinitions[resolveTag(tagIdentifier)];\n}\nexport const fieldTagTypes = {\n 256: 'SHORT',\n 257: 'SHORT',\n 258: 'SHORT',\n 259: 'SHORT',\n 262: 'SHORT',\n 270: 'ASCII',\n 271: 'ASCII',\n 272: 'ASCII',\n 273: 'LONG',\n 274: 'SHORT',\n 277: 'SHORT',\n 278: 'LONG',\n 279: 'LONG',\n 282: 'RATIONAL',\n 283: 'RATIONAL',\n 284: 'SHORT',\n 286: 'SHORT',\n 287: 'RATIONAL',\n 296: 'SHORT',\n 297: 'SHORT',\n 305: 'ASCII',\n 306: 'ASCII',\n 315: 'ASCII',\n 338: 'SHORT',\n 339: 'SHORT',\n 513: 'LONG',\n 514: 'LONG',\n 1024: 'SHORT',\n 1025: 'SHORT',\n 1026: 'ASCII',\n 2048: 'SHORT',\n 2049: 'ASCII',\n 2052: 'SHORT',\n 2054: 'SHORT',\n 2057: 'DOUBLE',\n 2059: 'DOUBLE',\n 2060: 'SHORT',\n 3072: 'SHORT',\n 3073: 'ASCII',\n 3076: 'SHORT',\n 4096: 'SHORT',\n 4097: 'ASCII',\n 4099: 'SHORT',\n 33432: 'ASCII',\n 33550: 'DOUBLE',\n 33922: 'DOUBLE',\n 34264: 'DOUBLE',\n 34665: 'LONG',\n 34735: 'SHORT',\n 34736: 'DOUBLE',\n 34737: 'ASCII',\n 42113: 'ASCII',\n};\nexport const photometricInterpretations = {\n WhiteIsZero: 0,\n BlackIsZero: 1,\n RGB: 2,\n Palette: 3,\n TransparencyMask: 4,\n CMYK: 5,\n YCbCr: 6,\n CIELab: 8,\n ICCLab: 9,\n};\nexport const ExtraSamplesValues = {\n Unspecified: 0,\n Assocalpha: 1,\n Unassalpha: 2,\n};\nexport const LercParameters = {\n Version: 0,\n AddCompression: 1,\n};\nexport const LercAddCompression = {\n None: 0,\n Deflate: 1,\n Zstandard: 2,\n};\nexport const geoKeyNames = /** @type {const} */ ({\n 1024: 'GTModelTypeGeoKey',\n 1025: 'GTRasterTypeGeoKey',\n 1026: 'GTCitationGeoKey',\n 2048: 'GeographicTypeGeoKey',\n 2049: 'GeogCitationGeoKey',\n 2050: 'GeogGeodeticDatumGeoKey',\n 2051: 'GeogPrimeMeridianGeoKey',\n 2052: 'GeogLinearUnitsGeoKey',\n 2053: 'GeogLinearUnitSizeGeoKey',\n 2054: 'GeogAngularUnitsGeoKey',\n 2055: 'GeogAngularUnitSizeGeoKey',\n 2056: 'GeogEllipsoidGeoKey',\n 2057: 'GeogSemiMajorAxisGeoKey',\n 2058: 'GeogSemiMinorAxisGeoKey',\n 2059: 'GeogInvFlatteningGeoKey',\n 2060: 'GeogAzimuthUnitsGeoKey',\n 2061: 'GeogPrimeMeridianLongGeoKey',\n 2062: 'GeogTOWGS84GeoKey',\n 3072: 'ProjectedCSTypeGeoKey',\n 3073: 'PCSCitationGeoKey',\n 3074: 'ProjectionGeoKey',\n 3075: 'ProjCoordTransGeoKey',\n 3076: 'ProjLinearUnitsGeoKey',\n 3077: 'ProjLinearUnitSizeGeoKey',\n 3078: 'ProjStdParallel1GeoKey',\n 3079: 'ProjStdParallel2GeoKey',\n 3080: 'ProjNatOriginLongGeoKey',\n 3081: 'ProjNatOriginLatGeoKey',\n 3082: 'ProjFalseEastingGeoKey',\n 3083: 'ProjFalseNorthingGeoKey',\n 3084: 'ProjFalseOriginLongGeoKey',\n 3085: 'ProjFalseOriginLatGeoKey',\n 3086: 'ProjFalseOriginEastingGeoKey',\n 3087: 'ProjFalseOriginNorthingGeoKey',\n 3088: 'ProjCenterLongGeoKey',\n 3089: 'ProjCenterLatGeoKey',\n 3090: 'ProjCenterEastingGeoKey',\n 3091: 'ProjCenterNorthingGeoKey',\n 3092: 'ProjScaleAtNatOriginGeoKey',\n 3093: 'ProjScaleAtCenterGeoKey',\n 3094: 'ProjAzimuthAngleGeoKey',\n 3095: 'ProjStraightVertPoleLongGeoKey',\n 3096: 'ProjRectifiedGridAngleGeoKey',\n 4096: 'VerticalCSTypeGeoKey',\n 4097: 'VerticalCitationGeoKey',\n 4098: 'VerticalDatumGeoKey',\n 4099: 'VerticalUnitsGeoKey',\n});\n/** @typedef {geoKeyNames[keyof typeof geoKeyNames]} GeoKeyName */\n/**\n * @type {Record<GeoKeyName, number>}\n */\nexport const geoKeys = /** @type {Record<GeoKeyName, number>} */ ({});\nfor (const [key, name] of Object.entries(geoKeyNames)) {\n geoKeys[ /** @type {GeoKeyName} */(name)] = parseInt(key, 10);\n}\n//# sourceMappingURL=globals.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;aACa,IAAa;CACtB,MAAwB;CACxB,OAAyB;CACzB,OAAyB;CACzB,MAAwB;CACxB,UAA4B;CAC5B,OAAyB;CACzB,WAA6B;CAC7B,QAA0B;CAC1B,OAAyB;CACzB,WAA8B;CAC9B,OAA0B;CAC1B,QAA2B;CAE3B,KAAwB;CAExB,OAA0B;CAC1B,QAA2B;CAC3B,MAAyB;CAC5B,EAIY,IAAuC;EAC/C,EAAW,OAAO;EAClB,EAAW,QAAQ;EACnB,EAAW,QAAQ;EACnB,EAAW,YAAY;EACvB,EAAW,QAAQ;EACnB,EAAW,SAAS;EACpB,EAAW,OAAO;EAClB,EAAW,QAAQ;EACnB,EAAW,QAAQ;EACnB,EAAW,MAAM;EACjB,EAAW,WAAW;EACtB,EAAW,YAAY;EACvB,EAAW,SAAS;EACpB,EAAW,QAAQ;EACnB,EAAW,SAAS;EACpB,EAAW,OAAO;CACtB;AAQD,SAAgB,EAAiB,GAAW;CACxC,IAAM,IAAO,EAAe;AAC5B,KAAI,MAAS,KAAA,EACT,OAAU,WAAW,uBAAuB,IAAY;AAE5D,QAAO;;AAUX,IAAa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,GAAY,EAAM,KAAK,EAAM,QAAQ,GAAK,EAAM,MAAM,EAAM,SAAS,EAAM,MAAM;;AAMrF,SAAgB,EAAW,GAAe;AAItC,QAHI,OAAO,KAAkB,WAClB,IAEJ,EAAK;;AA+DhB,IAAa,IAA6B;CACtC,aAAa;CACb,aAAa;CACb,KAAK;CACL,SAAS;CACT,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;CACX,EACY,IAAqB;CAC9B,aAAa;CACb,YAAY;CACZ,YAAY;CACf,EACY,IAAiB;CAC1B,SAAS;CACT,gBAAgB;CACnB,EACY,IAAqB;CAC9B,MAAM;CACN,SAAS;CACT,WAAW;CACd,EACY,IAAoC;CAC7C,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACT,EAKY,IAAqD,EAAE;AACpE,KAAK,IAAM,CAAC,GAAK,MAAS,OAAO,QAAQ,EAAY,CACjD,GAAmC,KAAS,SAAS,GAAK,GAAG"}
|
|
1
|
+
{"version":3,"file":"globals-QF85DtAk.js","names":[],"sources":["../../node_modules/geotiff/dist-module/globals.js"],"sourcesContent":["/** @import {TypedArray} from './geotiff.js' */\nexport const fieldTypes = {\n BYTE: /** @type {1} */ (0x0001),\n ASCII: /** @type {2} */ (0x0002),\n SHORT: /** @type {3} */ (0x0003),\n LONG: /** @type {4} */ (0x0004),\n RATIONAL: /** @type {5} */ (0x0005),\n SBYTE: /** @type {6} */ (0x0006),\n UNDEFINED: /** @type {7} */ (0x0007),\n SSHORT: /** @type {8} */ (0x0008),\n SLONG: /** @type {9} */ (0x0009),\n SRATIONAL: /** @type {10} */ (0x000a),\n FLOAT: /** @type {11} */ (0x000b),\n DOUBLE: /** @type {12} */ (0x000c),\n // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n IFD: /** @type {13} */ (0x000d),\n // introduced by BigTIFF\n LONG8: /** @type {16} */ (0x0010),\n SLONG8: /** @type {17} */ (0x0011),\n IFD8: /** @type {18} */ (0x0012),\n};\n/** @typedef {keyof fieldTypes} FieldTypeName */\n/** @typedef {fieldTypes[keyof typeof fieldTypes]} FieldType */\n/** @typedef {Record<FieldTypeName, number>} FieldTypeSizes */\nexport const fieldTypeSizes = /** @type {const} */ ({\n [fieldTypes.BYTE]: 1,\n [fieldTypes.ASCII]: 1,\n [fieldTypes.SBYTE]: 1,\n [fieldTypes.UNDEFINED]: 1,\n [fieldTypes.SHORT]: 2,\n [fieldTypes.SSHORT]: 2,\n [fieldTypes.LONG]: 4,\n [fieldTypes.SLONG]: 4,\n [fieldTypes.FLOAT]: 4,\n [fieldTypes.IFD]: 4,\n [fieldTypes.RATIONAL]: 8,\n [fieldTypes.SRATIONAL]: 8,\n [fieldTypes.DOUBLE]: 8,\n [fieldTypes.LONG8]: 8,\n [fieldTypes.SLONG8]: 8,\n [fieldTypes.IFD8]: 8,\n});\n/** @typedef {fieldTypeSizes[keyof typeof fieldTypeSizes]} FieldTypeSize */\n/**\n * Get the byte size for a given field type.\n * @param {FieldType} fieldType The TIFF field type constant\n * @returns {number} The size in bytes\n * @throws {RangeError} If the field type is invalid\n */\nexport function getFieldTypeSize(fieldType) {\n const size = fieldTypeSizes[fieldType];\n if (size === undefined) {\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n return size;\n}\n/**\n * @typedef {Object} TagDictionaryEntry\n * @property {number} tag\n * @property {string} [name]\n * @property {number} [type]\n * @property {boolean} [isArray]\n * @property {boolean} [eager]\n */\nexport const tagDictionary = /** @type {const} */ ({\n NewSubfileType: { tag: 254, type: fieldTypes.LONG, eager: true },\n SubfileType: { tag: 255, type: fieldTypes.SHORT, eager: true },\n ImageWidth: { tag: 256, type: fieldTypes.SHORT, eager: true },\n ImageLength: { tag: 257, type: fieldTypes.SHORT, eager: true },\n BitsPerSample: { tag: 258, type: fieldTypes.SHORT, isArray: true, eager: true },\n Compression: { tag: 259, type: fieldTypes.SHORT, eager: true },\n PhotometricInterpretation: { tag: 262, type: fieldTypes.SHORT, eager: true },\n Threshholding: { tag: 263, type: fieldTypes.SHORT },\n CellWidth: { tag: 264, type: fieldTypes.SHORT },\n CellLength: { tag: 265, type: fieldTypes.SHORT },\n FillOrder: { tag: 266, type: fieldTypes.SHORT },\n DocumentName: { tag: 269, type: fieldTypes.ASCII },\n ImageDescription: { tag: 270, type: fieldTypes.ASCII },\n Make: { tag: 271, type: fieldTypes.ASCII },\n Model: { tag: 272, type: fieldTypes.ASCII },\n StripOffsets: { tag: 273, type: fieldTypes.SHORT, isArray: true },\n Orientation: { tag: 274, type: fieldTypes.SHORT },\n SamplesPerPixel: { tag: 277, type: fieldTypes.SHORT, eager: true },\n RowsPerStrip: { tag: 278, type: fieldTypes.SHORT, eager: true },\n StripByteCounts: { tag: 279, type: fieldTypes.LONG, isArray: true },\n MinSampleValue: { tag: 280, type: fieldTypes.SHORT, isArray: true },\n MaxSampleValue: { tag: 281, type: fieldTypes.SHORT, isArray: true },\n XResolution: { tag: 282, type: fieldTypes.RATIONAL },\n YResolution: { tag: 283, type: fieldTypes.RATIONAL },\n PlanarConfiguration: { tag: 284, type: fieldTypes.SHORT, eager: true },\n PageName: { tag: 285, type: fieldTypes.ASCII },\n XPosition: { tag: 286, type: fieldTypes.RATIONAL },\n YPosition: { tag: 287, type: fieldTypes.RATIONAL },\n FreeOffsets: { tag: 288, type: fieldTypes.LONG },\n FreeByteCounts: { tag: 289, type: fieldTypes.LONG },\n GrayResponseUnit: { tag: 290, type: fieldTypes.SHORT },\n GrayResponseCurve: { tag: 291, type: fieldTypes.SHORT, isArray: true },\n T4Options: { tag: 292, type: fieldTypes.LONG },\n T6Options: { tag: 293, type: fieldTypes.LONG },\n ResolutionUnit: { tag: 296, type: fieldTypes.SHORT },\n PageNumber: { tag: 297, type: fieldTypes.SHORT, isArray: true },\n TransferFunction: { tag: 301, type: fieldTypes.SHORT, isArray: true },\n Software: { tag: 305, type: fieldTypes.ASCII },\n DateTime: { tag: 306, type: fieldTypes.ASCII },\n Artist: { tag: 315, type: fieldTypes.ASCII },\n HostComputer: { tag: 316, type: fieldTypes.ASCII },\n Predictor: { tag: 317, type: fieldTypes.SHORT },\n WhitePoint: { tag: 318, type: fieldTypes.RATIONAL, isArray: true },\n PrimaryChromaticities: { tag: 319, type: fieldTypes.RATIONAL, isArray: true },\n ColorMap: { tag: 320, type: fieldTypes.SHORT, isArray: true },\n HalftoneHints: { tag: 321, type: fieldTypes.SHORT, isArray: true },\n TileWidth: { tag: 322, type: fieldTypes.SHORT, eager: true },\n TileLength: { tag: 323, type: fieldTypes.SHORT, eager: true },\n TileOffsets: { tag: 324, type: fieldTypes.LONG, isArray: true },\n TileByteCounts: { tag: 325, type: fieldTypes.SHORT, isArray: true },\n InkSet: { tag: 332, type: fieldTypes.SHORT },\n InkNames: { tag: 333, type: fieldTypes.ASCII },\n NumberOfInks: { tag: 334, type: fieldTypes.SHORT },\n DotRange: { tag: 336, type: fieldTypes.BYTE, isArray: true },\n TargetPrinter: { tag: 337, type: fieldTypes.ASCII },\n ExtraSamples: { tag: 338, type: fieldTypes.BYTE, isArray: true, eager: true },\n SampleFormat: { tag: 339, type: fieldTypes.SHORT, isArray: true, eager: true },\n SMinSampleValue: { tag: 340, isArray: true },\n SMaxSampleValue: { tag: 341, isArray: true },\n TransferRange: { tag: 342, type: fieldTypes.SHORT, isArray: true },\n JPEGProc: { tag: 512, type: fieldTypes.SHORT },\n JPEGInterchangeFormat: { tag: 513, type: fieldTypes.LONG },\n JPEGInterchangeFormatLngth: { tag: 514, type: fieldTypes.LONG },\n JPEGRestartInterval: { tag: 515, type: fieldTypes.SHORT },\n JPEGLosslessPredictors: { tag: 517, type: fieldTypes.SHORT, isArray: true },\n JPEGPointTransforms: { tag: 518, type: fieldTypes.SHORT, isArray: true },\n JPEGQTables: { tag: 519, type: fieldTypes.LONG, isArray: true },\n JPEGDCTables: { tag: 520, type: fieldTypes.LONG, isArray: true },\n JPEGACTables: { tag: 521, type: fieldTypes.LONG, isArray: true },\n YCbCrCoefficients: { tag: 529, type: fieldTypes.RATIONAL, isArray: true },\n YCbCrSubSampling: { tag: 530, type: fieldTypes.SHORT, isArray: true },\n YCbCrPositioning: { tag: 531, type: fieldTypes.SHORT },\n ReferenceBlackWhite: { tag: 532, type: fieldTypes.LONG, isArray: true },\n Copyright: { tag: 33432, type: fieldTypes.ASCII },\n BadFaxLines: { tag: 326 },\n CleanFaxData: { tag: 327 },\n ClipPath: { tag: 343 },\n ConsecutiveBadFaxLines: { tag: 328 },\n Decode: { tag: 433 },\n DefaultImageColor: { tag: 434 },\n Indexed: { tag: 346 },\n JPEGTables: { tag: 347, isArray: true, eager: true },\n StripRowCounts: { tag: 559, isArray: true },\n SubIFDs: { tag: 330, isArray: true },\n XClipPathUnits: { tag: 344 },\n YClipPathUnits: { tag: 345 },\n ApertureValue: { tag: 37378 },\n ColorSpace: { tag: 40961 },\n DateTimeDigitized: { tag: 36868 },\n DateTimeOriginal: { tag: 36867 },\n ExifIFD: { tag: 34665, name: 'Exif IFD', type: fieldTypes.LONG },\n ExifVersion: { tag: 36864 },\n ExposureTime: { tag: 33434 },\n FileSource: { tag: 41728 },\n Flash: { tag: 37385 },\n FlashpixVersion: { tag: 40960 },\n FNumber: { tag: 33437 },\n ImageUniqueID: { tag: 42016 },\n LightSource: { tag: 37384 },\n MakerNote: { tag: 37500 },\n ShutterSpeedValue: { tag: 37377 },\n UserComment: { tag: 37510 },\n IPTC: { tag: 33723 },\n CZ_LSMINFO: { tag: 34412 },\n ICCProfile: { tag: 34675, name: 'ICC Profile' },\n XMP: { tag: 700 },\n GDAL_METADATA: { tag: 42112 },\n GDAL_NODATA: { tag: 42113, type: fieldTypes.ASCII, eager: true },\n Photoshop: { tag: 34377 },\n ModelPixelScale: { tag: 33550, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n ModelTiepoint: { tag: 33922, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n ModelTransformation: { tag: 34264, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n GeoKeyDirectory: { tag: 34735, type: fieldTypes.SHORT, isArray: true, eager: true },\n GeoDoubleParams: { tag: 34736, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n GeoAsciiParams: { tag: 34737, type: fieldTypes.ASCII, eager: true },\n LercParameters: { tag: 50674, eager: true },\n});\n/** @typedef {keyof typeof tagDictionary} TagName */\n/** @typedef {typeof tagDictionary[keyof typeof tagDictionary]['tag']} Tag */\n/**\n * @typedef {Extract<keyof typeof tagDictionary,\n * { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n * ? K : never }[keyof typeof tagDictionary]>} EagerTagName\n */\n/**\n * @typedef {Extract<Tag, { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n * ? (typeof tagDictionary)[K]['tag'] : never }[keyof typeof tagDictionary]>} EagerTag\n */\n/** @typedef {Extract<typeof tagDictionary[keyof typeof tagDictionary], {type: any}>['type']} TagType */\n/**\n * @template {number} T\n * @typedef {T extends 2 ? string : number} GeoTiffPrimitive\n */\n/**\n * @template {TagName} T\n * @typedef {typeof tagDictionary[T]} TagDef\n */\n/**\n * @typedef {{\n * 1: number;\n * 2: string;\n * 3: number;\n * 4: number;\n * 5: number;\n * 6: number;\n * 7: ArrayBuffer;\n * 8: number;\n * 9: number;\n * 10: number;\n * 11: number;\n * 12: number;\n * 16: number;\n * 17: number;\n * 18: number;\n * }} FieldTypeMap\n */\n/**\n * @template {TagName} T\n * @typedef {TagDef<T> extends { isArray: true }\n * ? (TagDef<T> extends { type: typeof fieldTypes.DOUBLE } ? number[] :\n * TagDef<T> extends { type: typeof fieldTypes.ASCII } ? string[] :\n * TagDef<T> extends { type: typeof fieldTypes.BYTE | typeof fieldTypes.SBYTE | typeof fieldTypes.UNDEFINED }\n * ? Uint8Array | Int8Array :\n * (number[] | TypedArray))\n * : (TagDef<T> extends { type: keyof FieldTypeMap } ? FieldTypeMap[TagDef<T>['type']] : any)} TagValue\n */\n/**\n * Maps tag names to their numeric values\n * @type {Record<string, number>}\n */\nexport const tags = {};\n/**\n * Maps tag numbers to their definitions\n * @type {Record<number, { tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }>}\n */\nexport const tagDefinitions = {};\n/**\n * Registers a new field tag\n * @param {number} tag the numeric tiff tag\n * @param {string} name the name of the tag that will be reported in the IFD\n * @param {keyof fieldTypes|number|undefined} type the tags data type\n * @param {Boolean} isArray whether the tag is an array\n * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n * When false (default), tags are loaded lazily on-demand.\n * When true, all tags are loaded immediately during parsing.\n */\nexport function registerTag(tag, name, type, isArray = false, eager = false) {\n tags[name] = tag;\n tagDefinitions[tag] = { tag, name, type: typeof type === 'string' ? fieldTypes[type] : type, isArray, eager };\n}\nfor (const [key, value] of Object.entries(tagDictionary)) {\n const entry = /** @type {TagDictionaryEntry} */ (value);\n registerTag(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {number} the resolved tag ID\n */\nexport function resolveTag(tagIdentifier) {\n if (typeof tagIdentifier === 'number') {\n return tagIdentifier;\n }\n return tags[tagIdentifier];\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {{ tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }} the tag definition\n */\nexport function getTag(tagIdentifier) {\n return tagDefinitions[resolveTag(tagIdentifier)];\n}\nexport const fieldTagTypes = {\n 256: 'SHORT',\n 257: 'SHORT',\n 258: 'SHORT',\n 259: 'SHORT',\n 262: 'SHORT',\n 270: 'ASCII',\n 271: 'ASCII',\n 272: 'ASCII',\n 273: 'LONG',\n 274: 'SHORT',\n 277: 'SHORT',\n 278: 'LONG',\n 279: 'LONG',\n 282: 'RATIONAL',\n 283: 'RATIONAL',\n 284: 'SHORT',\n 286: 'SHORT',\n 287: 'RATIONAL',\n 296: 'SHORT',\n 297: 'SHORT',\n 305: 'ASCII',\n 306: 'ASCII',\n 315: 'ASCII',\n 338: 'SHORT',\n 339: 'SHORT',\n 513: 'LONG',\n 514: 'LONG',\n 1024: 'SHORT',\n 1025: 'SHORT',\n 1026: 'ASCII',\n 2048: 'SHORT',\n 2049: 'ASCII',\n 2052: 'SHORT',\n 2054: 'SHORT',\n 2057: 'DOUBLE',\n 2059: 'DOUBLE',\n 2060: 'SHORT',\n 3072: 'SHORT',\n 3073: 'ASCII',\n 3076: 'SHORT',\n 4096: 'SHORT',\n 4097: 'ASCII',\n 4099: 'SHORT',\n 33432: 'ASCII',\n 33550: 'DOUBLE',\n 33922: 'DOUBLE',\n 34264: 'DOUBLE',\n 34665: 'LONG',\n 34735: 'SHORT',\n 34736: 'DOUBLE',\n 34737: 'ASCII',\n 42113: 'ASCII',\n};\nexport const photometricInterpretations = {\n WhiteIsZero: 0,\n BlackIsZero: 1,\n RGB: 2,\n Palette: 3,\n TransparencyMask: 4,\n CMYK: 5,\n YCbCr: 6,\n CIELab: 8,\n ICCLab: 9,\n};\nexport const ExtraSamplesValues = {\n Unspecified: 0,\n Assocalpha: 1,\n Unassalpha: 2,\n};\nexport const LercParameters = {\n Version: 0,\n AddCompression: 1,\n};\nexport const LercAddCompression = {\n None: 0,\n Deflate: 1,\n Zstandard: 2,\n};\nexport const geoKeyNames = /** @type {const} */ ({\n 1024: 'GTModelTypeGeoKey',\n 1025: 'GTRasterTypeGeoKey',\n 1026: 'GTCitationGeoKey',\n 2048: 'GeographicTypeGeoKey',\n 2049: 'GeogCitationGeoKey',\n 2050: 'GeogGeodeticDatumGeoKey',\n 2051: 'GeogPrimeMeridianGeoKey',\n 2052: 'GeogLinearUnitsGeoKey',\n 2053: 'GeogLinearUnitSizeGeoKey',\n 2054: 'GeogAngularUnitsGeoKey',\n 2055: 'GeogAngularUnitSizeGeoKey',\n 2056: 'GeogEllipsoidGeoKey',\n 2057: 'GeogSemiMajorAxisGeoKey',\n 2058: 'GeogSemiMinorAxisGeoKey',\n 2059: 'GeogInvFlatteningGeoKey',\n 2060: 'GeogAzimuthUnitsGeoKey',\n 2061: 'GeogPrimeMeridianLongGeoKey',\n 2062: 'GeogTOWGS84GeoKey',\n 3072: 'ProjectedCSTypeGeoKey',\n 3073: 'PCSCitationGeoKey',\n 3074: 'ProjectionGeoKey',\n 3075: 'ProjCoordTransGeoKey',\n 3076: 'ProjLinearUnitsGeoKey',\n 3077: 'ProjLinearUnitSizeGeoKey',\n 3078: 'ProjStdParallel1GeoKey',\n 3079: 'ProjStdParallel2GeoKey',\n 3080: 'ProjNatOriginLongGeoKey',\n 3081: 'ProjNatOriginLatGeoKey',\n 3082: 'ProjFalseEastingGeoKey',\n 3083: 'ProjFalseNorthingGeoKey',\n 3084: 'ProjFalseOriginLongGeoKey',\n 3085: 'ProjFalseOriginLatGeoKey',\n 3086: 'ProjFalseOriginEastingGeoKey',\n 3087: 'ProjFalseOriginNorthingGeoKey',\n 3088: 'ProjCenterLongGeoKey',\n 3089: 'ProjCenterLatGeoKey',\n 3090: 'ProjCenterEastingGeoKey',\n 3091: 'ProjCenterNorthingGeoKey',\n 3092: 'ProjScaleAtNatOriginGeoKey',\n 3093: 'ProjScaleAtCenterGeoKey',\n 3094: 'ProjAzimuthAngleGeoKey',\n 3095: 'ProjStraightVertPoleLongGeoKey',\n 3096: 'ProjRectifiedGridAngleGeoKey',\n 4096: 'VerticalCSTypeGeoKey',\n 4097: 'VerticalCitationGeoKey',\n 4098: 'VerticalDatumGeoKey',\n 4099: 'VerticalUnitsGeoKey',\n});\n/** @typedef {geoKeyNames[keyof typeof geoKeyNames]} GeoKeyName */\n/**\n * @type {Record<GeoKeyName, number>}\n */\nexport const geoKeys = /** @type {Record<GeoKeyName, number>} */ ({});\nfor (const [key, name] of Object.entries(geoKeyNames)) {\n geoKeys[ /** @type {GeoKeyName} */(name)] = parseInt(key, 10);\n}\n//# sourceMappingURL=globals.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;aACa,IAAa;CACtB,MAAwB;CACxB,OAAyB;CACzB,OAAyB;CACzB,MAAwB;CACxB,UAA4B;CAC5B,OAAyB;CACzB,WAA6B;CAC7B,QAA0B;CAC1B,OAAyB;CACzB,WAA8B;CAC9B,OAA0B;CAC1B,QAA2B;CAE3B,KAAwB;CAExB,OAA0B;CAC1B,QAA2B;CAC3B,MAAyB;CAC5B,EAIY,IAAuC;EAC/C,EAAW,OAAO;EAClB,EAAW,QAAQ;EACnB,EAAW,QAAQ;EACnB,EAAW,YAAY;EACvB,EAAW,QAAQ;EACnB,EAAW,SAAS;EACpB,EAAW,OAAO;EAClB,EAAW,QAAQ;EACnB,EAAW,QAAQ;EACnB,EAAW,MAAM;EACjB,EAAW,WAAW;EACtB,EAAW,YAAY;EACvB,EAAW,SAAS;EACpB,EAAW,QAAQ;EACnB,EAAW,SAAS;EACpB,EAAW,OAAO;CACtB;AAQD,SAAgB,EAAiB,GAAW;CACxC,IAAM,IAAO,EAAe;AAC5B,KAAI,MAAS,KAAA,EACT,OAAU,WAAW,uBAAuB,IAAY;AAE5D,QAAO;;AAUX,IAAa,IAAsC;CAC/C,gBAAgB;EAAE,KAAK;EAAK,MAAM,EAAW;EAAM,OAAO;EAAM;CAChE,aAAa;EAAE,KAAK;EAAK,MAAM,EAAW;EAAO,OAAO;EAAM;CAC9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J,EAAK;;AA+DhB,IAAa,IAA6B;CACtC,aAAa;CACb,aAAa;CACb,KAAK;CACL,SAAS;CACT,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;CACX,EACY,IAAqB;CAC9B,aAAa;CACb,YAAY;CACZ,YAAY;CACf,EACY,IAAiB;CAC1B,SAAS;CACT,gBAAgB;CACnB,EACY,IAAqB;CAC9B,MAAM;CACN,SAAS;CACT,WAAW;CACd,EACY,IAAoC;CAC7C,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACT,EAKY,IAAqD,EAAE;AACpE,KAAK,IAAM,CAAC,GAAK,MAAS,OAAO,QAAQ,EAAY,CACjD,GAAmC,KAAS,SAAS,GAAK,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./basedecoder-
|
|
2
|
-
//#region node_modules/geotiff/dist-module/compression/jpeg.js
|
|
1
|
+
import { t as e } from "./basedecoder-B2p-79Pg.js";
|
|
2
|
+
//#region ../node_modules/geotiff/dist-module/compression/jpeg.js
|
|
3
3
|
var t = new Int32Array([
|
|
4
4
|
0,
|
|
5
5
|
1,
|
|
@@ -519,4 +519,4 @@ var p = class {
|
|
|
519
519
|
//#endregion
|
|
520
520
|
export { m as default };
|
|
521
521
|
|
|
522
|
-
//# sourceMappingURL=jpeg-
|
|
522
|
+
//# sourceMappingURL=jpeg-ClN7e6im.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jpeg-ClN7e6im.js","names":[],"sources":["../../node_modules/geotiff/dist-module/compression/jpeg.js"],"sourcesContent":["import BaseDecoder from './basedecoder.js';\n/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n Copyright 2011 notmasteryet\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n// - The JPEG specification can be found in the ITU CCITT Recommendation T.81\n// (www.w3.org/Graphics/JPEG/itu-t81.pdf)\n// - The JFIF specification can be found in the JPEG File Interchange Format\n// (www.w3.org/Graphics/JPEG/jfif3.pdf)\n// - The Adobe Application-Specific JPEG markers in the Supporting the DCT Filters\n// in PostScript Level 2, Technical Note #5116\n// (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)\nconst dctZigZag = new Int32Array([\n 0,\n 1, 8,\n 16, 9, 2,\n 3, 10, 17, 24,\n 32, 25, 18, 11, 4,\n 5, 12, 19, 26, 33, 40,\n 48, 41, 34, 27, 20, 13, 6,\n 7, 14, 21, 28, 35, 42, 49, 56,\n 57, 50, 43, 36, 29, 22, 15,\n 23, 30, 37, 44, 51, 58,\n 59, 52, 45, 38, 31,\n 39, 46, 53, 60,\n 61, 54, 47,\n 55, 62,\n 63,\n]);\nconst dctCos1 = 4017; // cos(pi/16)\nconst dctSin1 = 799; // sin(pi/16)\nconst dctCos3 = 3406; // cos(3*pi/16)\nconst dctSin3 = 2276; // sin(3*pi/16)\nconst dctCos6 = 1567; // cos(6*pi/16)\nconst dctSin6 = 3784; // sin(6*pi/16)\nconst dctSqrt2 = 5793; // sqrt(2)\nconst dctSqrt1d2 = 2896; // sqrt(2) / 2\n/** @typedef {(number|HuffmanNode)[]} HuffmanNode */\n/** @typedef {{children: HuffmanNode, index: number}} Code */\n/**\n * @typedef {Object} JpegComponent\n * @property {number} h\n * @property {number} v\n * @property {number} [quantizationIdx]\n * @property {Int32Array} [quantizationTable]\n * @property {number} blocksPerLine\n * @property {number} blocksPerColumn\n * @property {Int32Array[][]} blocks\n * @property {HuffmanNode} [huffmanTableDC]\n * @property {HuffmanNode} [huffmanTableAC]\n * @property {number} [pred]\n */\n/**\n * @typedef {Object} JpegFrame\n * @property {boolean} extended\n * @property {boolean} progressive\n * @property {number} precision\n * @property {number} scanLines\n * @property {number} samplesPerLine\n * @property {Object.<string, JpegComponent>} components\n * @property {number[]} componentsOrder\n * @property {number} maxH\n * @property {number} maxV\n * @property {number} mcusPerLine\n * @property {number} mcusPerColumn\n */\n/**\n * @param {Uint8Array<ArrayBuffer>} codeLengths\n * @param {Uint8Array<ArrayBuffer>} values\n * @returns {HuffmanNode}\n */\nfunction buildHuffmanTable(codeLengths, values) {\n let k = 0;\n /** @type {Array<Code>} */\n const code = [];\n let length = 16;\n while (length > 0 && !codeLengths[length - 1]) {\n --length;\n }\n code.push({ children: [], index: 0 });\n /** @type {Code|undefined} */\n let p = code[0];\n /** @type {Code|undefined} */\n let q;\n for (let i = 0; i < length; i++) {\n for (let j = 0; j < codeLengths[i]; j++) {\n p = code.pop();\n if (!p) {\n throw new Error('buildHuffmanTable: codeLength mismatch');\n }\n p.children[p.index] = values[k];\n while (p.index > 0) {\n p = code.pop();\n if (!p) {\n throw new Error('buildHuffmanTable: codeLength mismatch');\n }\n }\n p.index++;\n code.push(p);\n while (code.length <= i) {\n code.push(q = { children: [], index: 0 });\n p.children[p.index] = q.children;\n p = q;\n }\n k++;\n }\n if (i + 1 < length) {\n // p here points to last code\n code.push(q = { children: [], index: 0 });\n p.children[p.index] = q.children;\n p = q;\n }\n }\n return code[0].children;\n}\n/**\n * @param {Uint8Array} data\n * @param {number} initialOffset\n * @param {JpegFrame} frame\n * @param {JpegComponent[]} components\n * @param {number} resetInterval\n * @param {number} spectralStart\n * @param {number} spectralEnd\n * @param {number} successivePrev\n * @param {number} successive\n */\nfunction decodeScan(data, initialOffset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) {\n const { mcusPerLine, progressive } = frame;\n if (components.length > 1 && (mcusPerLine === undefined || frame.mcusPerColumn === undefined)) {\n throw new Error('Missing MCU dimensions');\n }\n if (components.length === 1 && (components[0].blocksPerLine === undefined || components[0].blocksPerColumn === undefined)) {\n throw new Error('Missing block dimensions');\n }\n const startOffset = initialOffset;\n let offset = initialOffset;\n let bitsData = 0;\n let bitsCount = 0;\n function readBit() {\n if (bitsCount > 0) {\n bitsCount--;\n return (bitsData >> bitsCount) & 1;\n }\n bitsData = data[offset++];\n if (bitsData === 0xFF) {\n const nextByte = data[offset++];\n if (nextByte) {\n throw new Error(`unexpected marker: ${((bitsData << 8) | nextByte).toString(16)}`);\n }\n // unstuff 0\n }\n bitsCount = 7;\n return bitsData >>> 7;\n }\n /** @param {HuffmanNode|undefined} tree */\n function decodeHuffman(tree) {\n if (!tree) {\n throw new Error('Huffman table not found');\n }\n let node = tree;\n let bit;\n while ((bit = readBit()) !== null) { // eslint-disable-line no-cond-assign\n const next = node[bit];\n if (typeof next === 'number') {\n return next;\n }\n if (typeof next !== 'object') {\n throw new Error('invalid huffman sequence');\n }\n node = next;\n }\n return null;\n }\n /** @param {number} initialLength */\n function receive(initialLength) {\n let length = initialLength;\n let n = 0;\n while (length > 0) {\n const bit = readBit();\n if (bit === null) {\n return undefined;\n }\n n = (n << 1) | bit;\n --length;\n }\n return n;\n }\n /** @param {number} length */\n function receiveAndExtend(length) {\n const n = receive(length);\n if (n === undefined) {\n return undefined;\n }\n if (n >= 1 << (length - 1)) {\n return n;\n }\n return n + (-1 << length) + 1;\n }\n /**\n * @param {JpegComponent} component\n * @param {Int32Array} zz\n */\n function decodeBaseline(component, zz) {\n const t = decodeHuffman(component.huffmanTableDC);\n if (t === null) {\n throw new Error('Huffman error');\n }\n const diff = t === 0 ? 0 : receiveAndExtend(t);\n if (diff === undefined) {\n throw new Error('Unexpected end of stream');\n }\n if (component.pred === undefined) {\n component.pred = 0;\n }\n component.pred += diff;\n zz[0] = component.pred;\n let k = 1;\n while (k < 64) {\n const rs = decodeHuffman(component.huffmanTableAC);\n if (rs === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n const s = rs & 15;\n const r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n break;\n }\n k += 16;\n }\n else {\n k += r;\n const z = dctZigZag[k];\n const val = receiveAndExtend(s);\n if (val === undefined) {\n throw new Error('Unexpected end of stream');\n }\n zz[z] = val;\n k++;\n }\n }\n }\n /**\n * @param {JpegComponent} component\n * @param {Int32Array} zz\n */\n function decodeDCFirst(component, zz) {\n const t = decodeHuffman(component.huffmanTableDC);\n if (t === null) {\n throw new Error('Huffman error');\n }\n const value = receiveAndExtend(t);\n if (value === undefined) {\n throw new Error('Unexpected end of data in DC coefficient decoding');\n }\n const diff = t === 0 ? 0 : (value << successive);\n if (component.pred === undefined) {\n component.pred = 0;\n }\n component.pred += diff;\n zz[0] = component.pred;\n }\n /**\n * @param {JpegComponent} _\n * @param {Int32Array} zz\n */\n function decodeDCSuccessive(_, zz) {\n const bit = readBit();\n if (bit === null) {\n throw new Error('Unexpected end of data in DC coefficient decoding');\n }\n zz[0] |= bit << successive;\n }\n let eobrun = 0;\n /**\n * @param {JpegComponent} component\n * @param {Int32Array} zz\n */\n function decodeACFirst(component, zz) {\n if (eobrun > 0) {\n eobrun--;\n return;\n }\n let k = spectralStart;\n const e = spectralEnd;\n while (k <= e) {\n const rs = decodeHuffman(component.huffmanTableAC);\n if (rs === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n const s = rs & 15;\n const r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n const value = receive(r);\n if (value === undefined) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n eobrun = value + (1 << r) - 1;\n break;\n }\n k += 16;\n }\n else {\n k += r;\n const z = dctZigZag[k];\n const value = receiveAndExtend(s);\n if (value === undefined) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n zz[z] = value * (1 << successive);\n k++;\n }\n }\n }\n let successiveACState = 0;\n /** @type {number} */\n let successiveACNextValue;\n /**\n * @param {JpegComponent} component\n * @param {Int32Array} zz\n */\n function decodeACSuccessive(component, zz) {\n let k = spectralStart;\n const e = spectralEnd;\n let r = 0;\n while (k <= e) {\n const z = dctZigZag[k];\n const direction = zz[z] < 0 ? -1 : 1;\n switch (successiveACState) {\n case 0: { // initial state\n const rs = decodeHuffman(component.huffmanTableAC);\n if (rs === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n const s = rs & 15;\n r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n const value = receive(r);\n if (value === undefined) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n eobrun = value + (1 << r);\n successiveACState = 4;\n }\n else {\n r = 16;\n successiveACState = 1;\n }\n }\n else {\n if (s !== 1) {\n throw new Error('invalid ACn encoding');\n }\n const nextVal = receiveAndExtend(s);\n if (nextVal === undefined) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n successiveACNextValue = nextVal;\n successiveACState = r ? 2 : 3;\n }\n continue; // eslint-disable-line no-continue\n }\n case 1: // skipping r zero items\n case 2:\n if (zz[z]) {\n const bit = readBit();\n if (bit === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n zz[z] += (bit << successive) * direction;\n }\n else {\n r--;\n if (r === 0) {\n successiveACState = successiveACState === 2 ? 3 : 0;\n }\n }\n break;\n case 3: // set value for a zero item\n if (zz[z]) {\n const bit = readBit();\n if (bit === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n zz[z] += (bit << successive) * direction;\n }\n else {\n zz[z] = successiveACNextValue << successive;\n successiveACState = 0;\n }\n break;\n case 4: // eob\n if (zz[z]) {\n const bit = readBit();\n if (bit === null) {\n throw new Error('Unexpected end of data in AC coefficient decoding');\n }\n zz[z] += (bit << successive) * direction;\n }\n break;\n default:\n break;\n }\n k++;\n }\n if (successiveACState === 4) {\n eobrun--;\n if (eobrun === 0) {\n successiveACState = 0;\n }\n }\n }\n /**\n * @param {JpegComponent} component\n * @param {function} decodeFunction\n * @param {number} mcu\n * @param {number} row\n * @param {number} col\n */\n function decodeMcu(component, decodeFunction, mcu, row, col) {\n const mcuRow = (mcu / mcusPerLine) | 0;\n const mcuCol = mcu % mcusPerLine;\n const blockRow = (mcuRow * component.v) + row;\n const blockCol = (mcuCol * component.h) + col;\n if (!component.blocks) {\n throw new Error('Missing blocks');\n }\n decodeFunction(component, component.blocks[blockRow][blockCol]);\n }\n /**\n * @param {JpegComponent} component\n * @param {function} decodeFunction\n * @param {number} mcu\n */\n function decodeBlock(component, decodeFunction, mcu) {\n const blockRow = (mcu / component.blocksPerLine) | 0;\n const blockCol = mcu % component.blocksPerLine;\n if (!component.blocks) {\n throw new Error('Missing blocks');\n }\n decodeFunction(component, component.blocks[blockRow][blockCol]);\n }\n const componentsLength = components.length;\n let component;\n let i;\n let j;\n let k;\n let n;\n let decodeFn;\n if (progressive) {\n if (spectralStart === 0) {\n decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;\n }\n else {\n decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;\n }\n }\n else {\n decodeFn = decodeBaseline;\n }\n let mcu = 0;\n let marker;\n let mcuExpected;\n if (componentsLength === 1) {\n mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;\n }\n else {\n mcuExpected = mcusPerLine * frame.mcusPerColumn;\n }\n const usedResetInterval = resetInterval || mcuExpected;\n while (mcu < mcuExpected) {\n // reset interval stuff\n for (i = 0; i < componentsLength; i++) {\n components[i].pred = 0;\n }\n eobrun = 0;\n if (componentsLength === 1) {\n component = components[0];\n for (n = 0; n < usedResetInterval; n++) {\n decodeBlock(component, decodeFn, mcu);\n mcu++;\n }\n }\n else {\n for (n = 0; n < usedResetInterval; n++) {\n for (i = 0; i < componentsLength; i++) {\n component = components[i];\n const { h, v } = component;\n for (j = 0; j < v; j++) {\n for (k = 0; k < h; k++) {\n decodeMcu(component, decodeFn, mcu, j, k);\n }\n }\n }\n mcu++;\n // If we've reached our expected MCU's, stop decoding\n if (mcu === mcuExpected) {\n break;\n }\n }\n }\n // find marker\n bitsCount = 0;\n marker = (data[offset] << 8) | data[offset + 1];\n if (marker < 0xFF00) {\n throw new Error('marker was not found');\n }\n if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx\n offset += 2;\n }\n else {\n break;\n }\n }\n return offset - startOffset;\n}\n/**\n * @param {JpegComponent} component\n */\nfunction buildComponentData(component) {\n const lines = [];\n const { blocksPerLine, blocksPerColumn } = component;\n if (!blocksPerLine || !blocksPerColumn || !component.blocks) {\n throw new Error('Missing component data');\n }\n const samplesPerLine = blocksPerLine << 3;\n const R = new Int32Array(64);\n const r = new Uint8Array(64);\n // A port of poppler's IDCT method which in turn is taken from:\n // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,\n // \"Practical Fast 1-D DCT Algorithms with 11 Multiplications\",\n // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,\n // 988-991.\n /**\n * @param {Int32Array} zz\n * @param {Uint8Array} dataOut\n * @param {Int32Array} dataIn\n */\n function quantizeAndInverse(zz, dataOut, dataIn) {\n const qt = component.quantizationTable;\n if (!qt) {\n throw new Error('No quantization table found');\n }\n let v0;\n let v1;\n let v2;\n let v3;\n let v4;\n let v5;\n let v6;\n let v7;\n let t;\n const p = dataIn;\n let i;\n // dequant\n for (i = 0; i < 64; i++) {\n p[i] = zz[i] * qt[i];\n }\n // inverse DCT on rows\n for (i = 0; i < 8; ++i) {\n const row = 8 * i;\n // check for all-zero AC coefficients\n if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0\n && p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0\n && p[7 + row] === 0) {\n t = ((dctSqrt2 * p[0 + row]) + 512) >> 10;\n p[0 + row] = t;\n p[1 + row] = t;\n p[2 + row] = t;\n p[3 + row] = t;\n p[4 + row] = t;\n p[5 + row] = t;\n p[6 + row] = t;\n p[7 + row] = t;\n continue; // eslint-disable-line no-continue\n }\n // stage 4\n v0 = ((dctSqrt2 * p[0 + row]) + 128) >> 8;\n v1 = ((dctSqrt2 * p[4 + row]) + 128) >> 8;\n v2 = p[2 + row];\n v3 = p[6 + row];\n v4 = ((dctSqrt1d2 * (p[1 + row] - p[7 + row])) + 128) >> 8;\n v7 = ((dctSqrt1d2 * (p[1 + row] + p[7 + row])) + 128) >> 8;\n v5 = p[3 + row] << 4;\n v6 = p[5 + row] << 4;\n // stage 3\n t = (v0 - v1 + 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 128) >> 8;\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 128) >> 8;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n v7 = t;\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n v6 = t;\n // stage 1\n p[0 + row] = v0 + v7;\n p[7 + row] = v0 - v7;\n p[1 + row] = v1 + v6;\n p[6 + row] = v1 - v6;\n p[2 + row] = v2 + v5;\n p[5 + row] = v2 - v5;\n p[3 + row] = v3 + v4;\n p[4 + row] = v3 - v4;\n }\n // inverse DCT on columns\n for (i = 0; i < 8; ++i) {\n const col = i;\n // check for all-zero AC coefficients\n if (p[(1 * 8) + col] === 0 && p[(2 * 8) + col] === 0 && p[(3 * 8) + col] === 0\n && p[(4 * 8) + col] === 0 && p[(5 * 8) + col] === 0 && p[(6 * 8) + col] === 0\n && p[(7 * 8) + col] === 0) {\n t = ((dctSqrt2 * dataIn[i + 0]) + 8192) >> 14;\n p[(0 * 8) + col] = t;\n p[(1 * 8) + col] = t;\n p[(2 * 8) + col] = t;\n p[(3 * 8) + col] = t;\n p[(4 * 8) + col] = t;\n p[(5 * 8) + col] = t;\n p[(6 * 8) + col] = t;\n p[(7 * 8) + col] = t;\n continue; // eslint-disable-line no-continue\n }\n // stage 4\n v0 = ((dctSqrt2 * p[(0 * 8) + col]) + 2048) >> 12;\n v1 = ((dctSqrt2 * p[(4 * 8) + col]) + 2048) >> 12;\n v2 = p[(2 * 8) + col];\n v3 = p[(6 * 8) + col];\n v4 = ((dctSqrt1d2 * (p[(1 * 8) + col] - p[(7 * 8) + col])) + 2048) >> 12;\n v7 = ((dctSqrt1d2 * (p[(1 * 8) + col] + p[(7 * 8) + col])) + 2048) >> 12;\n v5 = p[(3 * 8) + col];\n v6 = p[(5 * 8) + col];\n // stage 3\n t = (v0 - v1 + 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 2048) >> 12;\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 2048) >> 12;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n v7 = t;\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n v6 = t;\n // stage 1\n p[(0 * 8) + col] = v0 + v7;\n p[(7 * 8) + col] = v0 - v7;\n p[(1 * 8) + col] = v1 + v6;\n p[(6 * 8) + col] = v1 - v6;\n p[(2 * 8) + col] = v2 + v5;\n p[(5 * 8) + col] = v2 - v5;\n p[(3 * 8) + col] = v3 + v4;\n p[(4 * 8) + col] = v3 - v4;\n }\n // convert to 8-bit integers\n for (i = 0; i < 64; ++i) {\n const sample = 128 + ((p[i] + 8) >> 4);\n if (sample < 0) {\n dataOut[i] = 0;\n }\n else if (sample > 0XFF) {\n dataOut[i] = 0xFF;\n }\n else {\n dataOut[i] = sample;\n }\n }\n }\n for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) {\n const scanLine = blockRow << 3;\n for (let i = 0; i < 8; i++) {\n lines.push(new Uint8Array(samplesPerLine));\n }\n for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) {\n quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);\n let offset = 0;\n const sample = blockCol << 3;\n for (let j = 0; j < 8; j++) {\n const line = lines[scanLine + j];\n for (let i = 0; i < 8; i++) {\n line[sample + i] = r[offset++];\n }\n }\n }\n }\n return lines;\n}\nclass JpegStreamReader {\n constructor() {\n this.jfif = null;\n this.adobe = null;\n /** @type {number} */\n this.resetInterval = 0;\n /** @type {Int32Array[]} */\n this.quantizationTables = [];\n /** @type {HuffmanNode[]} */\n this.huffmanTablesAC = [];\n /** @type {HuffmanNode[]} */\n this.huffmanTablesDC = [];\n /** @type {JpegFrame[]} */\n this.frames = [];\n }\n resetFrames() {\n this.frames = [];\n }\n /** @param {Uint8Array} data */\n parse(data) {\n let offset = 0;\n // const { length } = data;\n function readUint16() {\n const value = (data[offset] << 8) | data[offset + 1];\n offset += 2;\n return value;\n }\n function readDataBlock() {\n const length = readUint16();\n const array = data.subarray(offset, offset + length - 2);\n offset += array.length;\n return array;\n }\n /** @param {JpegFrame} frame */\n function prepareComponents(frame) {\n let maxH = 0;\n let maxV = 0;\n let component;\n let componentId;\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n if (maxH < component.h) {\n maxH = component.h;\n }\n if (maxV < component.v) {\n maxV = component.v;\n }\n }\n }\n const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);\n const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);\n const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);\n const blocksPerLineForMcu = mcusPerLine * component.h;\n const blocksPerColumnForMcu = mcusPerColumn * component.v;\n const blocks = [];\n for (let i = 0; i < blocksPerColumnForMcu; i++) {\n const row = [];\n for (let j = 0; j < blocksPerLineForMcu; j++) {\n row.push(new Int32Array(64));\n }\n blocks.push(row);\n }\n component.blocksPerLine = blocksPerLine;\n component.blocksPerColumn = blocksPerColumn;\n component.blocks = blocks;\n }\n }\n frame.maxH = maxH;\n frame.maxV = maxV;\n frame.mcusPerLine = mcusPerLine;\n frame.mcusPerColumn = mcusPerColumn;\n }\n let fileMarker = readUint16();\n if (fileMarker !== 0xFFD8) { // SOI (Start of Image)\n throw new Error('SOI not found');\n }\n fileMarker = readUint16();\n while (fileMarker !== 0xFFD9) { // EOI (End of image)\n switch (fileMarker) {\n case 0xFF00: break;\n case 0xFFE0: // APP0 (Application Specific)\n case 0xFFE1: // APP1\n case 0xFFE2: // APP2\n case 0xFFE3: // APP3\n case 0xFFE4: // APP4\n case 0xFFE5: // APP5\n case 0xFFE6: // APP6\n case 0xFFE7: // APP7\n case 0xFFE8: // APP8\n case 0xFFE9: // APP9\n case 0xFFEA: // APP10\n case 0xFFEB: // APP11\n case 0xFFEC: // APP12\n case 0xFFED: // APP13\n case 0xFFEE: // APP14\n case 0xFFEF: // APP15\n case 0xFFFE: { // COM (Comment)\n const appData = readDataBlock();\n if (fileMarker === 0xFFE0) {\n if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49\n && appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\\x00'\n this.jfif = {\n version: { major: appData[5], minor: appData[6] },\n densityUnits: appData[7],\n xDensity: (appData[8] << 8) | appData[9],\n yDensity: (appData[10] << 8) | appData[11],\n thumbWidth: appData[12],\n thumbHeight: appData[13],\n thumbData: appData.subarray(14, 14 + (3 * appData[12] * appData[13])),\n };\n }\n }\n // TODO APP1 - Exif\n if (fileMarker === 0xFFEE) {\n if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F\n && appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\\x00'\n this.adobe = {\n version: appData[6],\n flags0: (appData[7] << 8) | appData[8],\n flags1: (appData[9] << 8) | appData[10],\n transformCode: appData[11],\n };\n }\n }\n break;\n }\n case 0xFFDB: { // DQT (Define Quantization Tables)\n const quantizationTablesLength = readUint16();\n const quantizationTablesEnd = quantizationTablesLength + offset - 2;\n while (offset < quantizationTablesEnd) {\n const quantizationTableSpec = data[offset++];\n const tableData = new Int32Array(64);\n if ((quantizationTableSpec >> 4) === 0) { // 8 bit values\n for (let j = 0; j < 64; j++) {\n const z = dctZigZag[j];\n tableData[z] = data[offset++];\n }\n }\n else if ((quantizationTableSpec >> 4) === 1) { // 16 bit\n for (let j = 0; j < 64; j++) {\n const z = dctZigZag[j];\n tableData[z] = readUint16();\n }\n }\n else {\n throw new Error('DQT: invalid table spec');\n }\n this.quantizationTables[quantizationTableSpec & 15] = tableData;\n }\n break;\n }\n case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)\n case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)\n case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT)\n readUint16(); // skip data length\n /** @type {JpegFrame} */\n const frame = {\n extended: (fileMarker === 0xFFC1),\n progressive: (fileMarker === 0xFFC2),\n precision: data[offset++],\n scanLines: readUint16(),\n samplesPerLine: readUint16(),\n /** @type {Object.<string, JpegComponent>} */\n components: {},\n /** @type {number[]} */\n componentsOrder: [],\n maxH: 0,\n maxV: 0,\n mcusPerLine: 0,\n mcusPerColumn: 0,\n };\n const componentsCount = data[offset++];\n let componentId;\n // let maxH = 0;\n // let maxV = 0;\n for (let i = 0; i < componentsCount; i++) {\n componentId = data[offset];\n const h = data[offset + 1] >> 4;\n const v = data[offset + 1] & 15;\n const qId = data[offset + 2];\n frame.componentsOrder.push(componentId);\n frame.components[componentId] = {\n h,\n v,\n quantizationIdx: qId,\n blocksPerLine: 0,\n blocksPerColumn: 0,\n blocks: [],\n };\n offset += 3;\n }\n prepareComponents(frame);\n this.frames.push(frame);\n break;\n }\n case 0xFFC4: { // DHT (Define Huffman Tables)\n const huffmanLength = readUint16();\n for (let i = 2; i < huffmanLength;) {\n const huffmanTableSpec = data[offset++];\n const codeLengths = new Uint8Array(16);\n let codeLengthSum = 0;\n for (let j = 0; j < 16; j++, offset++) {\n codeLengths[j] = data[offset];\n codeLengthSum += codeLengths[j];\n }\n const huffmanValues = new Uint8Array(codeLengthSum);\n for (let j = 0; j < codeLengthSum; j++, offset++) {\n huffmanValues[j] = data[offset];\n }\n i += 17 + codeLengthSum;\n if ((huffmanTableSpec >> 4) === 0) {\n this.huffmanTablesDC[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues);\n }\n else {\n this.huffmanTablesAC[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues);\n }\n }\n break;\n }\n case 0xFFDD: // DRI (Define Restart Interval)\n readUint16(); // skip data length\n this.resetInterval = readUint16();\n break;\n case 0xFFDA: { // SOS (Start of Scan)\n readUint16(); // skip length\n const selectorsCount = data[offset++];\n const components = [];\n const frame = this.frames[0];\n for (let i = 0; i < selectorsCount; i++) {\n const component = frame.components[data[offset++]];\n const tableSpec = data[offset++];\n component.huffmanTableDC = this.huffmanTablesDC[tableSpec >> 4];\n component.huffmanTableAC = this.huffmanTablesAC[tableSpec & 15];\n components.push(component);\n }\n const spectralStart = data[offset++];\n const spectralEnd = data[offset++];\n const successiveApproximation = data[offset++];\n const processed = decodeScan(data, offset, frame, components, this.resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15);\n offset += processed;\n break;\n }\n case 0xFFFF: // Fill bytes\n if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.\n offset--;\n }\n break;\n default:\n if (data[offset - 3] === 0xFF\n && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {\n // could be incorrect encoding -- last 0xFF byte of the previous\n // block was eaten by the encoder\n offset -= 3;\n break;\n }\n throw new Error(`unknown JPEG marker ${fileMarker.toString(16)}`);\n }\n fileMarker = readUint16();\n }\n }\n getResult() {\n const { frames } = this;\n if (this.frames.length === 0) {\n throw new Error('no frames were decoded');\n }\n else if (this.frames.length > 1) {\n console.warn('more than one frame is not supported');\n }\n // set each frame's components quantization table\n for (let i = 0; i < this.frames.length; i++) {\n const cp = this.frames[i].components;\n for (const j of Object.keys(cp)) {\n const qIdx = cp[j].quantizationIdx;\n if (typeof qIdx === 'number') {\n cp[j].quantizationTable = this.quantizationTables[qIdx];\n delete cp[j].quantizationIdx;\n }\n }\n }\n const frame = frames[0];\n if (!frame.maxH || !frame.maxV) {\n throw new Error('Invalid frame dimensions');\n }\n const { components, componentsOrder } = frame;\n const outComponents = [];\n const width = frame.samplesPerLine;\n const height = frame.scanLines;\n for (let i = 0; i < componentsOrder.length; i++) {\n const component = components[componentsOrder[i]];\n outComponents.push({\n lines: buildComponentData(component),\n scaleX: component.h / frame.maxH,\n scaleY: component.v / frame.maxV,\n });\n }\n const out = new Uint8Array(width * height * outComponents.length);\n let oi = 0;\n for (let y = 0; y < height; ++y) {\n for (let x = 0; x < width; ++x) {\n for (let i = 0; i < outComponents.length; ++i) {\n const component = outComponents[i];\n out[oi] = component.lines[0 | y * component.scaleY][0 | x * component.scaleX];\n ++oi;\n }\n }\n }\n return out;\n }\n}\nexport default class JpegDecoder extends BaseDecoder {\n /**\n * @param {import('./basedecoder.js').BaseDecoderParameters & { JPEGTables?: Uint8Array }} parameters\n */\n constructor(parameters) {\n super(parameters);\n this.reader = new JpegStreamReader();\n if (parameters.JPEGTables) {\n this.reader.parse(parameters.JPEGTables);\n }\n }\n /** @param {ArrayBuffer} buffer */\n decodeBlock(buffer) {\n this.reader.resetFrames();\n this.reader.parse(new Uint8Array(buffer));\n return this.reader.getResult().buffer;\n }\n}\n//# sourceMappingURL=jpeg.js.map"],"x_google_ignoreList":[0],"mappings":";;AAsBA,IAAM,IAAY,IAAI,WAAW;CAC7B;CACA;CAAG;CACH;CAAI;CAAG;CACP;CAAG;CAAI;CAAI;CACX;CAAI;CAAI;CAAI;CAAI;CAChB;CAAG;CAAI;CAAI;CAAI;CAAI;CACnB;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CACxB;CAAG;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAC3B;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CACxB;CAAI;CAAI;CAAI;CAAI;CAAI;CACpB;CAAI;CAAI;CAAI;CAAI;CAChB;CAAI;CAAI;CAAI;CACZ;CAAI;CAAI;CACR;CAAI;CACJ;CACH,CAAC,EACI,IAAU,MACV,IAAU,KACV,IA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M,IAArB,cAAyC,EAAY;CAIjD,YAAY,GAAY;AAGpB,EAFA,MAAM,EAAW,EACjB,KAAK,SAAS,IAAI,GAAkB,EAChC,EAAW,cACX,KAAK,OAAO,MAAM,EAAW,WAAW;;CAIhD,YAAY,GAAQ;AAGhB,SAFA,KAAK,OAAO,aAAa,EACzB,KAAK,OAAO,MAAM,IAAI,WAAW,EAAO,CAAC,EAClC,KAAK,OAAO,WAAW,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as e, n as t, r as n, u as r } from "./globals-QF85DtAk.js";
|
|
2
|
-
import { t as i } from "./basedecoder-
|
|
3
|
-
import { t as a } from "./pako.esm-
|
|
2
|
+
import { t as i } from "./basedecoder-B2p-79Pg.js";
|
|
3
|
+
import { t as a } from "./pako.esm-x6ItERqe.js";
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region node_modules/zstddec/dist/zstddec.modern.js
|
|
5
|
+
//#region ../node_modules/zstddec/dist/zstddec.modern.js
|
|
6
6
|
var o = /* @__PURE__ */ e((/* @__PURE__ */ r(((e, t) => {
|
|
7
7
|
(function() {
|
|
8
8
|
var e = (function() {
|
|
@@ -755,4 +755,4 @@ var o = /* @__PURE__ */ e((/* @__PURE__ */ r(((e, t) => {
|
|
|
755
755
|
//#endregion
|
|
756
756
|
export { m as default, p as zstd };
|
|
757
757
|
|
|
758
|
-
//# sourceMappingURL=lerc-
|
|
758
|
+
//# sourceMappingURL=lerc-B8cSax8j.js.map
|