diff --git a/README.md b/README.md index 7ebf64305..18ccfc0d6 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,19 @@ Below are examples and a quickstart guide. See the [developer documentation](ht # Examples -***[Alignments](https://igv.org/web/release/3.0.3/examples/cram-vcf.html)*** +***[Alignments](https://igv.org/web/release/3.0.8/examples/cram-vcf.html)*** -***[Interactions](https://igv.org/web/release/3.0.3/examples/interact.html)*** +***[Interactions](https://igv.org/web/release/3.0.8/examples/interact.html)*** -***[Copy number](https://igv.org/web/release/3.0.3/examples/copyNumber.html)*** +***[Copy number](https://igv.org/web/release/3.0.8/examples/copyNumber.html)*** -***[Multiple regions](https://igv.org/web/release/3.0.3/examples/multi-locus.html)*** +***[Multiple regions](https://igv.org/web/release/3.0.8/examples/multi-locus.html)*** -***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.0.3/examples/maf-tcga.html)*** +***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.0.8/examples/maf-tcga.html)*** -***[Variant color options](https://igv.org/web/release/3.0.3/examples/variant-colors.html)*** +***[Variant color options](https://igv.org/web/release/3.0.8/examples/variant-colors.html)*** -***[More](https://igv.org/web/release/3.0.3/examples/)*** +***[More](https://igv.org/web/release/3.0.8/examples/)*** # Quickstart @@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [developer documentation](ht igv.js consists of a single javascript file with no external dependencies. Pre-built files for script include, AMD, or CJS module systems (igv.min.js) and an ES6 module (igv.esm.min.js) -can be downloaded from [https://cdn.jsdelivr.net/npm/igv@3.0.3/dist/](https://cdn.jsdelivr.net/npm/igv@3.0.3/dist/). +can be downloaded from [https://cdn.jsdelivr.net/npm/igv@3.0.8/dist/](https://cdn.jsdelivr.net/npm/igv@3.0.8/dist/). To import igv as an ES6 module ```javascript -import igv from "https://cdn.jsdelivr.net/npm/igv@3.0.3/dist/igv.esm.min.js" +import igv from "https://cdn.jsdelivr.net/npm/igv@3.0.8/dist/igv.esm.min.js" ``` Or as a script include (defines the "igv" global) ```html - + ``` Alternatively you can install with npm @@ -91,7 +91,9 @@ a browser on a single alignment track opened at a specific locus: }) ``` -For more details see the [Wiki](https://github.com/igvteam/igv.js/wiki) for full documentation of the API. +## Documentation + +Full documentation of the igv.js API is available at [https://igv.org/doc/igvjs/](https://igv.org/doc/igvjs/). ## Development diff --git a/css/_igv-ui-generic-dialog-container.scss b/css/_igv-ui-generic-dialog-container.scss index 665eafcf6..772c38ffd 100644 --- a/css/_igv-ui-generic-dialog-container.scss +++ b/css/_igv-ui-generic-dialog-container.scss @@ -72,7 +72,6 @@ color: $igv-dark-grey-color; width: 95%; - height: 24px; line-height: 24px; text-align: left; diff --git a/css/igv.css b/css/igv.css index fad7d42ea..23d16dc47 100644 --- a/css/igv.css +++ b/css/igv.css @@ -296,7 +296,6 @@ .igv-ui-generic-dialog-container .igv-ui-generic-dialog-one-liner { color: #373737; width: 95%; - height: 24px; line-height: 24px; text-align: left; margin-top: 8px; diff --git a/dev/alignment/bam.html b/dev/alignment/bam.html index 6a16bbeb8..643687afc 100644 --- a/dev/alignment/bam.html +++ b/dev/alignment/bam.html @@ -21,35 +21,26 @@

const config = { - "version": "3.0.2", - "showSampleNames": false, - "reference": { - "id": "mm39", - "name": "Mouse (GRCm39/mm39)", - "fastaURL": "https://s3.amazonaws.com/igv.org.genomes/mm39/mm39.fa", - "indexURL": "https://s3.amazonaws.com/igv.org.genomes/mm39/mm39.fa.fai", - "cytobandURL": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/database/cytoBandIdeo.txt.gz", - "aliasURL": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.chromAlias.txt", - "twoBitURL": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.2bit", - "chromSizesURL": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.chrom.sizes", - "chromosomeOrder": "chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chrX,chrY" - }, - "locus": "all", + "queryParametersSupported": true, + "genome": "hg19", + "locus": "chr1:155155389", "roi": [], "tracks": [ { - "type": "sequence", - "order": -9007199254740991 - }, -, - { - "name": "Refseq Genes", - "format": "refgene", - "url": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/database/ncbiRefSeq.txt.gz", - "indexed": false, - "order": 1000000, - "type": "annotation", - "height": 70 + "type": "alignment", + "url": "gs://genomics-public-data/platinum-genomes/bam/NA12878_S1.bam", + "indexURL": "gs://genomics-public-data/platinum-genomes/bam/NA12878_S1.bam.bai", + "name": "NA12878", + "format": "bam", + "sort": { + "chr": "chr1", + "position": 155155389, + "option": "BASE", + "direction": "ASC" + }, + groupBy: "strand", + height: 800, + filter: {mq: 30} } ] } diff --git a/dev/annotation/gff.html b/dev/annotation/gff.html index 6eff37306..7bbe7f5f1 100644 --- a/dev/annotation/gff.html +++ b/dev/annotation/gff.html @@ -23,8 +23,8 @@

gff and gtf files

reference: { "id": "hg38", "name": "Human (GRCh38/hg38)", - "fastaURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa", - "indexURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa.fai", + "fastaURL": "https://igv.org/genomes/data/hg38/hg38.fa", + "indexURL": "https://igv.org/genomes/data/hg38/hg38.fa.fai", //"twoBitURL": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit", }, locus: "chr8:127,736,541-127,736,692 chr1:155,186,114-155,186,153", diff --git a/dev/encode/bigwig.html b/dev/encode/bigwig.html index 97ea93202..9343f4e49 100644 --- a/dev/encode/bigwig.html +++ b/dev/encode/bigwig.html @@ -1,46 +1,24 @@ - - - - - Juicebox + IGV - - - - -
- + + diff --git a/dev/issues/issue_1643.html b/dev/issues/issue_1643.html deleted file mode 100644 index 1019f2dbf..000000000 --- a/dev/issues/issue_1643.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -
- - - \ No newline at end of file diff --git a/dev/sampleInfo/sampleInfoFileSession.html b/dev/sampleInfo/sampleInfoFileSession.html index 0dd82eabd..8b4626df6 100644 --- a/dev/sampleInfo/sampleInfoFileSession.html +++ b/dev/sampleInfo/sampleInfoFileSession.html @@ -33,17 +33,7 @@ { "version": "2.16.0", "showSampleNames": false, - "reference": { - "id": "hg38", - "name": "Human (GRCh38/hg38)", - "fastaURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa", - "indexURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa.fai", - "cytobandURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/hg38/cytoBandIdeo.txt.gz", - "aliasURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/hg38/hg38_alias.tab", - "chromSizesURL": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes", - "twoBitURL": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit", - "chromosomeOrder": "chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY" - }, + "genome": "hg38", "locus": "chr22:36,655,100-36,656,060", "roi": [], "tracks": [ diff --git a/dev/shoebox/bedToSampleInfo.cjs b/dev/shoebox/old/bedToSampleInfo.cjs similarity index 100% rename from dev/shoebox/bedToSampleInfo.cjs rename to dev/shoebox/old/bedToSampleInfo.cjs diff --git a/dev/shoebox/celltypeAnnotation.bed b/dev/shoebox/old/celltypeAnnotation.bed similarity index 100% rename from dev/shoebox/celltypeAnnotation.bed rename to dev/shoebox/old/celltypeAnnotation.bed diff --git a/dev/shoebox/sampleInfo.txt b/dev/shoebox/old/sampleInfo.txt similarity index 100% rename from dev/shoebox/sampleInfo.txt rename to dev/shoebox/old/sampleInfo.txt diff --git a/dev/shoebox/old/session.json b/dev/shoebox/old/session.json new file mode 100644 index 000000000..6c79c0ddc --- /dev/null +++ b/dev/shoebox/old/session.json @@ -0,0 +1,27 @@ +{ + "version": "2.16.0", + "showSampleNames": false, + "sampleNameViewportWidth": 6, + "genome": "hg38", + "locus": "chr6:152,971,612-152,992,127", + "roi": [], + "sampleinfo": [ + { + "type": "sampleinfo", + "url": "https://www.dropbox.com/s/oeg6y37mvyfjif3/sampleInfo.txt?dl=0" + } + ], + "tracks": [ + { + "url": "https://www.dropbox.com/scl/fi/9begjuwqq1kwhcbtnrioq/model2.allChr.f.2.hg38.r10-Yan-Hu.hic?rlkey=n94vc1qvlsn19fjocki9ereff&dl=0", + "filename": "model2.allChr.f.2.hg38.r10-Yan-Hu.hic", + "name": "m", + "order": 0, + "format": "hic", + "type": "shoebox", + "displayMode": "SQUISHED", + "height": 500, + "visibilityWindow": 1000000 + } + ] +} \ No newline at end of file diff --git a/dev/shoebox/old/shoebox.html b/dev/shoebox/old/shoebox.html new file mode 100644 index 000000000..6887386dd --- /dev/null +++ b/dev/shoebox/old/shoebox.html @@ -0,0 +1,44 @@ + + + + + Seg Big + + + + + +

Shoebox

+ + +
+ + + + + + + + + + + + diff --git a/dev/shoebox/shoebox.html b/dev/shoebox/shoebox.html index 3f49a0df2..7640860ff 100644 --- a/dev/shoebox/shoebox.html +++ b/dev/shoebox/shoebox.html @@ -10,6 +10,8 @@

Shoebox

+ +
@@ -19,31 +21,73 @@

Shoebox

var options = { - sampleNameViewportWidth: 20, + sampleNameViewportWidth: 6, genome: "hg38", - locus: "chr20:56,411,666-56,428,625", + locus: "chr1:1,001,575-1,002,408", tracks: [ { - "type": "shoebox", - "url": "https://www.dropbox.com/s/qxpnqfvbiqs0eyz/model1.allChr.f.2.hg38.r10.hic?dl=0", - "name": "model1.allChr.f.2.hg38.r10.hic", - "colorScale": "9010,0,0,255", - //height: 500 + "url": "https://www.dropbox.com/scl/fi/ayu63q7raqi47yduvvte5/pseudobulk_0.bed.gz?rlkey=ci5oqo928iljje4igk4wwjoor&dl=0", + "indexURL": "https://www.dropbox.com/scl/fi/bxz53av4v0ri9snidxj8g/pseudobulk_0.bed.gz.tbi?rlkey=qvc7zk8si0ays89cqjp05fdw9&dl=0", + // visibilityWindow: 10000 + // "name": "pseudobulk 14", + // "type": "shoebox", + // "format": "shoebox" }, { - "type": "sampleinfo", - "url": "sampleInfo.txt" - + "name": "Homo sapiens HepG2 H3K4me3 ", + "url": "https://www.encodeproject.org/files/ENCFF752OCZ/@@download/ENCFF752OCZ.bigWig", + "color": "rgb(0,150,0)", + "metadata": { + "Biosample": "Homo sapiens HepG2", + "AssayType": "ChIP-seq", + "Target": "H3K4me3 ", + "BioRep": "1", + "TechRep": "1_1", + "OutputType": "signal p-value", + "Format": "bigWig", + "Lab": "John Stamatoyannopoulos, UW", + "Accession": "ENCFF752OCZ", + "Experiment": "ENCSR000DUF" + }, + "format": "bigwig", + "type": "wig" + }, + { + "name": "Homo sapiens HepG2 CTCF ", + "url": "https://www.encodeproject.org/files/ENCFF160QOX/@@download/ENCFF160QOX.bigWig", + "metadata": { + "Biosample": "Homo sapiens HepG2", + "AssayType": "ChIP-seq", + "Target": "CTCF ", + "BioRep": "1", + "TechRep": "1_1", + "OutputType": "fold change over control", + "Format": "bigWig", + "Lab": "Richard Myers, HAIB", + "Accession": "ENCFF160QOX", + "Experiment": "ENCSR000BIE" + }, + "format": "bigwig", + "type": "wig" } ] } + var igvDiv = document.getElementById("igvDiv") igv.createBrowser(igvDiv, options) .then(function (browser) { console.log("Created IGV browser") - window.igvBrowser = browser + document.getElementById("log-state").addEventListener("click", () => console.log(browser.toJSON())) + + document.getElementById('bookmark').addEventListener('click', () => { + const path = window.location.href.slice() + const idx = path.indexOf("?") + const url = (idx > 0 ? path.substring(0, idx) : path) + "?sessionURL=blob:" + browser.compressedSession() + window.history.pushState({}, "IGV", url) + }) + }) diff --git a/dev/ucsc/simpleGenark.html b/dev/ucsc/simpleGenark.html new file mode 100644 index 000000000..9fa0f1f23 --- /dev/null +++ b/dev/ucsc/simpleGenark.html @@ -0,0 +1,17 @@ + + + + +
+ + + + + + diff --git a/dev/wig/groupAutoscale.html b/dev/wig/groupAutoscale.html index 85d9c4cf0..ffbc05c13 100644 --- a/dev/wig/groupAutoscale.html +++ b/dev/wig/groupAutoscale.html @@ -38,6 +38,7 @@

Test tracks

import igv from "../../js/index.js"; const options = { + queryParametersSupported: true, "genome": "hg19", "locus": "myc egfr", "tracks": [ @@ -94,7 +95,12 @@

Test tracks

}) document.getElementById("bookmarkButton").addEventListener("click", - () => window.history.pushState({}, "IGV", browser.sessionURL())) + () => { + const path = window.location.href.slice() + const idx = path.indexOf("?") + const url = (idx > 0 ? path.substring(0, idx) : path) + "?sessionURL=blob:" + browser.compressedSession() + window.history.pushState({}, "IGV", url) + }) document.getElementById("svgButton").addEventListener("click", () => { let svg = browser.toSVG(); diff --git a/examples/genark.html b/examples/genark.html new file mode 100644 index 000000000..8430e7140 --- /dev/null +++ b/examples/genark.html @@ -0,0 +1,26 @@ + + + + +

UCSC Genark Example

+ +

Example of specifying a genome hosted at the UCSC + Genark assembly hub. For a complete list of available assemblies see the + hub assembly list. +

+ +
+ + + + + + diff --git a/js/bam/alignmentTrack.js b/js/bam/alignmentTrack.js index 90ef28273..752d8eb5a 100644 --- a/js/bam/alignmentTrack.js +++ b/js/bam/alignmentTrack.js @@ -304,6 +304,7 @@ class AlignmentTrack extends TrackBase { if (this.groupBy && groupName) { ctx.save() + ctx.font = '400 12px sans-serif' const textMetrics = ctx.measureText(groupName) const w = textMetrics.width + 10 @@ -314,14 +315,10 @@ class AlignmentTrack extends TrackBase { ctx.textAlign = "center" ctx.fillStyle = 'white' ctx.strokeStyle = 'lightGray' - ctx.beginPath() - ctx.roundRect(x, baselineY - textMetrics.actualBoundingBoxAscent - 5, w, h, 2) - ctx.fill() - ctx.stroke() + IGVGraphics.roundRect(ctx, x, baselineY - textMetrics.actualBoundingBoxAscent - 5, w, h, 2, 1, 1) ctx.fillStyle = 'black' ctx.fillText(groupName, x + w / 2, baselineY) - IGVGraphics.dashedLine(ctx, 0, alignmentY, pixelWidth, alignmentY) ctx.restore() @@ -1229,7 +1226,7 @@ class AlignmentTrack extends TrackBase { const y = clickState.y const offsetY = y - this.top const genomicLocation = clickState.genomicLocation - + if(features.packedGroups) { let minGroupY = Number.MAX_VALUE for (let group of features.packedGroups.values()) { diff --git a/js/bam/bamAlignment.js b/js/bam/bamAlignment.js index a28d2cca8..3892ccaa9 100644 --- a/js/bam/bamAlignment.js +++ b/js/bam/bamAlignment.js @@ -102,14 +102,6 @@ class BamAlignment { } tags() { - if (!this.tagDict) { - if (this.tagBA) { - this.tagDict = decodeTags(this.tagBA) - this.tagBA = undefined - } else { - this.tagDict = {} // Mark so we don't try again. The record has no tags - } - } return this.tagDict } @@ -341,7 +333,7 @@ class BamAlignment { } getBaseModificationSets() { - this.tags() + if (!this.baseModificationSets && (this.tagDict["MM"] || this.tagDict["Mm"])) { const mm = this.tagDict["MM"] || this.tagDict["Mm"] diff --git a/js/bam/bamUtils.js b/js/bam/bamUtils.js index 605a39ade..92483600c 100644 --- a/js/bam/bamUtils.js +++ b/js/bam/bamUtils.js @@ -11,13 +11,22 @@ import BamFilter from "./bamFilter.js" * https://github.com/dasmoth/dalliance/blob/master/js/bam.js */ //=ACMGRSVTWYHKDBN +const BAM1_MAGIC_BYTES = new Uint8Array([0x42, 0x41, 0x4d, 0x01]) // BAM\1 +const BAM1_MAGIC_NUMBER = readInt(BAM1_MAGIC_BYTES, 0) + const SEQ_DECODER = ['=', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N'] const CIGAR_DECODER = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X', '?', '?', '?', '?', '?', '?', '?'] const READ_STRAND_FLAG = 0x10 const MATE_STRAND_FLAG = 0x20 - -const BAM1_MAGIC_BYTES = new Uint8Array([0x42, 0x41, 0x4d, 0x01]) // BAM\1 -const BAM1_MAGIC_NUMBER = readInt(BAM1_MAGIC_BYTES, 0) +const ELEMENT_SIZE = { + c: 1, + C: 1, + s: 2, + S: 2, + i: 4, + I: 4, + f: 4 +} const DEFAULT_ALLELE_FREQ_THRESHOLD = 0.2 const DEFAULT_SAMPLING_WINDOW_SIZE = 100 @@ -268,7 +277,9 @@ const BamUtils = { alignment.seq = seq alignment.qual = qualArray - alignment.tagBA = new Uint8Array(ba.buffer.slice(p, blockEnd)) // decode these on demand + + const tagBA = new Uint8Array(ba.buffer.slice(p, blockEnd)) + alignment.tagDict = decodeBamTags(tagBA) this.setPairOrientation(alignment) @@ -525,10 +536,6 @@ function readInt(ba, offset) { return (ba[offset + 3] << 24) | (ba[offset + 2] << 16) | (ba[offset + 1] << 8) | (ba[offset]) } -function readShort(ba, offset) { - return (ba[offset + 1] << 8) | (ba[offset]) -} - /** * Build a list of cigar operators from a cigarString. Removes padding operators and concatenates consecutive * operators of the same type @@ -583,6 +590,110 @@ function decodeSamTags(tags) { return tagDict } +/** + * Decode bam tags from the supplied UInt8Array + * + * A [!-~] Printable character + * i [-+]?[0-9]+ Signed integer16 + * f [-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)? Single-precision floating number + * Z [ !-~]* Printable string, including space + * H ([0-9A-F][0-9A-F])* Byte array in the Hex format17 + * B [cCsSiIf](,[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)* Integer or numeric array + * + * @param ba A byte array (UInt8Array) + * @returns {{}} Tag values + */ +function decodeBamTags(ba) { + + let p = 0 + const len = ba.length + const tags = {} + const dataView = new DataView(ba.buffer) + + while (p < len) { + const tag = String.fromCharCode(ba[p]) + String.fromCharCode(ba[p + 1]) + p += 2 + + const type = String.fromCharCode(ba[p++]) + let value + if (type === 'A') { + value = String.fromCharCode(ba[p]) + p++ + } else if (type === 'i' || type === 'I') { + value = dataView.getInt32(p, true) + p += 4 + } else if (type === 'c') { + value = dataView.getInt8(p, true) + p++ + } else if (type === 'C') { + value = dataView.getUint8(p, true) + p++ + } else if (type === 's' || type === 'S') { + value = dataView.getInt16(p, true) + p += 2 + } else if (type === 'f') { + value = dataView.getFloat32(p, true) + p += 4 + } else if (type === 'Z') { + value = '' + for (; ;) { + var cc = ba[p++] + if (cc === 0) { + break + } else { + value += String.fromCharCode(cc) + } + } + } else if (type === 'B') { + //‘cCsSiIf’, corresponding to int8 , uint8 t, int16 t, uint16 t, int32 t, uint32 t and float + const elementType = String.fromCharCode(ba[p++]) + let elementSize = ELEMENT_SIZE[elementType] + if (elementSize === undefined) { + tags[tag] = `Error: unknown element type '${elementType}'` + break + } + const numElements = dataView.getInt32(p, true) + p += 4 + const pEnd = p + numElements * elementSize + value = [] + + while (p < pEnd) { + switch (elementType) { + case 'c': + value.push(dataView.getInt8(p, true)) + break + case 'C': + value.push(dataView.getUint8(p, true)) + break + case 's': + value.push(dataView.getInt16(p, true)) + break + case 'S': + value.push(dataView.getUint16(p, true)) + break + case 'i': + value.push(dataView.getInt32(p, true)) + break + case 'I': + value.push(dataView.getUint32(p, true)) + break + case 'f': + value.push(dataView.getFloat32(p, true)) + } + p += elementSize + } + } else { + //'Unknown type ' + type; + value = 'Error unknown type: ' + type + tags[tag] = value + break + } + tags[tag] = value + } + return tags +} + + export default BamUtils diff --git a/js/bigwig/autosql_example.txt b/js/bigwig/autosql_example.txt new file mode 100644 index 000000000..a4c37289f --- /dev/null +++ b/js/bigwig/autosql_example.txt @@ -0,0 +1,35 @@ +table gencodeBGP +"GENCODE bigGenePred" + ( + string chrom; "Reference sequence chromosome or scaffold" + uint chromStart; "Start position in chromosome" + uint chromEnd; "End position in chromosome" + string name; "Ensembl ID" + uint score; "Score (0-1000)" + char[1] strand; "+ or - for strand" + uint thickStart; "Start of where display should be thick (start codon)" + uint thickEnd; "End of where display should be thick (stop codon)" + uint reserved; "RGB value (use R,G,B string in input file)" + int blockCount; "Number of blocks" + int[blockCount] blockSizes; "Comma separated list of block sizes" + int[blockCount] chromStarts; "Start positions relative to chromStart" + string name2; "UCSC Genes ID" + string cdsStartStat; "Status of CDS start annotation (none, unknown, incomplete, or complete)" + string cdsEndStat; "Status of CDS end annotation (none, unknown, incomplete, or complete)" + int[blockCount] exonFrames; "Exon frame {0,1,2}, or -1 if no frame for exon" + string type; "Transcript type" + string geneName; "Gene Symbol" + string geneName2; "UniProt display ID" + string geneType; "Gene type" + +# high level type of transcript (from gencodeAttrs)" + string transcriptClass; "Transcript Class" + string source; "Source of transcript (from gencodeTranscriptSource)" + string transcriptType; "BioType of transcript (from gencodeAttrs)" + string tag; "symbolic tags (from gencodeTags)" + string level; "support level, tsl1 is strongest support, tsl5 weakest, NA means not analyzed (from gencodeTranscriptionSupportLevel)" +# tier: all, basic, canonical + string tier; "Transcript Tier" + uint rank; "Transcript Rank" + ) + diff --git a/js/bigwig/bwReader.js b/js/bigwig/bwReader.js index 9f545d58a..00e653a42 100644 --- a/js/bigwig/bwReader.js +++ b/js/bigwig/bwReader.js @@ -57,8 +57,9 @@ class BWReader { new DataBuffer(BGZip.decodeDataURI(this.path).buffer) : igvxhr - if (config.searchTrix) { - this._trix = new Trix(`${config.searchTrix}x`, config.searchTrix) + const trixURL = config.trixURL || config.searchTrix + if (trixURL) { + this._trix = new Trix(`${trixURL}x`, trixURL) } } @@ -101,7 +102,7 @@ class BWReader { // Select a biwig "zoom level" appropriate for the current resolution. const zoomLevelHeaders = await this.getZoomHeaders() let zoomLevelHeader = bpPerPixel ? zoomLevelForScale(bpPerPixel, zoomLevelHeaders) : undefined - if (zoomLevelHeader) { + if (zoomLevelHeader && windowFunction != "none") { treeOffset = zoomLevelHeader.indexOffset decodeFunction = decodeZoomData } else { @@ -291,6 +292,16 @@ class BWReader { } } + /** + * The BB header consists of + * (1) the common header + * (2) the zoom headers + * (3) autosql + * (4) total summary block (version 2 and later) + * + * In addition, we read the chromomsome B+ tree + * @returns {Promise<*>} + */ async loadHeader() { if (this.header) { @@ -308,7 +319,7 @@ class BWReader { // Assume low-to-high unless proven otherwise this.littleEndian = true - let binaryParser = new BinaryParser(new DataView(data), this.littleEndian) + const binaryParser = new BinaryParser(new DataView(data), this.littleEndian) let magic = binaryParser.getUInt() if (magic === BIGWIG_MAGIC_LTH) { this.type = "bigwig" @@ -345,30 +356,33 @@ class BWReader { extensionOffset: binaryParser.getLong() } + // Read the next chunk containing zoom headers, autosql, and total summary if present. TotalSummary size = 40 bytes const startOffset = BBFILE_HEADER_SIZE + const size = header.totalSummaryOffset > 0 ? + header.totalSummaryOffset - startOffset + 40 : + Math.min(header.fullDataOffset, header.chromTreeOffset) - startOffset let range = { start: startOffset, - size: (header.fullDataOffset - startOffset + 4) + size: size } data = await this.loader.loadArrayBuffer(this.path, buildOptions(this.config, {range: range})) - - const nZooms = header.nZoomLevels - binaryParser = new BinaryParser(new DataView(data), this.littleEndian) + const extHeaderParser = new BinaryParser(new DataView(data), this.littleEndian) // Load zoom headers, store in order of decreasing reduction level (increasing resolution) + const nZooms = header.nZoomLevels this.zoomLevelHeaders = [] this.firstZoomDataOffset = Number.MAX_SAFE_INTEGER for (let i = 1; i <= nZooms; i++) { const zoomNumber = nZooms - i - const zlh = new ZoomLevelHeader(zoomNumber, binaryParser) + const zlh = new ZoomLevelHeader(zoomNumber, extHeaderParser) this.firstZoomDataOffset = Math.min(zlh.dataOffset, this.firstZoomDataOffset) this.zoomLevelHeaders[zoomNumber] = zlh } // Autosql if (header.autoSqlOffset > 0) { - binaryParser.position = header.autoSqlOffset - startOffset - const autoSqlString = binaryParser.getString() + extHeaderParser.position = header.autoSqlOffset - startOffset + const autoSqlString = extHeaderParser.getString() if (autoSqlString) { this.autoSql = parseAutoSQL(autoSqlString) } @@ -376,29 +390,23 @@ class BWReader { // Total summary if (header.totalSummaryOffset > 0) { - binaryParser.position = header.totalSummaryOffset - startOffset - this.totalSummary = new BWTotalSummary(binaryParser) + extHeaderParser.position = header.totalSummaryOffset - startOffset + this.totalSummary = new BWTotalSummary(extHeaderParser) } - // Chrom data index - if (header.chromTreeOffset > 0) { - binaryParser.position = header.chromTreeOffset - startOffset - this.chromTree = await ChromTree.parseTree(binaryParser, startOffset, this.genome) - this.chrNames = new Set(this.chromTree.idToName) - } else { - // TODO -- this is an error, not expected - throw "BigWig chromosome tree offset <= 0" - } - - //Finally total data count - binaryParser.position = header.fullDataOffset - startOffset - header.dataCount = binaryParser.getInt() + // Chrom data index. The start is known, size is not, but we can estimate it + const bufferSize = Math.min(200000, Math.max(10000, header.fullDataOffset - header.chromTreeOffset)) + this.chromTree = await this.#readChromTree(header.chromTreeOffset, bufferSize) + this.chrNames = new Set(this.chromTree.idToName) - this.featureDensity = header.dataCount / this.chromTree.sumLengths + // Estimate feature density from dataCount (bigbed only) + if("bigbed" === this.type) { + const dataCount = await this.#readDataCount(header.fullDataOffset) + this.featureDensity = dataCount / this.chromTree.sumLengths + } this.header = header - //extension if (header.extensionOffset > 0) { await this.loadExtendedHeader(header.extensionOffset) @@ -407,6 +415,50 @@ class BWReader { } } + async #readDataCount(offset) { + const data = await this.loader.loadArrayBuffer(this.path, buildOptions(this.config, { + range: { + start: offset, + size: 4 + } + })) + const binaryParser = new BinaryParser(new DataView(data), this.littleEndian) + return binaryParser.getInt() + } + + /** + * Used when the chromTreeOffset is > fullDataOffset, that is when the chrom tree is not in the initial chunk + * read for parsing the header. We know the start position, but not the total size of the chrom tree + * + * @returns {Promise} + */ + async #readChromTree(chromTreeOffset, bufferSize) { + + let size = bufferSize + const load = async () => { + const data = await this.loader.loadArrayBuffer(this.path, buildOptions(this.config, { + range: { + start: chromTreeOffset, + size: size + } + })) + const binaryParser = new BinaryParser(new DataView(data), this.littleEndian) + return ChromTree.parseTree(binaryParser, chromTreeOffset, this.genome) + } + + let error + while (size < 1000000) { + try { + const chromTree = await load() + return chromTree + } catch (e) { + error = e + size *= 2 + } + } + throw (error) + } + async loadExtendedHeader(offset) { let data = await this.loader.loadArrayBuffer(this.path, buildOptions(this.config, { diff --git a/js/bigwig/bwSource.js b/js/bigwig/bwSource.js index 4afeba93f..5cd809f3f 100755 --- a/js/bigwig/bwSource.js +++ b/js/bigwig/bwSource.js @@ -31,7 +31,7 @@ class BWSource extends BaseFeatureSource { queryable = true #wgValues = {} - windowFunctions = ["mean", "min", "max"] + windowFunctions = ["mean", "min", "max", "none"] constructor(config, genome) { super(genome) diff --git a/js/bigwig/chromTree.js b/js/bigwig/chromTree.js index 2fa631b78..cbb938303 100644 --- a/js/bigwig/chromTree.js +++ b/js/bigwig/chromTree.js @@ -32,7 +32,6 @@ export default class ChromTree { const idToName = [] let sumLengths = 0 const readTreeNode = (offset) => { - if (offset >= 0) binaryParser.position = offset const type = binaryParser.getByte() const reserved = binaryParser.getByte() @@ -69,7 +68,7 @@ export default class ChromTree { } // Recursively walk tree to populate dictionary - readTreeNode(binaryParser, -1) + readTreeNode( -1) return new ChromTree(header, nameToId, idToName, sumLengths) } diff --git a/js/binary.js b/js/binary.js index 9184b87a5..b540c87e0 100644 --- a/js/binary.js +++ b/js/binary.js @@ -34,6 +34,20 @@ class BinaryParser { this.length = dataView.byteLength } + /** + * Print the first "n" bytes to the console. Used for debugging. + * @param n + */ + dumpBytes (n = 100) { + const pos = this.position + const bytes = [] + for(let i=0; i<= n; i++) { + bytes.push(this.getByte()) + } + console.log(bytes.join(" ")) + this.setPosition(pos) + } + setPosition(position) { this.position = position } diff --git a/js/browser.js b/js/browser.js index 9b0551d42..be1484c61 100755 --- a/js/browser.js +++ b/js/browser.js @@ -1,8 +1,6 @@ import $ from "./vendor/jquery-3.3.1.slim.js" import {BGZip, FileUtils, igvxhr, StringUtils, URIUtils} from "../node_modules/igv-utils/src/index.js" import * as DOMUtils from "./ui/utils/dom-utils.js" -import {createIcon} from "./ui/utils/icons.js" -import SliderDialog from "./ui/components/sliderDialog.js" import InputDialog from "./ui/components/inputDialog.js" import GenericColorPicker from "./ui/components/genericColorPicker.js" import Alert from './ui/alert.js' @@ -20,19 +18,9 @@ import version from "./version.js" import FeatureSource from "./feature/featureSource.js" import {defaultNucleotideColors} from "./util/nucleotideColors.js" import search from "./search.js" -import {navbarDidResize} from "./responsiveNavbar.js" -import ChromosomeSelectWidget from "./ui/chromosomeSelectWidget.js" -import WindowSizePanel from "./windowSizePanel.js" -import CursorGuide from "./ui/cursorGuide.js" -import CursorGuideButton from "./ui/cursorGuideButton.js" -import CenterLineButton from './ui/centerLineButton.js' -import TrackLabelControl from "./ui/trackLabelControl.js" -import SampleNameControl from "./sample/sampleNameControl.js" -import SampleInfoControl from "./sample/sampleInfoControl.js" -import ZoomWidget from "./ui/zoomWidget.js" +import ResponsiveNavbar from "./responsiveNavbar.js" import DataRangeDialog from "./ui/dataRangeDialog.js" import HtsgetReader from "./htsget/htsgetReader.js" -import SaveImageControl from "./ui/saveImageControl.js" import MenuPopup from "./ui/menuPopup.js" import {viewportColumnManager} from './viewportColumnManager.js' import ViewportCenterLine from './ui/viewportCenterLine.js' @@ -40,16 +28,12 @@ import IdeogramTrack from "./ideogramTrack.js" import RulerTrack from "./rulerTrack.js" import CircularViewControl from "./ui/circularViewControl.js" import {createCircularView, makeCircViewChromosomes} from "./jbrowse/circularViewUtils.js" -import CustomButton from "./ui/customButton.js" import ROIManager from './roi/ROIManager.js' import TrackROISet from "./roi/trackROISet.js" -import ROITableControl from './roi/roiTableControl.js' import SampleInfo from "./sample/sampleInfo.js" import HicFile from "./hic/straw/hicFile.js" import {translateSession} from "./hic/shoeboxUtils.js" import Hub from "./ucsc/ucscHub.js" -import MultiTrackSelectButton from "./ui/multiTrackSelectButton.js" -import OverlayTrackButton from "./ui/overlayTrackButton.js" import MenuUtils from "./ui/menuUtils.js" import Genome from "./genome/genome.js" import {setDefaults} from "./igv-create.js" @@ -61,6 +45,22 @@ import {sampleInfoTileWidth, sampleInfoTileXShim} from "./sample/sampleInfoConst import QTLSelections from "./qtl/qtlSelections.js" import {inferFileFormat} from "./util/fileFormatUtils.js" import {convertToHubURL} from "./ucsc/ucscUtils.js" +import ChromosomeSelectWidget from "./ui/chromosomeSelectWidget.js" +import {createIcon} from "./ui/utils/icons.js" +import WindowSizePanel from "./windowSizePanel.js" +import OverlayTrackButton from "./ui/overlayTrackButton.js" +import MultiTrackSelectButton from "./ui/multiTrackSelectButton.js" +import CursorGuide from "./ui/cursorGuide.js" +import CursorGuideButton from "./ui/cursorGuideButton.js" +import CenterLineButton from "./ui/centerLineButton.js" +import TrackLabelControl from "./ui/trackLabelControl.js" +import ROITableControl from "./roi/roiTableControl.js" +import SampleInfoControl from "./sample/sampleInfoControl.js" +import SampleNameControl from "./sample/sampleNameControl.js" +import SaveImageControl from "./ui/saveImageControl.js" +import CustomButton from "./ui/customButton.js" +import ZoomWidget from "./ui/zoomWidget.js" +import SliderDialog from "./ui/components/sliderDialog.js" // css - $igv-scrollbar-outer-width: 14px; @@ -152,7 +152,6 @@ class Browser { this.sampleNameControl.setState(this.showSampleNames) this.sampleNameControl.hide() - this.layoutChange() } }) @@ -171,7 +170,7 @@ class Browser { this.sampleInfo = new SampleInfo(this) - this.setControls(config) + this.createStandardControls(config) // Region of interest this.roiManager = new ROIManager(this) @@ -229,121 +228,18 @@ class Browser { } } - setControls(config) { - - const $navBar = this.createStandardControls(config) - $navBar.insertBefore($(this.columnContainer)) - this.$navigation = $navBar - - if (false === config.showControls) { - $navBar.hide() - } - - } - createStandardControls(config) { - const $navBar = $('
', {class: 'igv-navbar'}) - this.$navigation = $navBar - - const $navbarLeftContainer = $('
', {class: 'igv-navbar-left-container'}) - $navBar.append($navbarLeftContainer) - - // IGV logo - const $logo = $('
', {class: 'igv-logo'}) - $navbarLeftContainer.append($logo) - - const logoSvg = logo() - logoSvg.css("width", "34px") - logoSvg.css("height", "32px") - $logo.append(logoSvg) - - this.$current_genome = $('
', {class: 'igv-current-genome'}) - $navbarLeftContainer.append(this.$current_genome) - this.$current_genome.text('') - - const $genomicLocation = $('
', {class: 'igv-navbar-genomic-location'}) - $navbarLeftContainer.append($genomicLocation) - - // chromosome select widget - this.chromosomeSelectWidget = new ChromosomeSelectWidget(this, $genomicLocation.get(0)) - if (config.showChromosomeWidget !== false) { - this.chromosomeSelectWidget.show() - } else { - this.chromosomeSelectWidget.hide() - } - - const $locusSizeGroup = $('
', {class: 'igv-locus-size-group'}) - $genomicLocation.append($locusSizeGroup) - - const $searchContainer = $('
', {class: 'igv-search-container'}) - $locusSizeGroup.append($searchContainer) - - // browser.$searchInput = $(''); - this.$searchInput = $('', {class: 'igv-search-input', type: 'text', placeholder: 'Locus Search'}) - $searchContainer.append(this.$searchInput) - // Stop event propagation to prevent feature track keyboard navigation - this.$searchInput[0].addEventListener('keyup', (event) => { - event.stopImmediatePropagation() - }) - - this.$searchInput.change(() => this.doSearch(this.$searchInput.val())) - - const searchIconContainer = DOMUtils.div({class: 'igv-search-icon-container'}) - $searchContainer.append($(searchIconContainer)) - - searchIconContainer.appendChild(createIcon("search")) - - searchIconContainer.addEventListener('click', () => this.doSearch(this.$searchInput.val())) - - this.windowSizePanel = new WindowSizePanel($locusSizeGroup.get(0), this) - - const $navbarRightContainer = $('
', {class: 'igv-navbar-right-container'}) - $navBar.append($navbarRightContainer) - - const $toggle_button_container = $('
') - $navbarRightContainer.append($toggle_button_container) - this.$toggle_button_container = $toggle_button_container - - this.overlayTrackButton = new OverlayTrackButton(this, $toggle_button_container.get(0)) - this.overlayTrackButton.setVisibility(false) - - this.multiTrackSelectButton = new MultiTrackSelectButton(this, $toggle_button_container.get(0)) - - this.cursorGuide = new CursorGuide(this.columnContainer, this) - - this.cursorGuideButton = new CursorGuideButton(this, $toggle_button_container.get(0)) - - this.centerLineButton = new CenterLineButton(this, $toggle_button_container.get(0)) - this.setTrackLabelVisibility(config.showTrackLabels) - this.trackLabelControl = new TrackLabelControl($toggle_button_container.get(0), this) - - // ROI Control - this.roiTableControl = new ROITableControl($toggle_button_container.get(0), this) - - this.sampleInfoControl = new SampleInfoControl($toggle_button_container.get(0), this) - - this.sampleNameControl = new SampleNameControl($toggle_button_container.get(0), this) - if (true === config.showSVGButton) { - this.saveImageControl = new SaveImageControl($toggle_button_container.get(0), this) - } - - if (config.customButtons) { - for (let b of config.customButtons) { - new CustomButton($toggle_button_container.get(0), this, b) - } - } + this.navbar = new ResponsiveNavbar(config, this) - this.zoomWidget = new ZoomWidget(this, $navbarRightContainer.get(0)) + this.navbar.$navigation.insertBefore($(this.columnContainer)) - if (false === config.showNavigation) { - this.$navigation.hide() + if (false === config.showControls) { + this.navbar.hide() } - - this.sliderDialog = new SliderDialog(this.root) - this.sliderDialog.container.id = `igv-slider-dialog-${DOMUtils.guid()}` + this.cursorGuide = new CursorGuide(this.columnContainer, this) this.inputDialog = new InputDialog(this.root) this.inputDialog.container.id = `igv-input-dialog-${DOMUtils.guid()}` @@ -354,7 +250,8 @@ class Browser { this.genericColorPicker = new GenericColorPicker({parent: this.columnContainer, width: 432}) this.genericColorPicker.container.id = `igv-track-color-picker-${DOMUtils.guid()}` - return $navBar + this.sliderDialog = new SliderDialog(this.root) + this.sliderDialog.container.id = `igv-slider-dialog-${DOMUtils.guid()}` } @@ -585,10 +482,10 @@ class Browser { session = await translateSession(session) } - this.sampleInfoControl.setButtonVisibility(false) + this.navbar.sampleInfoControl.setButtonVisibility(false) this.showSampleNames = session.showSampleNames || false - this.sampleNameControl.setState(this.showSampleNames === true) + this.navbar.sampleNameControl.setState(this.showSampleNames === true) if (session.sampleNameViewportWidth) { this.sampleNameViewportWidth = session.sampleNameViewportWidth @@ -708,9 +605,9 @@ class Browser { await rtv.updateViews() } - // If any tracks are selected show the selectino buttons + // If any tracks are selected show the selection buttons if (this.trackViews.some(tv => tv.track.selected)) { - this.multiTrackSelectButton.setMultiTrackSelection(true) + this.navbar.setEnableTrackSelection(true) } this.updateUIWithReferenceFrameList() @@ -751,7 +648,8 @@ class Browser { this.removeAllTracks() // Do this first, before new genome is set this.roiManager.clearROIs() - this.multiTrackSelectButton.setMultiTrackSelection(false) + + this.navbar.setEnableTrackSelection(false) let genome if (genomeConfig.gbkURL) { @@ -764,8 +662,7 @@ class Browser { this.genome = genome - this.updateNavbarDOMWithGenome(genome) - + this.navbar.updateGenome(genome) let locus = initialLocus || genome.initialLocus if (Array.isArray(locus)) { @@ -796,26 +693,6 @@ class Browser { } } - updateNavbarDOMWithGenome(genome) { - let genomeLabel = (genome.id && genome.id.length < 20 ? genome.id : `${genome.id.substring(0, 8)}...${genome.id.substring(genome.id.length - 8)}`) - this.$current_genome.text(genomeLabel) - this.$current_genome.attr('title', genome.description) - - // chromosome select widget -- Show this IFF its not explicitly hidden AND the genome has pre-loaded chromosomes - const showChromosomeWidget = - this.config.showChromosomeWidget !== false && - this.genome.showChromosomeWidget !== false && - genome.chromosomeNames && - genome.chromosomeNames.length > 1 - - if (showChromosomeWidget) { - this.chromosomeSelectWidget.update(genome) - this.chromosomeSelectWidget.show() - } else { - this.chromosomeSelectWidget.hide() - } - } - /** * Load a genome, defined by a string ID or a json-like configuration object. This includes a fasta reference * as well as optional cytoband and annotation tracks. @@ -900,16 +777,16 @@ class Browser { const isWGV = (this.isMultiLocusWholeGenomeView() || GenomeUtils.isWholeGenomeView(referenceFrameList[0].chr)) - navbarDidResize(this, this.$navigation.width(), isWGV) + this.navbar.navbarDidResize() toggleTrackLabels(this.trackViews, this.doShowTrackLabels) if (this.doShowCenterLine && GenomeUtils.isWholeGenomeView(referenceFrameList[0].chr)) { - this.centerLineButton.boundMouseClickHandler() + this.navbar.centerLineButton.boundMouseClickHandler() } if (this.doShowCursorGuide && GenomeUtils.isWholeGenomeView(referenceFrameList[0].chr)) { - this.cursorGuideButton.boundMouseClickHandler() + this.navbar.cursorGuideButton.boundMouseClickHandler() } this.setCenterLineAndCenterLineButtonVisibility(GenomeUtils.isWholeGenomeView(referenceFrameList[0].chr)) @@ -919,9 +796,9 @@ class Browser { setCenterLineAndCenterLineButtonVisibility(isWholeGenomeView) { if (isWholeGenomeView) { - this.centerLineButton.setVisibility(!isWholeGenomeView) + this.navbar.centerLineButton.setVisibility(false) } else { - this.centerLineButton.setVisibility(this.config.showCenterGuideButton) + this.navbar.centerLineButton.setVisibility(this.config.showCenterGuideButton) } for (let centerLine of this.centerLineList) { @@ -1127,7 +1004,7 @@ class Browser { this.reorderTracks() this.fireEvent('trackorderchanged', [this.getTrackOrder()]) - this.multiTrackSelectButton.setMultiTrackSelection(this.multiTrackSelectButton.enableMultiTrackSelection) + newTrack.trackView.enableTrackSelection(this.navbar.getEnableTrackSelection()) return newTrack @@ -1495,8 +1372,7 @@ class Browser { } if (this.referenceFrameList) { - const isWGV = this.isMultiLocusWholeGenomeView() || GenomeUtils.isWholeGenomeView(this.referenceFrameList[0].chr) - navbarDidResize(this, this.$navigation.width(), isWGV) + this.navbar.navbarDidResize() } resize.call(this) @@ -1578,13 +1454,11 @@ class Browser { referenceFrame.end = referenceFrame.start + referenceFrame.bpPerPixel * width } - if (this.chromosomeSelectWidget) { - this.chromosomeSelectWidget.setValue(referenceFrameList.length === 1 ? this.referenceFrameList[0].chr : '') - } + const chrName = referenceFrameList.length === 1 ? this.referenceFrameList[0].chr : '' const loc = this.referenceFrameList.map(rf => rf.getLocusString()).join(' ') - this.$searchInput.val(loc) + this.navbar.updateLocus(loc, chrName) this.fireEvent('locuschange', [this.referenceFrameList]) } @@ -1861,7 +1735,7 @@ class Browser { async loadSampleInfo(config) { await this.sampleInfo.loadSampleInfoFile(config.url) - + for (const {sampleInfoViewport} of this.trackViews) { sampleInfoViewport.setWidth(this.getSampleInfoColumnWidth()) } @@ -2317,7 +2191,7 @@ class Browser { createCircularView(container, show) { show = show === true // convert undefined to boolean this.circularView = createCircularView(container, this) - this.circularViewControl = new CircularViewControl(this.$toggle_button_container.get(0), this) + this.circularViewControl = new CircularViewControl(this.navbar.toggle_button_container, this) this.circularView.setAssembly({ name: this.genome.id, id: this.genome.id, @@ -2337,6 +2211,30 @@ class Browser { this.circularViewControl.setState(isVisible) } } + + + + // Navbar delegates + get sampleInfoControl() { + return this.navbar.sampleInfoControl + } + + get overlayTrackButton() { + return this.navbar.overlayTrackButton + } + + get roiTableControl() { + return this.navbar.roiTableControl + } + + get sampleInfoControl() { + return this.navbar.sampleInfoControl + } + + get sampleNameControl() { + return this.navbar.sampleNameControl + } + } function getFileExtension(input) { @@ -2471,7 +2369,7 @@ function mouseUpOrLeave(e) { async function keyUpHandler(event) { // Feature jumping disabled in multi-locus view - if (this.referenceFrameList.length > 1) return + if (!this.referenceFrameList || this.referenceFrameList.length > 1) return if (event.code === 'KeyF' || event.code === 'KeyB') { @@ -2546,21 +2444,6 @@ async function keyUpHandler(event) { } } - -function logo() { - - return $( - '' + - 'IGV' + - '' + - '' + - '' + - ';' + - '' + - ' ' - ) -} - function toggleTrackLabels(trackViews, isVisible) { for (let {viewports} of trackViews) { diff --git a/js/cram/cram-bundle.js b/js/cram/cram-bundle.js index 4cc0b93bf..f221455bf 100644 --- a/js/cram/cram-bundle.js +++ b/js/cram/cram-bundle.js @@ -1,2 +1,2 @@ /*! For license information please see cram-bundle.js.LICENSE.txt */ -export default (()=>{var e={4923:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(r(7430)),s=i(r(7392)),a=r(8712),A=r(5931),f=r(9747);function h(e,t){const[r,n,i,o,s,a]=t;e[r]||(e[r]=[]),e[r].push({start:n,span:i,containerStart:o,sliceStart:s,sliceBytes:a})}t.default=class{constructor(e){this.filehandle=(0,A.open)(e.url,e.path,e.filehandle),this._parseCache=new o.default({cache:new s.default({maxSize:1}),fill:(e,t)=>this.parseIndex()})}parseIndex(){const e={};return this.filehandle.readFile().then((e=>31===e[0]&&139===e[1]?(0,a.unzip)(e):e)).then((t=>{if(t.length>4&&21578050===t.readUInt32LE(0))throw new f.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let r=[],n="";for(const i of t)if(i>=48&&i<=57||!n&&45===i)n+=String.fromCharCode(i);else if(9===i)r.push(Number.parseInt(n,10)),n="";else if(10===i)r.push(Number.parseInt(n,10)),n="",h(e,r),r=[];else if(13!==i&&32!==i)throw new f.CramMalformedError("invalid .crai index file");return n&&r.push(Number.parseInt(n,10)),6===r.length&&h(e,r),Object.entries(e).forEach((([t,r])=>{e[t]=r.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(e={}){return this._parseCache.get("index",null,e.signal)}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},o=[];for(const e of n)0===i(e)&&o.push(e);return o}))}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,s.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=a},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),o=r(400);class s extends i.default{constructor(e,t,r){if(super(e,t),this.instantiateCodec=r,"byteArray"!==t)throw new TypeError(`byteArrayLength does not support data type ${t}`)}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),o=this._getDataCodec(),s=new Uint8Array(i);for(let a=0;a(0,o.tinyMemoize)(s,e)))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"byteArray"!==t)throw new TypeError(`byteArrayStop codec does not support data type ${t}`)}decode(e,t,r,n){const{blockContentId:o}=this.parameters,s=r[o];if(!s)throw new i.CramMalformedError(`no block found with content ID ${o}`);const a=n.externalBlocks.getCursor(o);return this._decodeByteArray(s,a)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let o=t.bytePosition;for(;r[o]!==n&&o=e.content.length)throw new a.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=A},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,s.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,s.getBits)(t.content,n.coreBlock,i-1)|1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;te.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const o=parseInt(r,10);n.forEach((r=>{const n={bitLength:o,value:r,bitCode:0};t+=1;const s=o-e;if(t<<=s,n.bitCode=t,e+=s,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>o)throw new i.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6524),i=r(9747),o={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){if(!this.tagCodecCache[e]){const t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=(0,n.instantiateCodec)(t,"byteArray"))}return this.tagCodecCache[e]}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const s=o[e];if(!s)throw new i.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,s),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=r(8287).Buffer,i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(9747),a=r(400),A=o(r(6771)),f=o(r(7219)),h=r(3165);class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return i(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(!(null==e?void 0:e.numRecords))return null;const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),n=yield this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new s.CramMalformedError(`invalid content type ${n.contentType} in what is supposed to be the compression header block`);const i=(0,a.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return Object.assign(Object.assign({},n),{parsedContent:i})}))}getFirstBlock(){return i(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(e)return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return i(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new A.default(this,e,t)}_readContainerHeader(e){return i(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),{cramContainerHeader1:i,cramContainerHeader2:o}=r,{size:s}=yield this.file.stat();if(e>=s)return void console.warn(`position:${e}>=fileSize:${s} in cram container`);const A=n.allocUnsafe(i.maxLength);yield this.file.read(A,0,i.maxLength,e);const f=(0,a.parseItem)(A,i.parser),l=(0,a.itf8Size)(f.numLandmarks);if(e+f.length>=s)return void console.warn(`container header at ${e} indicates that the container has length ${f.length}, which extends beyond the length of the file. Skipping this container.`);const c=n.allocUnsafe(o.maxLength(f.numLandmarks));yield this.file.read(c,0,o.maxLength(f.numLandmarks),e+f._size-l);const u=(0,a.parseItem)(c,o.parser);return this.file.validateChecksums&&void 0!==u.crc32&&(yield this.file.checkCrc32(e,f._size+u._size-l-4,u.crc32,`container header beginning at position ${e}`)),Object.assign(f,u,{_size:f._size+u._size-l,_endPosition:f._size+u._size-l+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>(0,a.tinyMemoize)(l,e)))},6794:function(e,t,r){"use strict";var n=r(8287).Buffer,i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(8712),a=o(r(4132)),A=o(r(7392)),f=o(r(6960)),h=o(r(235)),l=r(1307),c=r(9747),u=o(r(9989)),d=r(3165),g=o(r(78)),I=r(5931),p=r(400),C=r(5417);class m{constructor(e){var t;if(this.file=(0,I.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new A.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return i(this,void 0,void 0,(function*(){const{maxLength:e,parser:t}=(0,d.cramFileDefinition)(),r=n.allocUnsafe(e);yield this.file.read(r,0,e,0);const i=t(r).value;if(2!==i.majorVersion&&3!==i.majorVersion)throw new c.CramUnimplementedError(`CRAM version ${i.majorVersion} not supported`);return i}))}getSamHeader(){return i(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new c.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,C.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),i=r.toString("utf8",4,4+n);return this.header=i,(0,C.parseHeaderText)(i)}))}getHeaderText(){return i(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getContainerById(e){return i(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=yield this.file.stat(),{cramContainerHeader1:o}=r;let s;for(let t=0;t<=e;t++){if(n+o.maxLength+8>=i)return;s=this.getContainerAtPosition(n);const r=yield s.getHeader();if(!r)throw new c.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e=o)return;const s=n.allocUnsafe(i.maxLength);return yield this.file.read(s,0,i.maxLength,e),(0,p.parseItem)(s,i.parser,0,e)}))}_parseSection(e,t){return i(this,arguments,void 0,(function*(e,t,r=e.maxLength,i=void 0){let o;if(i)o=i;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;o=n.allocUnsafe(r),yield this.file.read(o,0,r,t)}const s=(0,p.parseItem)(o,e.parser,0,t);if(s._size!==r)throw new c.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${s._size}`);return s}))}_uncompress(e,t,r){return i(this,void 0,void 0,(function*(){if("gzip"===e)(0,s.unzip)(t).copy(r);else if("bzip2"===e){const e=h.default.array(t);let i,o=h.default.header(e),s=0;do{i=h.default.decompress(e,o),-1!=i&&(n.from(i).copy(r,s),s+=i.length,o-=i.length)}while(-1!=i)}else if("lzma"===e){const e=new Response(new l.XzReadableStream((i=t,new ReadableStream({start(e){e.enqueue(i),e.close()}}))));n.from(yield e.arrayBuffer()).copy(r)}else if("rans"===e)(0,u.default)(t,r);else if("rans4x16"===e)f.default.r4x16_uncompress(t,r);else if("arith"===e)f.default.arith_uncompress(t,r);else if("fqzcomp"===e)f.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new c.CramUnimplementedError(`${e} decompression not yet implemented`);f.default.tok3_uncompress(t,r)}var i}))}readBlock(e){return i(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t),i=yield this.readBlockHeader(e);if(void 0===i)return;const o=i._endPosition,s=n.allocUnsafe(i.uncompressedSize),a=Object.assign(Object.assign({},i),{_endPosition:o,contentPosition:o,content:s});if("raw"!==i.compressionMethod){const e=n.allocUnsafe(i.compressedSize);yield this.read(e,0,i.compressedSize,o),yield this._uncompress(i.compressionMethod,e,s)}else yield this.read(s,0,i.uncompressedSize,o);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,o+i.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,i._size+i.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=o+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>(0,p.tinyMemoize)(m,e)))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var o=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),o={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function s(e){const t={};for(const[r,n]of e)t["is"+n]=e=>!!(e&r),t["set"+n]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=s(t.BamFlags),t.CramFlagsDecoder=s(t.CramFlags),t.MateFlagsDecoder=s(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:o,mateRecordNumber:s,readBases:a,readFeatures:A,mateToUse:f,readGroupId:h,readName:l,sequenceId:c,uniqueId:u,templateSize:d,alignmentStart:g,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=o,a&&(this.readBases=a),this.readGroupId=h,this.readName=l,this.sequenceId=c,this.uniqueId=u,this.templateSize=d,this.alignmentStart=g,this.tags=I,A&&(this.readFeatures=A),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),s&&(this.mateRecordNumber=s)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,o=0;for(;n.lengththis.mate.alignmentStart&&o>0&&(o=-o),o>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){if(!t)return;const i=n.refPos-t.start,s=t.seq.charAt(i);s&&(n.ref=s);let a=o[s];void 0===a&&(a=4);const A=r.substitutionMatrix[a][n.data];A&&(n.sub=A)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=o,t.cramBlockCrc32=s,t.cramTagDictionary=A,t.cramPreservationMap=f,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:o(),cramBlockCrc32:s(),cramDataSeriesEncodingMap:d(),cramTagEncodingMap:g(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=f().parser(e,t);t=n;const{value:i,offset:o}=d().parser(e,t);t=o;const{value:s,offset:a}=g().parser(e,t);return t=a,{value:{dataSeriesEncoding:h(i),preservation:h(r),tagEncoding:h(s)},offset:t}}},cramEncoding:{parser:(e,t)=>u(e,t)},cramUnmappedSliceHeader:l(e),cramMappedSliceHeader:c(e),cramContainerHeader1:I(e),cramContainerHeader2:p(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length);let i=0;const o=e.subarray(i,i+4).toString();i+=4;const s=n.getUint8(i);i+=1;const a=n.getUint8(i);i+=1;const A=r.subarray(i,i+20).toString().replaceAll("\0","");return i+=20,{value:{magic:o,majorVersion:s,minorVersion:a,fileId:A},offset:i}},maxLength:26}}function o(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let o=0;const s=i.getUint8(o),a=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][s];if(!a)throw new Error(`compression method number ${s} not implemented`);o+=1;const A=i.getUint8(o),f=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][A];if(!f)throw new Error(`invalid block content type id ${A}`);o+=1;const[h,l]=(0,n.parseItf8)(e,o);o+=l;const[c,u]=(0,n.parseItf8)(e,o);o+=u;const[d,g]=(0,n.parseItf8)(e,o);return o+=g,{offset:o,value:{uncompressedSize:d,compressedSize:c,contentId:h,contentType:f,compressionMethod:a}}},maxLength:17}}function s(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function a(e,t,r){const n=e.toString("utf8",t,r),i=[];for(let e=0;e{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const o=e.subarray(t,t+r);t+=r;const s=[];let A=0,f=0;for(;fA&&s.push(a(o,A,f)),{value:{size:r,ents:s},offset:t}}}}function f(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,f]=(0,n.parseItf8)(e,t);t+=f;const h=[];for(let r=0;r{const[i,o]=(0,n.parseItf8)(t,r);r+=o;let s=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,s=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,s=e}else console.warn("recordCounter=0");const[a,A]=(0,n.parseItf8)(t,r);r+=A;const[f,h]=(0,n.parseItf8)(t,r);r+=h;const l=[];for(let e=0;e=2&&(c=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:s,md5:c,contentIds:l,numContentIds:f,numBlocks:a,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function c(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,o]=(0,n.parseItf8)(t,r);r+=o;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;let c=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,c=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,c=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[u,d]=(0,n.parseItf8)(t,r);r+=d;const[g,I]=(0,n.parseItf8)(t,r);r+=I;const p=[];for(let e=0;e=2&&(w=[...t.subarray(r,r+16)],r+=16),{value:{md5:w,numBlocks:u,numRecords:h,numContentIds:g,refSeqSpan:A,refSeqId:i,refSeqStart:s,recordCounter:c,refBaseBlockId:C,contentIds:p},offset:r}},maxLength:e=>60+5*e}}function u(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,A]=(0,n.parseItf8)(e,t);t+=A;const f={};if(0===o);else if(1===o){const[r,i]=(0,n.parseItf8)(e,t);f.blockContentId=r,t+=i}else if(2===o){const[r,i]=(0,n.parseItf8)(e,t);f.offset=r,t+=i;const[o,s]=(0,n.parseItf8)(e,t);f.M=o,t+=s}else if(3===o){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const o=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:s,offset:A}=u(e,t);t=A,a.push({key:o,value:s})}return{value:{mapSize:r,ents:a,mapCount:o},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;const[c,u]=(0,n.parseItf8)(t,r);r+=u;let d,g=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);g=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);g=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);d=e,r+=i}const[I,p]=(0,n.parseItf8)(t,r);r+=p;const[C,m]=(0,n.parseItf8)(t,r);return{value:{length:o,refSeqId:s,refSeqStart:A,alignmentSpan:h,numBlocks:I,numLandmarks:C,numBases:d,recordCounter:g,numRecords:c},offset:r+=m}}}}function p(e){return{parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length),[s,a]=(0,n.parseItf8)(t,r);r+=a;const A=[];for(let e=0;e=3&&(f=o.getUint32(r,!0),r+=4),{value:Object.assign(Object.assign({},void 0===f?{}:{crc32:f}),{numLandmarks:s,landmarks:A}),offset:r}},maxLength:e=>5+5*e+4}}},6484:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n,i,h,l,c,u){let d=t("BF");const g=t("CF");if(!(0,a.isMappedSliceHeader)(n.parsedContent))throw new Error("slice header not mapped");const I=c>1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId,p=t("RL");let C=t("AP");r.APdelta&&(C+=l.lastAlignmentStart),l.lastAlignmentStart=C;const m=t("RG");let w,B,y,_;if(r.readNamesIncluded&&(w=A(t("RN"))),s.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=A(t("RN")),w=n);const i=t("NS"),o=t("NP");(e||i>-1)&&(B={mateFlags:e,mateSequenceId:i,mateAlignmentStart:o,mateReadName:n}),y=t("TS"),s.MateFlagsDecoder.isUnmapped(e)&&(d=s.BamFlagsDecoder.setMateUnmapped(d)),s.MateFlagsDecoder.isOnNegativeStrand(e)&&(d=s.BamFlagsDecoder.setMateReverseComplemented(d))}else s.CramFlagsDecoder.isWithMateDownstream(g)&&(_=t("NF")+u+1);const E=t("TL");if(E<0)throw new o.CramMalformedError("invalid TL index");const b={},v=r.getTagNames(E),Q=v.length;for(let t=0;t1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!h)throw new o.CramMalformedError(`invalid read feature code "${t}"`);let l=f(h);const c={B:["number","QS"]}[t];c&&(l=[l,f(c)]),s+=n;const u=s;a+=n;const d=a;"D"===t||"N"===t?a+=l:"I"===t||"S"===t?a-=l.length:"i"===t&&(a-=1),A[e]={code:t,pos:u,refPos:d,data:l}}return A}(C,e,t,0,c)),k=p,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${w||`${I}:${C}`} record has invalid read features`),k=p),D=t("MQ"),s.CramFlagsDecoder.isPreservingQualityScores(g)){R=new Array(p);for(let e=0;e=0){const i=e[r.mateRecordNumber];if(!i)throw new o.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(i))}return n}(r),i=n.map((e=>e.alignmentStart)),s=n.map((e=>e.alignmentStart+e.readLength-1)),a=Math.max(...s)-Math.min(...i)+1;a>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new o.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}class u{constructor(e,t,r){this.container=e,this.containerPosition=t,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=(0,h.getSectionParsers)(e),r=yield this.container.getHeader();if(!r)throw new Error("wow");const n=yield this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}throw new o.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,h.isMappedSliceHeader)(e))throw new Error("slice header not mapped");if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new o.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new o.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){var e,t;const{majorVersion:r}=yield this.file.getDefinition(),n=yield this.container.getCompressionScheme();if(void 0===n)throw new Error("compression scheme undefined");const i=yield this.getHeader();if(void 0===i)throw new Error("slice header undefined");const a=yield this._getBlocksContentIdIndex();if(r>1&&this.file.options.checkSequenceMD5&&(0,h.isMappedSliceHeader)(i.parsedContent)&&i.parsedContent.refSeqId>=0&&"0000000000000000"!==(null===(e=i.parsedContent.md5)||void 0===e?void 0:e.join(""))){const e=yield this.getReferenceRegion();if(e){const{seq:r,start:n,end:a}=e,A=(0,s.sequenceMD5)(r),f=null===(t=i.parsedContent.md5)||void 0===t?void 0:t.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(A!==f)throw new o.CramMalformedError(`MD5 checksum reference mismatch for ref ${i.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${f}, calculated MD5: ${A}`)}}const u=yield this.getCoreDataBlock(),d={lastAlignmentStart:(0,h.isMappedSliceHeader)(i.parsedContent)?i.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},g=e=>{const t=n.getCodecForDataSeries(e);if(!t)throw new o.CramMalformedError(`no codec defined for ${e} data series`);return t.decode(this,u,a,d)};let I=new Array(i.parsedContent.numRecords);for(let e=0;e!!e));break}throw e}for(let e=0;e=0&&c(I,e,I[e],I[t])}return I}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const i=(yield r).filter(e);if(i.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,h.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const o={};for(const e of i){const r=void 0!==t?t:e.sequenceId;let n=o[r];n||(n={id:r,start:e.alignmentStart,end:-1/0,seq:null},o[r]=n);const i=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;i>n.end&&(n.end=i),e.alignmentStartn(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(const e of i){const n=o[void 0!==t?t:e.sequenceId];if(null==n?void 0:n.seq){const t=n.seq;e.addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return i}))}}t.default=u,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>(0,s.tinyMemoize)(u,e)))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new s.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){let r=t;const n=e[r];let i;if(n<128)i=n,r+=1;else if(n<192)i=16383&(e[r]<<8|e[r+1]),r+=2;else if(n<224)i=2097151&(e[r]<<16|e[r+1]<<8|e[r+2]),i=(63&n)<<16|e.readUInt16LE(r+1),r+=3;else if(n<240)i=268435455&(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4;else if(n<248)i=(15&e[r])*Math.pow(2,32)+(e[r+1]<<24)|e[r+2]<<16|e[r+3]<<8|e[r+4],r+=5;else if(n<252)i=((7&e[r])<<8|e[r+1])*Math.pow(2,32)+(e[r+2]<<24)|e[r+3]<<16|e[r+4]<<8|e[r+5],r+=6;else if(n<254)i=((3&e[r])<<16|e[r+1]<<8|e[r+2])*Math.pow(2,32)+(e[r+3]<<24)|e[r+4]<<16|e[r+5]<<8|e[r+6],r+=7;else if(n<255){if(i=o.default.fromBytesBE(e.slice(r+1,r+8)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=8}else{if(i=o.default.fromBytesBE(e.slice(r+1,r+9)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=9}return[i,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:o}=t(e,r);return Object.assign(Object.assign({},o),{_endPosition:i+n,_size:i-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,i.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))};const i=n(r(3503)),o=n(r(8570)),s=r(612)},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramRecord=t.CramFile=void 0;const i=r(8287);window.Buffer=i.Buffer;var o=r(7390);Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(o).default}}),Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return o.CramRecord}});var s=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(s).default}});var a=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(a).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9747),s=i(r(7390));t.default=class{constructor(e){var t;if(this.cram=null!==(t=e.cram)&&void 0!==t?t:new s.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof s.default))throw new Error("invalid arguments: no cramfile");if(this.index=e.index,!this.index.getEntriesForRange)throw new Error("invalid arguments: not an index")}getRecordsForRange(e,t,r){return n(this,arguments,void 0,(function*(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new o.CramUnimplementedError("string sequence names not yet supported");const i=e,s=yield this.index.getEntriesForRange(i,t,r),a=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,A=yield Promise.all(s.map((e=>this.getRecordsInSlice(e,a))));let f=Array.prototype.concat(...A);if(n.viewAsPairs){const e={},t={};for(const r of f){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const o=[];for(const e of f){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const A=[],h=[];for(const e of a){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),A.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));h.push(i)}const l=yield Promise.all(h);if(l.length){const e=l.reduce(((e,t)=>e.concat(t)));f=f.concat(e)}}return f}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1113);var i=r(1113);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let a=e.getInt(),A=e.getInt(),f=e.getInt(),h=e.getInt();const l=n.remaining(),c=-4&l;for(let i=0;i>2;let c=0,u=l,d=2*l,g=3*l,I=0,p=0,C=0,m=0;for(;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class o{constructor(){this.F=void 0,this.C=void 0}}function s(e,t,r,n){return r*(e>>n)+(e&(1<>o)+(e&(1<=128&&(t.fc[A].F&=-129,t.fc[A].F=(127&t.fc[A].F)<<8|255&e.get()),t.fc[A].C=i,s.default.symbolInit(r[A],t.fc[A].C,t.fc[A].F),t.R||(t.R=new Array(o.TOTFREQ)),t.R.fill(A,i,i+t.fc[A].F),i+=t.fc[A].F,0===n&&A+1===(255&e.getByteAt(e.position()))?(A=255&e.get(),n=255&e.get()):0!==n?(n-=1,A+=1):A=255&e.get()}while(0!==A);a(i=128&&(t[i].fc[h].F&=-129,t[i].fc[h].F=(127&t[i].fc[h].F)<<8|255&e.get()),t[i].fc[h].C=f,0===t[i].fc[h].F&&(t[i].fc[h].F=o.TOTFREQ),null==r[i][h]&&(r[i][h]=new s.default.RansDecSymbol),s.default.symbolInit(r[i][h],t[i].fc[h].C,t[i].fc[h].F),null==t[i].R&&(t[i].R=new Array(o.TOTFREQ)),t[i].R.fill(h,f,f+t[i].fc[h].F),f+=t[i].fc[h].F,a(f<=o.TOTFREQ),0===A&&h+1===(255&e.getByteAt(e.position()))?(h=255&e.get(),A=255&e.get()):0!==A?(A-=1,h+=1):h=255&e.get()}while(0!==h);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),o=r(6476),s=n(r(488));function a(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=r(8287).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const i=new l(e,r),c=i.get();if(0!==c&&1!==c)throw new o.CramMalformedError(`Invalid rANS order ${c}`);if(i.getInt()!==i.remaining()-h)throw new o.CramMalformedError("Incorrect input length.");const u=i.getInt(),d=new l(t||n.allocUnsafe(u));if(d.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8712:(e,t,r)=>{"use strict";var n=r(8287).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return n.from((0,i.inflate)(e))};const i=r(1668)},7430:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});class n{}class i{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new n){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):"function"==typeof e.addEventListener&&e.addEventListener("abort",(()=>{this.handleAborted(e)}))}handleAborted(e){this.signals.delete(e),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class o{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e;for(const t of this.callbacks)t(e)}}class s{constructor({fill:e,cache:t}){if("function"!=typeof e)throw new TypeError("must pass a fill function");if("object"!=typeof t)throw new TypeError("must pass a cache object");if("function"!=typeof t.get||"function"!=typeof t.set||"function"!=typeof t.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=t,this.fillCallback=e}static isAbortException(e){return"AbortError"===e.name||"ERR_ABORTED"===e.code||"AbortError: aborted"===e.message||"Error: aborted"===e.message}evict(e,t){this.cache.get(e)===t&&this.cache.delete(e)}fill(e,t,r,n){const s=new i,a=new o;a.addCallback(n);const A={aborter:s,promise:this.fillCallback(t,s.signal,(e=>{a.callback(e)})),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};A.aborter.addSignal(r),A.aborter.signal.addEventListener("abort",(()=>{A.settled||this.evict(e,A)})),A.promise.then((()=>{A.settled=!0}),(()=>{A.settled=!0,this.evict(e,A)})).catch((e=>{throw console.error(e),e})),this.cache.set(e,A)}static checkSinglePromise(e,t){function r(){if(null==t?void 0:t.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then((e=>(r(),e)),(e=>{throw r(),e}))}has(e){return this.cache.has(e)}get(e,t,r,n){if(!r&&t instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,t,r,n)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(n),s.checkSinglePromise(i.promise,r)):(this.fill(e,t,r,n),s.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const t=this.cache.get(e);t&&(t.settled||t.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let t=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),t+=1;return t}}},635:(e,t,r)=>{var n=r(8287).Buffer;const i=r(4646),o=r(8706),s=r(9614),a=r(235),A=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,i=t,o=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&A&&([n,i]=this.decodePackMeta(this.stream)),32&r)var s=this.decodeCat(this.stream,i);else s=4&r?this.decodeExt(this.stream,i):64&r?o?this.decodeRLE1(this.stream,i):this.decodeRLE0(this.stream,i):o?this.decode1(this.stream,i):this.decode0(this.stream,i);return r&A&&(s=this.decodePack(s,n,t)),s}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return n.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,i=1&t,s=e.length;return t&A&&([r,e,s]=this.encodePack(e)),t&A&&this.stream.WriteStream(r),64&t?i?this.encodeRLE1(e,s,this.stream):this.encodeRLE0(e,s,this.stream):i?this.encode1(e,s,this.stream):this.encode0(e,s,this.stream)}decode0(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new s(o),A=new i(e);A.RangeStartDecode(e);for(var f=0;f=3?3:h;for(A[l].ModelEncode(r,f,c),h-=c,l=256;3==c;)c=h>=3?3:h,A[l].ModelEncode(r,f,c),l=257,h-=c}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),A=0;A=3?3:l;for(A[c].ModelEncode(r,f,u),l-=u,c=256;3==u;)u=l>=3?3:l,A[c].ModelEncode(r,f,u),c=257,l-=u}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r>=1}}else if(this.nsym<=4)for(o=0,s=0;o>=2;else{if(!(this.nsym<=16))return e;for(o=0,s=0;o>=4}return i}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;ns),n[s]=new Array(i[s]);for(var a=0,A=0;As),a[s]=this.decodeStream(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,i=0;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var o=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){var s=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=s,s=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=s}return o}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){var o=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=o,o=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=o}}}},6038:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(9614),s=r(4646);function a(e,t,r){for(var n=0,i=0,o=-1,s=new Array(1024);i>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&l)for(var n=0;n0&&t.pflags&d)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&c&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&u&&a(e,t.dtab,256),t}function p(e,t,r,n,i,o){r.max_sel>0?i.s=n.sel.ModelDecode(e,t):i.s=0,i.x=r.stab[i.s];var s=r.params[i.x];if(s.fixed_len>=0){var a=n.len[0].ModelDecode(e,t);a|=n.len[1].ModelDecode(e,t)<<8,a|=n.len[2].ModelDecode(e,t)<<16,a|=n.len[3].ModelDecode(e,t)<<24,s.fixed_len>0&&(s.fixed_len=-a)}else a=-s.fixed_len;i.len=a,r.do_rev&&(o[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,s.pflags&A&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=a,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}function C(e,t,r){for(var n=0,i=0,o=new Array(2*r),s=0;n1?r.nparam-1:0,o=new Array(256);if(2&r)i=e.ReadByte(),a(e,o,256);else{for(var s=0;s0&&(t.sel=new o(e.max_sel+1)),t}(i),l=new s(e);l.RangeStartDecode(e);for(var c=new n.allocUnsafe(r),u={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},d=0;d0&&h.dup.ModelDecode(e,l)){for(var C=0;C4),qshift:l,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:l>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:A,nsym:a,do_qmap:c,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:l<=4?1:0,do_qtab:0,qbits:8+(l>4)-(0==s),sbits:1,sloc:15-(l<=4),do_stab:1,do_sel:1}]}(e,t,r,n),B=function(e,t,r,n,i,o,s){for(var a=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(I),1&I&&e.WriteByte(t.length),2&I){var p=1<0&&p--,e.WriteByte(p),C(e,s,256)}for(var m=0;m0){for(g=0;g<256;g++)n[m][g]=g;t[m].do_qtab&&C(e,n[m],256)}if(t[m].pbits>0){for(g=0;g<1024;g++)i[m][g]=Math.min((1<>t[m].pshift);C(e,i[m],1024)}if(t[m].dbits>0){for(g=0;g<256;g++)a[g]>(1<>t[m].dshift)];C(e,o[m],256)}}return e}(B,w,n,a,g,I,p);return function(e,t,r,n,i,a,A,f,h,l){var c=1<0&&c--;for(var u=t.length,d=0,g=0;g0&&m.ModelEncode(e,w,y);var _=l[y],E=r[Math.min(r.length-1,B++)];i[_].fixed_len?i[_].fixed_len>0&&(C[0].ModelEncode(e,w,255&E),C[1].ModelEncode(e,w,E>>8&255),C[2].ModelEncode(e,w,E>>16&255),C[3].ModelEncode(e,w,E>>24&255),i[_].fixed_len=-1):(C[0].ModelEncode(e,w,255&E),C[1].ModelEncode(e,w,E>>8&255),C[2].ModelEncode(e,w,E>>16&255),C[3].ModelEncode(e,w,E>>24&255)),i[_].do_dedup&&process.exit(1),g=E;var b=0,v=i[_].context,Q=0,S=0}var k=t[p++],D=a[_][k];I[v].ModelEncode(e,w,D),Q=(Q<0&&(v+=f[_][Math.min(g,1023)]<0&&(v+=h[_][Math.min(b,255)]<{"use strict";var n=r(8287).Buffer,i=r(5460),o=r(8223),s=r(635),a=r(6038),A=r(5997);e.exports={r4x8_uncompress:function(e,t){i.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){s.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=A.decode(e,0,"\0");n.from(r,"binary").copy(t,0,0)}}},8706:(e,t,r)=>{var n=r(8287).Buffer;e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=n.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},5460:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e){return 4095&e}function s(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function h(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<23>>n<<8)*r;e>=i;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,i),(Math.floor(e/n)<0?(s--,i++):(i=e.ReadByte())==o+1&&(s=e.ReadByte()),o=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function u(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var i=n/t;do{var o=0,s=0,a=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(o2?e[s]-=t-n:t!=n&&(i*=.99,a=1)}while(a)}function d(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new i(e),r=t.ReadByte(),h=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),i=new Array(256);c(e,r,i);for(var s=a(i),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var u=new n.allocUnsafe(t);for(l=0;l0?(a--,o++):(o=e.ReadByte())==s+1&&(a=e.ReadByte()),s=o}while(0!=o)}(e,r,i);for(var h=new Array(256),l=0;l<256;l++)h[l]=a(i[l]);for(var u=new Array(4),d=new Array(4),g=0;g<4;g++)u[g]=e.ReadUint32(),d[g]=0;var I=new n.allocUnsafe(t),p=Math.floor(t/4);for(l=0;l=0;a--)A[a%4]=l(A[a%4],c,s[e[a]],o[e[a]],12);for(a=3;a>=0;a--)h(A[a],c);var g=r.pos;return r.buf.writeInt32LE(g-9+(c.length-c.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),c.buf.slice(c.pos,c.length)],r.pos+c.length-c.pos)}(e):function(e){const t=e.length;var r=new i("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),s=new Array(256),a=new Array(256),A=0;A<256;A++)s[A]=new Array(256),a[A]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var i=0;i<256;i++)t[n][i]=0}var o=0;for(n=0;n>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,s,o),function(e,t){for(var r=0;r<256;r++)t[r]&&u(e[r])}(s,o),function(e,t,r){for(var n=0,i=0;i<256;i++)if(r[i]){if(n>0)n--;else if(e.WriteByte(i),i>0&&r[i-1]>0){for(n=i+1;n<256&&r[n];n++);n-=i+1,e.WriteByte(n)}d(e,t[i])}e.WriteByte(0)}(r,s,o),A=0;A<256;A++)if(o[A]){a[A][0]=0;for(var f=1;f<256;f++)a[A][f]=a[A][f-1]+s[A][f-1]}var c=new Array(4),g=new Array(4);for(f=0;f<4;f++)c[f]=1<<23,g[f]=0;var I=new i("",t,t),p=Math.floor(t/4),C=new Array(4),m=new Array(4);for(f=0;f<4;f++)C[f]=(f+1)*p-2,m[f]=e[C[f]+1];for(m[3]=e[t-1],A=t-2;A>4*p-2;A--)c[3]=l(c[3],I,a[e[A]][m[3]],s[e[A]][m[3]],12),m[3]=e[A];for(;C[0]>=0;)for(f=3;f>=0;f--){var w=e[C[f]];c[f]=l(c[f],I,a[w][m[f]],s[w][m[f]],12),m[f]=w,C[f]--}for(f=3;f>=0;f--)c[f]=l(c[f],I,a[0][m[f]],s[0][m[f]],12);for(A=3;A>=0;A--)h(c[A],I);var B=r.pos;return r.buf.writeInt32LE(B-9+(I.length-I.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),I.buf.slice(I.pos,I.length)],r.pos+I.length-I.pos)}(e)}}},8223:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e,t){return e&(1<=e[r+1];)r++;return r}function a(e,t){for(var r=1<=e[i+1];)i++;n[o]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<31-n)*r;e>=i;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,i),(Math.floor(e/n)<s),n[s]=new Array(o[s]);for(var a=0,A=0;As),a[s]=u(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s>4,h=e;if(1&u){var l=e.ReadUint7(),c=e.ReadUint7(),u=new i(e.ReadData(c));h=new i(I(u,l))}var d=new Array(256),p=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var o=0;o<256;o++)t[i][o]=0}var s=g(e);for(i=0;i<256;i++)if(s[i]){var a=0;for(o=0;o<256;o++)s[o]&&(a>0?a--:(t[i][o]=e.ReadUint7(),0==t[i][o]&&(a=e.ReadByte())));for(C(t[i],n),r[i][0]=0,o=0;o<256;o++)r[i][o+1]=r[i][o]+t[i][o]}}(h,d,p,r);for(var m=new Array(256),w=0;w<256;w++)m[w]=a(p[w],r);for(var B=new Array(4),y=new Array(4),_=0;_<4;_++)B[_]=e.ReadUint32(),y[_]=0;var E=new n.allocUnsafe(t),b=Math.floor(t/4);for(w=0;w>=1}else if(r<=4)for(a=0;a>=2;else if(r<=16)for(a=0;a>=4;return o}(b,w,B,m)),b}function d(e,t){var r=new i("",0,10);r.WriteByte(t);var o=1&t,s=8&t,a=32&t,A=64&t,f=128&t,u=t>>8;if(16&t||r.WriteUint7(e.length),s)return n.concat([r.buf.slice(0,r.pos),c(0,e,u)]);var d=new n.alloc(0);f&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r0&&(o[r]=s++);if(!(s>16)){if(s<=1)var a=new n.allocUnsafe(0);else if(s<=2){a=new n.allocUnsafe(Math.ceil(e.length/8));var A=-1;for(r=0;r0&&(t[r]=A++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var g=new n.alloc(0);if(A&&([g,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r0&&s++;for(s||(s=1,t[0]=1),(h=new i("",0,s+1+e.length)).WriteByte(s),r=0;r<256;r++)t[r]>0&&h.WriteByte(r);var a=new n.allocUnsafe(e.length),A=0;for(r=0;r0){o=e[r];for(var f=0;r+f+1>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,s,o),function(e,t){for(var r=0;r<256;r++)if(t[r]){var n=Math.ceil(Math.log2(t[r]));n>12&&(n=12),p(e[r],n)}}(s,o);var c=new i("",0,198156);!function(e,t,r){m(e,r);for(var n=0;n<256;n++)if(r[n])for(var i=0,o=0;o<256;o++)if(r[o])if(i)i--;else if(e.WriteUint7(t[n][o]),!t[n][o]){for(var s=o+1;s<256;s++)if(r[s]){if(0!=t[n][s])break;i++}e.WriteByte(i)}}(c,s,o);var u=w(c.buf.slice(0,c.pos));for(u.length4*y-2;A--)g[3]=l(g[3],B,a[e[A]][E[3]],s[e[A]][E[3]],f),E[3]=e[A];for(;_[0]>=0;)for(d=3;d>=0;d--){var b=e[_[d]];g[d]=l(g[d],B,a[b][E[d]],s[b][E[d]],f),E[d]=b,_[d]--}for(d=3;d>=0;d--)g[d]=l(g[d],B,a[0][E[d]],s[0][E[d]],f);for(A=3;A>=0;A--)h(g[A],B);return n.concat([r.buf.slice(0,r.pos),B.buf.slice(B.pos,B.length)],r.pos+B.length-B.pos)}(e);return n.concat([r.buf.slice(0,r.pos),d,g,I])}function g(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,i=e.ReadByte(),o=i;do{t[i]=1,n>0?(n--,i++):(i=e.ReadByte())==o+1&&(n=e.ReadByte()),o=i}while(0!=i);return t}function I(e,t){var r=new Array(256),i=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=g(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(C(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,i);for(var s=a(i,12),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var c=new n.allocUnsafe(t);for(l=0;l2?e[a]-=r-i:r!=i&&(o=i/r,A=1)}while(A)}function C(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function w(e){const t=e.length;var r=new i("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r12&&(s=12),p(o,s),function(e,t){m(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),p(o,12);var a=new Array(256);a[0]=0;for(var A=1;A<256;A++)a[A]=a[A-1]+o[A-1];var f=new Array(4);for(A=0;A<4;A++)f[A]=32768;var c=new i("",1.05*t+100|0,1.05*t+100|0);for(A=t-1;A>=0;A--)f[A%4]=l(f[A%4],c,a[e[A]],o[e[A]],12);for(A=3;A>=0;A--)h(f[A],c);return n.concat([r.buf.slice(0,r.pos),c.buf.slice(c.pos,c.length)],r.pos+c.length-c.pos)}e.exports={decode:function(e){return u(new i(e),0)},encode:d}},5997:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(8223);var s=new(r(635));function a(e,t){for(var r=e+"";r.length0&&5==t[s][0].type)&&t[s][r])switch(e[0].WriteByte(t[s][r].type),t[s][r].type){case 6:e[6].WriteUint32(t[s][r].val);break;case 5:e[5].WriteUint32(t[s][r].val);break;case 1:e[1].WriteString(t[s][r].val);break;case 2:e[2].WriteChar(t[s][r].val);break;case 7:e[7].WriteUint32(t[s][r].val);break;case 3:e[3].WriteUint32(t[s][r].val),e[4].WriteByte(t[s][r].val.length);break;case 8:case 9:e[t[s][r].type].WriteByte(t[s][r].val)}}function h(e,t,r,n){for(var i=0;i<=12;i++)if(!(e[i].pos<=0)){n.WriteByte(i+(0==i?128:0)),e[i]=e[i].buf.slice(0,e[i].pos);var o=l(e[i],r);n.WriteUint7(o.length),n.WriteData(o,o.length)}}function l(e,t){var r,n=1<<30,i=[0,1,64,65,128,129,201];for(var a in i){var A=i[a];if(!(1&A&&e.length<100||8&A&&e.length%4!=0)){try{var f=t?s.encode(e,A):o.encode(e,A)}catch(e){f=0}f&&n>f.length&&(n=f.length,r=f)}}return r}function c(e,t,r,n,i){var o=0,s=i-1;e[i]=new Array(256),t[n]?e[i][0]={type:5,val:i-t[n]}:e[i][0]={type:6,val:0==i?0:1},t[n]=i;for(var a=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),A=0;A=0&&e[s][f])if(e[s][f].str==a[A])h=10,l="";else if(7==e[s][f].type||8==e[s][f].type){var c=l-e[s][f].str;r[f]++,c>=0&&c<256&&r[f]>i/2&&(h=8,l=c)}else 3!=e[s][f].type&&9!=e[s][f].type||e[s][f].str.length!=l.length||(c=l-e[s][f].str,r[f]++,c>=0&&c<256&&r[f]>i/2&&(h=9,l=c));e[i][f]={str:a[A],val:l,type:h},o{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],A=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,A)),h=0,l=A>0?s-4:s;for(r=0;r>16&255,f[h++]=t>>8&255,f[h++]=255&t;return 2===A&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[h++]=255&t),1===A&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function A(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=A,t.SlowBuffer=function(e){return+e!=e&&(e=0),A.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return u(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return u(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return A.from(n,t,r);const i=function(e){if(A.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),a(e<0?0:0|d(e))}function c(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function I(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return b(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,A=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,A/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-A),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function b(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function v(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,A;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(A=(31&t)<<6|63&r,A>127&&(o=A));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(A=(15&t)<<12|(63&r)<<6|63&n,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(A=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(A.isBuffer(t)||(t=A.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!A.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},A.byteLength=g,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,i){if(j(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return B(this,e,t,r);case"ascii":case"latin1":case"binary":return y(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}A.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigUInt64LE=V((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=V((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigInt64LE=V((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=V((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new T.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}O("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),O("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),O("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function V(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var o=0;i>0;){var s=8-t;i>=s?(o<<=s,o|=n[s]&e[r++],t=0,i-=s):(o<<=i,o|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return o}},simple:function(e){var r,n,i=t.header(e),o=[],s=0;do{-1!=(n=t.decompress(e,i))&&(o.push(n),s+=n.byteLength)}while(-1!=n);r=new Uint8Array(s),s=0;for(var a=0;a9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",o=0;o<6;o++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var s=e(24);if(s>n)throw"Initial position larger than buffer size";var a=e(16),A=new Uint8Array(256),f=0;for(o=0;o<16;o++)if(a&1<<15-o){var h=e(16);for(g=0;g<16;g++)h&1<<15-g&&(A[f++]=16*o+g)}var l=e(3);if(l<2||l>6)throw"another error";var c=e(15);if(0==c)throw"meh";var u=[];for(o=0;o=l)throw"whoops another error";var I=u[g];u.splice(g,1),u.splice(0,0,I),d[o]=I}var p=f+2,C=[];for(g=0;g20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?a--:a++}y[o]=a}for(m=w=y[0],o=1;ow?w=y[o]:y[o]=c)throw"meow i'm a kitty, that's an error";E=(B=C[d[k++]]).base.subarray(1),b=B.limit.subarray(1)}for(g=e(o=B.minLen);;){if(o>B.maxLen)throw"rawr i'm a dinosaur";if(g<=b[o])break;o++,g=g<<1|e(1)}if((g-=E[o])<0||g>=258)throw"moo i'm a cow";var F=B.permute[g];if(0!=F&&1!=F){if(Q){if(Q=0,S+a>=n)throw"Boom.";for(D[I=A[u[0]]]+=a;a--;)R[S++]=I}if(F>f)break;if(S>=n)throw"I can't think of anything. Error";I=u[o=F-1],u.splice(o,1),u.splice(0,0,I),D[I=A[I]]++,R[S++]=I}else Q||(Q=1,a=0),a+=0==F?Q:2*Q,Q<<=1}if(s<0||s>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,o=0;o<256;o++)h=g+D[o],D[o]=g,g=h;for(o=0;o>=8,x=-1);var L,U,q,T=new Uint8Array(n),O=0;for(r||(r=1/0);S;){for(S--,U=N,N=255&(M=R[M]),M>>=8,3==x++?(L=N,q=U,N=-1):(L=1,q=N);L--;)if(T[O++]=q,! --r)return T;N!=U&&(x=0)}return T.subarray(0,O)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n>>6-2*i);return r}},e.exports=r},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>f,LocalFile:()=>i(),RemoteFile:()=>a,fromUrl:()=>h,open:()=>l});var n=r(3617),i=r.n(n),o=r(8287);function s(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class a{async getBufferFromResponse(e){const t=await e.arrayBuffer();return o.Buffer.from(t)}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${s(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${s(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t=0,r,n=0,i={}){const{headers:o={},signal:s,overrides:a={}}=i;r<1/0?o.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(o.range=`bytes=${n}-`);const A=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...o,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!A.ok)throw new Error(`HTTP ${A.status} fetching ${this.url}`);if(200===A.status&&0===n||206===A.status){const n=await this.getBufferFromResponse(A),i=n.copy(e,t,0,Math.min(r,n.length)),o=A.headers.get("content-range"),s=/\/(\d+)$/.exec(o||"");return(null==s?void 0:s[1])&&(this._stat={size:parseInt(s[1],10)}),{bytesRead:i,buffer:e}}if(200===A.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${A.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:o={}}=r,s=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...o});if(200!==s.status)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=o.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function A(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class f{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const i=n,s=i+r,a=await A(this.blob.slice(i,s)),f=o.Buffer.from(a);return{bytesRead:f.copy(e,t),buffer:f}}async readFile(e){const t="string"==typeof e?e:null==e?void 0:e.encoding;if("utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await A(this.blob);return o.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function h(e,t={}){return new a(e,t)}function l(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return h(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,A=(1<>1,h=-7,l=r?i-1:0,c=r?-1:1,u=e[t+l];for(l+=c,o=u&(1<<-h)-1,u>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=c,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+l],l+=c,h-=8);if(0===o)o=1-f;else{if(o===A)return s?NaN:1/0*(u?-1:1);s+=Math.pow(2,n),o-=f}return(u?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,A,f=8*o-i-1,h=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,u=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-s))<1&&(s--,A*=2),(t+=s+l>=1?c/A:c*Math.pow(2,1-l))*A>=2&&(s++,A/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*A-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+u]=255&a,u+=d,a/=256,i-=8);for(s=s<0;e[r+u]=255&s,u+=d,s/=256,f-=8);e[r+u-d]|=128*g}},8570:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=A(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=A(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?p:I;if(t){if(e<0)return p;if(e>=u)return y}else{if(e<=-d)return _;if(e+1>=d)return B}return e<0?a(-e,t).neg():A(e%c|0,e/c|0,t)}function A(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=A;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return I;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return h(e.substring(1),t,r).neg();for(var i=a(f(r,8)),o=I,s=0;s>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=A).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(e){return n(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(n(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(C)},E.neg=E.negate,E.add=function(e){n(e)||(e=l(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,f=e.low>>>16,h=0,c=0,u=0,d=0;return u+=(d+=o+(65535&e.low))>>>16,c+=(u+=i+f)>>>16,h+=(c+=r+a)>>>16,h+=t+s,A((u&=65535)<<16|(d&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},E.subtract=function(e){return n(e)||(e=l(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return I;if(n(e)||(e=l(e)),t)return A(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return I;if(this.eq(_))return e.isOdd()?_:I;if(e.eq(_))return this.isOdd()?_:I;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,f=e.high>>>16,h=65535&e.high,c=e.low>>>16,u=65535&e.low,d=0,p=0,C=0,m=0;return C+=(m+=s*u)>>>16,p+=(C+=o*u)>>>16,C&=65535,p+=(C+=s*c)>>>16,d+=(p+=i*u)>>>16,p&=65535,d+=(p+=o*c)>>>16,p&=65535,d+=(p+=s*h)>>>16,d+=r*u+i*c+o*h+s*f,A((C&=65535)<<16|(m&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(n(e)||(e=l(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?A((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p:I;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return p;if(e.gt(this.shru(1)))return m;o=p}else{if(this.eq(_))return e.eq(C)||e.eq(w)?_:e.eq(_)?C:(r=this.shr(1).div(e).shl(1)).eq(I)?e.isNegative()?C:w:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(_))return this.unsigned?p:I;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=I}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),h=s<=48?1:f(2,s-48),c=a(r),u=c.mul(e);u.isNegative()||u.gt(i);)u=(c=a(r-=h,this.unsigned)).mul(e);c.isZero()&&(c=C),o=o.add(c),i=i.sub(u)}return o},E.div=E.divide,E.modulo=function(e){return n(e)||(e=l(e)),t?A((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return A(~this.low,~this.high,this.unsigned)},E.and=function(e){return n(e)||(e=l(e)),A(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return n(e)||(e=l(e)),A(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return n(e)||(e=l(e)),A(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A(this.low<>>32-e,this.unsigned):A(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):A(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?A(this.low>>>e|t<<32-e,t>>>e,this.unsigned):A(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?A(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:A(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3503:(e,t,r)=>{var n,i,o,s,a;n=r(3939),i=r(2151).utf8,o=r(652),s=r(2151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),A=8*e.length,f=1732584193,h=-271733879,l=-1732584194,c=271733878,u=0;u>>24)|4278255360&(r[u]<<24|r[u]>>>8);r[A>>>5]|=128<>>9<<4)]=A;var d=a._ff,g=a._gg,I=a._hh,p=a._ii;for(u=0;u>>0,h=h+m>>>0,l=l+w>>>0,c=c+B>>>0}return n.endian([f,h,l,c])})._ff=function(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+(i>>>0)+s;return(a<>>32-o)+t},a._gg=function(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+(i>>>0)+s;return(a<>>32-o)+t},a._hh=function(e,t,r,n,i,o,s){var a=e+(t^r^n)+(i>>>0)+s;return(a<>>32-o)+t},a._ii=function(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+(i>>>0)+s;return(a<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),o=r(1996),s=r(4674),a=r(4442),A=Object.prototype.toString,f=0,h=-1,l=0,c=8;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({level:h,method:c,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===A.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==f)throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}u.prototype.push=function(e,t){var r,s,a=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===A.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(h),a.next_out=0,a.avail_out=h),1!==(r=n.deflate(a,s))&&r!==f)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f):2!==s||(this.onEnd(f),a.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),o=r(1996),s=r(9681),a=r(4674),A=r(4442),f=r(7414),h=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new f,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[r])}function c(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(e,t){var r,a,A,f,l,c=this.strm,u=this.options.chunkSize,d=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?c.input=o.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new i.Buf8(u),c.next_out=0,c.avail_out=u),(r=n.inflate(c,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&d&&(r=n.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==s.Z_STREAM_END&&(0!==c.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(A=o.utf8border(c.output,c.next_out),f=c.next_out-A,l=o.buf2string(c.output,A),c.next_out=f,c.avail_out=u-f,f&&i.arraySet(c.output,c.output,A,f,0),this.onData(l)):this.onData(i.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(g=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),c.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=l,t.inflate=c,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.ungzip=c},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r(9805),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function A(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return A(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)f[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?f[n++]=65533:i<65536?f[n++]=i:(i-=65536,f[n++]=55296|i>>10&1023,f[n++]=56320|1023&i)}return A(f,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},9681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^r[a])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),o=r(3665),s=r(3269),a=r(4823),A=r(4674),f=0,h=0,l=-2,c=2,u=8,d=286,g=30,I=19,p=2*d+1,C=15,m=3,w=258,B=w+m+1,y=42,_=103,E=113,b=666;function v(e,t){return e.msg=A[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function S(e){for(var t=e.length;--t>=0;)e[t]=0}function k(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,k(e.strm)}function R(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function M(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=s(e.adler,t,o,r):2===e.state.wrap&&(e.adler=a(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function N(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,A=e.strstart>e.w_size-B?e.strstart-(e.w_size-B):0,f=e.window,h=e.w_mask,l=e.prev,c=e.strstart+w,u=f[o+s-1],d=f[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(f[(r=t)+s]===d&&f[r+s-1]===u&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(e.match_start=t,s=n,n>=a)break;u=f[o+s-1],d=f[o+s]}}}while((t=l[t&h])>A&&0!=--i);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,o,s,a=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-B)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);o+=a}if(0===e.strm.avail_in)break;if(r=M(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=m)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<=m)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-m),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=m){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=m-1)),e.prev_length>=m&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-m,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-m),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),o<1||o>9||r!==u||n<8||n>15||t<0||t>9||s<0||s>4)return v(e,l);8===n&&(n=9);var A=new T;return e.state=A,A.strm=e,A.wrap=a,A.gzhead=null,A.w_bits=n,A.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&t===f)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,D(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-B&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),1)})),new q(4,4,8,4,L),new q(4,5,16,8,L),new q(4,6,32,32,L),new q(4,4,16,16,U),new q(8,16,32,32,U),new q(8,16,128,128,U),new q(8,32,128,256,U),new q(32,128,258,1024,U),new q(32,258,258,4096,U)],t.deflateInit=function(e,t){return P(e,t,u,15,8,0)},t.deflateInit2=P,t.deflateReset=z,t.deflateResetKeep=O,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,h):l},t.deflate=function(e,t){var r,i,s,A;if(!e||!e.state||t>5||t<0)return e?v(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===b&&4!==t)return v(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===y)if(2===i.wrap)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,255&i.gzhead.time),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,255&i.gzhead.extra.length),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,3),i.status=E);else{var c=u+(i.w_bits-8<<4)<<8;c|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(c|=32),c+=31-c%31,i.status=E,F(i,c),0!==i.strstart&&(F(i,e.adler>>>16),F(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending!==i.pending_buf_size));)R(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.status=_)}else i.status=_;if(i.status===_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&k(e),i.pending+2<=i.pending_buf_size&&(R(i,255&e.adler),R(i,e.adler>>8&255),e.adler=0,i.status=E)):i.status=E),0!==i.pending){if(k(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&Q(t)<=Q(r)&&4!==t)return v(e,-5);if(i.status===b&&0!==e.avail_in)return v(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==f&&i.status!==b){var d=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(t===f)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=w){if(x(e),e.lookahead<=w&&t===f)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=m&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+w;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=m?(r=o._tr_tally(e,1,e.match_length-m),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==d&&4!==d||(i.status=b),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),h;if(2===d&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),k(e),0===e.avail_out))return i.last_flush=-1,h}return 4!==t?h:i.wrap<=0?1:(2===i.wrap?(R(i,255&e.adler),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,255&e.total_in),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),k(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==y&&69!==t&&73!==t&&91!==t&&t!==_&&t!==E&&t!==b?v(e,l):(e.state=null,t===E?v(e,-3):h):l},t.deflateSetDictionary=function(e,t){var r,n,o,a,A,f,c,u,d=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==y||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new i.Buf8(r.w_size),i.arraySet(u,t,d-r.w_size,r.w_size,0),t=u,d=r.w_size),A=e.avail_in,f=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(r);r.lookahead>=m;){n=r.strstart,o=r.lookahead-(m-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,A,f,h,l,c,u,d,g,I,p,C,m,w,B,y,_,E,b,v;r=e.state,n=e.next_in,b=e.input,i=n+(e.avail_in-5),o=e.next_out,v=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),A=r.dmax,f=r.wsize,h=r.whave,l=r.wnext,c=r.window,u=r.hold,d=r.bits,g=r.lencode,I=r.distcode,p=(1<>>=w=m>>>24,d-=w,0==(w=m>>>16&255))v[o++]=65535&m;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}m=g[(65535&m)+(u&(1<>>=w,d-=w),d<15&&(u+=b[n++]<>>=w=m>>>24,d-=w,16&(w=m>>>16&255)){if(y=65535&m,d<(w&=15)&&(u+=b[n++]<A){e.msg="invalid distance too far back",r.mode=30;break e}if(u>>>=w,d-=w,y>(w=o-s)){if((w=y-w)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(_=0,E=c,0===l){if(_+=f-w,w2;)v[o++]=E[_++],v[o++]=E[_++],v[o++]=E[_++],B-=3;B&&(v[o++]=E[_++],B>1&&(v[o++]=E[_++]))}else{_=o-y;do{v[o++]=v[_++],v[o++]=v[_++],v[o++]=v[_++],B-=3}while(B>2);B&&(v[o++]=v[_++],B>1&&(v[o++]=v[_++]))}break}if(64&w){e.msg="invalid distance code",r.mode=30;break e}m=I[(65535&m)+(u&(1<>3,u&=(1<<(d-=B<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(9805),i=r(3269),o=r(4823),s=r(7293),a=r(1998),A=0,f=-2,h=1,l=12,c=30,u=852,d=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(u),t.distcode=t.distdyn=new n.Buf32(d),t.sane=1,t.back=-1,A):f}function C(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):f}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,C(e))):f}function w(e,t){var r,n;return e?(n=new I,e.state=n,n.window=null,(r=m(e,t))!==A&&(e.state=null),r):f}var B,y,_=!0;function E(e){if(_){var t;for(B=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,B,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=B,e.lenbits=9,e.distcode=y,e.distbits=5}function b(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,O,2,0),w=0,B=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",r.mode=c;break}if(8!=(15&w)){e.msg="unknown compression method",r.mode=c;break}if(B-=4,x=8+(15&(w>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=c;break}r.dmax=1<>8&1),512&r.flags&&(O[0]=255&w,O[1]=w>>>8&255,r.check=o(r.check,O,2,0)),w=0,B=0,r.mode=3;case 3:for(;B<32;){if(0===C)break e;C--,w+=u[I++]<>>8&255,O[2]=w>>>16&255,O[3]=w>>>24&255,r.check=o(r.check,O,4,0)),w=0,B=0,r.mode=4;case 4:for(;B<16;){if(0===C)break e;C--,w+=u[I++]<>8),512&r.flags&&(O[0]=255&w,O[1]=w>>>8&255,r.check=o(r.check,O,2,0)),w=0,B=0,r.mode=5;case 5:if(1024&r.flags){for(;B<16;){if(0===C)break e;C--,w+=u[I++]<>>8&255,r.check=o(r.check,O,2,0)),w=0,B=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((v=r.length)>C&&(v=C),v&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,I,v,x)),512&r.flags&&(r.check=o(r.check,u,v,I)),C-=v,I+=v,r.length-=v),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===C)break e;v=0;do{x=u[I+v++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&v>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;B<32;){if(0===C)break e;C--,w+=u[I++]<>>=7&B,B-=7&B,r.mode=27;break}for(;B<3;){if(0===C)break e;C--,w+=u[I++]<>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6===t){w>>>=2,B-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=c}w>>>=2,B-=2;break;case 14:for(w>>>=7&B,B-=7&B;B<32;){if(0===C)break e;C--,w+=u[I++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&w,w=0,B=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(v=r.length){if(v>C&&(v=C),v>m&&(v=m),0===v)break e;n.arraySet(d,u,I,v,p),C-=v,I+=v,m-=v,p+=v,r.length-=v;break}r.mode=l;break;case 17:for(;B<14;){if(0===C)break e;C--,w+=u[I++]<>>=5,B-=5,r.ndist=1+(31&w),w>>>=5,B-=5,r.ncode=4+(15&w),w>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,B-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,U={bits:r.lenbits},L=a(0,r.lens,0,19,r.lencode,0,r.work,U),r.lenbits=U.bits,L){e.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&T,!((k=T>>>24)<=B);){if(0===C)break e;C--,w+=u[I++]<>>=k,B-=k,r.lens[r.have++]=R;else{if(16===R){for(q=k+2;B>>=k,B-=k,0===r.have){e.msg="invalid bit length repeat",r.mode=c;break}x=r.lens[r.have-1],v=3+(3&w),w>>>=2,B-=2}else if(17===R){for(q=k+3;B>>=k)),w>>>=3,B-=3}else{for(q=k+7;B>>=k)),w>>>=7,B-=7}if(r.have+v>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=c;break}for(;v--;)r.lens[r.have++]=x}}if(r.mode===c)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,U={bits:r.lenbits},L=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,U),r.lenbits=U.bits,L){e.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,U={bits:r.distbits},L=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,U),r.distbits=U.bits,L){e.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(C>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=I,e.avail_in=C,r.hold=w,r.bits=B,s(e,_),p=e.next_out,d=e.output,m=e.avail_out,I=e.next_in,u=e.input,C=e.avail_in,w=r.hold,B=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;D=(T=r.lencode[w&(1<>>16&255,R=65535&T,!((k=T>>>24)<=B);){if(0===C)break e;C--,w+=u[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=B);){if(0===C)break e;C--,w+=u[I++]<>>=F,B-=F,r.back+=F}if(w>>>=k,B-=k,r.back+=k,r.length=R,0===D){r.mode=26;break}if(32&D){r.back=-1,r.mode=l;break}if(64&D){e.msg="invalid literal/length code",r.mode=c;break}r.extra=15&D,r.mode=22;case 22:if(r.extra){for(q=r.extra;B>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;D=(T=r.distcode[w&(1<>>16&255,R=65535&T,!((k=T>>>24)<=B);){if(0===C)break e;C--,w+=u[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=B);){if(0===C)break e;C--,w+=u[I++]<>>=F,B-=F,r.back+=F}if(w>>>=k,B-=k,r.back+=k,64&D){e.msg="invalid distance code",r.mode=c;break}r.offset=R,r.extra=15&D,r.mode=24;case 24:if(r.extra){for(q=r.extra;B>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===m)break e;if(v=_-m,r.offset>v){if((v=r.offset-v)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=c;break}v>r.wnext?(v-=r.wnext,Q=r.wsize-v):Q=r.wnext-v,v>r.length&&(v=r.length),S=r.window}else S=d,Q=p-r.offset,v=r.length;v>m&&(v=m),m-=v,r.length-=v;do{d[p++]=S[Q++]}while(--v);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;d[p++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;B<32;){if(0===C)break e;C--,w|=u[I++]<{"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,A,f,h,l,c){var u,d,g,I,p,C,m,w,B,y=c.bits,_=0,E=0,b=0,v=0,Q=0,S=0,k=0,D=0,R=0,F=0,M=null,N=0,x=new n.Buf16(16),L=new n.Buf16(16),U=null,q=0;for(_=0;_<=15;_++)x[_]=0;for(E=0;E=1&&0===x[v];v--);if(Q>v&&(Q=v),0===v)return f[h++]=20971520,f[h++]=20971520,c.bits=1,0;for(b=1;b0&&(0===e||1!==v))return-1;for(L[1]=0,_=1;_<15;_++)L[_+1]=L[_]+x[_];for(E=0;E852||2===e&&R>592)return 1;for(;;){m=_-k,l[E]C?(w=U[q+l[E]],B=M[N+l[E]]):(w=96,B=0),u=1<<_-k,b=d=1<>k)+(d-=u)]=m<<24|w<<16|B}while(0!==d);for(u=1<<_-1;F&u;)u>>=1;if(0!==u?(F&=u-1,F+=u):F=0,E++,0==--x[_]){if(_===v)break;_=t[r+l[E]]}if(_>Q&&(F&I)!==g){for(0===k&&(k=Q),p+=b,D=1<<(S=_-k);S+k852||2===e&&R>592)return 1;f[g=F&I]=Q<<24|S<<16|p-h}}return 0!==F&&(f[p+F]=_-k<<24|64<<16),c.bits=Q,0}},4674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,s=286,a=30,A=15,f=16,h=[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],l=[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],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);i(d);var g=new Array(60);i(g);var I=new Array(512);i(I);var p=new Array(256);i(p);var C=new Array(29);i(C);var m,w,B,y=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function b(e){return e<256?I[e]:I[256+(e>>>7)]}function v(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Q(e,t,r){e.bi_valid>f-r?(e.bi_buf|=t<>f-e.bi_valid,e.bi_valid+=r-f):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function D(e,t,r){var n,i,o=new Array(A+1),s=0;for(n=1;n<=A;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=k(o[a]++,a))}}function R(e){var t;for(t=0;t8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,f=t.dyn_tree,h=t.max_code,l=t.stat_desc.static_tree,c=t.stat_desc.has_stree,u=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,g=t.stat_desc.max_length,I=0;for(o=0;o<=A;o++)e.bl_count[o]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=f[2*f[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,I++),f[2*n+1]=o,n>h||(e.bl_count[o]++,s=0,n>=d&&(s=u[n-d]),a=f[2*n],e.opt_len+=a*(o+s),c&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==I){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,I-=2}while(I>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>h||(f[2*i+1]!==o&&(e.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(e,t),D(o,h,e.bl_count)}function U(e,t,r){var n,i,o=-1,s=t[1],a=0,A=7,f=4;for(0===s&&(A=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?O(e,t,r,n):4===e.strategy||s===i?(Q(e,2+(n?1:0),3),x(e,d,g)):(Q(e,4+(n?1:0),3),function(e,t,r,n){var i;for(Q(e,t-257,5),Q(e,r-1,5),Q(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+o+1)]++,e.dyn_dtree[2*b(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){Q(e,2,3),S(e,256,d),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,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IgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3FFDRELIAEoAgQiDCABKAIIIg1GDQ4CQCABKAIAIgogDGotAAAiCw0AIAAgDDYCECABIAxBAWo2AgRBBiECDAwLQQAhAiAAQQA2AqgBIABBAjYCACAAIAtBAnRBBGoiCzYCrAEgACALNgJACyAIIAJqQQhqIAogDGogDSAMayIMIAsgAmsiAiAMIAJJGyICEIeAgIAAGiABIAIgASgCBGo2AgRBACEMIABBACAAKAKoASACaiICIAIgACgCrAEiC0YbNgKoASACIAtHDQ8gACACQXxqIgI2AqwBQQchDCAEIAJBABCNgICAACAAIAAoAqwBIgtqQbABaigAAEcNDyAAQQI2AqgBIAAtALEBIgJBP3ENDAJAAkAgAkHAAHFFDQAgACAEIAggCxCRgICAAEEBRw0RIAAgACkDCDcDMCAALQCxASECDAELIABCfzcDMAtCfyEOAkAgAkEYdEEYdUF/Sg0AIAAgBCAIIAAoAqwBEJGAgIAAQQFHDRAgACkDCCEOCyAAIA43AzggACgCrAEiDSAAKAKoASICa0ECSQ0PIAAgAkEBaiIKNgKoASAIIAJqQQhq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IgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiALQQt2IA8vAQAiCmwiA08iEg0AIAAgAzYCACAKQYAQIAprQQV2aiEKDAELIAAgDiADayIONgIEIAAgCyADayIDNgIAIAogCkEFdmshCkEAIQ0LIA8gCjsBACANIBFzIQ0gBEEBdCASciIEQYACSQ0ACwsgACACQQFqNgIgIAAoAhggAmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC3YgDS8BACIEbCIJTw0AIAAgCTYCACANIARBgBAgBGtBBXZqOwEAIAAoAlghAwwBCyAAIA4gCWsiDjYCBCANIAQgBEEFdms7AQAgD0HABGohBAJAIAMgCWsiA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgCkEBajYCECAAIA5BCHQgACgCDCAKai0AAHIiDjYCBAsCQAJAIA4gA0ELdiAELwEAIg1sIglPDQAgACAJNgIAIAQgDUGAECANa0EFdmo7AQAgACgCXCEDDAELIAAgDiAJazYCBCAAIAMgCWs2AgAgACgCYCEDIAAgACgCXDYCYCAEIA0gDUEFdms7AQALIAAgACgCWDYCXAsgACAAKAJUNgJYIAAgAzYCVAsgAEEIQQsgACgCZEEHSRs2AmQgACAHIAsQn4CAgAAMAQsgBCANQYAQIA1rQQV2ajsBACAAIAk2AgAgACAAKAJcNgJgIAAgACkCVDcCWCAAQQdBCiAAKAJkQQdJGzYCZCAAIAUgCxCfgICAACAAKAJoIgNBfmpBAyADQQZJGyEKIAAoAgAhA0EBIQ4DQCAAIApBB3RqIA5BAXQiDmpB2AdqIQ0CQAJAIANBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgRBAWo2AhAgACAAKAIEQQh0IAQgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgDS8BACIJbCIPSQ0AIAAgBCAPayIENgIEIAAgAyAPayIDNgIAIA0gCSAJQQV2azsBACAOQQFyIQ4MAQsgACAPNgIAIA0gCUGAECAJa0EFdmo7AQAgDyEDCyAOQcAASQ0ACwJAIA5BQGoiCUEDSw0AIAAgCTYCVAwBCyAAIA5BAXFBAnIiDTYCVCAJQQF2IQ8CQCAJQQ1LDQAgACANIA9Bf2oiDHQiCzYCVEEBIQ0gCCALQQF0akGEC2ohEEE/IA5rIRFBACEPA0AgECARIA1qQQF0aiEOAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA4vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACAOIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDUEBdEEBciENDAELIAAgAzYCACAOIAlBgBAgCWtBBXZqOwEAIA1BAXQhDQsgDCAPQQFqIg9HDQAMAgsLIA9Be2ohDgNAAkAgA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgACgCECIJQQFqNgIQIARBCHQgCSAAKAIMai0AAHIhBAsgACADQQF2IgM2AgAgACAEIANrIgRBH3UiCSANQQF0akEBaiINNgJUIAAgCSADcSAEaiIENgIEIA5Bf2oiDg0ACyAAIA1BBHQiCzYCVEEAIQ9BASEOA0AgACAOQQF0Ig5qQbwNaiENAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA0vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACANIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDkEBciEODAELIAAgAzYCACANIAlBgBAgCWtBBXZqOwEACyAPQQFqIg9BBEcNAAsLAkAgASAGIAAoAlQQnoCAgAANAEEADwsgACgCICECCyACIAAoAihJDQALC0EBIQMCQCAAKAIAIgRB////B0sNACAAIARBCHQ2AgBBASEDIAAgACgCECIEQQFqNgIQIAAgACgCBEEIdCAEIAAoAgxqLQAAcjYCBAsgAwtwAQF/AkBBqN4BEICAgIAAIgJFDQAgAkE0aiABNgIAIAJBPGogADYCAAJAAkACQCAAQX9qDgIAAQILIAIgARCAgICAACIANgIYIAANASACEIKAgIAADAILIAJBADYCGCACQThqQQA2AgALIAIPC0EAC9IBAQJ/QQYhAgJAIAFBJ0sNACAAQTBqIAFBAXFBAnIgAUEBdkELanQiATYCAAJAAkAgAEE8aigCACIDRQ0AQQQhAiABIABBNGooAgBLDQIgAEEsaiABNgIAIANBAkcNACAAQThqIgMoAgAgAU8NACAAIAE2AjggACgCGBCCgICAACAAIAAoAjAQgICAgAAiATYCGCABDQBBAyECDAELQQAhAiAAQQA2AkAgAEHQAGpBAToAACAAQegAakEANgIAIABB5N0BaiEDCyADQQA2AgALIAILIwACQCAAQTxqKAIARQ0AIAAoAhgQgoCAgAALIAAQgoCAgAAL9QEBBH9BACEDAkAgACgCDCACTQ0AIAAoAhggAk0NACABIAEoAgAiBCAAKAIQIAAoAggiBWsiBiAEIAYgBEkbIgRrNgIAIAUgAkF/c2ohAQJAIAUgAksNACAAKAIUIAFqIQELIAAoAgAiAiABai0AACEGQQEhAyAAIAVBAWo2AgggAiAFaiAGOgAAAkAgBEF/aiICRQ0AA0AgACgCACIFQQAgAUEBaiIBIAEgACgCFEYbIgFqLQAAIQQgACAAKAIIIgZBAWo2AgggBSAGaiAEOgAAIAJBf2oiAg0ACwsgACgCDCAAKAIIIgFPDQAgACABNgIMCyADC8gEAQd/AkACQCAAKAIAIgNBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAAKAIEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgAS8BACIGbCIFTw0AIAEgBkGAECAGa0EFdmo7AQAgASACQQR0akEEaiEHQQghCEECIQkMAQsgACAEIAVrIgQ2AgQgASAGIAZBBXZrOwEAAkAgAyAFayIDQf///wdLDQAgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkAgBCADQQt2IAEvAQIiBmwiBU8NACABIAZBgBAgBmtBBXZqOwECIAEgAkEEdGpBhAJqIQdBCCEIQQohCQwBCyAAIAQgBWsiBDYCBCABIAYgBkEFdms7AQIgAUGEBGohByADIAVrIQVBgAIhCEESIQkLIABB6ABqIAk2AgBBASEBA0AgByABQQF0IgFqIQMCQAJAIAVB////B00NACAFIQIMAQsgACAFQQh0IgI2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIAJBC3YgAy8BACIGbCIFSQ0AIAAgBCAFayIENgIEIAAgAiAFayIFNgIAIAMgBiAGQQV2azsBACABQQFyIQEMAQsgACAFNgIAIAMgBkGAECAGa0EFdmo7AQALIAEgCEkNAAsgAEHoAGogASAIayAJajYCAAsLNQEAQYAICy4IAAAAEAAAABgAAAAgAAAAKAAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>o});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class o extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});o._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){o._moduleInstance||await(o._moduleInstancePromise||(o._moduleInstancePromise=o._getModuleInstance())),t=new r(o._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},3617:()=>{},772:()=>{},4132:(e,t,r)=>{"use strict";var n=r(8287).Buffer;function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const o=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function s(e){if(n.isBuffer(e))return e;if("number"==typeof e)return n.alloc(e);if("string"==typeof e)return n.from(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function a(e,t){e=s(e),n.isBuffer(t)&&(t=t.readUInt32BE(0));let r=~t;for(var i=0;i>>8;return~r}function A(){return function(e){const t=s(4);return t.writeInt32BE(e,0),t}(a.apply(null,arguments))}A.signed=function(){return a.apply(null,arguments)},A.unsigned=function(){return a.apply(null,arguments)>>>0};const f=i(A);e.exports=f}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);return n})(); \ No newline at end of file +export default (()=>{var e={4923:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8712),o=r(5931),s=r(9747);function a(e,t){const[r,n,i,o,s,a]=t,A=r;e[A]||(e[A]=[]),e[A].push({start:n,span:i,containerStart:o,sliceStart:s,sliceBytes:a})}t.default=class{constructor(e){this.filehandle=(0,o.open)(e.url,e.path,e.filehandle)}parseIndex(){return n(this,void 0,void 0,(function*(){const e={},t=31===(r=yield this.filehandle.readFile())[0]&&139===r[1]?(0,i.unzip)(r):r;var r;if(t.length>4&&21578050===t.readUInt32LE(0))throw new s.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let n=[],o="";for(const r of t)if(r>=48&&r<=57||!o&&45===r)o+=String.fromCharCode(r);else if(9===r)n.push(Number.parseInt(o,10)),o="";else if(10===r)n.push(Number.parseInt(o,10)),o="",a(e,n),n=[];else if(13!==r&&32!==r)throw new s.CramMalformedError("invalid .crai index file");return o&&n.push(Number.parseInt(o,10)),6===n.length&&a(e,n),Object.entries(e).forEach((([t,r])=>{const n=r;e[t]=n.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(){return this.parseIndexP||(this.parseIndexP=this.parseIndex().catch((e=>{throw this.parseIndexP=void 0,e}))),this.parseIndexP}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},o=[];for(const e of n)0===i(e)&&o.push(e);return o}))}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,s.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=a},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),o=r(400);class s extends i.default{constructor(e,t,r){super(e,t),this.instantiateCodec=r}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),o=this._getDataCodec(),s=new Uint8Array(i);for(let a=0;a{(0,o.tinyMemoize)(s,e)}))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{decode(e,t,r,n){const{blockContentId:o}=this.parameters,s=r[o];if(!s)throw new i.CramMalformedError(`no block found with content ID ${o}`);const a=n.externalBlocks.getCursor(o);return this._decodeByteArray(s,a)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let o=t.bytePosition;for(;r[o]!==n&&o=e.content.length)throw new a.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=A},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,s.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,s.getBits)(t.content,n.coreBlock,i-1)|1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;te.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const o=Number.parseInt(r,10);n.forEach((r=>{const n={bitLength:o,value:r,bitCode:0};t+=1;const s=o-e;if(t<<=s,n.bitCode=t,e+=s,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>o)throw new i.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6524),i=r(9747),o={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){const t=this.tagCodecCache[e];if(t)return t;{const t=this.tagEncoding[e];if(!t)throw new Error("Error, no tag encoding");const r=(0,n.instantiateCodec)(t,"byteArray");return this.tagCodecCache[e]=r,r}}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const s=o[e];if(!s)throw new i.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,s),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=r(9747),a=r(400),A=i(r(6771)),f=i(r(7219)),h=r(3165);class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(!(null==e?void 0:e.numRecords))return null;const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),n=yield this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new s.CramMalformedError(`invalid content type ${n.contentType} in compression header block`);const i=(0,a.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return Object.assign(Object.assign({},n),{parsedContent:i})}))}getFirstBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(e)return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return n(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new A.default(this,e,t)}_readContainerHeader(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),{cramContainerHeader1:n,cramContainerHeader2:i}=r,{size:s}=yield this.file.stat();if(e>=s)return void console.warn(`pos:${e}>=fileSize:${s} in cram container`);const A=o.Buffer.allocUnsafe(n.maxLength);yield this.file.read(A,0,n.maxLength,e);const f=(0,a.parseItem)(A,n.parser),l=(0,a.itf8Size)(f.numLandmarks);if(e+f.length>=s)return void console.warn(`container at ${e} is beyond fileSize:${s}, skipping`);const u=o.Buffer.allocUnsafe(i.maxLength(f.numLandmarks));yield this.file.read(u,0,i.maxLength(f.numLandmarks),e+f._size-l);const c=(0,a.parseItem)(u,i.parser);return this.file.validateChecksums&&void 0!==c.crc32&&(yield this.file.checkCrc32(e,f._size+c._size-l-4,c.crc32,`container header beginning at position ${e}`)),Object.assign(f,c,{_size:f._size+c._size-l,_endPosition:f._size+c._size-l+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>{(0,a.tinyMemoize)(l,e)}))},6794:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=i(r(928)),a=i(r(7392)),A=i(r(6960)),f=i(r(235)),h=r(1307),l=r(9747),u=r(8712),c=i(r(9989)),d=r(3165),g=i(r(78)),I=r(5931),p=r(400),C=r(5417);class m{constructor(e){var t;if(this.file=(0,I.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new a.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return n(this,void 0,void 0,(function*(){const{maxLength:e,parser:t}=(0,d.cramFileDefinition)(),r=o.Buffer.allocUnsafe(e);yield this.file.read(r,0,e,0);const n=t(r).value;if(2!==n.majorVersion&&3!==n.majorVersion)throw new l.CramUnimplementedError(`CRAM version ${n.majorVersion} not supported`);return n}))}getSamHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new l.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,C.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),i=r.toString("utf8",4,4+n);return this.header=i,(0,C.parseHeaderText)(i)}))}getHeaderText(){return n(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getContainerById(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=yield this.file.stat(),{cramContainerHeader1:o}=r;let s;for(let t=0;t<=e;t++){if(n+o.maxLength+8>=i)return;s=this.getContainerAtPosition(n);const r=yield s.getHeader();if(!r)throw new l.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e=i)return;const s=o.Buffer.allocUnsafe(n.maxLength);return yield this.file.read(s,0,n.maxLength,e),(0,p.parseItem)(s,n.parser,0,e)}))}_parseSection(e,t){return n(this,arguments,void 0,(function*(e,t,r=e.maxLength,n){let i;if(n)i=n;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;i=o.Buffer.allocUnsafe(r),yield this.file.read(i,0,r,t)}const s=(0,p.parseItem)(i,e.parser,0,t);if(s._size!==r)throw new l.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${s._size}`);return s}))}_uncompress(e,t,r){return n(this,void 0,void 0,(function*(){if("gzip"===e)(0,u.unzip)(t).copy(r);else if("bzip2"===e){const e=f.default.array(t);let n,i=f.default.header(e),s=0;do{n=f.default.decompress(e,i),-1!==n&&(o.Buffer.from(n).copy(r,s),s+=n.length,i-=n.length)}while(-1!==n)}else if("lzma"===e){const e=new Response(new h.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));o.Buffer.from(yield e.arrayBuffer()).copy(r)}else if("rans"===e)(0,c.default)(t,r);else if("rans4x16"===e)A.default.r4x16_uncompress(t,r);else if("arith"===e)A.default.arith_uncompress(t,r);else if("fqzcomp"===e)A.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new l.CramUnimplementedError(`${e} decompression not yet implemented`);A.default.tok3_uncompress(t,r)}var n}))}readBlock(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t),n=yield this.readBlockHeader(e);if(void 0===n)return;const i=n._endPosition,s=o.Buffer.allocUnsafe(n.uncompressedSize),a=Object.assign(Object.assign({},n),{_endPosition:i,contentPosition:i,content:s});if("raw"!==n.compressionMethod){const e=o.Buffer.allocUnsafe(n.compressedSize);yield this.read(e,0,n.compressedSize,i),yield this._uncompress(n.compressionMethod,e,s)}else yield this.read(s,0,n.uncompressedSize,i);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,i+n.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=i+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>{(0,p.tinyMemoize)(m,e)}))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var o=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),o={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function s(e){const t={};for(const[r,n]of e)t[`is${n}`]=e=>!!(e&r),t[`set${n}`]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=s(t.BamFlags),t.CramFlagsDecoder=s(t.CramFlags),t.MateFlagsDecoder=s(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:o,mateRecordNumber:s,readBases:a,readFeatures:A,mateToUse:f,readGroupId:h,readName:l,sequenceId:u,uniqueId:c,templateSize:d,alignmentStart:g,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=o,a&&(this.readBases=a),this.readGroupId=h,this.readName=l,this.sequenceId=u,this.uniqueId=c,this.templateSize=d,this.alignmentStart=g,this.tags=I,A&&(this.readFeatures=A),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),s&&(this.mateRecordNumber=s)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,o=0;for(;n.lengththis.mate.alignmentStart&&o>0&&(o=-o),o>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){const i=n.refPos-t.start,s=t.seq.charAt(i);s&&(n.ref=s);let a=o[s];void 0===a&&(a=4);const A=r.substitutionMatrix[a][n.data];A&&(n.sub=A)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=o,t.cramBlockCrc32=s,t.cramTagDictionary=A,t.cramPreservationMap=f,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:o(),cramBlockCrc32:s(),cramDataSeriesEncodingMap:d(),cramTagEncodingMap:g(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=f().parser(e,t);t=n;const{value:i,offset:o}=d().parser(e,t);t=o;const{value:s,offset:a}=g().parser(e,t);return t=a,{value:{dataSeriesEncoding:h(i),preservation:h(r),tagEncoding:h(s)},offset:t}}},cramEncoding:{parser:(e,t)=>c(e,t)},cramUnmappedSliceHeader:l(e),cramMappedSliceHeader:u(e),cramContainerHeader1:I(e),cramContainerHeader2:p(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length);let i=0;const o=e.subarray(i,i+4).toString();i+=4;const s=n.getUint8(i);i+=1;const a=n.getUint8(i);i+=1;const A=r.subarray(i,i+20).toString().replaceAll("\0","");return i+=20,{value:{magic:o,majorVersion:s,minorVersion:a,fileId:A},offset:i}},maxLength:26}}function o(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let o=0;const s=i.getUint8(o),a=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][s];if(!a)throw new Error(`compression method number ${s} not implemented`);o+=1;const A=i.getUint8(o),f=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][A];if(!f)throw new Error(`invalid block content type id ${A}`);o+=1;const[h,l]=(0,n.parseItf8)(e,o);o+=l;const[u,c]=(0,n.parseItf8)(e,o);o+=c;const[d,g]=(0,n.parseItf8)(e,o);return o+=g,{offset:o,value:{uncompressedSize:d,compressedSize:u,contentId:h,contentType:f,compressionMethod:a}}},maxLength:17}}function s(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function a(e,t,r){const n=e.toString("utf8",t,r),i=[];for(let e=0;e{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const o=e.subarray(t,t+r);t+=r;const s=[];let A=0,f=0;for(;fA&&s.push(a(o,A,f)),{value:{size:r,ents:s},offset:t}}}}function f(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,f]=(0,n.parseItf8)(e,t);t+=f;const h=[];for(let r=0;r{const[i,o]=(0,n.parseItf8)(t,r);r+=o;let s=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,s=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,s=e}else console.warn("recordCounter=0");const[a,A]=(0,n.parseItf8)(t,r);r+=A;const[f,h]=(0,n.parseItf8)(t,r);r+=h;const l=[];for(let e=0;e=2&&(u=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:s,md5:u,contentIds:l,numContentIds:f,numBlocks:a,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function u(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,o]=(0,n.parseItf8)(t,r);r+=o;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;let u=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,u=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,u=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[c,d]=(0,n.parseItf8)(t,r);r+=d;const[g,I]=(0,n.parseItf8)(t,r);r+=I;const p=[];for(let e=0;e=2&&(B=[...t.subarray(r,r+16)],r+=16),{value:{md5:B,numBlocks:c,numRecords:h,numContentIds:g,refSeqSpan:A,refSeqId:i,refSeqStart:s,recordCounter:u,refBaseBlockId:C,contentIds:p},offset:r}},maxLength:e=>60+5*e}}function c(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,A]=(0,n.parseItf8)(e,t);t+=A;const f={};if(0===o);else if(1===o){const[r,i]=(0,n.parseItf8)(e,t);f.blockContentId=r,t+=i}else if(2===o){const[r,i]=(0,n.parseItf8)(e,t);f.offset=r,t+=i;const[o,s]=(0,n.parseItf8)(e,t);f.M=o,t+=s}else if(3===o){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const o=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:s,offset:A}=c(e,t);t=A,a.push({key:o,value:s})}return{value:{mapSize:r,ents:a,mapCount:o},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;const[u,c]=(0,n.parseItf8)(t,r);r+=c;let d,g=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);g=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);g=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);d=e,r+=i}const[I,p]=(0,n.parseItf8)(t,r);r+=p;const[C,m]=(0,n.parseItf8)(t,r);return{value:{length:o,refSeqId:s,refSeqStart:A,alignmentSpan:h,numBlocks:I,numLandmarks:C,numBases:d,recordCounter:g,numRecords:u},offset:r+=m}}}}function p(e){return{parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length),[s,a]=(0,n.parseItf8)(t,r);r+=a;const A=[];for(let e=0;e=3&&(f=o.getUint32(r,!0),r+=4),{value:Object.assign(Object.assign({},void 0===f?{}:{crc32:f}),{numLandmarks:s,landmarks:A}),offset:r}},maxLength:e=>5+5*e+4}}},6484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,A,f,h,l,u,c){let d=t("BF");const g=t("CF");if(!(0,o.isMappedSliceHeader)(A.parsedContent))throw new Error("slice header not mapped");const I=u>1&&-2===A.parsedContent.refSeqId?t("RI"):A.parsedContent.refSeqId,p=t("RL");let C=t("AP");r.APdelta&&(C+=l.lastAlignmentStart),l.lastAlignmentStart=C;const m=t("RG");let B,w,y,_;if(r.readNamesIncluded&&(B=s(t("RN"))),i.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=s(t("RN")),B=n);const o=t("NS"),a=t("NP");(e||o>-1)&&(w={mateFlags:e,mateSequenceId:o,mateAlignmentStart:a,mateReadName:n}),y=t("TS"),i.MateFlagsDecoder.isUnmapped(e)&&(d=i.BamFlagsDecoder.setMateUnmapped(d)),i.MateFlagsDecoder.isOnNegativeStrand(e)&&(d=i.BamFlagsDecoder.setMateReverseComplemented(d))}else i.CramFlagsDecoder.isWithMateDownstream(g)&&(_=t("NF")+c+1);const E=t("TL");if(E<0)throw new n.CramMalformedError("invalid TL index");const v={},b=r.getTagNames(E),Q=b.length;for(let t=0;t1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!h)throw new n.CramMalformedError(`invalid read feature code "${t}"`);let l=f(h);const u={B:["number","QS"]}[t];u&&(l=[l,f(u)]),s+=i;const c=s;a+=i;const d=a;"D"===t||"N"===t?a+=l:"I"===t||"S"===t?a-=l.length:"i"===t&&(a-=1),A[e]={code:t,pos:c,refPos:d,data:l}}return A}(C,e,t,0,u)),k=p,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${B||`${I}:${C}`} record has invalid read features`),k=p),D=t("MQ"),i.CramFlagsDecoder.isPreservingQualityScores(g)){R=new Array(p);for(let e=0;e=0){const i=e[r.mateRecordNumber];if(!i)throw new o.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(i))}return n}(r),i=n.map((e=>e.alignmentStart)),s=n.map((e=>e.alignmentStart+e.readLength-1)),a=Math.max(...s)-Math.min(...i)+1;a>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new o.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),r.mateRecordNumber=void 0}class c{constructor(e,t,r){this.container=e,this.containerPosition=t,this.sliceSize=r,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=(0,h.getSectionParsers)(e),r=yield this.container.getHeader();if(!r)throw new Error("no container header detected");const n=yield this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}throw new o.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,h.isMappedSliceHeader)(e))throw new Error("slice header not mapped");if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new o.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new o.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){var e,t;const{majorVersion:r}=yield this.file.getDefinition(),n=yield this.container.getCompressionScheme();if(void 0===n)throw new Error("compression scheme undefined");const i=yield this.getHeader(),a=yield this._getBlocksContentIdIndex();if(r>1&&this.file.options.checkSequenceMD5&&(0,h.isMappedSliceHeader)(i.parsedContent)&&i.parsedContent.refSeqId>=0&&"0000000000000000"!==(null===(e=i.parsedContent.md5)||void 0===e?void 0:e.join(""))){const e=yield this.getReferenceRegion();if(e){const{seq:r,start:n,end:a}=e,A=(0,s.sequenceMD5)(r),f=null===(t=i.parsedContent.md5)||void 0===t?void 0:t.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(A!==f)throw new o.CramMalformedError(`MD5 checksum reference mismatch for ref ${i.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${f}, calculated MD5: ${A}`)}}const c=yield this.getCoreDataBlock(),d={lastAlignmentStart:(0,h.isMappedSliceHeader)(i.parsedContent)?i.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},g=e=>{const t=n.getCodecForDataSeries(e);if(!t)throw new o.CramMalformedError(`no codec defined for ${e} data series`);return t.decode(this,c,a,d)},I=new Array(i.parsedContent.numRecords);for(let e=0;e=0&&u(I,e,I[e],I[t])}return I}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const i=(yield r).filter(e);if(i.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,h.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const o={};for(const e of i){const r=void 0!==t?t:e.sequenceId;let n=o[r];n||(n={id:r,start:e.alignmentStart,end:Number.NEGATIVE_INFINITY,seq:null},o[r]=n);const i=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;i>n.end&&(n.end=i),e.alignmentStartn(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(const e of i){const n=o[void 0!==t?t:e.sequenceId];if(null==n?void 0:n.seq){const t=n.seq;e.addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return i}))}}t.default=c,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>{(0,s.tinyMemoize)(c,e)}))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new s.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){let r=t;const n=e[r];let i;if(n<128)i=n,r+=1;else if(n<192)i=16383&(e[r]<<8|e[r+1]),r+=2;else if(n<224)i=2097151&(e[r]<<16|e[r+1]<<8|e[r+2]),i=(63&n)<<16|e.readUInt16LE(r+1),r+=3;else if(n<240)i=268435455&(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4;else if(n<248)i=(15&e[r])*Math.pow(2,32)+(e[r+1]<<24)|e[r+2]<<16|e[r+3]<<8|e[r+4],r+=5;else if(n<252)i=((7&e[r])<<8|e[r+1])*Math.pow(2,32)+(e[r+2]<<24)|e[r+3]<<16|e[r+4]<<8|e[r+5],r+=6;else if(n<254)i=((3&e[r])<<16|e[r+1]<<8|e[r+2])*Math.pow(2,32)+(e[r+3]<<24)|e[r+4]<<16|e[r+5]<<8|e[r+6],r+=7;else if(n<255){if(i=o.default.fromBytesBE(e.slice(r+1,r+8)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=8}else{if(i=o.default.fromBytesBE(e.slice(r+1,r+9)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=9}return[i,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:o}=t(e,r);return Object.assign(Object.assign({},o),{_endPosition:i+n,_size:i-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,i.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))};const i=n(r(3503)),o=n(r(8570)),s=r(612)},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramRecord=t.CramFile=void 0;var i=r(7390);Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(i).default}}),Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return i.CramRecord}});var o=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(o).default}});var s=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(s).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9747),s=i(r(7390));t.default=class{constructor(e){var t;if(this.cram=null!==(t=e.cram)&&void 0!==t?t:new s.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof s.default))throw new Error("invalid arguments: no cramfile");this.index=e.index}getRecordsForRange(e,t,r){return n(this,arguments,void 0,(function*(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new o.CramUnimplementedError("string sequence names not yet supported");const i=e,s=yield this.index.getEntriesForRange(i,t,r),a=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,A=yield Promise.all(s.map((e=>this.getRecordsInSlice(e,a))));let f=Array.prototype.concat(...A);if(n.viewAsPairs){const e={},t={};for(const r of f){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const o=[];for(const e of f){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const A=[],h=[];for(const e of a){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),A.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));h.push(i)}const l=yield Promise.all(h);if(l.length){const e=l.reduce(((e,t)=>e.concat(t)));f=f.concat(e)}}return f}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1113);var i=r(1113);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let a=e.getInt(),A=e.getInt(),f=e.getInt(),h=e.getInt();const l=n.remaining(),u=-4&l;for(let i=0;i>2;let u=0,c=l,d=2*l,g=3*l,I=0,p=0,C=0,m=0;for(;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class o{constructor(){this.F=void 0,this.C=void 0}}function s(e,t,r,n){return r*(e>>n)+(e&(1<>o)+(e&(1<=128&&(t.fc[A].F&=-129,t.fc[A].F=(127&t.fc[A].F)<<8|255&e.get()),t.fc[A].C=i,s.default.symbolInit(r[A],t.fc[A].C,t.fc[A].F),t.R||(t.R=new Array(o.TOTFREQ)),t.R.fill(A,i,i+t.fc[A].F),i+=t.fc[A].F,0===n&&A+1===(255&e.getByteAt(e.position()))?(A=255&e.get(),n=255&e.get()):0!==n?(n-=1,A+=1):A=255&e.get()}while(0!==A);a(i=128&&(t[i].fc[h].F&=-129,t[i].fc[h].F=(127&t[i].fc[h].F)<<8|255&e.get()),t[i].fc[h].C=f,0===t[i].fc[h].F&&(t[i].fc[h].F=o.TOTFREQ),null==r[i][h]&&(r[i][h]=new s.default.RansDecSymbol),s.default.symbolInit(r[i][h],t[i].fc[h].C,t[i].fc[h].F),null==t[i].R&&(t[i].R=new Array(o.TOTFREQ)),t[i].R.fill(h,f,f+t[i].fc[h].F),f+=t[i].fc[h].F,a(f<=o.TOTFREQ),0===A&&h+1===(255&e.getByteAt(e.position()))?(h=255&e.get(),A=255&e.get()):0!==A?(A-=1,h+=1):h=255&e.get()}while(0!==h);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),o=r(6476),s=n(r(488));function a(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),u=n.get();if(0!==u&&1!==u)throw new o.CramMalformedError(`Invalid rANS order ${u}`);if(n.getInt()!==n.remaining()-h)throw new o.CramMalformedError("Incorrect input length.");const c=n.getInt(),d=new l(t||i.Buffer.allocUnsafe(c));if(d.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return i.Buffer.from((0,n.inflate)(e))};const n=r(1668),i=r(8287)},635:(e,t,r)=>{var n=r(8287).Buffer;const i=r(4646),o=r(8706),s=r(9614),a=r(235),A=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,i=t,o=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&A&&([n,i]=this.decodePackMeta(this.stream)),32&r)var s=this.decodeCat(this.stream,i);else s=4&r?this.decodeExt(this.stream,i):64&r?o?this.decodeRLE1(this.stream,i):this.decodeRLE0(this.stream,i):o?this.decode1(this.stream,i):this.decode0(this.stream,i);return r&A&&(s=this.decodePack(s,n,t)),s}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return n.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,i=1&t,s=e.length;return t&A&&([r,e,s]=this.encodePack(e)),t&A&&this.stream.WriteStream(r),64&t?i?this.encodeRLE1(e,s,this.stream):this.encodeRLE0(e,s,this.stream):i?this.encode1(e,s,this.stream):this.encode0(e,s,this.stream)}decode0(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new s(o),A=new i(e);A.RangeStartDecode(e);for(var f=0;f=3?3:h;for(A[l].ModelEncode(r,f,u),h-=u,l=256;3==u;)u=h>=3?3:h,A[l].ModelEncode(r,f,u),l=257,h-=u}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),A=0;A=3?3:l;for(A[u].ModelEncode(r,f,c),l-=c,u=256;3==c;)c=l>=3?3:l,A[u].ModelEncode(r,f,c),u=257,l-=c}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r>=1}}else if(this.nsym<=4)for(o=0,s=0;o>=2;else{if(!(this.nsym<=16))return e;for(o=0,s=0;o>=4}return i}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;ns),n[s]=new Array(i[s]);for(var a=0,A=0;As),a[s]=this.decodeStream(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,i=0;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var o=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){var s=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=s,s=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=s}return o}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){var o=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=o,o=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=o}}}},6038:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(9614),s=r(4646);function a(e,t,r){for(var n=0,i=0,o=-1,s=new Array(1024);i>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&l)for(var n=0;n0&&t.pflags&d)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&u&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&c&&a(e,t.dtab,256),t}function p(e,t,r,n,i,o){r.max_sel>0?i.s=n.sel.ModelDecode(e,t):i.s=0,i.x=r.stab[i.s];var s=r.params[i.x];if(s.fixed_len>=0){var a=n.len[0].ModelDecode(e,t);a|=n.len[1].ModelDecode(e,t)<<8,a|=n.len[2].ModelDecode(e,t)<<16,a|=n.len[3].ModelDecode(e,t)<<24,s.fixed_len>0&&(s.fixed_len=-a)}else a=-s.fixed_len;i.len=a,r.do_rev&&(o[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,s.pflags&A&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=a,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}function C(e,t,r){for(var n=0,i=0,o=new Array(2*r),s=0;n1?r.nparam-1:0,o=new Array(256);if(2&r)i=e.ReadByte(),a(e,o,256);else{for(var s=0;s0&&(t.sel=new o(e.max_sel+1)),t}(i),l=new s(e);l.RangeStartDecode(e);for(var u=new n.allocUnsafe(r),c={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},d=0;d0&&h.dup.ModelDecode(e,l)){for(var C=0;C4),qshift:l,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:l>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:A,nsym:a,do_qmap:u,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:l<=4?1:0,do_qtab:0,qbits:8+(l>4)-(0==s),sbits:1,sloc:15-(l<=4),do_stab:1,do_sel:1}]}(e,t,r,n),w=function(e,t,r,n,i,o,s){for(var a=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(I),1&I&&e.WriteByte(t.length),2&I){var p=1<0&&p--,e.WriteByte(p),C(e,s,256)}for(var m=0;m0){for(g=0;g<256;g++)n[m][g]=g;t[m].do_qtab&&C(e,n[m],256)}if(t[m].pbits>0){for(g=0;g<1024;g++)i[m][g]=Math.min((1<>t[m].pshift);C(e,i[m],1024)}if(t[m].dbits>0){for(g=0;g<256;g++)a[g]>(1<>t[m].dshift)];C(e,o[m],256)}}return e}(w,B,n,a,g,I,p);return function(e,t,r,n,i,a,A,f,h,l){var u=1<0&&u--;for(var c=t.length,d=0,g=0;g0&&m.ModelEncode(e,B,y);var _=l[y],E=r[Math.min(r.length-1,w++)];i[_].fixed_len?i[_].fixed_len>0&&(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255),i[_].fixed_len=-1):(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255)),i[_].do_dedup&&process.exit(1),g=E;var v=0,b=i[_].context,Q=0,S=0}var k=t[p++],D=a[_][k];I[b].ModelEncode(e,B,D),Q=(Q<0&&(b+=f[_][Math.min(g,1023)]<0&&(b+=h[_][Math.min(v,255)]<{"use strict";var n=r(8287).Buffer,i=r(5460),o=r(8223),s=r(635),a=r(6038),A=r(5997);e.exports={r4x8_uncompress:function(e,t){i.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){s.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=A.decode(e,0,"\0");n.from(r,"binary").copy(t,0,0)}}},8706:(e,t,r)=>{var n=r(8287).Buffer;e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=n.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},5460:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e){return 4095&e}function s(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function h(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<23>>n<<8)*r;e>=i;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,i),(Math.floor(e/n)<0?(s--,i++):(i=e.ReadByte())==o+1&&(s=e.ReadByte()),o=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function c(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var i=n/t;do{var o=0,s=0,a=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(o2?e[s]-=t-n:t!=n&&(i*=.99,a=1)}while(a)}function d(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new i(e),r=t.ReadByte(),h=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),i=new Array(256);u(e,r,i);for(var s=a(i),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var c=new n.allocUnsafe(t);for(l=0;l0?(a--,o++):(o=e.ReadByte())==s+1&&(a=e.ReadByte()),s=o}while(0!=o)}(e,r,i);for(var h=new Array(256),l=0;l<256;l++)h[l]=a(i[l]);for(var c=new Array(4),d=new Array(4),g=0;g<4;g++)c[g]=e.ReadUint32(),d[g]=0;var I=new n.allocUnsafe(t),p=Math.floor(t/4);for(l=0;l=0;a--)A[a%4]=l(A[a%4],u,s[e[a]],o[e[a]],12);for(a=3;a>=0;a--)h(A[a],u);var g=r.pos;return r.buf.writeInt32LE(g-9+(u.length-u.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}(e):function(e){const t=e.length;var r=new i("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),s=new Array(256),a=new Array(256),A=0;A<256;A++)s[A]=new Array(256),a[A]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var i=0;i<256;i++)t[n][i]=0}var o=0;for(n=0;n>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,s,o),function(e,t){for(var r=0;r<256;r++)t[r]&&c(e[r])}(s,o),function(e,t,r){for(var n=0,i=0;i<256;i++)if(r[i]){if(n>0)n--;else if(e.WriteByte(i),i>0&&r[i-1]>0){for(n=i+1;n<256&&r[n];n++);n-=i+1,e.WriteByte(n)}d(e,t[i])}e.WriteByte(0)}(r,s,o),A=0;A<256;A++)if(o[A]){a[A][0]=0;for(var f=1;f<256;f++)a[A][f]=a[A][f-1]+s[A][f-1]}var u=new Array(4),g=new Array(4);for(f=0;f<4;f++)u[f]=1<<23,g[f]=0;var I=new i("",t,t),p=Math.floor(t/4),C=new Array(4),m=new Array(4);for(f=0;f<4;f++)C[f]=(f+1)*p-2,m[f]=e[C[f]+1];for(m[3]=e[t-1],A=t-2;A>4*p-2;A--)u[3]=l(u[3],I,a[e[A]][m[3]],s[e[A]][m[3]],12),m[3]=e[A];for(;C[0]>=0;)for(f=3;f>=0;f--){var B=e[C[f]];u[f]=l(u[f],I,a[B][m[f]],s[B][m[f]],12),m[f]=B,C[f]--}for(f=3;f>=0;f--)u[f]=l(u[f],I,a[0][m[f]],s[0][m[f]],12);for(A=3;A>=0;A--)h(u[A],I);var w=r.pos;return r.buf.writeInt32LE(w-9+(I.length-I.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),I.buf.slice(I.pos,I.length)],r.pos+I.length-I.pos)}(e)}}},8223:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e,t){return e&(1<=e[r+1];)r++;return r}function a(e,t){for(var r=1<=e[i+1];)i++;n[o]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<31-n)*r;e>=i;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,i),(Math.floor(e/n)<s),n[s]=new Array(o[s]);for(var a=0,A=0;As),a[s]=c(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s>4,h=e;if(1&c){var l=e.ReadUint7(),u=e.ReadUint7(),c=new i(e.ReadData(u));h=new i(I(c,l))}var d=new Array(256),p=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var o=0;o<256;o++)t[i][o]=0}var s=g(e);for(i=0;i<256;i++)if(s[i]){var a=0;for(o=0;o<256;o++)s[o]&&(a>0?a--:(t[i][o]=e.ReadUint7(),0==t[i][o]&&(a=e.ReadByte())));for(C(t[i],n),r[i][0]=0,o=0;o<256;o++)r[i][o+1]=r[i][o]+t[i][o]}}(h,d,p,r);for(var m=new Array(256),B=0;B<256;B++)m[B]=a(p[B],r);for(var w=new Array(4),y=new Array(4),_=0;_<4;_++)w[_]=e.ReadUint32(),y[_]=0;var E=new n.allocUnsafe(t),v=Math.floor(t/4);for(B=0;B>=1}else if(r<=4)for(a=0;a>=2;else if(r<=16)for(a=0;a>=4;return o}(v,B,w,m)),v}function d(e,t){var r=new i("",0,10);r.WriteByte(t);var o=1&t,s=8&t,a=32&t,A=64&t,f=128&t,c=t>>8;if(16&t||r.WriteUint7(e.length),s)return n.concat([r.buf.slice(0,r.pos),u(0,e,c)]);var d=new n.alloc(0);f&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r0&&(o[r]=s++);if(!(s>16)){if(s<=1)var a=new n.allocUnsafe(0);else if(s<=2){a=new n.allocUnsafe(Math.ceil(e.length/8));var A=-1;for(r=0;r0&&(t[r]=A++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var g=new n.alloc(0);if(A&&([g,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r0&&s++;for(s||(s=1,t[0]=1),(h=new i("",0,s+1+e.length)).WriteByte(s),r=0;r<256;r++)t[r]>0&&h.WriteByte(r);var a=new n.allocUnsafe(e.length),A=0;for(r=0;r0){o=e[r];for(var f=0;r+f+1>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,s,o),function(e,t){for(var r=0;r<256;r++)if(t[r]){var n=Math.ceil(Math.log2(t[r]));n>12&&(n=12),p(e[r],n)}}(s,o);var u=new i("",0,198156);!function(e,t,r){m(e,r);for(var n=0;n<256;n++)if(r[n])for(var i=0,o=0;o<256;o++)if(r[o])if(i)i--;else if(e.WriteUint7(t[n][o]),!t[n][o]){for(var s=o+1;s<256;s++)if(r[s]){if(0!=t[n][s])break;i++}e.WriteByte(i)}}(u,s,o);var c=B(u.buf.slice(0,u.pos));for(c.length4*y-2;A--)g[3]=l(g[3],w,a[e[A]][E[3]],s[e[A]][E[3]],f),E[3]=e[A];for(;_[0]>=0;)for(d=3;d>=0;d--){var v=e[_[d]];g[d]=l(g[d],w,a[v][E[d]],s[v][E[d]],f),E[d]=v,_[d]--}for(d=3;d>=0;d--)g[d]=l(g[d],w,a[0][E[d]],s[0][E[d]],f);for(A=3;A>=0;A--)h(g[A],w);return n.concat([r.buf.slice(0,r.pos),w.buf.slice(w.pos,w.length)],r.pos+w.length-w.pos)}(e);return n.concat([r.buf.slice(0,r.pos),d,g,I])}function g(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,i=e.ReadByte(),o=i;do{t[i]=1,n>0?(n--,i++):(i=e.ReadByte())==o+1&&(n=e.ReadByte()),o=i}while(0!=i);return t}function I(e,t){var r=new Array(256),i=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=g(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(C(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,i);for(var s=a(i,12),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var u=new n.allocUnsafe(t);for(l=0;l2?e[a]-=r-i:r!=i&&(o=i/r,A=1)}while(A)}function C(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function B(e){const t=e.length;var r=new i("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r12&&(s=12),p(o,s),function(e,t){m(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),p(o,12);var a=new Array(256);a[0]=0;for(var A=1;A<256;A++)a[A]=a[A-1]+o[A-1];var f=new Array(4);for(A=0;A<4;A++)f[A]=32768;var u=new i("",1.05*t+100|0,1.05*t+100|0);for(A=t-1;A>=0;A--)f[A%4]=l(f[A%4],u,a[e[A]],o[e[A]],12);for(A=3;A>=0;A--)h(f[A],u);return n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}e.exports={decode:function(e){return c(new i(e),0)},encode:d}},5997:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(8223);var s=new(r(635));function a(e,t){for(var r=e+"";r.length0&&5==t[s][0].type)&&t[s][r])switch(e[0].WriteByte(t[s][r].type),t[s][r].type){case 6:e[6].WriteUint32(t[s][r].val);break;case 5:e[5].WriteUint32(t[s][r].val);break;case 1:e[1].WriteString(t[s][r].val);break;case 2:e[2].WriteChar(t[s][r].val);break;case 7:e[7].WriteUint32(t[s][r].val);break;case 3:e[3].WriteUint32(t[s][r].val),e[4].WriteByte(t[s][r].val.length);break;case 8:case 9:e[t[s][r].type].WriteByte(t[s][r].val)}}function h(e,t,r,n){for(var i=0;i<=12;i++)if(!(e[i].pos<=0)){n.WriteByte(i+(0==i?128:0)),e[i]=e[i].buf.slice(0,e[i].pos);var o=l(e[i],r);n.WriteUint7(o.length),n.WriteData(o,o.length)}}function l(e,t){var r,n=1<<30,i=[0,1,64,65,128,129,201];for(var a in i){var A=i[a];if(!(1&A&&e.length<100||8&A&&e.length%4!=0)){try{var f=t?s.encode(e,A):o.encode(e,A)}catch(e){f=0}f&&n>f.length&&(n=f.length,r=f)}}return r}function u(e,t,r,n,i){var o=0,s=i-1;e[i]=new Array(256),t[n]?e[i][0]={type:5,val:i-t[n]}:e[i][0]={type:6,val:0==i?0:1},t[n]=i;for(var a=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),A=0;A=0&&e[s][f])if(e[s][f].str==a[A])h=10,l="";else if(7==e[s][f].type||8==e[s][f].type){var u=l-e[s][f].str;r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=8,l=u)}else 3!=e[s][f].type&&9!=e[s][f].type||e[s][f].str.length!=l.length||(u=l-e[s][f].str,r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=9,l=u));e[i][f]={str:a[A],val:l,type:h},o{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],A=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,A)),h=0,l=A>0?s-4:s;for(r=0;r>16&255,f[h++]=t>>8&255,f[h++]=255&t;return 2===A&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[h++]=255&t),1===A&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function A(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=A,t.SlowBuffer=function(e){return+e!=e&&(e=0),A.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return A.from(n,t,r);const i=function(e){if(A.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),a(e<0?0:0|d(e))}function u(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function I(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return v(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,A=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,A/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-A),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function v(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function b(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,A;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(A=(31&t)<<6|63&r,A>127&&(o=A));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(A=(15&t)<<12|(63&r)<<6|63&n,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(A=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(A.isBuffer(t)||(t=A.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!A.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},A.byteLength=g,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,i){if(j(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return B(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return y(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}A.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigUInt64LE=V((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=V((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigInt64LE=V((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=V((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new T.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}O("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),O("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),O("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function V(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var o=0;i>0;){var s=8-t;i>=s?(o<<=s,o|=n[s]&e[r++],t=0,i-=s):(o<<=i,o|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return o}},simple:function(e){var r,n,i=t.header(e),o=[],s=0;do{-1!=(n=t.decompress(e,i))&&(o.push(n),s+=n.byteLength)}while(-1!=n);r=new Uint8Array(s),s=0;for(var a=0;a9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",o=0;o<6;o++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var s=e(24);if(s>n)throw"Initial position larger than buffer size";var a=e(16),A=new Uint8Array(256),f=0;for(o=0;o<16;o++)if(a&1<<15-o){var h=e(16);for(g=0;g<16;g++)h&1<<15-g&&(A[f++]=16*o+g)}var l=e(3);if(l<2||l>6)throw"another error";var u=e(15);if(0==u)throw"meh";var c=[];for(o=0;o=l)throw"whoops another error";var I=c[g];c.splice(g,1),c.splice(0,0,I),d[o]=I}var p=f+2,C=[];for(g=0;g20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?a--:a++}y[o]=a}for(m=B=y[0],o=1;oB?B=y[o]:y[o]=u)throw"meow i'm a kitty, that's an error";E=(w=C[d[k++]]).base.subarray(1),v=w.limit.subarray(1)}for(g=e(o=w.minLen);;){if(o>w.maxLen)throw"rawr i'm a dinosaur";if(g<=v[o])break;o++,g=g<<1|e(1)}if((g-=E[o])<0||g>=258)throw"moo i'm a cow";var F=w.permute[g];if(0!=F&&1!=F){if(Q){if(Q=0,S+a>=n)throw"Boom.";for(D[I=A[c[0]]]+=a;a--;)R[S++]=I}if(F>f)break;if(S>=n)throw"I can't think of anything. Error";I=c[o=F-1],c.splice(o,1),c.splice(0,0,I),D[I=A[I]]++,R[S++]=I}else Q||(Q=1,a=0),a+=0==F?Q:2*Q,Q<<=1}if(s<0||s>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,o=0;o<256;o++)h=g+D[o],D[o]=g,g=h;for(o=0;o>=8,x=-1);var U,L,q,T=new Uint8Array(n),O=0;for(r||(r=1/0);S;){for(S--,L=N,N=255&(M=R[M]),M>>=8,3==x++?(U=N,q=L,N=-1):(U=1,q=N);U--;)if(T[O++]=q,! --r)return T;N!=L&&(x=0)}return T.subarray(0,O)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n>>6-2*i);return r}},e.exports=r},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>f,LocalFile:()=>i(),RemoteFile:()=>a,fromUrl:()=>h,open:()=>l});var n=r(3617),i=r.n(n),o=r(8287);function s(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class a{async getBufferFromResponse(e){const t=await e.arrayBuffer();return o.Buffer.from(t)}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${s(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${s(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t=0,r,n=0,i={}){const{headers:o={},signal:s,overrides:a={}}=i;r<1/0?o.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(o.range=`bytes=${n}-`);const A=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...o,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!A.ok)throw new Error(`HTTP ${A.status} fetching ${this.url}`);if(200===A.status&&0===n||206===A.status){const n=await this.getBufferFromResponse(A),i=n.copy(e,t,0,Math.min(r,n.length)),o=A.headers.get("content-range"),s=/\/(\d+)$/.exec(o||"");return(null==s?void 0:s[1])&&(this._stat={size:parseInt(s[1],10)}),{bytesRead:i,buffer:e}}if(200===A.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${A.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:o={}}=r,s=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...o});if(200!==s.status)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=o.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function A(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class f{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const i=n,s=i+r,a=await A(this.blob.slice(i,s)),f=o.Buffer.from(a);return{bytesRead:f.copy(e,t),buffer:f}}async readFile(e){const t="string"==typeof e?e:null==e?void 0:e.encoding;if("utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await A(this.blob);return o.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function h(e,t={}){return new a(e,t)}function l(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return h(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,A=(1<>1,h=-7,l=r?i-1:0,u=r?-1:1,c=e[t+l];for(l+=u,o=c&(1<<-h)-1,c>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=u,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+l],l+=u,h-=8);if(0===o)o=1-f;else{if(o===A)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,n),o-=f}return(c?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,A,f=8*o-i-1,h=(1<>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-s))<1&&(s--,A*=2),(t+=s+l>=1?u/A:u*Math.pow(2,1-l))*A>=2&&(s++,A/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*A-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+c]=255&a,c+=d,a/=256,i-=8);for(s=s<0;e[r+c]=255&s,c+=d,s/=256,f-=8);e[r+c-d]|=128*g}},8570:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=A(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=A(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?p:I;if(t){if(e<0)return p;if(e>=c)return y}else{if(e<=-d)return _;if(e+1>=d)return w}return e<0?a(-e,t).neg():A(e%u|0,e/u|0,t)}function A(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=A;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return I;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return h(e.substring(1),t,r).neg();for(var i=a(f(r,8)),o=I,s=0;s>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=A).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(e){return n(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(n(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(C)},E.neg=E.negate,E.add=function(e){n(e)||(e=l(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,f=e.low>>>16,h=0,u=0,c=0,d=0;return c+=(d+=o+(65535&e.low))>>>16,u+=(c+=i+f)>>>16,h+=(u+=r+a)>>>16,h+=t+s,A((c&=65535)<<16|(d&=65535),(h&=65535)<<16|(u&=65535),this.unsigned)},E.subtract=function(e){return n(e)||(e=l(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return I;if(n(e)||(e=l(e)),t)return A(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return I;if(this.eq(_))return e.isOdd()?_:I;if(e.eq(_))return this.isOdd()?_:I;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,f=e.high>>>16,h=65535&e.high,u=e.low>>>16,c=65535&e.low,d=0,p=0,C=0,m=0;return C+=(m+=s*c)>>>16,p+=(C+=o*c)>>>16,C&=65535,p+=(C+=s*u)>>>16,d+=(p+=i*c)>>>16,p&=65535,d+=(p+=o*u)>>>16,p&=65535,d+=(p+=s*h)>>>16,d+=r*c+i*u+o*h+s*f,A((C&=65535)<<16|(m&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(n(e)||(e=l(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?A((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p:I;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return p;if(e.gt(this.shru(1)))return m;o=p}else{if(this.eq(_))return e.eq(C)||e.eq(B)?_:e.eq(_)?C:(r=this.shr(1).div(e).shl(1)).eq(I)?e.isNegative()?C:B:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(_))return this.unsigned?p:I;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=I}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(r),c=u.mul(e);c.isNegative()||c.gt(i);)c=(u=a(r-=h,this.unsigned)).mul(e);u.isZero()&&(u=C),o=o.add(u),i=i.sub(c)}return o},E.div=E.divide,E.modulo=function(e){return n(e)||(e=l(e)),t?A((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return A(~this.low,~this.high,this.unsigned)},E.and=function(e){return n(e)||(e=l(e)),A(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return n(e)||(e=l(e)),A(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return n(e)||(e=l(e)),A(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A(this.low<>>32-e,this.unsigned):A(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):A(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?A(this.low>>>e|t<<32-e,t>>>e,this.unsigned):A(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?A(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:A(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3503:(e,t,r)=>{var n,i,o,s,a;n=r(3939),i=r(2151).utf8,o=r(652),s=r(2151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),A=8*e.length,f=1732584193,h=-271733879,l=-1732584194,u=271733878,c=0;c>>24)|4278255360&(r[c]<<24|r[c]>>>8);r[A>>>5]|=128<>>9<<4)]=A;var d=a._ff,g=a._gg,I=a._hh,p=a._ii;for(c=0;c>>0,h=h+m>>>0,l=l+B>>>0,u=u+w>>>0}return n.endian([f,h,l,u])})._ff=function(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+(i>>>0)+s;return(a<>>32-o)+t},a._gg=function(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+(i>>>0)+s;return(a<>>32-o)+t},a._hh=function(e,t,r,n,i,o,s){var a=e+(t^r^n)+(i>>>0)+s;return(a<>>32-o)+t},a._ii=function(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+(i>>>0)+s;return(a<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),o=r(1996),s=r(4674),a=r(4442),A=Object.prototype.toString,f=0,h=-1,l=0,u=8;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:h,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===A.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==f)throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===A.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(h),a.next_out=0,a.avail_out=h),1!==(r=n.deflate(a,s))&&r!==f)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f):2!==s||(this.onEnd(f),a.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),o=r(1996),s=r(9681),a=r(4674),A=r(4442),f=r(7414),h=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new f,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[r])}function u(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(e,t){var r,a,A,f,l,u=this.strm,c=this.options.chunkSize,d=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?u.input=o.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new i.Buf8(c),u.next_out=0,u.avail_out=c),(r=n.inflate(u,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&d&&(r=n.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&r!==s.Z_STREAM_END&&(0!==u.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(A=o.utf8border(u.output,u.next_out),f=u.next_out-A,l=o.buf2string(u.output,A),u.next_out=f,u.avail_out=c-f,f&&i.arraySet(u.output,u.output,A,f,0),this.onData(l)):this.onData(i.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(g=!0)}while((u.avail_in>0||0===u.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),u.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=l,t.inflate=u,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.ungzip=u},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r(9805),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function A(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return A(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)f[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?f[n++]=65533:i<65536?f[n++]=i:(i-=65536,f[n++]=55296|i>>10&1023,f[n++]=56320|1023&i)}return A(f,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},9681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^r[a])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),o=r(3665),s=r(3269),a=r(4823),A=r(4674),f=0,h=0,l=-2,u=2,c=8,d=286,g=30,I=19,p=2*d+1,C=15,m=3,B=258,w=B+m+1,y=42,_=103,E=113,v=666;function b(e,t){return e.msg=A[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function S(e){for(var t=e.length;--t>=0;)e[t]=0}function k(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,k(e.strm)}function R(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function M(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=s(e.adler,t,o,r):2===e.state.wrap&&(e.adler=a(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function N(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,A=e.strstart>e.w_size-w?e.strstart-(e.w_size-w):0,f=e.window,h=e.w_mask,l=e.prev,u=e.strstart+B,c=f[o+s-1],d=f[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(f[(r=t)+s]===d&&f[r+s-1]===c&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(e.match_start=t,s=n,n>=a)break;c=f[o+s-1],d=f[o+s]}}}while((t=l[t&h])>A&&0!=--i);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,o,s,a=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-w)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);o+=a}if(0===e.strm.avail_in)break;if(r=M(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=m)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<=m)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-m),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=m){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=m-1)),e.prev_length>=m&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-m,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-m),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),o<1||o>9||r!==c||n<8||n>15||t<0||t>9||s<0||s>4)return b(e,l);8===n&&(n=9);var A=new T;return e.state=A,A.strm=e,A.wrap=a,A.gzhead=null,A.w_bits=n,A.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&t===f)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,D(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-w&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),1)})),new q(4,4,8,4,U),new q(4,5,16,8,U),new q(4,6,32,32,U),new q(4,4,16,16,L),new q(8,16,32,32,L),new q(8,16,128,128,L),new q(8,32,128,256,L),new q(32,128,258,1024,L),new q(32,258,258,4096,L)],t.deflateInit=function(e,t){return P(e,t,c,15,8,0)},t.deflateInit2=P,t.deflateReset=z,t.deflateResetKeep=O,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,h):l},t.deflate=function(e,t){var r,i,s,A;if(!e||!e.state||t>5||t<0)return e?b(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===v&&4!==t)return b(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===y)if(2===i.wrap)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,255&i.gzhead.time),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,255&i.gzhead.extra.length),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,3),i.status=E);else{var u=c+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=E,F(i,u),0!==i.strstart&&(F(i,e.adler>>>16),F(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending!==i.pending_buf_size));)R(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.status=_)}else i.status=_;if(i.status===_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&k(e),i.pending+2<=i.pending_buf_size&&(R(i,255&e.adler),R(i,e.adler>>8&255),e.adler=0,i.status=E)):i.status=E),0!==i.pending){if(k(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&Q(t)<=Q(r)&&4!==t)return b(e,-5);if(i.status===v&&0!==e.avail_in)return b(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==f&&i.status!==v){var d=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(t===f)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=B){if(x(e),e.lookahead<=B&&t===f)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=m&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+B;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=m?(r=o._tr_tally(e,1,e.match_length-m),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==d&&4!==d||(i.status=v),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),h;if(2===d&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),k(e),0===e.avail_out))return i.last_flush=-1,h}return 4!==t?h:i.wrap<=0?1:(2===i.wrap?(R(i,255&e.adler),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,255&e.total_in),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),k(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==y&&69!==t&&73!==t&&91!==t&&t!==_&&t!==E&&t!==v?b(e,l):(e.state=null,t===E?b(e,-3):h):l},t.deflateSetDictionary=function(e,t){var r,n,o,a,A,f,u,c,d=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==y||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,t,d-r.w_size,r.w_size,0),t=c,d=r.w_size),A=e.avail_in,f=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(r);r.lookahead>=m;){n=r.strstart,o=r.lookahead-(m-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,A,f,h,l,u,c,d,g,I,p,C,m,B,w,y,_,E,v,b;r=e.state,n=e.next_in,v=e.input,i=n+(e.avail_in-5),o=e.next_out,b=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),A=r.dmax,f=r.wsize,h=r.whave,l=r.wnext,u=r.window,c=r.hold,d=r.bits,g=r.lencode,I=r.distcode,p=(1<>>=B=m>>>24,d-=B,0==(B=m>>>16&255))b[o++]=65535&m;else{if(!(16&B)){if(64&B){if(32&B){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}m=g[(65535&m)+(c&(1<>>=B,d-=B),d<15&&(c+=v[n++]<>>=B=m>>>24,d-=B,16&(B=m>>>16&255)){if(y=65535&m,d<(B&=15)&&(c+=v[n++]<A){e.msg="invalid distance too far back",r.mode=30;break e}if(c>>>=B,d-=B,y>(B=o-s)){if((B=y-B)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(_=0,E=u,0===l){if(_+=f-B,B2;)b[o++]=E[_++],b[o++]=E[_++],b[o++]=E[_++],w-=3;w&&(b[o++]=E[_++],w>1&&(b[o++]=E[_++]))}else{_=o-y;do{b[o++]=b[_++],b[o++]=b[_++],b[o++]=b[_++],w-=3}while(w>2);w&&(b[o++]=b[_++],w>1&&(b[o++]=b[_++]))}break}if(64&B){e.msg="invalid distance code",r.mode=30;break e}m=I[(65535&m)+(c&(1<>3,c&=(1<<(d-=w<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(9805),i=r(3269),o=r(4823),s=r(7293),a=r(1998),A=0,f=-2,h=1,l=12,u=30,c=852,d=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(c),t.distcode=t.distdyn=new n.Buf32(d),t.sane=1,t.back=-1,A):f}function C(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):f}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,C(e))):f}function B(e,t){var r,n;return e?(n=new I,e.state=n,n.window=null,(r=m(e,t))!==A&&(e.state=null),r):f}var w,y,_=!0;function E(e){if(_){var t;for(w=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=w,e.lenbits=9,e.distcode=y,e.distbits=5}function v(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,O,2,0),B=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",r.mode=u;break}if(8!=(15&B)){e.msg="unknown compression method",r.mode=u;break}if(w-=4,x=8+(15&(B>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=u;break}r.dmax=1<>8&1),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>8&255,O[2]=B>>>16&255,O[3]=B>>>24&255,r.check=o(r.check,O,4,0)),B=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>8),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((b=r.length)>C&&(b=C),b&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,I,b,x)),512&r.flags&&(r.check=o(r.check,c,b,I)),C-=b,I+=b,r.length-=b),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===C)break e;b=0;do{x=c[I+b++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&b>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===C)break e;C--,B+=c[I++]<>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6===t){B>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=u}B>>>=2,w-=2;break;case 14:for(B>>>=7&w,w-=7&w;w<32;){if(0===C)break e;C--,B+=c[I++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=u;break}if(r.length=65535&B,B=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(b=r.length){if(b>C&&(b=C),b>m&&(b=m),0===b)break e;n.arraySet(d,c,I,b,p),C-=b,I+=b,m-=b,p+=b,r.length-=b;break}r.mode=l;break;case 17:for(;w<14;){if(0===C)break e;C--,B+=c[I++]<>>=5,w-=5,r.ndist=1+(31&B),B>>>=5,w-=5,r.ncode=4+(15&B),B>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=u;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},U=a(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid code lengths set",r.mode=u;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=k,w-=k,r.lens[r.have++]=R;else{if(16===R){for(q=k+2;w>>=k,w-=k,0===r.have){e.msg="invalid bit length repeat",r.mode=u;break}x=r.lens[r.have-1],b=3+(3&B),B>>>=2,w-=2}else if(17===R){for(q=k+3;w>>=k)),B>>>=3,w-=3}else{for(q=k+7;w>>=k)),B>>>=7,w-=7}if(r.have+b>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=u;break}for(;b--;)r.lens[r.have++]=x}}if(r.mode===u)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=u;break}if(r.lenbits=9,L={bits:r.lenbits},U=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid literal/lengths set",r.mode=u;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},U=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,U){e.msg="invalid distances set",r.mode=u;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(C>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=I,e.avail_in=C,r.hold=B,r.bits=w,s(e,_),p=e.next_out,d=e.output,m=e.avail_out,I=e.next_in,c=e.input,C=e.avail_in,B=r.hold,w=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;D=(T=r.lencode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,r.length=R,0===D){r.mode=26;break}if(32&D){r.back=-1,r.mode=l;break}if(64&D){e.msg="invalid literal/length code",r.mode=u;break}r.extra=15&D,r.mode=22;case 22:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;D=(T=r.distcode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,64&D){e.msg="invalid distance code",r.mode=u;break}r.offset=R,r.extra=15&D,r.mode=24;case 24:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=u;break}r.mode=25;case 25:if(0===m)break e;if(b=_-m,r.offset>b){if((b=r.offset-b)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=u;break}b>r.wnext?(b-=r.wnext,Q=r.wsize-b):Q=r.wnext-b,b>r.length&&(b=r.length),S=r.window}else S=d,Q=p-r.offset,b=r.length;b>m&&(b=m),m-=b,r.length-=b;do{d[p++]=S[Q++]}while(--b);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;d[p++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===C)break e;C--,B|=c[I++]<{"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,A,f,h,l,u){var c,d,g,I,p,C,m,B,w,y=u.bits,_=0,E=0,v=0,b=0,Q=0,S=0,k=0,D=0,R=0,F=0,M=null,N=0,x=new n.Buf16(16),U=new n.Buf16(16),L=null,q=0;for(_=0;_<=15;_++)x[_]=0;for(E=0;E=1&&0===x[b];b--);if(Q>b&&(Q=b),0===b)return f[h++]=20971520,f[h++]=20971520,u.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(U[1]=0,_=1;_<15;_++)U[_+1]=U[_]+x[_];for(E=0;E852||2===e&&R>592)return 1;for(;;){m=_-k,l[E]C?(B=L[q+l[E]],w=M[N+l[E]]):(B=96,w=0),c=1<<_-k,v=d=1<>k)+(d-=c)]=m<<24|B<<16|w}while(0!==d);for(c=1<<_-1;F&c;)c>>=1;if(0!==c?(F&=c-1,F+=c):F=0,E++,0==--x[_]){if(_===b)break;_=t[r+l[E]]}if(_>Q&&(F&I)!==g){for(0===k&&(k=Q),p+=v,D=1<<(S=_-k);S+k852||2===e&&R>592)return 1;f[g=F&I]=Q<<24|S<<16|p-h}}return 0!==F&&(f[p+F]=_-k<<24|64<<16),u.bits=Q,0}},4674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,s=286,a=30,A=15,f=16,h=[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],l=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);i(d);var g=new Array(60);i(g);var I=new Array(512);i(I);var p=new Array(256);i(p);var C=new Array(29);i(C);var m,B,w,y=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?I[e]:I[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Q(e,t,r){e.bi_valid>f-r?(e.bi_buf|=t<>f-e.bi_valid,e.bi_valid+=r-f):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function D(e,t,r){var n,i,o=new Array(A+1),s=0;for(n=1;n<=A;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=k(o[a]++,a))}}function R(e){var t;for(t=0;t8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,f=t.dyn_tree,h=t.max_code,l=t.stat_desc.static_tree,u=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,g=t.stat_desc.max_length,I=0;for(o=0;o<=A;o++)e.bl_count[o]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=f[2*f[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,I++),f[2*n+1]=o,n>h||(e.bl_count[o]++,s=0,n>=d&&(s=c[n-d]),a=f[2*n],e.opt_len+=a*(o+s),u&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==I){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,I-=2}while(I>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>h||(f[2*i+1]!==o&&(e.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(e,t),D(o,h,e.bl_count)}function L(e,t,r){var n,i,o=-1,s=t[1],a=0,A=7,f=4;for(0===s&&(A=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?O(e,t,r,n):4===e.strategy||s===i?(Q(e,2+(n?1:0),3),x(e,d,g)):(Q(e,4+(n?1:0),3),function(e,t,r,n){var i;for(Q(e,t-257,5),Q(e,r-1,5),Q(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+o+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){Q(e,2,3),S(e,256,d),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,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IgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3FFDRELIAEoAgQiDCABKAIIIg1GDQ4CQCABKAIAIgogDGotAAAiCw0AIAAgDDYCECABIAxBAWo2AgRBBiECDAwLQQAhAiAAQQA2AqgBIABBAjYCACAAIAtBAnRBBGoiCzYCrAEgACALNgJACyAIIAJqQQhqIAogDGogDSAMayIMIAsgAmsiAiAMIAJJGyICEIeAgIAAGiABIAIgASgCBGo2AgRBACEMIABBACAAKAKoASACaiICIAIgACgCrAEiC0YbNgKoASACIAtHDQ8gACACQXxqIgI2AqwBQQchDCAEIAJBABCNgICAACAAIAAoAqwBIgtqQbABaigAAEcNDyAAQQI2AqgBIAAtALEBIgJBP3ENDAJAAkAgAkHAAHFFDQAgACAEIAggCxCRgICAAEEBRw0RIAAgACkDCDcDMCAALQCxASECDAELIABCfzcDMAtCfyEOAkAgAkEYdEEYdUF/Sg0AIAAgBCAIIAAoAqwBEJGAgIAAQQFHDRAgACkDCCEOCyAAIA43AzggACgCrAEiDSAAKAKoASICa0ECSQ0PIAAgAkEBaiIKNgKoASAIIAJqQQhqLQAAQSFHDQwgACACQQJqIgs2AqgBIAggCmpBCGotAABBAUcNDCANIAtGDQ8gACACQQNqNgKoASAAKAKwCSAIIAtqQQhqLQAAEJyAgIAAIgwNDyAAKAKoASIMIAAoAqwBIgIgDCACSxshDQJAA0AgDSAMRg0BIAggDEEBaiICNgIAIAQgDGohCyACIQwgCy0AAA0ODAALCyAGQgA3AwAgAEEANgKoASAAQQM2AgAgBkEIakIANwMACyAAIAEoAgQ2AhAgACABKAIQNgIUIAAoArAJIAEQmYCAgAAhDCAAIAApA0ggASgCBCAAKAIQa618Ig43A0ggACAAKQNQIAEoAhAgACgCFCICayILrXwiDzcDUCAOIAApAzBWDQ0gDyAAKQM4Vg0NAkACQAJAAkAgACgCIEF/ag4EAAMDAQMLIAEoAgwgAmogCyAAKAIYEI2AgIAArSEODAELIAEoAgwgAmogCyAAKQMYEI+AgIAAIQ4LIAAgDjcDGAsgDEEBRw0OAkAgACkDMCIOQn9RDQAgDiAGKQMAUg0OCwJAIAApAzgiDkJ/UQ0AQQchDCAOIAApA1BSDQ8LIAAgACkDSCAANQJAfCAAKQNgfCIPNwNgQgQhDgJAAkACQCAAKAIgQX9qDgQBAgIAAgtCCCEOCyAFIA4gD3w3AwALIAAgACkDaCAAKQNQfDcDaCAAIAVBGCAAKAJwEI2AgIAANgJwIABBBDYCACAAIAApA1hCAXw3A1gLAkAgBikDACIOQgODUA0AIA5CAXwhDiABKAIEIQwgASgCCCELA0AgCyAMRg0NIAEgDEEBaiICNgIEIAEoAgAgDGotAAANDiAGIA43AwAgDkIDgyEPIA5CAXwhDiACIQwgD0IAUg0ACwsgAEEFNgIAC0EBIQIgACgCIEF/ag4EBgcHBQcLIAAgARCSgICAACIMQQFHDQsgAEEHNgIAC0EAIAAoAhBrIQggAEGAAWopAwAhDiABKAIEIQwCQANAIA4gCCAMaq18QgODUA0BAkAgDCABKAIIRw0AIAAgARCTgICAAAwLCyABIAxBAWoiAjYCBCABKAIAIAxqIQsgAiEMIAstAAANCwwACwsgACABEJOAgIAAQQchDCAFIABBkAFqQRgQhICAgAANCiAAQQg2AgALIAAgAUEgEJSAgIAAIgxBAUcNCSAAQQk2AgBBDCELIABBDDYCrAEMAQsgACgCrAEhCwsgAEGoAWogACgCqAEiDGpBCGogASgCACABKAIEIgJqIAEoAgggAmsiAiALIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0HIAAQlYCAgAAhDAwHC0EBIQIgACABQcAAEJSAgIAAIgxBAUcNBgwBC0EBIQIgACABQSAQlICAgAAiDEEBRw0FCyAAIAI2AgAMAAsLQQYhDAwCC0EAIQwMAQtBByEMCwJAAkAgACgCJA0AAkACQCAMDgIAAwELQQdBCCABKAIEIAEoAghGGyEMCyABIAk2AhAgASADNgIEIAwPCwJAIAwNACADIAEoAgRHDQAgCSABKAIQRw0AIAAtACghASAAQQE6ACggAUEDdA8LIABBADoAKAsgDAuaAQEDfwJAIAAoAgQiBA0AIABCADcDCAsgAigCACEFA0ACQCAFIANJDQBBAA8LIAEgBWotAAAhBiACIAVBAWoiBTYCACAAIAZB/wBxrSAErYYgACkDCIQ3AwgCQAJAIAZBgAFxDQACQCAGDQBBByEGIAQNAgsgAEEANgIEQQEPC0EHIQYgACAEQQdqIgQ2AgQgBEE/Rw0BCwsgBguhAgIDfwF+IABBkAFqIQIgAUEEaiEDA0ACQCAAIAEoAgAgAyABKAIIEJGAgIAAIgRBAUYNACAAQYABaiIDIAMpAwAgASgCBCAAKAIQIgNrIgKtfDcDACAAIAMgASgCAGogAiAAKAIYEI2AgIAArTcDGCAEDwsCQAJAAkACQAJAIAAoAngOAwACAQMLIAAgACkDCCIFNwOIAQJAIAUgACkDWFENAEEHDwsgAEEBNgJ4DAMLIAAgACkDmAEgACkDCHw3A5gBIAAgAkEYIAAoAqABEI2AgIAANgKgASAAQQE2AnggACAAKQOIAUJ/fCIFNwOIAQwCCyAAQQI2AnggACAAKQOQASAAKQMIfDcDkAELIAApA4gBIQULIAVCAFINAAtBAQtAAQJ/IABBgAFqIgIgAikDACABKAIEIAAoAhAiAmsiA618NwMAIAAgAiABKAIAaiADIAAoAhgQjYCAgACtNwMYC3wBBH8gASgCBCEDIAEoAgghBANAAkAgBCADRw0AQQAPCyABIANBAWoiBTYCBAJAIAEoAgAgA2otAAAgACkDGCAAKAIEIgOtiKdB/wFxRg0AQQcPCyAAIANBCGoiBjYCBCAFIQMgBiACSQ0ACyAAQQA2AgQgAEIANwMYQQELbwEBf0EHIQECQCAAQboBai8AAEHZtAFHDQAgAEG0AWpBBkEAEI2AgIAAIABBsAFqKAAARw0AIABBgAFqKQMAQgKIIAA1ALQBUg0AIABBuAFqLQAADQBBAUEHIAAoAiAgAEG5AWotAABGGyEBCyABC7QCAQR/AkACQCAAKAIkRQ0AIAAoAgAhAwwBC0EAIQMgAEEAOgAoIABCADcDACAAQgA3AxggAEHIAGpBAEHkABCGgICAABogAEGsAWpBDDYCAEEBIQILIABByABqIQQCQAJAA0ACQCADQQpHDQAgASgCBCIDIAEoAggiBUYNAiABKAIAIQYCQANAIAYgA2otAAANASABIANBAWoiAzYCBCAAIAAoAgRBAWpBA3E2AgQgBSADRg0EDAALCwJAIAAoAgRFDQBBBw8LIAAoAiRFDQAgAEEAOgAoIABCADcDACAAQgA3AxggBEEAQeQAEIaAgIAAGiAAQQw2AqwBCyAAIAEQkICAgAAiA0EBRw0CQQohAyAAQQo2AgAMAAsLAkAgAg0AQQAPC0EHQQEgACgCBBshAwsgAwt1AQF/AkBBuAkQgICAgAAiAkUNACACIAA2AiQgAiAAIAEQm4CAgAAiADYCsAkCQCAARQ0AIAJBADoAKCACQgA3AwAgAkIANwMYIAJByABqQQBB5AAQhoCAgAAaIAJBrAFqQQw2AgAgAg8LIAIQgoCAgAALQQALHgACQCAARQ0AIAAoArAJEJ2AgIAAIAAQgoCAgAALC4ARAQx/IABB6N0BaiECIABB1ABqIQMgAEEcaiIEQQhqIQUCQAJAA0AgACgCQCEGAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgASgCBCIHIAEoAggiCEkNACAGQQdGDQEMEgsgBg4JAQIDBAUGBwAJDwsgACgCTCEGDAcLQQEhCSABIAdBAWo2AgQgASgCACAHai0AACIHRQ0IAkACQCAHQd8BSw0AIAdBAUcNAQsgAEGAAjsBUAJAIAAoAjwNACAAIAEoAgwgASgCECIGajYCGCAAIAEoAhQgBms2AiwLIARCADcCACAFQgA3AgAMCwsgAC0AUEUNCgwOCyABIAdBAWo2AgQgASgCACAHai0AACEHIABBAjYCQCAAIAdBCHQgACgCSGo2AkgMDAsgASAHQQFqNgIEIAEoAgAgB2otAAAhByAAQQM2AkAgACAHIAAoAkhqQQFqNgJIDAsLIAEgB0EBajYCBCABKAIAIAdqLQAAIQcgAEEENgJAIAAgB0EIdDYCTAwKCyABIAdBAWo2AgQgASgCACAHai0AACEHIAAgACgCRDYCQCAAIAcgACgCTGpBAWo2AkwMCQsgASAHQQFqNgIEQQchCSABKAIAIAdqLQAAIgdB4AFLDQNBACEGAkACQCAHQS1PDQBBACEIDAELIAdBU2oiByAHQf8BcUEtbiIIQS1sayEHIAhBAWohCAsgAEF/IAh0QX9zNgJ0AkAgB0H/AXFBCUkNACAHQXdqIgcgB0H/AXFBCW4iBkEJbGshByAGQQFqIQYLIAAgBjYCcCAAIAdB/wFxIgc2AmwgBiAHakEESw0DIANCADcCACADQQhqQgA3AgAgA0EQakEANgIAIABBfyAGdEF/czYCcEH4ACEHA0AgACAHakGACDsBACAHQQJqIgdB5N0BRw0ACyAAQQY2AkAgAEEFNgIIIABC/////w83AgALIAAoAkwiCUEFSQ0IAkAgACgCCCIHRQ0AIAdBf2ohBiABKAIEIQcgASgCCCEKA0AgCiAHRg0LIAEgB0EBaiIINgIEIAEoAgAgB2otAAAhByAAIAY2AgggACAHIAAoAgRBCHRyNgIEIAghByAGQX9qIgZBf0cNAAsLIABBBzYCQCAAIAlBe2oiBjYCTAsgACAAKAIgIgcgASgCFCABKAIQayIIIAAoAkgiCiAIIApJGyIIaiAAKAIsIgogCiAHayAISxs2AiggASgCCCIJIAEoAgQiCGshBwJAAkACQCAAKALk3QEiCg0AIAYNAUEAIQYLIABB5N0BaiILIApqQQRqIAEoAgAgCGogByAGIAprIgZBKiAKayIIIAggBksbIgYgBiAHSxsiBxCHgICAABoCQAJAIAcgACgC5N0BIghqIgYgACgCTEcNACALIAhqIAdqQQRqQQBBPyAGaxCGgICAABogACgC5N0BIAdqIQYMAQsCQCAGQRRLDQAgACAGNgLk3QEgASABKAIEIAdqNgIEDAMLIAZBa2ohBgsgAEEANgIQIAAgAjYCDCAAIAY2AhRBByEJIAAQmoCAgABFDQMgACgCECIIIAAoAuTdASIKIAdqSw0DIAAgACgCTCAIayIGNgJMAkAgCiAITQ0AIAAgCiAIayIHNgLk3QEgAiALIAhqQQRqIAcQhYCAgAAaDAILIABBADYC5N0BIAEgASgCBCAIIApraiIINgIEIAEoAggiCSAIayEHCwJAIAdBFUkNACAAIAg2AhAgACABKAIANgIMIAAgCUFraiAIIAZqIAcgBkEVakkbNgIUQQchCSAAEJqAgIAARQ0DIAAoAkwiByAAKAIQIgggASgCBGsiBkkNAyABIAg2AgQgACAHIAZrIgY2AkwgASgCCCAIayIHQRRLDQELIAIgASgCACAIaiAGIAcgByAGSxsiBxCHgICAABogACAHNgLk3QEgASABKAIEIAdqNgIECyAAKAIgIgYgACgCHCIIayEHAkAgACgCPEUNAAJAIAYgACgCLEcNACAAQQA2AiALIAEoAgwgASgCEGogACgCGCAIaiAHEIeAgIAAGiAAKAIgIQYLIAAgBjYCHCABIAEoAhAgB2oiBjYCECAAIAAoAkggB2siBzYCSAJAIAcNAEEHIQkgACgCTA0CIAAoAmgNAiAAKAIEDQIgAEEANgJADAULQQAhCSAGIAEoAhRGDQEgASgCBCABKAIIRw0GIAAoAuTdASAAKAJMTw0GDAELIAAoAkwiCkUNAUEAIQkgCCAHTQ0AA0AgASgCFCIGIAEoAhAiC00NASAAIAogCiAAKAIsIAAoAiAiDGsiDSAIIAdrIgggBiALayIGIAggBkkbIgYgBiANSxsiBiAGIApLGyIGazYCTCAMIAAoAhhqIAEoAgAgB2ogBhCFgICAABogACAAKAIgIAZqIgc2AiACQCAAKAIkIAdPDQAgACAHNgIkCwJAIAAoAjxFDQACQCAHIAAoAixHDQAgAEEANgIgCyABKAIMIAEoAhBqIAEoAgAgASgCBGogBhCFgICAABogACgCICEHCyAAIAc2AhwgASABKAIQIAZqNgIQIAEgASgCBCAGaiIHNgIEIAAoAkwiCkUNAiABKAIIIgggB0sNAAsLIAkPCyAAQQA2AkAMAwsgB0EYdEEYdUF/Sg0BIABBATYCQCAAIAdBEHRBgID8AHE2AkgCQCAHQcABSQ0AIABBBTYCRCAAQQA6AFEMAwsgAC0AUQ0DIABBBjYCRCAHQaABSQ0CIANCADcCACADQRBqQQA2AgAgA0EIakIANwIAQfgAIQcDQCAAIAdqQYAIOwEAIAdBAmoiB0Hk3QFHDQALCyAAQQU2AgggAEL/////DzcCAAwBCyAHQQJLDQEgAEKDgICAgAE3AkAMAAsLQQcPC0EAC/8XARJ/IABBGGohAQJAIABBIGooAgAiAiAAQShqKAIAIgNPDQAgAEHoAGoiBCgCAEUNACABIAQgACgCVBCegICAABogACgCKCEDIAAoAiAhAgsCQCACIANPDQAgAEHcDWohBSAAQegAaiEGIABB4BVqIQcgAEHUAGohCANAIAAoAhAiCSAAKAIUSw0BIAAgACgCZCIKQQV0aiAAKAJ0IAJxIgtBAXRqIgxB+ABqIQ0CQAJAIAAoAgAiBEGAgIAISQ0AIAAoAgQhDgwBCyAAIARBCHQiBDYCACAAIAlBAWoiAzYCECAAIAAoAgRBCHQgACgCDCAJai0AAHIiDjYCBCADIQkLAkACQCAOIARBC3YgDS8BACIPbCIDTw0AIAAgAzYCACANIA9BgBAgD2tBBXZqOwEAIAJBf2ohBAJAIAINACAAKAIsIARqIQQLAkACQCAAKAIkIg8NAEEAIQQMAQsgACgCGCAEai0AACEECyAAKAJwIAJxIAAoAmwiDXQgBEEIIA1rdmohDAJAAkAgCkEGSw0AQQEhBANAIAAgDEGADGxqIARBAXQiBGpB5B1qIQ0CQAJAIANB////B00NACADIQoMAQsgACADQQh0Igo2AgAgACAJQQFqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiAKQQt2IA0vAQAiD2wiA0kNACAAIA4gA2siDjYCBCAAIAogA2siAzYCACANIA8gD0EFdms7AQAgBEEBciEEDAELIAAgAzYCACANIA9BgBAgD2tBBXZqOwEACyAEQYACSQ0ADAILCyACIAAoAlQiDUF/c2ohBAJAIAIgDUsNACAAKAIsIARqIQQLAkACQCAPDQBBACEQDAELIAAoAhggBGotAAAhEAtBASEEQYACIQ0DQCAAIAxBgAxsaiAQQQF0IhAgDXEiESANaiAEakEBdGpB5B1qIQ8CQAJAIANB////B00NACADIQsMAQsgACADQQh0Igs2AgAgACAJQQFqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiALQQt2IA8vAQAiCmwiA08iEg0AIAAgAzYCACAKQYAQIAprQQV2aiEKDAELIAAgDiADayIONgIEIAAgCyADayIDNgIAIAogCkEFdmshCkEAIQ0LIA8gCjsBACANIBFzIQ0gBEEBdCASciIEQYACSQ0ACwsgACACQQFqNgIgIAAoAhggAmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC3YgDS8BACIEbCIJTw0AIAAgCTYCACANIARBgBAgBGtBBXZqOwEAIAAoAlghAwwBCyAAIA4gCWsiDjYCBCANIAQgBEEFdms7AQAgD0HABGohBAJAIAMgCWsiA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgCkEBajYCECAAIA5BCHQgACgCDCAKai0AAHIiDjYCBAsCQAJAIA4gA0ELdiAELwEAIg1sIglPDQAgACAJNgIAIAQgDUGAECANa0EFdmo7AQAgACgCXCEDDAELIAAgDiAJazYCBCAAIAMgCWs2AgAgACgCYCEDIAAgACgCXDYCYCAEIA0gDUEFdms7AQALIAAgACgCWDYCXAsgACAAKAJUNgJYIAAgAzYCVAsgAEEIQQsgACgCZEEHSRs2AmQgACAHIAsQn4CAgAAMAQsgBCANQYAQIA1rQQV2ajsBACAAIAk2AgAgACAAKAJcNgJgIAAgACkCVDcCWCAAQQdBCiAAKAJkQQdJGzYCZCAAIAUgCxCfgICAACAAKAJoIgNBfmpBAyADQQZJGyEKIAAoAgAhA0EBIQ4DQCAAIApBB3RqIA5BAXQiDmpB2AdqIQ0CQAJAIANBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgRBAWo2AhAgACAAKAIEQQh0IAQgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgDS8BACIJbCIPSQ0AIAAgBCAPayIENgIEIAAgAyAPayIDNgIAIA0gCSAJQQV2azsBACAOQQFyIQ4MAQsgACAPNgIAIA0gCUGAECAJa0EFdmo7AQAgDyEDCyAOQcAASQ0ACwJAIA5BQGoiCUEDSw0AIAAgCTYCVAwBCyAAIA5BAXFBAnIiDTYCVCAJQQF2IQ8CQCAJQQ1LDQAgACANIA9Bf2oiDHQiCzYCVEEBIQ0gCCALQQF0akGEC2ohEEE/IA5rIRFBACEPA0AgECARIA1qQQF0aiEOAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA4vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACAOIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDUEBdEEBciENDAELIAAgAzYCACAOIAlBgBAgCWtBBXZqOwEAIA1BAXQhDQsgDCAPQQFqIg9HDQAMAgsLIA9Be2ohDgNAAkAgA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgACgCECIJQQFqNgIQIARBCHQgCSAAKAIMai0AAHIhBAsgACADQQF2IgM2AgAgACAEIANrIgRBH3UiCSANQQF0akEBaiINNgJUIAAgCSADcSAEaiIENgIEIA5Bf2oiDg0ACyAAIA1BBHQiCzYCVEEAIQ9BASEOA0AgACAOQQF0Ig5qQbwNaiENAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA0vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACANIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDkEBciEODAELIAAgAzYCACANIAlBgBAgCWtBBXZqOwEACyAPQQFqIg9BBEcNAAsLAkAgASAGIAAoAlQQnoCAgAANAEEADwsgACgCICECCyACIAAoAihJDQALC0EBIQMCQCAAKAIAIgRB////B0sNACAAIARBCHQ2AgBBASEDIAAgACgCECIEQQFqNgIQIAAgACgCBEEIdCAEIAAoAgxqLQAAcjYCBAsgAwtwAQF/AkBBqN4BEICAgIAAIgJFDQAgAkE0aiABNgIAIAJBPGogADYCAAJAAkACQCAAQX9qDgIAAQILIAIgARCAgICAACIANgIYIAANASACEIKAgIAADAILIAJBADYCGCACQThqQQA2AgALIAIPC0EAC9IBAQJ/QQYhAgJAIAFBJ0sNACAAQTBqIAFBAXFBAnIgAUEBdkELanQiATYCAAJAAkAgAEE8aigCACIDRQ0AQQQhAiABIABBNGooAgBLDQIgAEEsaiABNgIAIANBAkcNACAAQThqIgMoAgAgAU8NACAAIAE2AjggACgCGBCCgICAACAAIAAoAjAQgICAgAAiATYCGCABDQBBAyECDAELQQAhAiAAQQA2AkAgAEHQAGpBAToAACAAQegAakEANgIAIABB5N0BaiEDCyADQQA2AgALIAILIwACQCAAQTxqKAIARQ0AIAAoAhgQgoCAgAALIAAQgoCAgAAL9QEBBH9BACEDAkAgACgCDCACTQ0AIAAoAhggAk0NACABIAEoAgAiBCAAKAIQIAAoAggiBWsiBiAEIAYgBEkbIgRrNgIAIAUgAkF/c2ohAQJAIAUgAksNACAAKAIUIAFqIQELIAAoAgAiAiABai0AACEGQQEhAyAAIAVBAWo2AgggAiAFaiAGOgAAAkAgBEF/aiICRQ0AA0AgACgCACIFQQAgAUEBaiIBIAEgACgCFEYbIgFqLQAAIQQgACAAKAIIIgZBAWo2AgggBSAGaiAEOgAAIAJBf2oiAg0ACwsgACgCDCAAKAIIIgFPDQAgACABNgIMCyADC8gEAQd/AkACQCAAKAIAIgNBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAAKAIEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgAS8BACIGbCIFTw0AIAEgBkGAECAGa0EFdmo7AQAgASACQQR0akEEaiEHQQghCEECIQkMAQsgACAEIAVrIgQ2AgQgASAGIAZBBXZrOwEAAkAgAyAFayIDQf///wdLDQAgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkAgBCADQQt2IAEvAQIiBmwiBU8NACABIAZBgBAgBmtBBXZqOwECIAEgAkEEdGpBhAJqIQdBCCEIQQohCQwBCyAAIAQgBWsiBDYCBCABIAYgBkEFdms7AQIgAUGEBGohByADIAVrIQVBgAIhCEESIQkLIABB6ABqIAk2AgBBASEBA0AgByABQQF0IgFqIQMCQAJAIAVB////B00NACAFIQIMAQsgACAFQQh0IgI2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIAJBC3YgAy8BACIGbCIFSQ0AIAAgBCAFayIENgIEIAAgAiAFayIFNgIAIAMgBiAGQQV2azsBACABQQFyIQEMAQsgACAFNgIAIAMgBkGAECAGa0EFdmo7AQALIAEgCEkNAAsgAEHoAGogASAIayAJajYCAAsLNQEAQYAICy4IAAAAEAAAABgAAAAgAAAAKAAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>o});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class o extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});o._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){o._moduleInstance||await(o._moduleInstancePromise||(o._moduleInstancePromise=o._getModuleInstance())),t=new r(o._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},3617:()=>{},772:()=>{},928:(e,t,r)=>{const n=r(2886).default;e.exports=n,e.exports.default=n},1308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=0===t?0:~t;for(let t=0;t>>8;return~n}},2886:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(1308)),o=n(r(7327));t.default=(0,o.default)("crc-32",i.default)},4422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8287);t.default=(e,t)=>n.Buffer.from(e,t)},7327:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(4422));t.default=function(e,t){const r=(e,r)=>t((0,i.default)(e),r)>>>0;return r.signed=(e,r)=>t((0,i.default)(e),r),r.unsigned=r,r.model=e,r}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);return n})(); \ No newline at end of file diff --git a/js/embedCss.js b/js/embedCss.js index a5835e764..b45f4803d 100644 --- a/js/embedCss.js +++ b/js/embedCss.js @@ -1 +1 @@ -export default '.igv-ui-dropdown {\n cursor: default;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: 1px;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n background-color: white;\n}\n.igv-ui-dropdown > div {\n overflow-y: auto;\n overflow-x: hidden;\n background-color: white;\n}\n.igv-ui-dropdown > div > div {\n padding: 4px;\n width: 100%;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n background-color: white;\n}\n.igv-ui-dropdown > div > div:last-child {\n border-bottom-color: transparent;\n border-bottom-width: 0;\n}\n.igv-ui-dropdown > div > div:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.igv-ui-popover {\n cursor: default;\n position: absolute;\n z-index: 2048;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n background-color: white;\n}\n.igv-ui-popover > div:first-child {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-width: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-popover > div:first-child > div:first-child {\n margin-left: 4px;\n}\n.igv-ui-popover > div:first-child > div:last-child {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-popover > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-popover > div:last-child {\n user-select: text;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 400px;\n max-width: 800px;\n background-color: white;\n border-bottom-width: 0;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-ui-popover > div:last-child > div {\n margin-left: 4px;\n margin-right: 4px;\n min-width: 220px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.igv-ui-popover > div:last-child > div > span {\n font-weight: bolder;\n}\n.igv-ui-popover > div:last-child hr {\n width: 100%;\n}\n\n.igv-ui-alert-dialog-container {\n box-sizing: content-box;\n position: absolute;\n z-index: 2048;\n top: 50%;\n left: 50%;\n width: 400px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n outline: none;\n font-family: \"Open Sans\", sans-serif;\n font-size: 15px;\n font-weight: 400;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-ui-alert-dialog-container > div:first-child {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-alert-dialog-container > div:first-child div:first-child {\n padding-left: 8px;\n}\n.igv-ui-alert-dialog-container .igv-ui-alert-dialog-body {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n color: #373737;\n width: 100%;\n height: calc(100% - 24px - 64px);\n overflow-y: scroll;\n}\n.igv-ui-alert-dialog-container .igv-ui-alert-dialog-body .igv-ui-alert-dialog-body-copy {\n margin: 16px;\n width: auto;\n height: auto;\n overflow-wrap: break-word;\n word-break: break-word;\n background-color: white;\n border: unset;\n}\n.igv-ui-alert-dialog-container > div:last-child {\n width: 100%;\n margin-bottom: 10px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-ui-alert-dialog-container > div:last-child div {\n margin: unset;\n width: 40px;\n height: 30px;\n line-height: 30px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n border-color: #2B81AF;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-ui-alert-dialog-container > div:last-child div:hover {\n cursor: pointer;\n border-color: #25597f;\n background-color: #25597f;\n}\n\n.igv-ui-color-swatch {\n position: relative;\n box-sizing: content-box;\n display: flex;\n flex-flow: row;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n border-style: solid;\n border-width: 2px;\n border-color: white;\n border-radius: 4px;\n}\n\n.igv-ui-color-swatch:hover {\n border-color: dimgray;\n}\n\n.igv-ui-colorpicker-menu-close-button {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 32px;\n margin-top: 4px;\n margin-bottom: 4px;\n padding-right: 8px;\n}\n.igv-ui-colorpicker-menu-close-button i.fa {\n display: block;\n margin-left: 4px;\n margin-right: 4px;\n color: #5f5f5f;\n}\n.igv-ui-colorpicker-menu-close-button i.fa:hover,\n.igv-ui-colorpicker-menu-close-button i.fa:focus,\n.igv-ui-colorpicker-menu-close-button i.fa:active {\n cursor: pointer;\n color: #0f0f0f;\n}\n\n.igv-ui-generic-dialog-container {\n box-sizing: content-box;\n position: fixed;\n top: 0;\n left: 0;\n width: 300px;\n height: fit-content;\n padding-bottom: 16px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input > div {\n width: fit-content;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input[type=range] {\n width: 70%;\n -webkit-appearance: none;\n background: linear-gradient(90deg, white, black);\n outline: none;\n margin: 0;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input output {\n display: block;\n height: 100%;\n width: 20%;\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n padding-top: 16px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div {\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n\n.igv-ui-generic-container {\n box-sizing: content-box;\n position: absolute;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-container > div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-ui-generic-container > div:first-child > div {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-ui-dialog {\n z-index: 2048;\n position: fixed;\n width: fit-content;\n height: fit-content;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n background-color: white;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n}\n.igv-ui-dialog .igv-ui-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-dialog .igv-ui-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-dialog .igv-ui-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-dialog .igv-ui-dialog-one-liner {\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin: 8px;\n overflow-wrap: break-word;\n background-color: white;\n font-weight: bold;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel {\n width: 100%;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div {\n margin: 16px;\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:first-child {\n background-color: #5ea4e0;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:last-child {\n background-color: #c4c4c4;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-ui-dialog .igv-ui-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-dialog .igv-ui-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-ui-dialog .igv-ui-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-ui-panel, .igv-ui-panel-row, .igv-ui-panel-column {\n z-index: 2048;\n background-color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n}\n\n.igv-ui-panel-column {\n display: flex;\n flex-direction: column;\n}\n\n.igv-ui-panel-row {\n display: flex;\n flex-direction: row;\n}\n\n.igv-ui-textbox {\n background-color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n}\n\n.igv-ui-table {\n background-color: white;\n}\n\n.igv-ui-table thead {\n position: sticky;\n top: 0;\n}\n\n.igv-ui-table th {\n text-align: left;\n}\n\n.igv-ui-table td {\n padding-right: 20px;\n}\n\n.igv-ui-table tr:hover {\n background-color: lightblue;\n}\n\n.igv-ui-center-fixed {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.igv-navbar {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n color: #444;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n line-height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n margin-top: 2px;\n margin-bottom: 6px;\n height: 32px;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: #f3f3f3;\n}\n.igv-navbar .igv-navbar-left-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-left-container .igv-logo {\n width: 34px;\n height: 32px;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-left-container .igv-current-genome {\n height: 32px;\n margin-left: 4px;\n margin-right: 4px;\n user-select: none;\n line-height: 32px;\n vertical-align: middle;\n text-align: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n height: 100%;\n width: 125px;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container select {\n display: block;\n cursor: pointer;\n width: 100px;\n height: 75%;\n outline: none;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-left: 8px;\n height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 240px;\n height: 22px;\n line-height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container input.igv-search-input {\n cursor: text;\n width: 85%;\n height: 22px;\n line-height: 22px;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n text-align: left;\n padding-left: 8px;\n margin-right: 8px;\n outline: none;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: white;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container .igv-search-icon-container {\n cursor: pointer;\n height: 16px;\n width: 16px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-windowsize-panel-container {\n margin-left: 4px;\n user-select: none;\n}\n.igv-navbar .igv-navbar-right-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container {\n position: relative;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container-hidden {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget {\n color: #737373;\n font-size: 18px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:first-child {\n height: 20px;\n width: 20px;\n margin-left: unset;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:last-child {\n height: 20px;\n width: 20px;\n margin-left: 4px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:nth-child(even) {\n display: block;\n height: fit-content;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget input {\n display: block;\n width: 125px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:first-child {\n height: 20px;\n width: 20px;\n margin-left: unset;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:last-child {\n height: 20px;\n width: 20px;\n margin-left: 4px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:nth-child(even) {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 input {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-hidden {\n display: none;\n}\n\n.igv-navbar-button {\n display: block;\n box-sizing: unset;\n padding-left: 6px;\n padding-right: 6px;\n height: 18px;\n text-transform: capitalize;\n user-select: none;\n line-height: 18px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 11px;\n font-weight: 200;\n color: #737373;\n background-color: #f3f3f3;\n border-color: #737373;\n border-style: solid;\n border-width: thin;\n border-radius: 6px;\n}\n\n.igv-navbar-button:hover {\n cursor: pointer;\n}\n\n.igv-navbar-button-clicked {\n color: white;\n background-color: #737373;\n}\n\n.igv-navbar-icon-button {\n cursor: pointer;\n position: relative;\n width: 24px;\n height: 24px;\n margin-left: 4px;\n margin-right: 4px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-icon-button > div:first-child {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: -18px;\n width: 24px;\n height: 24px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-icon-button > div:last-child {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 18px;\n width: 24px;\n height: 24px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.igv-navbar-text-button {\n cursor: pointer;\n position: relative;\n margin-left: 2px;\n margin-right: 2px;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.igv-navbar-text-button > div:nth-child(2) {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 0;\n width: 38px;\n height: 18px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-text-button > div:nth-child(3) {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 42px;\n width: 38px;\n height: 18px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n#igv-text-button-label {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.igv-navbar-text-button-svg-inactive rect {\n stroke: #737373;\n fill: white;\n}\n.igv-navbar-text-button-svg-inactive text {\n fill: #737373;\n}\n.igv-navbar-text-button-svg-inactive tspan {\n dominant-baseline: middle;\n}\n\n.igv-navbar-text-button-svg-hover rect {\n stroke: #737373;\n fill: #737373;\n}\n.igv-navbar-text-button-svg-hover text {\n fill: white;\n}\n.igv-navbar-text-button-svg-hover tspan {\n dominant-baseline: middle;\n}\n\n#igv-save-svg-group rect {\n stroke: #737373;\n fill: white;\n}\n#igv-save-svg-group text {\n fill: #737373;\n}\n\n#igv-save-svg-group:hover rect {\n stroke: #737373;\n fill: #737373;\n}\n#igv-save-svg-group:hover text {\n fill: white;\n}\n\n#igv-save-png-group rect {\n stroke: #737373;\n fill: white;\n}\n#igv-save-png-group text {\n fill: #737373;\n}\n\n#igv-save-png-group:hover rect {\n stroke: #737373;\n fill: #737373;\n}\n#igv-save-png-group:hover text {\n fill: white;\n}\n\n.igv-zoom-in-notice-container {\n z-index: 256;\n position: absolute;\n top: 8px;\n left: 50%;\n transform: translate(-50%, 0%);\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n background-color: white;\n}\n.igv-zoom-in-notice-container > div {\n padding-left: 4px;\n padding-right: 4px;\n padding-top: 2px;\n padding-bottom: 2px;\n width: 100%;\n height: 100%;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: #3f3f3f;\n}\n\n.igv-zoom-in-notice {\n position: absolute;\n top: 10px;\n left: 50%;\n}\n.igv-zoom-in-notice div {\n position: relative;\n left: -50%;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #3f3f3f;\n background-color: rgba(255, 255, 255, 0.51);\n z-index: 64;\n}\n\n.igv-container-spinner {\n position: absolute;\n top: 90%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1024;\n width: 24px;\n height: 24px;\n pointer-events: none;\n color: #737373;\n}\n\n.igv-multi-locus-close-button {\n position: absolute;\n top: 2px;\n right: 0;\n padding-left: 2px;\n padding-right: 2px;\n width: 12px;\n height: 12px;\n color: #666666;\n background-color: white;\n z-index: 1000;\n}\n.igv-multi-locus-close-button > svg {\n vertical-align: top;\n}\n\n.igv-multi-locus-close-button:hover {\n cursor: pointer;\n color: #434343;\n}\n\n.igv-multi-locus-ruler-label {\n z-index: 64;\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 12px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-multi-locus-ruler-label > div {\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n color: rgb(16, 16, 16);\n background-color: white;\n}\n.igv-multi-locus-ruler-label > div {\n cursor: pointer;\n}\n\n.igv-multi-locus-ruler-label-square-dot {\n z-index: 64;\n position: absolute;\n left: 50%;\n top: 5%;\n transform: translate(-50%, 0%);\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-multi-locus-ruler-label-square-dot > div:first-child {\n width: 14px;\n height: 14px;\n}\n.igv-multi-locus-ruler-label-square-dot > div:last-child {\n margin-left: 16px;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: rgb(16, 16, 16);\n}\n\n.igv-ruler-sweeper {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 26px;\n bottom: 0;\n left: 0;\n width: 0;\n z-index: 99999;\n background-color: rgba(68, 134, 247, 0.25);\n}\n\n.igv-ruler-tooltip {\n pointer-events: none;\n z-index: 128;\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n height: 32px;\n background-color: transparent;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ruler-tooltip > div {\n pointer-events: none;\n width: 128px;\n height: auto;\n padding: 1px;\n color: #373737;\n font-size: 10px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n background-color: white;\n border-style: solid;\n border-width: thin;\n border-color: #373737;\n}\n\n.igv-track-label {\n position: absolute;\n left: 8px;\n top: 8px;\n width: auto;\n height: auto;\n max-width: 50%;\n padding-left: 4px;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: white;\n z-index: 128;\n cursor: pointer;\n}\n\n.igv-track-label:hover,\n.igv-track-label:focus,\n.igv-track-label:active {\n background-color: #e8e8e8;\n}\n\n.igv-track-label-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-top: 4px;\n}\n\n.igv-center-line {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 8;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-left-style: dashed;\n border-left-width: thin;\n border-right-style: dashed;\n border-right-width: thin;\n}\n\n.igv-center-line-wide {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(127, 127, 127, 0.51);\n}\n\n.igv-center-line-thin {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(0, 0, 0, 0);\n}\n\n.igv-cursor-guide-horizontal {\n display: none;\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n height: 1px;\n z-index: 32;\n margin-left: 50px;\n margin-right: 54px;\n border-top-style: dotted;\n border-top-width: thin;\n border-top-color: rgba(127, 127, 127, 0.76);\n}\n\n.igv-cursor-guide-vertical {\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 1px;\n z-index: 32;\n border-left-style: dotted;\n border-left-width: thin;\n border-left-color: rgba(127, 127, 127, 0.76);\n display: none;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-generic-dialog-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 300px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-generic-dialog-container .igv-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input div {\n width: 30%;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div {\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-generic-container {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-container div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-generic-container div:first-child i {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-menu-popup {\n position: absolute;\n top: 0;\n left: 0;\n width: max-content;\n max-width: 400px;\n z-index: 512;\n cursor: pointer;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background: white;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-end;\n text-align: left;\n}\n.igv-menu-popup > div:not(:first-child) {\n width: 100%;\n}\n.igv-menu-popup > div:not(:first-child) > div {\n background: white;\n}\n.igv-menu-popup > div:not(:first-child) > div.context-menu {\n padding-left: 4px;\n padding-right: 4px;\n}\n.igv-menu-popup > div:not(:first-child) > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-menu-popup > div:not(:first-child) > div:hover {\n background: #efefef;\n}\n\n.igv-menu-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-bottom: 1px;\n padding-top: 1px;\n}\n\n.igv-menu-popup-header {\n position: relative;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-menu-popup-header div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-menu-popup-header div:hover {\n cursor: pointer;\n color: #444;\n}\n\n.igv-menu-popup-check-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 20px;\n margin-right: 4px;\n background-color: transparent;\n}\n.igv-menu-popup-check-container div {\n padding-top: 2px;\n padding-left: 8px;\n}\n.igv-menu-popup-check-container div:first-child {\n position: relative;\n width: 12px;\n height: 12px;\n}\n.igv-menu-popup-check-container div:first-child svg {\n position: absolute;\n width: 12px;\n height: 12px;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-loading-spinner-container {\n z-index: 1024;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-loading-spinner-container > div {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 4px solid rgba(128, 128, 128, 0.5);\n border-top-color: rgb(255, 255, 255);\n animation: spin 1s ease-in-out infinite;\n -webkit-animation: spin 1s ease-in-out infinite;\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.igv-roi-menu {\n position: absolute;\n z-index: 512;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background-color: white;\n width: 192px;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-menu > div:first-child {\n height: 24px;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-roi-menu > div:first-child > div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-roi-menu > div:first-child > div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-menu > div:last-child {\n background-color: white;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n text-align: start;\n vertical-align: middle;\n}\n.igv-roi-menu > div:last-child > div {\n height: 24px;\n padding-left: 4px;\n border-bottom-style: solid;\n border-bottom-width: thin;\n border-bottom-color: #7f7f7f;\n}\n.igv-roi-menu > div:last-child > div:not(:first-child):hover {\n cursor: pointer;\n background-color: rgba(127, 127, 127, 0.1);\n}\n.igv-roi-menu > div:last-child div:first-child {\n font-style: italic;\n text-align: center;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.igv-roi-menu > div:last-child > div:last-child {\n border-bottom-width: 0;\n border-bottom-color: transparent;\n}\n\n.igv-roi-placeholder {\n font-style: normal;\n color: rgba(75, 75, 75, 0.6);\n}\n\n.igv-roi-table {\n position: absolute;\n z-index: 1024;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n resize: both;\n overflow: hidden;\n width: min-content;\n max-width: 1600px;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n background-color: white;\n cursor: default;\n}\n.igv-roi-table > div {\n height: 24px;\n font-size: 14px;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n}\n.igv-roi-table > div:first-child {\n border-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-width: 0;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-roi-table > div:first-child > div:first-child {\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-left: 4px;\n margin-right: 4px;\n width: calc(100% - 4px - 12px);\n}\n.igv-roi-table > div:first-child > div:last-child {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7f7f7f;\n}\n.igv-roi-table > div:first-child > div:last-child > svg {\n display: block;\n}\n.igv-roi-table > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-table > .igv-roi-table-description {\n padding: 4px;\n margin-left: 4px;\n word-break: break-all;\n overflow-y: auto;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-goto-explainer {\n margin-top: 5px;\n margin-left: 4px;\n color: #7F7F7F;\n font-style: italic;\n height: 24px;\n border-top: solid lightgray;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-column-titles {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n padding-right: 16px;\n background-color: white;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: #7f7f7f;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n overflow: auto;\n height: 360px;\n flex: 1 1 auto;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: transparent;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row-hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.igv-roi-table > div:last-child {\n min-height: 32px;\n height: 32px;\n line-height: 32px;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: transparent;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-width: 0;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n\n.igv-roi-table-row-selected {\n background-color: rgba(0, 0, 0, 0.125);\n}\n\n.igv-roi-table-button {\n cursor: pointer;\n height: 20px;\n user-select: none;\n line-height: 20px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 13px;\n font-weight: 400;\n color: black;\n padding-left: 6px;\n padding-right: 6px;\n background-color: rgb(239, 239, 239);\n border-color: black;\n border-style: solid;\n border-width: thin;\n border-radius: 3px;\n}\n\n.igv-roi-table-button:hover {\n font-weight: 400;\n background-color: rgba(0, 0, 0, 0.13);\n}\n\n.igv-roi-region {\n z-index: 64;\n position: absolute;\n top: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n margin-top: 66px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-region > div {\n position: relative;\n width: 100%;\n height: 8px;\n pointer-events: auto;\n}\n\n.igv-roi-menu-row {\n height: 24px;\n padding-left: 8px;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n background-color: white;\n}\n\n.igv-roi-menu-row-edit-description {\n width: -webkit-fill-available;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n background-color: white;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 4px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-menu-row-edit-description > label {\n margin-left: 2px;\n margin-bottom: 0;\n display: block;\n width: -webkit-fill-available;\n}\n.igv-roi-menu-row-edit-description > input {\n display: block;\n margin-left: 2px;\n margin-right: 2px;\n margin-bottom: 1px;\n width: -webkit-fill-available;\n}\n\n.igv-container {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-top: 4px;\n user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n min-height: 160px;\n}\n\n.igv-viewport {\n position: relative;\n margin-top: 5px;\n line-height: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.igv-viewport-content {\n position: relative;\n width: 100%;\n}\n.igv-viewport-content > canvas {\n position: relative;\n display: block;\n}\n\n.igv-column-container {\n position: relative;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n width: 100%;\n}\n\n.igv-column-shim {\n width: 1px;\n margin-left: 2px;\n margin-right: 2px;\n background-color: #545453;\n}\n\n.igv-axis-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 50px;\n}\n.igv-axis-column > div {\n position: relative;\n margin-top: 5px;\n width: 100%;\n}\n.igv-axis-column > div > div {\n z-index: 512;\n position: absolute;\n top: 8px;\n left: 8px;\n width: fit-content;\n height: fit-content;\n background-color: transparent;\n display: grid;\n align-items: start;\n justify-items: center;\n}\n.igv-axis-column > div > div > input {\n display: block;\n margin: unset;\n cursor: pointer;\n}\n\n.igv-column {\n position: relative;\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-sample-info-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-sample-name-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-scrollbar-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 14px;\n}\n.igv-scrollbar-column > div {\n position: relative;\n margin-top: 5px;\n width: 14px;\n}\n.igv-scrollbar-column > div > div {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 2px;\n width: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-scrollbar-column > div > div:hover {\n background-color: #c4c4c4;\n}\n\n.igv-track-drag-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 12px;\n background-color: white;\n}\n.igv-track-drag-column > .igv-track-drag-handle {\n z-index: 512;\n position: relative;\n cursor: pointer;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n.igv-track-drag-column .igv-track-drag-handle-color {\n background-color: #c4c4c4;\n}\n.igv-track-drag-column .igv-track-drag-handle-hover-color {\n background-color: #787878;\n}\n.igv-track-drag-column .igv-track-drag-handle-selected-color {\n background-color: #0963fa;\n}\n.igv-track-drag-column > .igv-track-drag-shim {\n position: relative;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n}\n\n.igv-gear-menu-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 28px;\n}\n.igv-gear-menu-column > div {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 5px;\n width: 100%;\n background: white;\n}\n.igv-gear-menu-column > div > div {\n position: relative;\n margin-top: 4px;\n width: 16px;\n height: 16px;\n color: #7F7F7F;\n}\n.igv-gear-menu-column > div > div:hover {\n cursor: pointer;\n color: #444;\n}\n\n/*# sourceMappingURL=igv.css.map */\n' \ No newline at end of file +export default '.igv-ui-dropdown {\n cursor: default;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: 1px;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n background-color: white;\n}\n.igv-ui-dropdown > div {\n overflow-y: auto;\n overflow-x: hidden;\n background-color: white;\n}\n.igv-ui-dropdown > div > div {\n padding: 4px;\n width: 100%;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n background-color: white;\n}\n.igv-ui-dropdown > div > div:last-child {\n border-bottom-color: transparent;\n border-bottom-width: 0;\n}\n.igv-ui-dropdown > div > div:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.igv-ui-popover {\n cursor: default;\n position: absolute;\n z-index: 2048;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n background-color: white;\n}\n.igv-ui-popover > div:first-child {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-width: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-popover > div:first-child > div:first-child {\n margin-left: 4px;\n}\n.igv-ui-popover > div:first-child > div:last-child {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-popover > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-popover > div:last-child {\n user-select: text;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 400px;\n max-width: 800px;\n background-color: white;\n border-bottom-width: 0;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-ui-popover > div:last-child > div {\n margin-left: 4px;\n margin-right: 4px;\n min-width: 220px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.igv-ui-popover > div:last-child > div > span {\n font-weight: bolder;\n}\n.igv-ui-popover > div:last-child hr {\n width: 100%;\n}\n\n.igv-ui-alert-dialog-container {\n box-sizing: content-box;\n position: absolute;\n z-index: 2048;\n top: 50%;\n left: 50%;\n width: 400px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n outline: none;\n font-family: \"Open Sans\", sans-serif;\n font-size: 15px;\n font-weight: 400;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-ui-alert-dialog-container > div:first-child {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-alert-dialog-container > div:first-child div:first-child {\n padding-left: 8px;\n}\n.igv-ui-alert-dialog-container .igv-ui-alert-dialog-body {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n color: #373737;\n width: 100%;\n height: calc(100% - 24px - 64px);\n overflow-y: scroll;\n}\n.igv-ui-alert-dialog-container .igv-ui-alert-dialog-body .igv-ui-alert-dialog-body-copy {\n margin: 16px;\n width: auto;\n height: auto;\n overflow-wrap: break-word;\n word-break: break-word;\n background-color: white;\n border: unset;\n}\n.igv-ui-alert-dialog-container > div:last-child {\n width: 100%;\n margin-bottom: 10px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-ui-alert-dialog-container > div:last-child div {\n margin: unset;\n width: 40px;\n height: 30px;\n line-height: 30px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n border-color: #2B81AF;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-ui-alert-dialog-container > div:last-child div:hover {\n cursor: pointer;\n border-color: #25597f;\n background-color: #25597f;\n}\n\n.igv-ui-color-swatch {\n position: relative;\n box-sizing: content-box;\n display: flex;\n flex-flow: row;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n border-style: solid;\n border-width: 2px;\n border-color: white;\n border-radius: 4px;\n}\n\n.igv-ui-color-swatch:hover {\n border-color: dimgray;\n}\n\n.igv-ui-colorpicker-menu-close-button {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 32px;\n margin-top: 4px;\n margin-bottom: 4px;\n padding-right: 8px;\n}\n.igv-ui-colorpicker-menu-close-button i.fa {\n display: block;\n margin-left: 4px;\n margin-right: 4px;\n color: #5f5f5f;\n}\n.igv-ui-colorpicker-menu-close-button i.fa:hover,\n.igv-ui-colorpicker-menu-close-button i.fa:focus,\n.igv-ui-colorpicker-menu-close-button i.fa:active {\n cursor: pointer;\n color: #0f0f0f;\n}\n\n.igv-ui-generic-dialog-container {\n box-sizing: content-box;\n position: fixed;\n top: 0;\n left: 0;\n width: 300px;\n height: fit-content;\n padding-bottom: 16px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input > div {\n width: fit-content;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input input[type=range] {\n width: 70%;\n -webkit-appearance: none;\n background: linear-gradient(90deg, white, black);\n outline: none;\n margin: 0;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-input output {\n display: block;\n height: 100%;\n width: 20%;\n font-size: 16px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n padding-top: 16px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div {\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-ui-generic-dialog-container .igv-ui-generic-dialog-ok-cancel > div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n\n.igv-ui-generic-container {\n box-sizing: content-box;\n position: absolute;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ui-generic-container > div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-ui-generic-container > div:first-child > div {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-ui-dialog {\n z-index: 2048;\n position: fixed;\n width: fit-content;\n height: fit-content;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n background-color: white;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n}\n.igv-ui-dialog .igv-ui-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-ui-dialog .igv-ui-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-ui-dialog .igv-ui-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-ui-dialog .igv-ui-dialog-one-liner {\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin: 8px;\n overflow-wrap: break-word;\n background-color: white;\n font-weight: bold;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel {\n width: 100%;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div {\n margin: 16px;\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:first-child {\n background-color: #5ea4e0;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:last-child {\n background-color: #c4c4c4;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-ui-dialog .igv-ui-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-ui-dialog .igv-ui-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-ui-dialog .igv-ui-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-ui-dialog .igv-ui-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-ui-panel, .igv-ui-panel-row, .igv-ui-panel-column {\n z-index: 2048;\n background-color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n}\n\n.igv-ui-panel-column {\n display: flex;\n flex-direction: column;\n}\n\n.igv-ui-panel-row {\n display: flex;\n flex-direction: row;\n}\n\n.igv-ui-textbox {\n background-color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n}\n\n.igv-ui-table {\n background-color: white;\n}\n\n.igv-ui-table thead {\n position: sticky;\n top: 0;\n}\n\n.igv-ui-table th {\n text-align: left;\n}\n\n.igv-ui-table td {\n padding-right: 20px;\n}\n\n.igv-ui-table tr:hover {\n background-color: lightblue;\n}\n\n.igv-ui-center-fixed {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.igv-navbar {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n color: #444;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n line-height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n margin-top: 2px;\n margin-bottom: 6px;\n height: 32px;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: #f3f3f3;\n}\n.igv-navbar .igv-navbar-left-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-left-container .igv-logo {\n width: 34px;\n height: 32px;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-left-container .igv-current-genome {\n height: 32px;\n margin-left: 4px;\n margin-right: 4px;\n user-select: none;\n line-height: 32px;\n vertical-align: middle;\n text-align: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n height: 100%;\n width: 125px;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container select {\n display: block;\n cursor: pointer;\n width: 100px;\n height: 75%;\n outline: none;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-left: 8px;\n height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 240px;\n height: 22px;\n line-height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container input.igv-search-input {\n cursor: text;\n width: 85%;\n height: 22px;\n line-height: 22px;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n text-align: left;\n padding-left: 8px;\n margin-right: 8px;\n outline: none;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: white;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container .igv-search-icon-container {\n cursor: pointer;\n height: 16px;\n width: 16px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-windowsize-panel-container {\n margin-left: 4px;\n user-select: none;\n}\n.igv-navbar .igv-navbar-right-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container {\n position: relative;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container-hidden {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget {\n color: #737373;\n font-size: 18px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:first-child {\n height: 20px;\n width: 20px;\n margin-left: unset;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:last-child {\n height: 20px;\n width: 20px;\n margin-left: 4px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:nth-child(even) {\n display: block;\n height: fit-content;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget input {\n display: block;\n width: 125px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:first-child {\n height: 20px;\n width: 20px;\n margin-left: unset;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:last-child {\n height: 20px;\n width: 20px;\n margin-left: 4px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:nth-child(even) {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 input {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-hidden {\n display: none;\n}\n\n.igv-navbar-button {\n display: block;\n box-sizing: unset;\n padding-left: 6px;\n padding-right: 6px;\n height: 18px;\n text-transform: capitalize;\n user-select: none;\n line-height: 18px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 11px;\n font-weight: 200;\n color: #737373;\n background-color: #f3f3f3;\n border-color: #737373;\n border-style: solid;\n border-width: thin;\n border-radius: 6px;\n}\n\n.igv-navbar-button:hover {\n cursor: pointer;\n}\n\n.igv-navbar-button-clicked {\n color: white;\n background-color: #737373;\n}\n\n.igv-navbar-icon-button {\n cursor: pointer;\n position: relative;\n width: 24px;\n height: 24px;\n margin-left: 4px;\n margin-right: 4px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-icon-button > div:first-child {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: -18px;\n width: 24px;\n height: 24px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-icon-button > div:last-child {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 18px;\n width: 24px;\n height: 24px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.igv-navbar-text-button {\n cursor: pointer;\n position: relative;\n margin-left: 2px;\n margin-right: 2px;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.igv-navbar-text-button > div:nth-child(2) {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 0;\n width: 38px;\n height: 18px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.igv-navbar-text-button > div:nth-child(3) {\n z-index: 512;\n position: absolute;\n top: 36px;\n left: 42px;\n width: 38px;\n height: 18px;\n border: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n#igv-text-button-label {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.igv-navbar-text-button-svg-inactive rect {\n stroke: #737373;\n fill: white;\n}\n.igv-navbar-text-button-svg-inactive text {\n fill: #737373;\n}\n.igv-navbar-text-button-svg-inactive tspan {\n dominant-baseline: middle;\n}\n\n.igv-navbar-text-button-svg-hover rect {\n stroke: #737373;\n fill: #737373;\n}\n.igv-navbar-text-button-svg-hover text {\n fill: white;\n}\n.igv-navbar-text-button-svg-hover tspan {\n dominant-baseline: middle;\n}\n\n#igv-save-svg-group rect {\n stroke: #737373;\n fill: white;\n}\n#igv-save-svg-group text {\n fill: #737373;\n}\n\n#igv-save-svg-group:hover rect {\n stroke: #737373;\n fill: #737373;\n}\n#igv-save-svg-group:hover text {\n fill: white;\n}\n\n#igv-save-png-group rect {\n stroke: #737373;\n fill: white;\n}\n#igv-save-png-group text {\n fill: #737373;\n}\n\n#igv-save-png-group:hover rect {\n stroke: #737373;\n fill: #737373;\n}\n#igv-save-png-group:hover text {\n fill: white;\n}\n\n.igv-zoom-in-notice-container {\n z-index: 256;\n position: absolute;\n top: 8px;\n left: 50%;\n transform: translate(-50%, 0%);\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n background-color: white;\n}\n.igv-zoom-in-notice-container > div {\n padding-left: 4px;\n padding-right: 4px;\n padding-top: 2px;\n padding-bottom: 2px;\n width: 100%;\n height: 100%;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: #3f3f3f;\n}\n\n.igv-zoom-in-notice {\n position: absolute;\n top: 10px;\n left: 50%;\n}\n.igv-zoom-in-notice div {\n position: relative;\n left: -50%;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #3f3f3f;\n background-color: rgba(255, 255, 255, 0.51);\n z-index: 64;\n}\n\n.igv-container-spinner {\n position: absolute;\n top: 90%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1024;\n width: 24px;\n height: 24px;\n pointer-events: none;\n color: #737373;\n}\n\n.igv-multi-locus-close-button {\n position: absolute;\n top: 2px;\n right: 0;\n padding-left: 2px;\n padding-right: 2px;\n width: 12px;\n height: 12px;\n color: #666666;\n background-color: white;\n z-index: 1000;\n}\n.igv-multi-locus-close-button > svg {\n vertical-align: top;\n}\n\n.igv-multi-locus-close-button:hover {\n cursor: pointer;\n color: #434343;\n}\n\n.igv-multi-locus-ruler-label {\n z-index: 64;\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 12px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-multi-locus-ruler-label > div {\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n color: rgb(16, 16, 16);\n background-color: white;\n}\n.igv-multi-locus-ruler-label > div {\n cursor: pointer;\n}\n\n.igv-multi-locus-ruler-label-square-dot {\n z-index: 64;\n position: absolute;\n left: 50%;\n top: 5%;\n transform: translate(-50%, 0%);\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-multi-locus-ruler-label-square-dot > div:first-child {\n width: 14px;\n height: 14px;\n}\n.igv-multi-locus-ruler-label-square-dot > div:last-child {\n margin-left: 16px;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: rgb(16, 16, 16);\n}\n\n.igv-ruler-sweeper {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 26px;\n bottom: 0;\n left: 0;\n width: 0;\n z-index: 99999;\n background-color: rgba(68, 134, 247, 0.25);\n}\n\n.igv-ruler-tooltip {\n pointer-events: none;\n z-index: 128;\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n height: 32px;\n background-color: transparent;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ruler-tooltip > div {\n pointer-events: none;\n width: 128px;\n height: auto;\n padding: 1px;\n color: #373737;\n font-size: 10px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n background-color: white;\n border-style: solid;\n border-width: thin;\n border-color: #373737;\n}\n\n.igv-track-label {\n position: absolute;\n left: 8px;\n top: 8px;\n width: auto;\n height: auto;\n max-width: 50%;\n padding-left: 4px;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: white;\n z-index: 128;\n cursor: pointer;\n}\n\n.igv-track-label:hover,\n.igv-track-label:focus,\n.igv-track-label:active {\n background-color: #e8e8e8;\n}\n\n.igv-track-label-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-top: 4px;\n}\n\n.igv-center-line {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 8;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-left-style: dashed;\n border-left-width: thin;\n border-right-style: dashed;\n border-right-width: thin;\n}\n\n.igv-center-line-wide {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(127, 127, 127, 0.51);\n}\n\n.igv-center-line-thin {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(0, 0, 0, 0);\n}\n\n.igv-cursor-guide-horizontal {\n display: none;\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n height: 1px;\n z-index: 32;\n margin-left: 50px;\n margin-right: 54px;\n border-top-style: dotted;\n border-top-width: thin;\n border-top-color: rgba(127, 127, 127, 0.76);\n}\n\n.igv-cursor-guide-vertical {\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 1px;\n z-index: 32;\n border-left-style: dotted;\n border-left-width: thin;\n border-left-color: rgba(127, 127, 127, 0.76);\n display: none;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-generic-dialog-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 300px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-generic-dialog-container .igv-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input div {\n width: 30%;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div {\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-generic-container {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-container div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-generic-container div:first-child i {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-menu-popup {\n position: absolute;\n top: 0;\n left: 0;\n width: max-content;\n max-width: 400px;\n z-index: 512;\n cursor: pointer;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background: white;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-end;\n text-align: left;\n}\n.igv-menu-popup > div:not(:first-child) {\n width: 100%;\n}\n.igv-menu-popup > div:not(:first-child) > div {\n background: white;\n}\n.igv-menu-popup > div:not(:first-child) > div.context-menu {\n padding-left: 4px;\n padding-right: 4px;\n}\n.igv-menu-popup > div:not(:first-child) > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-menu-popup > div:not(:first-child) > div:hover {\n background: #efefef;\n}\n\n.igv-menu-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-bottom: 1px;\n padding-top: 1px;\n}\n\n.igv-menu-popup-header {\n position: relative;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-menu-popup-header div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-menu-popup-header div:hover {\n cursor: pointer;\n color: #444;\n}\n\n.igv-menu-popup-check-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 20px;\n margin-right: 4px;\n background-color: transparent;\n}\n.igv-menu-popup-check-container div {\n padding-top: 2px;\n padding-left: 8px;\n}\n.igv-menu-popup-check-container div:first-child {\n position: relative;\n width: 12px;\n height: 12px;\n}\n.igv-menu-popup-check-container div:first-child svg {\n position: absolute;\n width: 12px;\n height: 12px;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-loading-spinner-container {\n z-index: 1024;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-loading-spinner-container > div {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 4px solid rgba(128, 128, 128, 0.5);\n border-top-color: rgb(255, 255, 255);\n animation: spin 1s ease-in-out infinite;\n -webkit-animation: spin 1s ease-in-out infinite;\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.igv-roi-menu {\n position: absolute;\n z-index: 512;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background-color: white;\n width: 192px;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-menu > div:first-child {\n height: 24px;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-roi-menu > div:first-child > div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-roi-menu > div:first-child > div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-menu > div:last-child {\n background-color: white;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n text-align: start;\n vertical-align: middle;\n}\n.igv-roi-menu > div:last-child > div {\n height: 24px;\n padding-left: 4px;\n border-bottom-style: solid;\n border-bottom-width: thin;\n border-bottom-color: #7f7f7f;\n}\n.igv-roi-menu > div:last-child > div:not(:first-child):hover {\n cursor: pointer;\n background-color: rgba(127, 127, 127, 0.1);\n}\n.igv-roi-menu > div:last-child div:first-child {\n font-style: italic;\n text-align: center;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.igv-roi-menu > div:last-child > div:last-child {\n border-bottom-width: 0;\n border-bottom-color: transparent;\n}\n\n.igv-roi-placeholder {\n font-style: normal;\n color: rgba(75, 75, 75, 0.6);\n}\n\n.igv-roi-table {\n position: absolute;\n z-index: 1024;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n resize: both;\n overflow: hidden;\n width: min-content;\n max-width: 1600px;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n background-color: white;\n cursor: default;\n}\n.igv-roi-table > div {\n height: 24px;\n font-size: 14px;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n}\n.igv-roi-table > div:first-child {\n border-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-width: 0;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-roi-table > div:first-child > div:first-child {\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-left: 4px;\n margin-right: 4px;\n width: calc(100% - 4px - 12px);\n}\n.igv-roi-table > div:first-child > div:last-child {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7f7f7f;\n}\n.igv-roi-table > div:first-child > div:last-child > svg {\n display: block;\n}\n.igv-roi-table > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-table > .igv-roi-table-description {\n padding: 4px;\n margin-left: 4px;\n word-break: break-all;\n overflow-y: auto;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-goto-explainer {\n margin-top: 5px;\n margin-left: 4px;\n color: #7F7F7F;\n font-style: italic;\n height: 24px;\n border-top: solid lightgray;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-column-titles {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n padding-right: 16px;\n background-color: white;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: #7f7f7f;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n overflow: auto;\n height: 360px;\n flex: 1 1 auto;\n background-color: transparent;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: transparent;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row-hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.igv-roi-table > div:last-child {\n min-height: 32px;\n height: 32px;\n line-height: 32px;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: transparent;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-width: 0;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n\n.igv-roi-table-row-selected {\n background-color: rgba(0, 0, 0, 0.125);\n}\n\n.igv-roi-table-button {\n cursor: pointer;\n height: 20px;\n user-select: none;\n line-height: 20px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 13px;\n font-weight: 400;\n color: black;\n padding-left: 6px;\n padding-right: 6px;\n background-color: rgb(239, 239, 239);\n border-color: black;\n border-style: solid;\n border-width: thin;\n border-radius: 3px;\n}\n\n.igv-roi-table-button:hover {\n font-weight: 400;\n background-color: rgba(0, 0, 0, 0.13);\n}\n\n.igv-roi-region {\n z-index: 64;\n position: absolute;\n top: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n margin-top: 66px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-region > div {\n position: relative;\n width: 100%;\n height: 8px;\n pointer-events: auto;\n}\n\n.igv-roi-menu-row {\n height: 24px;\n padding-left: 8px;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n background-color: white;\n}\n\n.igv-roi-menu-row-edit-description {\n width: -webkit-fill-available;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n background-color: white;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 4px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-menu-row-edit-description > label {\n margin-left: 2px;\n margin-bottom: 0;\n display: block;\n width: -webkit-fill-available;\n}\n.igv-roi-menu-row-edit-description > input {\n display: block;\n margin-left: 2px;\n margin-right: 2px;\n margin-bottom: 1px;\n width: -webkit-fill-available;\n}\n\n.igv-container {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-top: 4px;\n user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n min-height: 160px;\n}\n\n.igv-viewport {\n position: relative;\n margin-top: 5px;\n line-height: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.igv-viewport-content {\n position: relative;\n width: 100%;\n}\n.igv-viewport-content > canvas {\n position: relative;\n display: block;\n}\n\n.igv-column-container {\n position: relative;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n width: 100%;\n}\n\n.igv-column-shim {\n width: 1px;\n margin-left: 2px;\n margin-right: 2px;\n background-color: #545453;\n}\n\n.igv-axis-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 50px;\n}\n.igv-axis-column > div {\n position: relative;\n margin-top: 5px;\n width: 100%;\n}\n.igv-axis-column > div > div {\n z-index: 512;\n position: absolute;\n top: 8px;\n left: 8px;\n width: fit-content;\n height: fit-content;\n background-color: transparent;\n display: grid;\n align-items: start;\n justify-items: center;\n}\n.igv-axis-column > div > div > input {\n display: block;\n margin: unset;\n cursor: pointer;\n}\n\n.igv-column {\n position: relative;\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-sample-info-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-sample-name-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-scrollbar-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 14px;\n}\n.igv-scrollbar-column > div {\n position: relative;\n margin-top: 5px;\n width: 14px;\n}\n.igv-scrollbar-column > div > div {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 2px;\n width: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-scrollbar-column > div > div:hover {\n background-color: #c4c4c4;\n}\n\n.igv-track-drag-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 12px;\n background-color: white;\n}\n.igv-track-drag-column > .igv-track-drag-handle {\n z-index: 512;\n position: relative;\n cursor: pointer;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n.igv-track-drag-column .igv-track-drag-handle-color {\n background-color: #c4c4c4;\n}\n.igv-track-drag-column .igv-track-drag-handle-hover-color {\n background-color: #787878;\n}\n.igv-track-drag-column .igv-track-drag-handle-selected-color {\n background-color: #0963fa;\n}\n.igv-track-drag-column > .igv-track-drag-shim {\n position: relative;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n}\n\n.igv-gear-menu-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 28px;\n}\n.igv-gear-menu-column > div {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 5px;\n width: 100%;\n background: white;\n}\n.igv-gear-menu-column > div > div {\n position: relative;\n margin-top: 4px;\n width: 16px;\n height: 16px;\n color: #7F7F7F;\n}\n.igv-gear-menu-column > div > div:hover {\n cursor: pointer;\n color: #444;\n}\n\n/*# sourceMappingURL=igv.css.map */\n' \ No newline at end of file diff --git a/js/feature/decode/ucsc.js b/js/feature/decode/ucsc.js index 5e0641cda..f9aea40a9 100644 --- a/js/feature/decode/ucsc.js +++ b/js/feature/decode/ucsc.js @@ -538,6 +538,29 @@ function decodeSNP(tokens, header) { } +function decodeShoebox(tokens, header, maxColumnCount = Number.MAX_SAFE_INTEGER) { + + if (tokens.length < 4) return undefined + + const chr = tokens[0] + const start = parseInt(tokens[1]) + const end = tokens.length > 2 ? parseInt(tokens[2]) : start + 1 + if (isNaN(start) || isNaN(end)) { + return new DecodeError(`Unparsable bed record.`) + } + const feature = new UCSCBedFeature({chr: chr, start: start, end: end, score: 1000}) + + const values = [] + for(let i = 3; i< tokens.length; i++) { + values.push(Number.parseInt(tokens[i])) + } + feature.values = values; + + + return feature +} + + class UCSCBedFeature { constructor(properties) { @@ -650,6 +673,6 @@ class PSLFeature { export { decodeBed, decodeBedGraph, decodeGenePred, decodeGenePredExt, decodePeak, decodeReflat, decodeRepeatMasker, - decodeSNP, decodeWig, decodePSL, decodeBedmethyl, decodeGappedPeak, decodeNarrowPeak + decodeSNP, decodeWig, decodePSL, decodeBedmethyl, decodeGappedPeak, decodeNarrowPeak, decodeShoebox } diff --git a/js/feature/featureParser.js b/js/feature/featureParser.js index d1eece80a..5da3b655c 100644 --- a/js/feature/featureParser.js +++ b/js/feature/featureParser.js @@ -36,6 +36,7 @@ import { decodePeak, decodeReflat, decodeRepeatMasker, + decodeShoebox, decodeSNP, decodeWig } from "./decode/ucsc.js" @@ -319,6 +320,10 @@ class FeatureParser { this.decode = decodeGcnv this.delimiter = "\t" break + case "shoebox": + this.decode = decodeShoebox + this.delimiter = "\t" + break default: const customFormat = getFormat(format) if (customFormat !== undefined) { diff --git a/js/feature/mergedTrack.js b/js/feature/mergedTrack.js index 3eace8bc6..56c4315d7 100644 --- a/js/feature/mergedTrack.js +++ b/js/feature/mergedTrack.js @@ -152,6 +152,19 @@ class MergedTrack extends TrackBase { return this._autoscale } + set autoscaleGroup(g) { + if(this.tracks) { + for(let t of this.tracks) t.autoscaleGroup = g + } + } + + get autoscaleGroup() { + if(this.tracks && this.tracks.length > 0) { + const g = this.tracks[0].autoscaleGroup + return (this.tracks.some(t => g !== t.autoscaleGroup)) ? undefined : g + } + } + /** * Set the data range of all constitutive numeric tracks. This method is called from the menu item, i.e. an explicit * setting, so it should disable autoscale as well. diff --git a/js/feature/textFeatureSource.js b/js/feature/textFeatureSource.js index 571b9cfc1..0e0edbe23 100644 --- a/js/feature/textFeatureSource.js +++ b/js/feature/textFeatureSource.js @@ -245,7 +245,10 @@ class TextFeatureSource extends BaseFeatureSource { for (let feature of featureList) { for (let field of searchableFields) { let key - if (typeof feature.getAttributeValue === 'function') { + if(feature.hasOwnProperty(field)) { + key = feature[field]; + } + else if (typeof feature.getAttributeValue === 'function') { key = feature.getAttributeValue(field) } if (key) { diff --git a/js/feature/wigTrack.js b/js/feature/wigTrack.js index 58ee4e17b..cc44205ca 100755 --- a/js/feature/wigTrack.js +++ b/js/feature/wigTrack.js @@ -23,7 +23,8 @@ class WigTrack extends TrackBase { scaleFactor: undefined, overflowColor: `rgb(255, 32, 255)`, baselineColor: 'lightGray', - summarize: true + summarize: true, + visibilityWindow: undefined } constructor(config, browser) { @@ -69,6 +70,10 @@ class WigTrack extends TrackBase { if (header) this.setTrackProperties(header) } + supportsWholeGenome() { + return this.visibilityWindow === undefined || this.visibilityWindow < 0 + } + async getFeatures(chr, start, end, bpPerPixel) { const windowFunction = this.windowFunction diff --git a/js/igv-create.js b/js/igv-create.js index 0ae990176..dc9db472d 100644 --- a/js/igv-create.js +++ b/js/igv-create.js @@ -26,7 +26,6 @@ import {GoogleAuth, igvxhr} from '../node_modules/igv-utils/src/index.js' import Browser from "./browser.js" import GenomeUtils from "./genome/genomeUtils.js" -import {navbarDidResize} from "./responsiveNavbar.js" let allBrowsers = [] @@ -82,7 +81,7 @@ async function createBrowser(parentDiv, config) { } browser.stopSpinner() - navbarDidResize(browser, browser.$navigation.width()) + browser.navbar.navbarDidResize() return browser diff --git a/js/responsiveNavbar.js b/js/responsiveNavbar.js index 27d32994c..d461cd715 100644 --- a/js/responsiveNavbar.js +++ b/js/responsiveNavbar.js @@ -24,66 +24,270 @@ */ import $ from "./vendor/jquery-3.3.1.slim.js" -import {StringUtils} from "../node_modules/igv-utils/src/index.js" import GenomeUtils from "./genome/genomeUtils.js" +import ChromosomeSelectWidget from "./ui/chromosomeSelectWidget.js" +import * as DOMUtils from "./ui/utils/dom-utils.js" +import {createIcon} from "./ui/utils/icons.js" +import WindowSizePanel from "./windowSizePanel.js" +import OverlayTrackButton from "./ui/overlayTrackButton.js" +import MultiTrackSelectButton from "./ui/multiTrackSelectButton.js" +import CursorGuide from "./ui/cursorGuide.js" +import CursorGuideButton from "./ui/cursorGuideButton.js" +import CenterLineButton from "./ui/centerLineButton.js" +import TrackLabelControl from "./ui/trackLabelControl.js" +import ROITableControl from "./roi/roiTableControl.js" +import SampleInfoControl from "./sample/sampleInfoControl.js" +import SampleNameControl from "./sample/sampleNameControl.js" +import SaveImageControl from "./ui/saveImageControl.js" +import CustomButton from "./ui/customButton.js" +import ZoomWidget from "./ui/zoomWidget.js" import NavbarButton from "./ui/navbarButton.js" -const navbarResponsiveClasses = {} +class ResponsiveNavbar { + constructor(config, browser) { + + this.browser = browser + this.config = config + + this.currentClass = 'igv-navbar-text-button' + + // DOM element for + const $navBar = $('
', {class: 'igv-navbar'}) + this.$navigation = $navBar + + const $navbarLeftContainer = $('
', {class: 'igv-navbar-left-container'}) + $navBar.append($navbarLeftContainer) + this.navbarLeftContainer = $navbarLeftContainer.get(0) + + // IGV logo + const $logo = $('
', {class: 'igv-logo'}) + $navbarLeftContainer.append($logo) + + const logoSvg = logo() + logoSvg.css("width", "34px") + logoSvg.css("height", "32px") + $logo.append(logoSvg) + + this.$current_genome = $('
', {class: 'igv-current-genome'}) + $navbarLeftContainer.append(this.$current_genome) + this.$current_genome.text('') + + const $genomicLocation = $('
', {class: 'igv-navbar-genomic-location'}) + $navbarLeftContainer.append($genomicLocation) + + // chromosome select widget + this.chromosomeSelectWidget = new ChromosomeSelectWidget(browser, $genomicLocation.get(0)) + if (config.showChromosomeWidget !== false) { + this.chromosomeSelectWidget.show() + } else { + this.chromosomeSelectWidget.hide() + } + + const $locusSizeGroup = $('
', {class: 'igv-locus-size-group'}) + $genomicLocation.append($locusSizeGroup) + + const $searchContainer = $('
', {class: 'igv-search-container'}) + $locusSizeGroup.append($searchContainer) + + // browser.$searchInput = $(''); + this.$searchInput = $('', {class: 'igv-search-input', type: 'text', placeholder: 'Locus Search'}) + $searchContainer.append(this.$searchInput) + // Stop event propagation to prevent feature track keyboard navigation + this.$searchInput[0].addEventListener('keyup', (event) => { + event.stopImmediatePropagation() + }) + + this.$searchInput.change(() => browser.doSearch(this.$searchInput.val())) + + const searchIconContainer = DOMUtils.div({class: 'igv-search-icon-container'}) + $searchContainer.append($(searchIconContainer)) + searchIconContainer.appendChild(createIcon("search")) + searchIconContainer.addEventListener('click', () => browser.doSearch(this.$searchInput.val())) + + this.windowSizePanel = new WindowSizePanel($locusSizeGroup.get(0), browser) + + const $navbarRightContainer = $('
', {class: 'igv-navbar-right-container'}) + $navBar.append($navbarRightContainer) + this.navbarRightContainer = $navbarRightContainer.get(0) + + const $toggle_button_container = $('
') + $navbarRightContainer.append($toggle_button_container) + const toggleButtonContainer = $toggle_button_container.get(0) + this.toggle_button_container = toggleButtonContainer // TODO -- for circular view , refactor this + + this.overlayTrackButton = new OverlayTrackButton(toggleButtonContainer, browser) + this.overlayTrackButton.setVisibility(false) + + const showMultiSelect = config.showMultiSelectButton !== false + this.multiTrackSelectButton = new MultiTrackSelectButton(toggleButtonContainer, browser, this, showMultiSelect) + + this.cursorGuideButton = new CursorGuideButton(toggleButtonContainer, browser) + + this.centerLineButton = new CenterLineButton(toggleButtonContainer, browser) + + this.trackLabelControl = new TrackLabelControl(toggleButtonContainer, browser) + + // ROI Control + this.roiTableControl = new ROITableControl(toggleButtonContainer, browser) + + this.sampleInfoControl = new SampleInfoControl(toggleButtonContainer, browser) + + this.sampleNameControl = new SampleNameControl(toggleButtonContainer, browser) + + if (true === config.showSVGButton) { + this.saveImageControl = new SaveImageControl(toggleButtonContainer, browser) + } + + if (config.customButtons) { + for (let b of config.customButtons) { + new CustomButton(toggleButtonContainer, browser, b) + } + } + + this.zoomWidget = new ZoomWidget(config, browser, $navbarRightContainer.get(0)) + + if (false === config.showNavigation) { + this.$navigation.hide() + } -const responsiveThreshold = 8 -let textButtonContainerWidth = undefined -function navbarDidResize(browser, width) { - const currentClass = NavbarButton.currentNavbarButtonClass(browser) - if ('igv-navbar-text-button' === currentClass) { - textButtonContainerWidth = browser.$navigation.get(0).querySelector('.igv-navbar-right-container').getBoundingClientRect().width } - const responsiveClasses = getResponsiveClasses(browser, width) + navbarDidResize() { - $(browser.zoomWidget.zoomContainer).removeClass() - $(browser.zoomWidget.zoomContainer).addClass(responsiveClasses.zoomContainer) - browser.fireEvent('navbar-resize', [ responsiveClasses.navbarButton ]) -} + const navbarWidth = this.$navigation.width() + const currentClass = this.currentNavbarButtonClass() + if ('igv-navbar-text-button' === currentClass) { + this.textButtonContainerWidth = this.navbarRightContainer.getBoundingClientRect().width + } + const browser = this.browser + const isWGV = + (browser.isMultiLocusWholeGenomeView()) || + (browser.referenceFrameList && GenomeUtils.isWholeGenomeView(browser.referenceFrameList[0].chr)) + + isWGV ? this.windowSizePanel.hide() : this.windowSizePanel.show() -function getResponsiveClasses(browser, navbarWidth) { + const { + x: leftContainerX, + width: leftContainerWidth + } = this.navbarLeftContainer.getBoundingClientRect() + const leftContainerExtent = leftContainerX + leftContainerWidth + const {x: rightContainerX} = this.navbarRightContainer.getBoundingClientRect() - const isWGV = - (browser.isMultiLocusWholeGenomeView()) || - (browser.referenceFrameList && GenomeUtils.isWholeGenomeView(browser.referenceFrameList[0].chr)) + const delta = rightContainerX - leftContainerExtent + + let navbarButtonClass + const threshold = 8 + if ('igv-navbar-text-button' === currentClass && delta < threshold) { + navbarButtonClass = 'igv-navbar-icon-button' + } else if (this.textButtonContainerWidth && 'igv-navbar-icon-button' === currentClass) { + const length = navbarWidth - leftContainerExtent + if (length - this.textButtonContainerWidth > threshold) { + navbarButtonClass = 'igv-navbar-text-button' + } + } + // Update all the buttons (buttons are listeners) + if(navbarButtonClass && currentClass !== navbarButtonClass) { + this.currentClass = navbarButtonClass + this.browser.fireEvent('navbar-resize', [navbarButtonClass]) + } + + let zoomContainerClass + if (isWGV) { + zoomContainerClass = 'igv-zoom-widget-hidden' + } else { + zoomContainerClass = navbarWidth > 860 ? 'igv-zoom-widget' : 'igv-zoom-widget-900' + } + $(this.zoomWidget.zoomContainer).removeClass() + $(this.zoomWidget.zoomContainer).addClass(zoomContainerClass) + } + + + setCenterLineButtonVisibility(isWholeGenomeView) { + if (isWholeGenomeView) { + this.centerLineButton.setVisibility(!isWholeGenomeView) + } else { + this.centerLineButton.setVisibility(this.config.showCenterGuideButton) + } + } - isWGV ? browser.windowSizePanel.hide() : browser.windowSizePanel.show() + setCursorGuideVisibility(doShowCursorGuide) { + if (doShowCursorGuide) { + this.cursorGuide.show() + } else { + this.cursorGuide.hide() + } + } - const { x: leftContainerX, width: leftContainerWidth } = browser.$navigation.get(0).querySelector('.igv-navbar-left-container').getBoundingClientRect() - const leftContainerExtent = leftContainerX + leftContainerWidth - const { x:rightContainerX} = browser.$navigation.get(0).querySelector('.igv-navbar-right-container').getBoundingClientRect() + updateGenome(genome) { - const delta = rightContainerX - leftContainerExtent + let genomeLabel = (genome.id && genome.id.length < 20 ? genome.id : `${genome.id.substring(0, 8)}...${genome.id.substring(genome.id.length - 8)}`) + this.$current_genome.text(genomeLabel) + this.$current_genome.attr('title', genome.description) - const currentClass = NavbarButton.currentNavbarButtonClass(browser) + // chromosome select widget -- Show this IFF its not explicitly hidden AND the genome has pre-loaded chromosomes + const showChromosomeWidget = + this.config.showChromosomeWidget !== false && + genome.showChromosomeWidget !== false && + genome.chromosomeNames && + genome.chromosomeNames.length > 1 - // console.log(`Current class ${ currentClass } Delta: ${ StringUtils.numberFormatter(Math.floor(delta))}`) + if (showChromosomeWidget) { + this.chromosomeSelectWidget.update(genome) + this.chromosomeSelectWidget.show() + } else { + this.chromosomeSelectWidget.hide() + } + } - if ('igv-navbar-text-button' === currentClass && delta < responsiveThreshold) { - navbarResponsiveClasses.navbarButton = 'igv-navbar-icon-button' - } else if (textButtonContainerWidth && 'igv-navbar-icon-button' === currentClass) { - const length = navbarWidth - leftContainerExtent - if (length - textButtonContainerWidth > responsiveThreshold) { - navbarResponsiveClasses.navbarButton = 'igv-navbar-text-button' + updateLocus(loc, chrName) { + if(this.$searchInput) { + this.$searchInput.val(loc) } + if (this.chromosomeSelectWidget) { + this.chromosomeSelectWidget.select.value = chrName + } + } + currentNavbarButtonClass() { + return this.currentClass + //const el = this.$navigation.get(0).querySelector('.igv-navbar-text-button') + //return el ? 'igv-navbar-text-button' : 'igv-navbar-icon-button' } + setEnableTrackSelection(b) { + this.multiTrackSelectButton.setMultiTrackSelection(b) + } + getEnableTrackSelection() { + return this.multiTrackSelectButton.enableMultiTrackSelection + } - if (isWGV) { - navbarResponsiveClasses.zoomContainer = 'igv-zoom-widget-hidden' - } else { - navbarResponsiveClasses.zoomContainer = navbarWidth > 860 ? 'igv-zoom-widget' : 'igv-zoom-widget-900' + hide() { + this.$navigation.hide() + } + + show() { + this.$navigation.show() } - return navbarResponsiveClasses } -export { navbarDidResize, navbarResponsiveClasses } + +function logo() { + + return $( + '' + + 'IGV' + + '' + + '' + + '' + + ';' + + '' + + ' ' + ) +} + + +export default ResponsiveNavbar diff --git a/js/roi/ROIManager.js b/js/roi/ROIManager.js index 0a4a4757a..86fc49f40 100644 --- a/js/roi/ROIManager.js +++ b/js/roi/ROIManager.js @@ -274,6 +274,10 @@ class ROIManager { return this.roiSets.find(roiSet => true === roiSet.isUserDefined) } + deleteUserDefinedROISet(){ + this.roiSets = this.roiSets.filter(roiSet => roiSet.isUserDefined !== true); + } + initializeUserDefinedROISet() { const config = @@ -289,15 +293,8 @@ class ROIManager { } async deleteRegionWithKey(regionKey, columnContainer) { - columnContainer.querySelectorAll(createSelector(regionKey)).forEach(node => node.remove()) - const {feature, set} = await this.findRegionWithKey(regionKey) - - if (set) { - set.removeFeature(feature) - } - const records = await this.getTableRecords() if (0 === records.length) { @@ -307,23 +304,6 @@ class ROIManager { } - async findRegionWithKey(regionKey) { - - const {chr, start, end} = parseRegionKey(regionKey) - - for (let set of this.roiSets) { - const features = await set.getFeatures(chr, start, end) - - for (let feature of features) { - if (feature.chr === chr && feature.start >= start && feature.end <= end) { - return {feature, set} - } - } - } - - return {feature: undefined, set: undefined} - } - toJSON() { return this.roiSets.map(roiSet => roiSet.toJSON()) } diff --git a/js/roi/ROIMenu.js b/js/roi/ROIMenu.js index e037215f7..c13cbfea9 100644 --- a/js/roi/ROIMenu.js +++ b/js/roi/ROIMenu.js @@ -109,9 +109,16 @@ class ROIMenu { '
', { label: 'Delete', - click: () => { - this.browser.roiManager.deleteRegionWithKey(regionElement.dataset.region, this.browser.columnContainer) - this.browser.roiManager.repaintTable() + click: async () => { + roiSet.removeFeature(feature) + const userDefinedFeatures = await roiSet.getAllFeatures() + + // Delete user defined ROI Set if it is empty + if (Object.keys(userDefinedFeatures).length === 0) { + roiManager.deleteUserDefinedROISet() + } + roiManager.deleteRegionWithKey(regionElement.dataset.region, columnContainer) + roiManager.repaintTable() } } ) diff --git a/js/roi/ROISet.js b/js/roi/ROISet.js index e97bbd845..2880f5de5 100644 --- a/js/roi/ROISet.js +++ b/js/roi/ROISet.js @@ -184,6 +184,10 @@ class DynamicFeatureSource { if (this.featureMap[chr]) { const match = `${chr}-${start}-${end}` this.featureMap[chr] = this.featureMap[chr].filter(feature => match !== `${feature.chr}-${feature.start}-${feature.end}`) + // Check if featureMap for a specific chromosome is empty now and delete it if yes + if (this.featureMap[chr].length === 0) { + delete this.featureMap[chr]; + } } } } diff --git a/js/roi/roiTableControl.js b/js/roi/roiTableControl.js index 07170660c..877281e72 100644 --- a/js/roi/roiTableControl.js +++ b/js/roi/roiTableControl.js @@ -32,7 +32,7 @@ class ROITableControl extends NavbarButton { constructor(parent, browser) { - super(browser, parent, [ 'ROI', 'Regions of Interest Table' ], buttonLabel, roiImage, roiImageHover, false) + super(parent, browser, ['ROI', 'Regions of Interest Table'], buttonLabel, roiImage, roiImageHover, false) this.button.addEventListener('mouseenter', () => { if (false === browser.doShowROITable) { diff --git a/js/sample/sampleInfoControl.js b/js/sample/sampleInfoControl.js index 0163f4e71..d737e8c3a 100644 --- a/js/sample/sampleInfoControl.js +++ b/js/sample/sampleInfoControl.js @@ -32,7 +32,7 @@ class SampleInfoControl extends NavbarButton { constructor(parent, browser) { - super(browser, parent, 'Sample Info', buttonLabel, sampleInfoImage, sampleInfoImageHover, false) + super(parent, browser, 'Sample Info', buttonLabel, sampleInfoImage, sampleInfoImageHover, false) this.showSampleInfo = false diff --git a/js/sample/sampleNameControl.js b/js/sample/sampleNameControl.js index 9e5a8fbdb..5b006b4db 100644 --- a/js/sample/sampleNameControl.js +++ b/js/sample/sampleNameControl.js @@ -32,7 +32,7 @@ class SampleNameControl extends NavbarButton { constructor(parent, browser) { - super(browser, parent, 'Sample Names', sampleNameButtonLabel, sampleNameImage, sampleNameImageHover, browser.config.showSampleNames) + super(parent, browser, 'Sample Names', sampleNameButtonLabel, sampleNameImage, sampleNameImageHover, browser.config.showSampleNames) this.button.addEventListener('mouseenter', () => { if (false === browser.showSampleNames) { diff --git a/js/search.js b/js/search.js index 4391768d6..9b844580f 100644 --- a/js/search.js +++ b/js/search.js @@ -13,6 +13,7 @@ async function searchFeatures(browser, name) { const searchConfig = browser.searchConfig || DEFAULT_SEARCH_CONFIG let feature + name = name.toUpperCase() const searchableTracks = browser.tracks.filter(t => t.searchable) for (let track of searchableTracks) { const feature = await track.search(name) diff --git a/js/shoebox/shoeboxColorScale.js b/js/shoebox/shoeboxColorScale.js new file mode 100644 index 000000000..0c6b831a1 --- /dev/null +++ b/js/shoebox/shoeboxColorScale.js @@ -0,0 +1,99 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2017 The Regents of the University of California + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the + * following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +import {IGVMath} from "../../node_modules/igv-utils/src/index.js" + +const defaultColorScaleConfig = {min: 0, max: 3000, color: "rgb(0,0,255)"} + +class ShoeboxColorScale { + + constructor(scale) { + + scale = scale || defaultColorScaleConfig + this.max = scale.max + this.min = scale.min || 0 + this.cache = [] + this.nbins = 1000 + this.binsize = (this.max - this.min) / this.nbins + this.updateColor(scale.color || "rgb(0,0,255)") + + } + + updateColor(color) { + const comps = color.substring(4).replace(")", "").split(",") + if (comps.length === 3) { + this.r = Number.parseInt(comps[0].trim()) + this.g = Number.parseInt(comps[1].trim()) + this.b = Number.parseInt(comps[2].trim()) + } + this.cache = [] + } + + setMinMax(min, max) { + this.min = min + this.max = max + this.cache = [] + this.binsize = (this.max - this.min) / this.nbins + } + + getColor(value) { + const low = 0 + if (value < this.min) return "white" + + const bin = Math.floor((Math.min(this.max, value) - this.min) / this.binsize) + if (undefined === this.cache[bin]) { + const alpha = (IGVMath.clamp(value, low, this.max) - low) / (this.max - low) + this.cache[bin] = `rgba(${this.r},${this.g},${this.b}, ${alpha})` + } + return this.cache[bin] + } + + /** + * + * @returns {{min: (*|number), color: string, max}} + */ + toJson() { + return { + min: this.min, + max: this.max, + color: `rgb(${this.r},${this.g},${this.b})` + } + } + + // For short-term backward compatibility + static parse(str) { + + const tokens = str.split(",") + + const cs = { + min: Number.parseFloat(tokens[0]), + max: Number.parseFloat(tokens[1]), + color: `${tokens[2]},${tokens[3]},${tokens[4]}` + } + return new ShoeboxColorScale(cs) + } + +} + + +export default ShoeboxColorScale diff --git a/js/shoebox/shoeboxTrack.js b/js/shoebox/shoeboxTrack.js new file mode 100755 index 000000000..75c894297 --- /dev/null +++ b/js/shoebox/shoeboxTrack.js @@ -0,0 +1,253 @@ +import $ from "../vendor/jquery-3.3.1.slim.js" +import FeatureSource from "../feature/featureSource.js" +import TrackBase from "../trackBase.js" +import IGVGraphics from "../igv-canvas.js" +import ShoeboxColorScale from "./shoeboxColorScale.js" + + +class ShoeboxTrack extends TrackBase { + + static defaults = { + height: 300, + rowHeight: 3, + max: 3000, + visibilityWindow: 10000 + } + + constructor(config, browser) { + super(config, browser) + } + + init(config) { + super.init(config) + + this.type = "shoebox" + this.height = config.height || 300 + this.rowHeight = config.rowHeight || 3 + this.max = config.max || 3000 + + // Hardcoded -- todo get from track line + this.sampleKeys = [] + for (let i = 1; i <= 100; i++) { + this.sampleKeys.push(i) + } + + // Create featureSource + const configCopy = Object.assign({}, this.config) + configCopy.format = 'shoebox' // bit of a hack + this.featureSource = FeatureSource(configCopy, this.browser.genome) + } + + async postInit() { + if (typeof this.featureSource.getHeader === "function") { + this.header = await this.featureSource.getHeader() + if (this.disposed) return // This track was removed during async load + } + // Set properties from track line + if (this.header) { + this.setTrackProperties(this.header) + } + + // Must do the following after setting track properties as they can be overriden via a track line + + // Color settings + if (this.config.colorScale && this.config.colorScale.max && this.config.colorScale.color) { // Minimal validation + this.colorScale = new ShoeboxColorScale(this.config.colorScale) + + } else { + const min = this.dataRange.min + const max = this.dataRange.max + this.colorScale = new ShoeboxColorScale({min, max, color: this.color}) + } + } + + get color() { + return this._color || "rgb(0,0,255)" + } + + set color(color) { + this._color = color + if (this.colorScale) { + this.colorScale.updateColor(color) + } + } + + menuItemList() { + + const menuItems = [] + + + menuItems.push('
') + + // Data range + let object = $('
') + object.text('Set data range') + + function dialogPresentationHandler() { + + if (this.trackView.track.selected) { + this.browser.dataRangeDialog.configure(this.trackView.browser.getSelectedTrackViews()) + } else { + this.browser.dataRangeDialog.configure(this.trackView) + } + this.browser.dataRangeDialog.present($(this.browser.columnContainer)) + } + + menuItems.push({object, dialog: dialogPresentationHandler}) + + return menuItems + } + + setDataRange({min, max}) { + this.dataRange.min = min + this.dataRange.max = max + this.colorScale.min = min + this.colorScale.max = max + this.trackView.repaintViews() + } + + hasSamples() { + return true // by definition + } + + getSamples() { + return { + names: this.sampleKeys, + height: this.rowHeight, + yOffset: 0 + } + } + + async getFeatures(chr, start, end, bpPerPixel) { + const visibilityWindow = this.visibilityWindow + return this.featureSource.getFeatures({chr, start, end, bpPerPixel, visibilityWindow}) + } + + + draw({context, pixelTop, pixelWidth, pixelHeight, features, bpPerPixel, bpStart}) { + + + IGVGraphics.fillRect(context, 0, pixelTop, pixelWidth, pixelHeight, {'fillStyle': "rgb(255, 255, 255)"}) + + if (features && features.length > 0) { + + const rowHeight = this.rowHeight + const pixelBottom = pixelTop + pixelHeight + const bpEnd = bpStart + pixelWidth * bpPerPixel + 1 + + const h = rowHeight + + for (let f of features) { + + // Test for overlap with in-view region + if (f.end < bpStart || f.start > bpEnd) continue + + // Pixel x values + const xLeft = Math.round((f.start - bpStart) / bpPerPixel) + const xRight = Math.round((f.end - bpStart) / bpPerPixel) + const w = Math.max(1, xRight - xLeft) + + // Loop through value array + let row = 0 + + for (let i = f.values.length - 1; i >= 0; i--) { + + const v = f.values[i] + + const y = row * rowHeight + + + const bottom = y + rowHeight + + if (bottom < pixelTop || y > pixelBottom) { + continue + } + + const color = this.colorScale.getColor(v) + + context.fillStyle = color + + context.fillRect(xLeft, y, w, h) + + row++ + } + } + } else { + //console.log("No feature list"); + } + + } + + /** + * Optional method to compute pixel height to accomodate the list of features. + * + * @param features + * @returns {number} + */ + computePixelHeight(features) { + if (!features || features.length === 0) return 0 + return features[0].values.length * this.rowHeight + } + + + clickedFeatures(clickState) { + + const allFeatures = super.clickedFeatures(clickState) + const y = clickState.y + return allFeatures.filter(function (feature) { + const rect = feature.pixelRect + return rect && y >= rect.y && y <= (rect.y + rect.h) + }) + + } + + hoverText(clickState) { + const features = this.clickedFeatures(clickState) + if (features && features.length > 0) { + return `${features[0].sample}: ${features[0].value}` + } + } + + popupData(clickState, featureList) { + + if (featureList === undefined) featureList = this.clickedFeatures(clickState) + + const items = [] + + for (let feature of featureList) { + + // Double line divider between features + if (items.length > 0) { + items.push('
') + items.push('
') + } + + // hack for whole genome features, which save the original feature as "_f" + const f = feature._f || feature + + const data = (typeof f.popupData === 'function') ? + f.popupData(this.type, this.browser.genome.id) : + this.extractPopupData(f) + Array.prototype.push.apply(items, data) + + } + + return items + } + + get supportsWholeGenome() { + return false + } + + getState() { + + const config = super.getState() + config.colorScale = this.colorScale.toJson() + return config + + } + +} + + +export default ShoeboxTrack diff --git a/js/trackFactory.js b/js/trackFactory.js index 7090eb20e..4aa38d91a 100644 --- a/js/trackFactory.js +++ b/js/trackFactory.js @@ -14,6 +14,7 @@ import IdeogramTrack from "./ideogramTrack.js" import SpliceJunctionTrack from "./feature/spliceJunctionTrack.js" import BlatTrack from "./blat/blatTrack.js" import CNVPytorTrack from "./cnvpytor/cnvpytorTrack.js" +import ShoeboxTrack from "./shoebox/shoeboxTrack.js" //import CNVPytorTrack from "./CNVpytor/cnvpytorTrack.js" @@ -25,7 +26,7 @@ const trackFunctions = ['seg', (config, browser) => new SegTrack(config, browser)], ['mut', (config, browser) => new SegTrack(config, browser)], ['maf', (config, browser) => new SegTrack(config, browser)], - ['shoebox', (config, browser) => new SegTrack(config, browser)], + ['shoebox', (config, browser) => new ShoeboxTrack(config, browser)], ['wig', (config, browser) => new WigTrack(config, browser)], ['merged', (config, browser) => new MergedTrack(config, browser)], ['alignment', (config, browser) => new BAMTrack(config, browser)], diff --git a/js/trackView.js b/js/trackView.js index ad0dad770..3862ac55e 100644 --- a/js/trackView.js +++ b/js/trackView.js @@ -33,7 +33,7 @@ import {createIcon} from "./ui/utils/icons.js" import SampleInfoViewport from "./sample/sampleInfoViewport.js" import SampleNameViewport from './sample/sampleNameViewport.js' import MenuPopup from "./ui/menuPopup.js" -import { autoScaleGroupColorHash, multiTrackSelectExclusionTypes } from "./ui/menuUtils.js" +import {autoScaleGroupColorHash, multiTrackSelectExclusionTypes} from "./ui/menuUtils.js" import {colorPalettes, hexToRGB} from "./util/colorPalletes.js" import {isOverlayTrackCriteriaMet} from "./ui/overlayTrackButton.js" @@ -117,6 +117,8 @@ class TrackView { createAxis(browser, track) { const axis = DOMUtils.div() + this.axis = axis + browser.columnContainer.querySelector('.igv-axis-column').appendChild(axis) axis.dataset.tracktype = track.type @@ -134,12 +136,12 @@ class TrackView { if (false === multiTrackSelectExclusionTypes.has(this.track.type)) { - const trackSelectionContainer = DOMUtils.div() - axis.appendChild(trackSelectionContainer) + this.trackSelectionContainer = DOMUtils.div() + axis.appendChild(this.trackSelectionContainer) const html = `` const input = document.createRange().createContextualFragment(html).firstChild - trackSelectionContainer.appendChild(input) + this.trackSelectionContainer.appendChild(input) input.checked = this.track.selected || false input.addEventListener('change', event => { @@ -147,10 +149,10 @@ class TrackView { event.stopPropagation() this.track.selected = event.target.checked this.setDragHandleSelectionState(event.target.checked) - this.browser.overlayTrackButton.setVisibility( isOverlayTrackCriteriaMet(this.browser) ) + this.browser.overlayTrackButton.setVisibility(isOverlayTrackCriteriaMet(this.browser)) }) - this.setTrackSelectionState(axis, false) + this.enableTrackSelection(false) } @@ -422,7 +424,7 @@ class TrackView { const viewportsToRepaint = visibleViewports.filter(vp => vp.needsRepaint()).filter(viewport => viewport.checkZoomIn()) // Get viewports that require a data load - const viewportsToReload = visibleViewports.filter(viewport => viewport.needsReload()) + const viewportsToReload = visibleViewports.filter(viewport => viewport.checkZoomIn()).filter(viewport => viewport.needsReload()) // Trigger viewport to load features needed to cover current genomic range // NOTE: these must be loaded synchronously, do not user Promise.all, not all file readers are thread safe @@ -966,13 +968,19 @@ class TrackView { return Math.max(...this.viewports.map(viewport => viewport.getContentHeight())) } - setTrackSelectionState(axis, doEnableMultiSelection) { + enableTrackSelection(doEnableMultiSelection) { + + const container = this.trackSelectionContainer - const container = axis.querySelector('div') + if (!container || multiTrackSelectExclusionTypes.has(this.track.type)) { + return + } if (false !== doEnableMultiSelection) { container.style.display = 'grid' } else { + // If disabling selection set track selection state to false + this.track.selected = false const trackSelectInput = container.querySelector('[name=track-select]') trackSelectInput.checked = this.track.selected @@ -998,13 +1006,11 @@ class TrackView { dragHandle.classList.remove('igv-track-drag-handle-selected-color') dragHandle.classList.add('igv-track-drag-handle-color') } - } } - function renderSVGAxis(context, track, axisCanvas, deltaX, deltaY) { if (typeof track.paintAxis === 'function') { diff --git a/js/trackViewport.js b/js/trackViewport.js index 80b675a4e..9a0acd9c7 100644 --- a/js/trackViewport.js +++ b/js/trackViewport.js @@ -475,7 +475,8 @@ class TrackViewport extends Viewport { context.saveWithTranslationAndClipRect(id, x, y, width, height, yClipOffset) - let {start, bpPerPixel} = this.referenceFrame + const {start, bpPerPixel} = this.referenceFrame + const pixelXOffset = Math.round((start - this.referenceFrame.start) / bpPerPixel) const config = { @@ -486,6 +487,8 @@ class TrackViewport extends Viewport { pixelTop: yClipOffset, pixelWidth: width, pixelHeight: height, + pixelXOffset, + pixelShift: pixelXOffset, bpStart: start, bpEnd: start + (width * bpPerPixel), bpPerPixel, diff --git a/js/ucsc/ucscHub.js b/js/ucsc/ucscHub.js index c191faf99..b88bd6ead 100644 --- a/js/ucsc/ucscHub.js +++ b/js/ucsc/ucscHub.js @@ -347,7 +347,7 @@ isPcr dynablat-01.soe.ucsc.edu 4040 dynamic GCF/000/186/305/GCF_000186305.1 config.searchIndex = t.getProperty("searchIndex") } if (t.hasProperty("searchTrix")) { - config.searchTrix = this.baseURL + t.getProperty("searchTrix") + config.trixURL = this.baseURL + t.getProperty("searchTrix") } if (t.hasProperty("group")) { diff --git a/js/ui/centerLineButton.js b/js/ui/centerLineButton.js index 925c9bd90..c0bd0acd6 100644 --- a/js/ui/centerLineButton.js +++ b/js/ui/centerLineButton.js @@ -31,9 +31,9 @@ import { buttonLabel } from "./navbarIcons/buttonLabel.js" class CenterLineButton extends NavbarButton { - constructor(browser, parent) { + constructor(parent, browser) { - super(browser, parent, 'Center Line', buttonLabel, centerlineImage, centerlineImageHover, browser.config.showCenterGuide) + super(parent, browser, 'Center Line', buttonLabel, centerlineImage, centerlineImageHover, browser.config.showCenterGuide) this.button.addEventListener('mouseenter', () => { if (false === browser.doShowCenterLine) { diff --git a/js/ui/cursorGuideButton.js b/js/ui/cursorGuideButton.js index 623a5a0c6..cd4824290 100644 --- a/js/ui/cursorGuideButton.js +++ b/js/ui/cursorGuideButton.js @@ -31,9 +31,9 @@ import { buttonLabel } from "./navbarIcons/buttonLabel.js" class CursorGuideButton extends NavbarButton { - constructor(browser, parent) { + constructor(parent, browser) { - super(browser, parent, 'Crosshairs', buttonLabel, cursorImage, cursorImageHover, browser.doShowCursorGuide) + super(parent, browser, 'Crosshairs', buttonLabel, cursorImage, cursorImageHover, browser.doShowCursorGuide) this.button.addEventListener('mouseenter', () => { if (false === browser.doShowCursorGuide) { diff --git a/js/ui/menuUtils.js b/js/ui/menuUtils.js index 00eda8e02..c7db4c4d6 100644 --- a/js/ui/menuUtils.js +++ b/js/ui/menuUtils.js @@ -4,9 +4,9 @@ import Dialog from "./components/dialog.js" import $ from "../vendor/jquery-3.3.1.slim.js" import {colorPalettes} from "../util/colorPalletes.js" -const colorPickerTrackTypeSet = new Set(['bedtype', 'alignment', 'annotation', 'variant', 'wig', 'interact']) +const colorPickerTrackTypeSet = new Set(['bedtype', 'alignment', 'annotation', 'variant', 'wig', 'interact', 'shoebox']) -const vizWindowTypes = new Set(['alignment', 'annotation', 'variant', 'eqtl', 'qtl', 'snp', 'shoebox']) +const vizWindowTypes = new Set(['alignment', 'annotation', 'variant', 'eqtl', 'qtl', 'snp', 'shoebox', 'wig']) const multiTrackSelectExclusionTypes = new Set(['sequence', 'ruler', 'ideogram']) @@ -83,7 +83,7 @@ class MenuUtils { if (isVisibilityWindowType(trackView)) { list.push('
') - list.push(visibilityWindowMenuItem()) + list.push(visibilityWindowMenuItem(trackView.track.type)) } return list @@ -166,7 +166,7 @@ function groupAutoScaleMenuItem() { } -function visibilityWindowMenuItem() { +function visibilityWindowMenuItem(trackType) { const object = $('
') object.text('Set visibility window') @@ -184,9 +184,12 @@ function visibilityWindowMenuItem() { this.trackView.updateViews() } + const label = 'wig' === trackType ? + 'Visibility window (bp). Enter 0 for whole chromosome, -1 for whole genome.' : + 'Visibility window (bp). Enter 0 for whole chromosome.' const config = { - label: 'Visibility Window', + label, value: this.visibilityWindow, callback } @@ -302,6 +305,8 @@ function trackHeightMenuItem() { } for (const track of tracks) { + // Explicitly setting track height turns off autoHeight + track.trackView.autoHeight = false // If explicitly setting the height adjust min or max, if necessary if (track.minHeight !== undefined && track.minHeight > number) { @@ -315,9 +320,6 @@ function trackHeightMenuItem() { track.trackView.checkContentHeight() track.trackView.repaintViews() - // Explicitly setting track height turns off autoHeight - track.trackView.autoHeight = false - } // for (tracks) } // if (undefined !== number) diff --git a/js/ui/multiTrackSelectButton.js b/js/ui/multiTrackSelectButton.js index 365dd5ed2..285136378 100644 --- a/js/ui/multiTrackSelectButton.js +++ b/js/ui/multiTrackSelectButton.js @@ -1,15 +1,16 @@ import NavbarButton from "./navbarButton.js" -import {multiTrackSelectExclusionTypes} from './menuUtils.js' import {multiSelectImage, multiSelectImageHover} from "./navbarIcons/multiSelect.js" import {buttonLabel} from "./navbarIcons/buttonLabel.js" - +import {multiTrackSelectExclusionTypes} from './menuUtils.js' class MultiTrackSelectButton extends NavbarButton { - constructor(browser, parent, enableMultiTrackSelection) { + constructor(parent, browser, navbar, enableMultiTrackSelection, visibility = true) { - super(browser, parent, 'Select Tracks', buttonLabel, multiSelectImage, multiSelectImageHover, enableMultiTrackSelection = false) - this.enableMultiTrackSelection = enableMultiTrackSelection + super(parent, browser, 'Select Tracks', buttonLabel, multiSelectImage, multiSelectImageHover, false) + + this.navbar = navbar + this.enableMultiTrackSelection = false // Initial state this.button.addEventListener('mouseenter', event => { if (false === enableMultiTrackSelection) { this.setState(true) @@ -23,6 +24,7 @@ class MultiTrackSelectButton extends NavbarButton { }) const mouseClickHandler = () => { + // Toggle the selection state this.setMultiTrackSelection(!this.enableMultiTrackSelection) } @@ -30,29 +32,26 @@ class MultiTrackSelectButton extends NavbarButton { this.button.addEventListener('click', this.boundMouseClickHandler) - this.setVisibility(true) + this.setVisibility(visibility) } setMultiTrackSelection(enableMultiTrackSelection) { - this.enableMultiTrackSelection = enableMultiTrackSelection - for (const trackView of this.browser.trackViews) { - if (false === multiTrackSelectExclusionTypes.has(trackView.track.type)) { - trackView.setTrackSelectionState(trackView.axis, this.enableMultiTrackSelection) - // If closing the selection boxes set track selected property to false - if (!this.enableMultiTrackSelection) { - trackView.track.selected = false - } - } - } + this.enableMultiTrackSelection = enableMultiTrackSelection this.setState(this.enableMultiTrackSelection) - // If enableMultiTrackSelection is false hide Overlay button + // If enableMultiTrackSelection is false hide the Overly button if (false === this.enableMultiTrackSelection) { - this.browser.overlayTrackButton.setVisibility(false) + this.navbar.overlayTrackButton.setVisibility(false) } + + for (const trackView of this.browser.trackViews) { + trackView.enableTrackSelection(enableMultiTrackSelection) + } + } + } export default MultiTrackSelectButton diff --git a/js/ui/navbarButton.js b/js/ui/navbarButton.js index ce7d254cd..29218b883 100644 --- a/js/ui/navbarButton.js +++ b/js/ui/navbarButton.js @@ -28,7 +28,7 @@ import * as DOMUtils from "../ui/utils/dom-utils.js" class NavbarButton { - constructor(browser, parent, title, buttonLabel, imageSVG, imageHoverSVG, initialButtonState) { + constructor(parent, browser, title, buttonLabel, imageSVG, imageHoverSVG, initialButtonState) { this.browser = browser @@ -85,7 +85,7 @@ class NavbarButton { } configureTextButton(textContent) { - + console.log(`text ${this.title}`) this.button.classList.add('igv-navbar-text-button') const tempDiv = document.createElement('div') @@ -100,6 +100,7 @@ class NavbarButton { } configureIconButton() { + console.log(`icon ${this.title}`) this.button.classList.add('igv-navbar-icon-button') } @@ -139,11 +140,6 @@ class NavbarButton { this.hide() } } - - static currentNavbarButtonClass(browser) { - const el = browser.$navigation.get(0).querySelector('.igv-navbar-text-button') - return el ? 'igv-navbar-text-button' : 'igv-navbar-icon-button' - } } export default NavbarButton diff --git a/js/ui/overlayTrackButton.js b/js/ui/overlayTrackButton.js index 46f1722b4..31a909ef3 100644 --- a/js/ui/overlayTrackButton.js +++ b/js/ui/overlayTrackButton.js @@ -1,13 +1,13 @@ import NavbarButton from "./navbarButton.js" -import { overlayTrackImage, overlayTrackImageHover } from "./navbarIcons/overlayTrack.js" -import { buttonLabel } from "./navbarIcons/buttonLabel.js" +import {overlayTrackImage, overlayTrackImageHover} from "./navbarIcons/overlayTrack.js" +import {buttonLabel} from "./navbarIcons/buttonLabel.js" import MergedTrack from "../feature/mergedTrack.js" class OverlayTrackButton extends NavbarButton { - constructor(browser, parent) { + constructor(parent, browser) { - super(browser, parent, 'Overlay Tracks', buttonLabel, overlayTrackImage, overlayTrackImageHover, false) + super(parent, browser, 'Overlay Tracks', buttonLabel, overlayTrackImage, overlayTrackImageHover, false) this.button.addEventListener('mouseenter', () => this.setState(true)) this.button.addEventListener('mouseleave', () => this.setState(false)) @@ -30,15 +30,15 @@ function trackOverlayClickHandler(e) { if (true === isOverlayTrackCriteriaMet(this.browser)) { - const tracks = this.browser.getSelectedTrackViews().map(({ track }) => track) + const tracks = this.browser.getSelectedTrackViews().map(({track}) => track) for (const track of tracks) { track.selected = false } - // Flatten any merged tracks. Must do this before there removal + // Flatten any merged tracks. Must do this before their removal const flattenedTracks = [] - for(let t of tracks) { - if("merged" === t.type) { + for (let t of tracks) { + if ("merged" === t.type) { flattenedTracks.push(...t.tracks) } else { flattenedTracks.push(t) @@ -51,17 +51,20 @@ function trackOverlayClickHandler(e) { type: 'merged', autoscale: false, alpha: 0.5, //fudge * (1.0/tracks.length), - height: Math.max(...tracks.map(({ height }) => height)), - order: Math.min(...tracks.map(({ order }) => order)), + height: Math.max(...tracks.map(({height}) => height)), + order: Math.min(...tracks.map(({order}) => order)), } const mergedTrack = new MergedTrack(config, this.browser, flattenedTracks) for (const track of tracks) { - this.browser.removeTrack(track) + const idx = this.browser.trackViews.indexOf(track.trackView) + this.browser.trackViews.splice(idx, 1) + track.trackView.dispose() } this.browser.addTrack(config, mergedTrack) + mergedTrack.trackView.updateViews() } @@ -73,9 +76,9 @@ function isOverlayTrackCriteriaMet(browser) { if (selected && selected.length > 1) { - const criteriaSet = new Set([ 'wig', 'merged' ]) + const criteriaSet = new Set(['wig', 'merged']) - const list = selected.filter(({ track }) => criteriaSet.has(track.type)) + const list = selected.filter(({track}) => criteriaSet.has(track.type)) return list.length > 1 @@ -85,5 +88,5 @@ function isOverlayTrackCriteriaMet(browser) { } -export { isOverlayTrackCriteriaMet } +export {isOverlayTrackCriteriaMet} export default OverlayTrackButton diff --git a/js/ui/saveImageControl.js b/js/ui/saveImageControl.js index 785040a82..fd31ad5ee 100644 --- a/js/ui/saveImageControl.js +++ b/js/ui/saveImageControl.js @@ -33,7 +33,7 @@ import { buttonLabel } from "./navbarIcons/buttonLabel.js" class SaveImageControl extends NavbarButton { constructor(parent, browser) { - super(browser, parent, 'Save Image', buttonLabel, imageSaveImageSVG, imageSaveImageHoverSVG, false) + super(parent, browser, 'Save Image', buttonLabel, imageSaveImageSVG, imageSaveImageHoverSVG, false) this.button.addEventListener('mouseenter', () => this.setState(true)) diff --git a/js/ui/trackLabelControl.js b/js/ui/trackLabelControl.js index adc43cfab..e98973fd7 100644 --- a/js/ui/trackLabelControl.js +++ b/js/ui/trackLabelControl.js @@ -32,7 +32,7 @@ class TrackLabelControl extends NavbarButton { constructor(parent, browser) { - super(browser, parent, 'Track Labels', buttonLabel, trackLabelsImage, trackLabelsImageHover, browser.config.showTrackLabels) + super(parent, browser, 'Track Labels', buttonLabel, trackLabelsImage, trackLabelsImageHover, browser.config.showTrackLabels) this.button.addEventListener('mouseenter', () => { if (false === browser.doShowTrackLabels) { diff --git a/js/ui/zoomWidget.js b/js/ui/zoomWidget.js index 3019530e6..54e9dc3e8 100644 --- a/js/ui/zoomWidget.js +++ b/js/ui/zoomWidget.js @@ -5,146 +5,135 @@ const sliderMin = 0 let sliderMax = 23 let sliderValueRaw = 0 -const ZoomWidget = function (browser, parent) { +class ZoomWidget { + constructor(config, browser, parent) { - this.browser = browser + this.browser = browser - this.zoomContainer = DOMUtils.div({class: 'igv-zoom-widget'}) - parent.appendChild(this.zoomContainer) + this.zoomContainer = DOMUtils.div({class: 'igv-zoom-widget'}) + parent.appendChild(this.zoomContainer) - // zoom out - this.zoomOutButton = DOMUtils.div() - this.zoomContainer.appendChild(this.zoomOutButton) - this.zoomOutButton.appendChild(createIcon('minus-circle')) - this.zoomOutButton.addEventListener('click', () => { - // browser.zoomWithScaleFactor(2.0) - browser.zoomOut() - }) + // zoom out + this.zoomOutButton = DOMUtils.div() + this.zoomContainer.appendChild(this.zoomOutButton) + this.zoomOutButton.appendChild(createIcon('minus-circle')) + this.zoomOutButton.addEventListener('click', () => { + // browser.zoomWithScaleFactor(2.0) + browser.zoomOut() + }) - // Range slider - const el = DOMUtils.div() - this.zoomContainer.appendChild(el) - this.slider = document.createElement('input') - this.slider.type = 'range' + // Range slider (optional) + if (config.showZoomSlider !== false) { + const el = DOMUtils.div() + this.zoomContainer.appendChild(el) + this.slider = document.createElement('input') + this.slider.type = 'range' - this.slider.min = `${sliderMin}` - this.slider.max = `${sliderMax}` + this.slider.min = `${sliderMin}` + this.slider.max = `${sliderMax}` - el.appendChild(this.slider) + el.appendChild(this.slider) - this.slider.addEventListener('change', e => { + this.slider.addEventListener('change', e => { - e.preventDefault() - e.stopPropagation() + e.preventDefault() + e.stopPropagation() - const referenceFrame = browser.referenceFrameList[0] - const {bpLength} = referenceFrame.genome.getChromosome(referenceFrame.chr) - const {end, start} = referenceFrame + const referenceFrame = browser.referenceFrameList[0] + const {bpLength} = referenceFrame.genome.getChromosome(referenceFrame.chr) + const {end, start} = referenceFrame - const extent = end - start + const extent = end - start - // bpLength/(end - start) - const scaleFactor = Math.pow(2, e.target.valueAsNumber) + // bpLength/(end - start) + const scaleFactor = Math.pow(2, e.target.valueAsNumber) - // (end - start) = bpLength/scaleFactor - const zoomedExtent = bpLength / scaleFactor + // (end - start) = bpLength/scaleFactor + const zoomedExtent = bpLength / scaleFactor - // console.log(`zoom-widget - slider ${ e.target.value } scaleFactor ${ scaleFactor } extent-zoomed ${ StringUtils.numberFormatter(Math.round(zoomedExtent)) }`) + // console.log(`zoom-widget - slider ${ e.target.value } scaleFactor ${ scaleFactor } extent-zoomed ${ StringUtils.numberFormatter(Math.round(zoomedExtent)) }`) - browser.zoomWithScaleFactor(zoomedExtent / extent) + browser.zoomWithScaleFactor(zoomedExtent / extent) - }) - - // zoom in - this.zoomInButton = DOMUtils.div() - this.zoomContainer.appendChild(this.zoomInButton) - this.zoomInButton.appendChild(createIcon('plus-circle')) - this.zoomInButton.addEventListener('click', () => { - // browser.zoomWithScaleFactor(0.5) - browser.zoomIn() - }) - - browser.on('locuschange', (referenceFrameList) => { - - if (this.browser.isMultiLocusMode()) { - this.disable() - } else { - this.enable() - this.update(referenceFrameList) + }) } - }) - -} - -ZoomWidget.prototype.update = function (referenceFrameList) { - - const referenceFrame = referenceFrameList[0] - const {bpLength} = referenceFrame.genome.getChromosome(referenceFrame.chr) - const {start, end} = referenceFrame - - sliderMax = Math.ceil(Math.log2(bpLength / this.browser.minimumBases())) - - this.slider.max = `${sliderMax}` + // zoom in + this.zoomInButton = DOMUtils.div() + this.zoomContainer.appendChild(this.zoomInButton) + this.zoomInButton.appendChild(createIcon('plus-circle')) + this.zoomInButton.addEventListener('click', () => { + // browser.zoomWithScaleFactor(0.5) + browser.zoomIn() + }) - const scaleFactor = bpLength / (end - start) - sliderValueRaw = Math.log2(scaleFactor) - this.slider.value = `${Math.round(sliderValueRaw)}` + browser.on('locuschange', (referenceFrameList) => { - const extent = end - start + if (this.browser.isMultiLocusMode()) { + this.disable() + } else { + this.enable() + this.update(referenceFrameList) + } - const derivedScalefactor = Math.pow(2, sliderValueRaw) + }) - const derivedExtent = bpLength / derivedScalefactor + } - // referenceFrame.description('zoom.update') + update(referenceFrameList) { - // console.log(`${ Date.now() } update - slider ${ this.slider.value } scaleFactor ${ Math.round(scaleFactor) } extent ${ StringUtils.numberFormatter(Math.round(extent)) }`) + if(this.slider) { + const referenceFrame = referenceFrameList[0] + const {bpLength} = referenceFrame.genome.getChromosome(referenceFrame.chr) + const {start, end} = referenceFrame - // console.log(`update - sliderMin ${ sliderMin } sliderValue ${ this.slider.value } sliderMax ${ sliderMax } scaleFactor ${ scaleFactor.toFixed(3) } derived-scaleFactor ${ derivedScalefactor.toFixed(3) }`) + sliderMax = Math.ceil(Math.log2(bpLength / this.browser.minimumBases())) + this.slider.max = `${sliderMax}` -} + const scaleFactor = bpLength / (end - start) + sliderValueRaw = Math.log2(scaleFactor) + this.slider.value = `${Math.round(sliderValueRaw)}` + } + } -ZoomWidget.prototype.enable = function () { - // this.zoomInButton.style.color = appleCrayonPalette[ 'steel' ]; - // this.zoomInButton.style.pointerEvents = 'auto'; - // - // this.zoomOutButton.style.color = appleCrayonPalette[ 'steel' ]; - // this.zoomOutButton.style.pointerEvents = 'auto'; + enable() { - this.slider.disabled = false -} + // this.zoomInButton.style.color = appleCrayonPalette[ 'steel' ]; + // this.zoomInButton.style.pointerEvents = 'auto'; + // + // this.zoomOutButton.style.color = appleCrayonPalette[ 'steel' ]; + // this.zoomOutButton.style.pointerEvents = 'auto'; -ZoomWidget.prototype.disable = function () { + if (this.slider) this.slider.disabled = false + } - // this.zoomInButton.style.color = appleCrayonPalette[ 'silver' ]; - // this.zoomInButton.style.pointerEvents = 'none'; - // - // this.zoomOutButton.style.color = appleCrayonPalette[ 'silver' ]; - // this.zoomOutButton.style.pointerEvents = 'none'; + disable() { - this.slider.disabled = true -} + // this.zoomInButton.style.color = appleCrayonPalette[ 'silver' ]; + // this.zoomInButton.style.pointerEvents = 'none'; + // + // this.zoomOutButton.style.color = appleCrayonPalette[ 'silver' ]; + // this.zoomOutButton.style.pointerEvents = 'none'; -ZoomWidget.prototype.hide = function () { - this.zoomContainer.style.display = 'none' -} + if (this.slider) this.slider.disabled = true + } -ZoomWidget.prototype.show = function () { - this.zoomContainer.style.display = 'block' -} + hide() { + this.zoomContainer.style.display = 'none' + } -ZoomWidget.prototype.hideSlider = function () { - this.slider.style.display = 'none' -} + show() { + this.zoomContainer.style.display = 'block' + } -ZoomWidget.prototype.showSlider = function () { - this.slider.style.display = 'block' -} + hideSlider() { + if (this.slider) this.slider.style.display = 'none' + } -function lerpAlvyRaySmith(a, b, t) { - return a - t * (a - b) + showSlider() { + if (this.slider) this.slider.style.display = 'block' + } } export default ZoomWidget diff --git a/js/util/fileFormatUtils.js b/js/util/fileFormatUtils.js index 2d51f3ca6..18c09d98e 100644 --- a/js/util/fileFormatUtils.js +++ b/js/util/fileFormatUtils.js @@ -235,6 +235,10 @@ async function inferFileFormatFromContents(config) { if (firstLine.startsWith("##gff-version")) { return "gff" } + if(firstLine.startsWith("##fileformat=")) { + return firstLine.substring(13).toLowerCase(); // Non standard extension of VCF convention + } + // QTL test must preceed GWAS test as GWAS files will also pass the QTL test if (QTLParser.isQTL(firstLine)) { diff --git a/js/util/ucscUtils.js b/js/util/ucscUtils.js index e0e5d00d8..c77e0c122 100644 --- a/js/util/ucscUtils.js +++ b/js/util/ucscUtils.js @@ -10,21 +10,26 @@ function parseAutoSQL(str) { let startDecoding = false const lines = str.trim().split(/\s*[\r\n]+\s*/g) for (let line of lines) { - if (line.startsWith('table')) { - table = line.split(/\s+/)[1].trim() - } else if (line.startsWith('(')) { - startDecoding = true - } else if (line.startsWith(')')) { - } else if (startDecoding) { - if (line.length > 0) { + line = line.trim() + if (line.length > 0) { + if (line.startsWith('#')) { + continue + } else if (line.startsWith('table')) { + table = line.split(/\s+/)[1].trim() + } else if (line.startsWith('(')) { + startDecoding = true + } else if (line.startsWith(')')) { + } else if (startDecoding) { const idx = line.indexOf(';') - const tokens = line.substr(0, idx).split(/\s+/) - const description = line.substr(idx + 1).replace(/"/g, '').trim() - fields.push({ - type: tokens[0], - name: tokens[1], - description: description - }) + if (idx > 0) { + const tokens = line.substr(0, idx).split(/\s+/) + const description = line.substr(idx + 1).replace(/"/g, '').trim() + fields.push({ + type: tokens[0], + name: tokens[1], + description: description + }) + } } } } diff --git a/js/version.js b/js/version.js index fca18121c..285d7fb96 100644 --- a/js/version.js +++ b/js/version.js @@ -1,4 +1,4 @@ -const _version = "3.0.4" +const _version = "3.0.8" function version() { return _version } diff --git a/package.json b/package.json index 9c7faa134..262345f7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "igv", - "version": "3.0.4", + "version": "3.0.8", "main": "dist/igv.esm.js", "browser": "dist/igv.js", "module": "dist/igv.esm.js", diff --git a/test/data/bam/tags.bam b/test/data/bam/tags.bam new file mode 100644 index 000000000..efb95ed05 Binary files /dev/null and b/test/data/bam/tags.bam differ diff --git a/test/data/bam/tags.bam.bai b/test/data/bam/tags.bam.bai new file mode 100644 index 000000000..c3adea535 Binary files /dev/null and b/test/data/bam/tags.bam.bai differ diff --git a/test/testBAM.js b/test/testBAM.js index 9c9718aea..6783cf8e7 100755 --- a/test/testBAM.js +++ b/test/testBAM.js @@ -119,5 +119,38 @@ suite("testBAM", function () { assert.equal(tags["XT"], "M") } -}) + /** + * A [!-~] Printable character + * i [-+]?[0-9]+ Signed integer16 + * f [-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)? Single-precision floating number + * Z [ !-~]* Printable string, including space + * H ([0-9A-F][0-9A-F])* Byte array in the Hex format17 + * B [cCsSiIf](,[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)* Integer or numeric array + * + * X0:i:10 X1:i:5 MD:Z:100 RG:Z:SRR360773 AM:i:0 NM:i:0 SM:i:0 MQ:i:0 XT:A:R BQ:Z:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C pa:f:228.71 + */ + test("tags", async function () { + + const bamReader = new BamReaderNonIndexed({ + type: 'bam', + url: 'test/data/bam/tags.bam', + indexed: false + }) + + const alignmentContainer = await bamReader.readAlignments("1", 119930, 119940) + const alignment = alignmentContainer.alignments[0].firstAlignment; + + const tags = alignment.tags(); + assert.ok(floatEqual(tags["pa"], 228.71)) + assert.equal(tags["X0"], 10) + assert.equal(tags["RG"], "SRR360773") + assert.equal(tags["XT"], "R") + + }) + }) + +function floatEqual(f1, f2) { + const dif = Math.abs(f1 - f2) / (f1 + f2) + return dif < 0.00001 +} diff --git a/test/testBigwig.js b/test/testBigwig.js index 73276db4b..6fe12d715 100644 --- a/test/testBigwig.js +++ b/test/testBigwig.js @@ -11,7 +11,6 @@ suite("testBigWig", function () { this.timeout(10000) - //chr21:19,146,376-19,193,466 const url = "https://s3.amazonaws.com/igv.org.test/data/uncompressed.bw", chr = "chr21", start = 0, @@ -21,14 +20,27 @@ suite("testBigWig", function () { const bwReader = new BWReader({url: url}) const features = await bwReader.readFeatures(chr, start, chr, end, bpPerPixel) assert.equal(features.length, 8) // Verified in iPad app + }) + + + /** + * Test a BW file with an unusual layout (chromTree after full data). + */ + test("chromTree", async function () { + this.timeout(10000) + + const url = "https://data.broadinstitute.org/igvdata/test/data/bb/chromTreeTest.bigwig" + const bwReader = new BWReader({url: url}) + const header = await bwReader.loadHeader() + assert.ok(header) + assert.equal(bwReader.chrNames.size, 6) }) test("bigwig", async function () { this.timeout(10000) - //chr21:19,146,376-19,193,466 const url = "test/data/bb/fixedStep.bw" const chr = "chr1" const bwReader = new BWReader({url: url}) diff --git a/test/testGenePred.js b/test/testGenePred.js index baa5d2b9b..b9efd48da 100644 --- a/test/testGenePred.js +++ b/test/testGenePred.js @@ -1,16 +1,6 @@ import "./utils/mockObjects.js" import FeatureFileReader from "../js/feature/featureFileReader.js" -import FeatureSource from "../js/feature/featureSource.js" import {assert} from 'chai' -import Genome from "../js/genome/genome.js" -import {decodeGenePredExt} from "../js/feature/decode/ucsc.js" - -const reference = { - "id": "hg38", - "name": "Human (GRCh38/hg38)", - "fastaURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa", - "indexURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa.fai", -} suite("testGenePredExt", function () { @@ -20,7 +10,6 @@ suite("testGenePredExt", function () { this.timeout(200000) - const genome = await Genome.createGenome(reference) const config = { format: "refgene",