@cornerstonejs/dicom-image-loader 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dynamic-import/031089e563a18ada8441.wasm +0 -0
- package/dist/dynamic-import/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/dynamic-import/5004fdc02f329ce53b69.wasm +0 -0
- package/dist/dynamic-import/54.min.js +2 -0
- package/dist/dynamic-import/54.min.js.map +1 -0
- package/dist/dynamic-import/548.min.js +2 -0
- package/dist/dynamic-import/548.min.js.map +1 -0
- package/dist/dynamic-import/918.min.js +2 -0
- package/dist/dynamic-import/918.min.js.map +1 -0
- package/dist/dynamic-import/958.min.js +3 -0
- package/dist/dynamic-import/958.min.js.LICENSE.txt +5 -0
- package/dist/dynamic-import/958.min.js.map +1 -0
- package/dist/dynamic-import/c22b37c3488e1d6c3aa4.wasm +0 -0
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/esm/init.js +1 -2
- package/package.json +3 -3
- package/dist/dynamic-import/4de9823ef4bef156227c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"918.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,MAAO,GAAIH,GACQ,iBAAZC,QACdA,QAAQ,KAASD,IAEjBD,EAAK,KAASC,GACf,CATD,CASGK,MAAM,I,UCTLC,ECCAC,EADAC,ECAAC,E,2CCwCJ,QArCAC,eACEC,EACAC,GAEA,IAAIC,EAAcD,EAAUE,OAExBC,EAASH,EAAUI,WACvB,MAAMC,EAASL,EAAUK,OA2BzB,OAzBiC,KAA7BN,EAAWO,eAGTH,EAAS,IACXF,EAAcA,EAAYM,MAAMJ,GAChCA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EACnCL,EAA2BvT,EAAK,C,K1BnB7B3B,EAAOiR,EAAoB1J,EAC/B0J,EAAoB1J,EAAI,IAChB0J,EAAoBsC,EAAE,KAAKxP,KAAK/D,G2BDdiR,EAAoB1J,G","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/create fake namespace object","webpack:///webpack/runtime/startup chunk dependencies","webpack:///./shared/decoders/decodeLittleEndian.ts","webpack:///./shared/decoders/decodeBigEndian.ts","webpack:///./shared/decoders/decodeRLE.ts","webpack:///./shared/decoders/decodeJPEGBaseline8Bit.ts","webpack:///./shared/decoders/decodeJPEGBaseline12Bit-js.ts","webpack:///./shared/decoders/decodeJPEGLossless.ts","webpack:///./shared/decoders/decodeJPEGLS.ts","webpack:///./shared/decoders/decodeJPEG2000.ts","webpack:///./shared/decoders/decodeHTJ2K.ts","webpack:///./shared/getMinMax.ts","webpack:///./decodeImageFrameWorker.js","webpack:///./shared/scaling/bilinear.ts","webpack:///./shared/scaling/replicate.ts","webpack:///./shared/isColorImage.ts","webpack:///./shared/scaling/scaleArray.ts","webpack:///./shared/getPixelDataTypeFromMinMax.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/importScripts chunk loading","webpack:///webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"918\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"918\"] = factory();\n\telse\n\t\troot[\"918\"] = factory();\n})(this, () => {\nreturn ","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(958).then(next);\n};","import type { ByteArray } from 'dicom-parser';\nimport type { Types } from '@cornerstonejs/core';\n\nasync function decodeLittleEndian(\n imageFrame: Types.IImageFrame,\n pixelData: ByteArray\n): Promise<Types.IImageFrame> {\n let arrayBuffer = pixelData.buffer;\n\n let offset = pixelData.byteOffset;\n const length = pixelData.length;\n\n if (imageFrame.bitsAllocated === 16) {\n // if pixel data is not aligned on even boundary, shift it so we can create the 16 bit array\n // buffers on it\n if (offset % 2) {\n arrayBuffer = arrayBuffer.slice(offset);\n offset = 0;\n }\n\n if (imageFrame.pixelRepresentation === 0) {\n imageFrame.pixelData = new Uint16Array(arrayBuffer, offset, length / 2);\n } else {\n imageFrame.pixelData = new Int16Array(arrayBuffer, offset, length / 2);\n }\n } else if (imageFrame.bitsAllocated === 8 || imageFrame.bitsAllocated === 1) {\n imageFrame.pixelData = pixelData;\n } else if (imageFrame.bitsAllocated === 32) {\n // if pixel data is not aligned on even boundary, shift it\n if (offset % 2) {\n arrayBuffer = arrayBuffer.slice(offset);\n offset = 0;\n }\n\n imageFrame.pixelData = new Float32Array(arrayBuffer, offset, length / 4);\n }\n\n return imageFrame;\n}\n\nexport default decodeLittleEndian;\n","import type { ByteArray } from 'dicom-parser';\nimport type { Types } from '@cornerstonejs/core';\n\n/* eslint no-bitwise: 0 */\nfunction swap16(val) {\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff);\n}\n\nasync function decodeBigEndian(\n imageFrame: Types.IImageFrame,\n pixelData: ByteArray\n): Promise<Types.IImageFrame> {\n if (imageFrame.bitsAllocated === 16) {\n let arrayBuffer = pixelData.buffer;\n\n let offset = pixelData.byteOffset;\n const length = pixelData.length;\n // if pixel data is not aligned on even boundary, shift it so we can create the 16 bit array\n // buffers on it\n\n if (offset % 2) {\n arrayBuffer = arrayBuffer.slice(offset);\n offset = 0;\n }\n\n if (imageFrame.pixelRepresentation === 0) {\n imageFrame.pixelData = new Uint16Array(arrayBuffer, offset, length / 2);\n } else {\n imageFrame.pixelData = new Int16Array(arrayBuffer, offset, length / 2);\n }\n // Do the byte swap\n for (let i = 0; i < imageFrame.pixelData.length; i++) {\n imageFrame.pixelData[i] = swap16(imageFrame.pixelData[i]);\n }\n } else if (imageFrame.bitsAllocated === 8) {\n imageFrame.pixelData = pixelData;\n }\n\n return imageFrame;\n}\n\nexport default decodeBigEndian;\n","import type { ByteArray } from 'dicom-parser';\nimport type { Types } from '@cornerstonejs/core';\n\nasync function decodeRLE(\n imageFrame: Types.IImageFrame,\n pixelData: ByteArray\n): Promise<Types.IImageFrame> {\n if (imageFrame.bitsAllocated === 8) {\n if (imageFrame.planarConfiguration) {\n return decode8Planar(imageFrame, pixelData);\n }\n\n return decode8(imageFrame, pixelData);\n } else if (imageFrame.bitsAllocated === 16) {\n return decode16(imageFrame, pixelData);\n }\n\n throw new Error('unsupported pixel format for RLE');\n}\n\nfunction decode8(imageFrame: Types.IImageFrame, pixelData: ByteArray) {\n const frameData = pixelData;\n const frameSize = imageFrame.rows * imageFrame.columns;\n const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel);\n const header = new DataView(frameData.buffer, frameData.byteOffset);\n const data = new Int8Array(frameData.buffer, frameData.byteOffset);\n const out = new Int8Array(outFrame);\n\n let outIndex = 0;\n const numSegments = header.getInt32(0, true);\n\n for (let s = 0; s < numSegments; ++s) {\n outIndex = s;\n\n let inIndex = header.getInt32((s + 1) * 4, true);\n\n let maxIndex = header.getInt32((s + 2) * 4, true);\n\n if (maxIndex === 0) {\n maxIndex = frameData.length;\n }\n\n const endOfSegment = frameSize * numSegments;\n\n while (inIndex < maxIndex) {\n const n = data[inIndex++];\n\n if (n >= 0 && n <= 127) {\n // copy n bytes\n for (let i = 0; i < n + 1 && outIndex < endOfSegment; ++i) {\n out[outIndex] = data[inIndex++];\n outIndex += imageFrame.samplesPerPixel;\n }\n } else if (n <= -1 && n >= -127) {\n const value = data[inIndex++];\n // run of n bytes\n\n for (let j = 0; j < -n + 1 && outIndex < endOfSegment; ++j) {\n out[outIndex] = value;\n outIndex += imageFrame.samplesPerPixel;\n }\n } /* else if (n === -128) {\n\n } // do nothing */\n }\n }\n imageFrame.pixelData = new Uint8Array(outFrame);\n\n return imageFrame;\n}\n\nfunction decode8Planar(imageFrame: Types.IImageFrame, pixelData: ByteArray) {\n const frameData = pixelData;\n const frameSize = imageFrame.rows * imageFrame.columns;\n const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel);\n const header = new DataView(frameData.buffer, frameData.byteOffset);\n const data = new Int8Array(frameData.buffer, frameData.byteOffset);\n const out = new Int8Array(outFrame);\n\n let outIndex = 0;\n const numSegments = header.getInt32(0, true);\n\n for (let s = 0; s < numSegments; ++s) {\n outIndex = s * frameSize;\n\n let inIndex = header.getInt32((s + 1) * 4, true);\n\n let maxIndex = header.getInt32((s + 2) * 4, true);\n\n if (maxIndex === 0) {\n maxIndex = frameData.length;\n }\n\n const endOfSegment = frameSize * numSegments;\n\n while (inIndex < maxIndex) {\n const n = data[inIndex++];\n\n if (n >= 0 && n <= 127) {\n // copy n bytes\n for (let i = 0; i < n + 1 && outIndex < endOfSegment; ++i) {\n out[outIndex] = data[inIndex++];\n outIndex++;\n }\n } else if (n <= -1 && n >= -127) {\n const value = data[inIndex++];\n // run of n bytes\n\n for (let j = 0; j < -n + 1 && outIndex < endOfSegment; ++j) {\n out[outIndex] = value;\n outIndex++;\n }\n } /* else if (n === -128) {\n\n } // do nothing */\n }\n }\n imageFrame.pixelData = new Uint8Array(outFrame);\n\n return imageFrame;\n}\n\nfunction decode16(imageFrame: Types.IImageFrame, pixelData: ByteArray) {\n const frameData = pixelData;\n const frameSize = imageFrame.rows * imageFrame.columns;\n const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel * 2);\n\n const header = new DataView(frameData.buffer, frameData.byteOffset);\n const data = new Int8Array(frameData.buffer, frameData.byteOffset);\n const out = new Int8Array(outFrame);\n\n const numSegments = header.getInt32(0, true);\n\n for (let s = 0; s < numSegments; ++s) {\n let outIndex = 0;\n const highByte = s === 0 ? 1 : 0;\n\n let inIndex = header.getInt32((s + 1) * 4, true);\n\n let maxIndex = header.getInt32((s + 2) * 4, true);\n\n if (maxIndex === 0) {\n maxIndex = frameData.length;\n }\n\n while (inIndex < maxIndex) {\n const n = data[inIndex++];\n\n if (n >= 0 && n <= 127) {\n for (let i = 0; i < n + 1 && outIndex < frameSize; ++i) {\n out[outIndex * 2 + highByte] = data[inIndex++];\n outIndex++;\n }\n } else if (n <= -1 && n >= -127) {\n const value = data[inIndex++];\n\n for (let j = 0; j < -n + 1 && outIndex < frameSize; ++j) {\n out[outIndex * 2 + highByte] = value;\n outIndex++;\n }\n } /* else if (n === -128) {\n\n } // do nothing */\n }\n }\n if (imageFrame.pixelRepresentation === 0) {\n imageFrame.pixelData = new Uint16Array(outFrame);\n } else {\n imageFrame.pixelData = new Int16Array(outFrame);\n }\n\n return imageFrame;\n}\n\nexport default decodeRLE;\n","import type {\n LibJpegTurbo8Bit,\n OpenJpegModule,\n} from '@cornerstonejs/codec-libjpeg-turbo-8bit/dist/libjpegturbowasm_decode';\nimport type { ByteArray } from 'dicom-parser';\n// @ts-ignore\nimport libjpegTurboFactory from '@cornerstonejs/codec-libjpeg-turbo-8bit/decodewasmjs';\n\n// @ts-ignore\n// import libjpegTurboWasm from '@cornerstonejs/codec-libjpeg-turbo-8bit/decodewasm';\nconst libjpegTurboWasm = new URL(\n '@cornerstonejs/codec-libjpeg-turbo-8bit/decodewasm',\n import.meta.url\n);\nimport type { Types } from '@cornerstonejs/core';\n\nconst local: {\n codec: OpenJpegModule;\n decoder: LibJpegTurbo8Bit;\n} = {\n codec: undefined,\n decoder: undefined,\n};\n\nfunction initLibjpegTurbo(): Promise<void> {\n if (local.codec) {\n return Promise.resolve();\n }\n\n const libjpegTurboModule = libjpegTurboFactory({\n locateFile: (f) => {\n if (f.endsWith('.wasm')) {\n return libjpegTurboWasm.toString();\n }\n\n return f;\n },\n });\n\n return new Promise((resolve, reject) => {\n libjpegTurboModule.then((instance) => {\n local.codec = instance;\n local.decoder = new instance.JPEGDecoder();\n resolve();\n }, reject);\n });\n}\n\n// imageFrame.pixelRepresentation === 1 <-- Signed\n/**\n *\n * @param {*} compressedImageFrame\n * @param {object} imageInfo\n * @param {boolean} imageInfo.signed -\n */\nasync function decodeAsync(\n compressedImageFrame,\n imageInfo\n): Promise<Types.IImageFrame> {\n await initLibjpegTurbo();\n const decoder = local.decoder;\n\n // get pointer to the source/encoded bit stream buffer in WASM memory\n // that can hold the encoded bitstream\n const encodedBufferInWASM = decoder.getEncodedBuffer(\n compressedImageFrame.length\n );\n\n // copy the encoded bitstream into WASM memory buffer\n encodedBufferInWASM.set(compressedImageFrame);\n\n // decode it\n decoder.decode();\n\n // get information about the decoded image\n const frameInfo = decoder.getFrameInfo();\n\n // get the decoded pixels\n const decodedPixelsInWASM = decoder.getDecodedBuffer();\n\n const encodedImageInfo = {\n columns: frameInfo.width,\n rows: frameInfo.height,\n bitsPerPixel: frameInfo.bitsPerSample,\n signed: imageInfo.signed,\n bytesPerPixel: imageInfo.bytesPerPixel,\n componentsPerPixel: frameInfo.componentCount,\n };\n\n const pixelData = getPixelData(frameInfo, decodedPixelsInWASM);\n\n const encodeOptions = {\n frameInfo,\n };\n\n return {\n ...imageInfo,\n pixelData,\n imageInfo: encodedImageInfo,\n encodeOptions,\n ...encodeOptions,\n ...encodedImageInfo,\n };\n}\n\nfunction getPixelData(frameInfo, decodedBuffer: ByteArray) {\n if (frameInfo.isSigned) {\n return new Int8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n }\n\n return new Uint8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n}\n\nexport default decodeAsync;\n","import type { ByteArray } from 'dicom-parser';\nimport type { Types } from '@cornerstonejs/core';\nimport type { WebWorkerDecodeConfig } from '../../types';\n\nconst local = {\n JpegImage: undefined,\n decodeConfig: {} as WebWorkerDecodeConfig,\n};\n\nexport function initialize(\n decodeConfig?: WebWorkerDecodeConfig\n): Promise<void> {\n local.decodeConfig = decodeConfig;\n\n if (local.JpegImage) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n // @ts-ignore\n import('../../codecs/jpeg').then(({ JpegImage }) => {\n local.JpegImage = JpegImage;\n resolve();\n }, reject);\n });\n}\n\nasync function decodeJPEGBaseline12BitAsync(\n imageFrame: Types.IImageFrame,\n pixelData: ByteArray\n): Promise<Types.IImageFrame> {\n // check to make sure codec is loaded\n await initialize();\n if (typeof local.JpegImage === 'undefined') {\n throw new Error('No JPEG Baseline decoder loaded');\n }\n const jpeg = new local.JpegImage();\n\n jpeg.parse(pixelData);\n\n // Do not use the internal jpeg.js color transformation,\n // since we will handle this afterwards\n jpeg.colorTransform = false;\n\n if (imageFrame.bitsAllocated === 8) {\n imageFrame.pixelData = jpeg.getData(imageFrame.columns, imageFrame.rows);\n\n return imageFrame;\n } else if (imageFrame.bitsAllocated === 16) {\n imageFrame.pixelData = jpeg.getData16(imageFrame.columns, imageFrame.rows);\n\n return imageFrame;\n }\n}\n\nexport default decodeJPEGBaseline12BitAsync;\n","import type { ByteArray } from 'dicom-parser';\nimport type { Types } from '@cornerstonejs/core';\nimport type { WebWorkerDecodeConfig } from '../../types';\n\nconst local = {\n jpeg: undefined,\n decodeConfig: {} as WebWorkerDecodeConfig,\n};\n\nexport function initialize(\n decodeConfig?: WebWorkerDecodeConfig\n): Promise<void> {\n local.decodeConfig = decodeConfig;\n\n if (local.jpeg) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n import('../../codecs/jpegLossless').then((jpeg) => {\n local.jpeg = jpeg;\n resolve();\n }, reject);\n });\n}\n\nasync function decodeJPEGLossless(\n imageFrame: Types.IImageFrame,\n pixelData: ByteArray\n): Promise<Types.IImageFrame> {\n await initialize();\n\n // check to make sure codec is loaded\n if (\n typeof local.jpeg === 'undefined' ||\n typeof local.jpeg.lossless === 'undefined' ||\n typeof local.jpeg.lossless.Decoder === 'undefined'\n ) {\n throw new Error('No JPEG Lossless decoder loaded');\n }\n\n const byteOutput = imageFrame.bitsAllocated <= 8 ? 1 : 2;\n // console.time('jpeglossless');\n const buffer = pixelData.buffer;\n const decoder = new local.jpeg.lossless.Decoder();\n const decompressedData = decoder.decode(\n buffer,\n pixelData.byteOffset,\n pixelData.length,\n byteOutput\n );\n // console.timeEnd('jpeglossless');\n\n if (imageFrame.pixelRepresentation === 0) {\n if (imageFrame.bitsAllocated === 16) {\n imageFrame.pixelData = new Uint16Array(decompressedData.buffer);\n\n return imageFrame;\n }\n // untested!\n imageFrame.pixelData = new Uint8Array(decompressedData.buffer);\n\n return imageFrame;\n }\n imageFrame.pixelData = new Int16Array(decompressedData.buffer);\n\n return imageFrame;\n}\n\nexport default decodeJPEGLossless;\n","import type {\n CharlsModule,\n JpegLSDecoder,\n} from '@cornerstonejs/codec-charls/dist/charlswasm_decode';\n// @ts-ignore\nimport charlsFactory from '@cornerstonejs/codec-charls/decodewasmjs';\n// @ts-ignore\n// import charlsWasm from '@cornerstonejs/codec-charls/decodewasm';\nconst charlsWasm = new URL(\n '@cornerstonejs/codec-charls/decodewasm',\n import.meta.url\n);\nimport type { ByteArray } from 'dicom-parser';\nimport type { WebWorkerDecodeConfig } from '../../types';\nimport type { Types } from '@cornerstonejs/core';\n\nconst local: {\n codec: CharlsModule;\n decoder: JpegLSDecoder;\n decodeConfig: WebWorkerDecodeConfig;\n} = {\n codec: undefined,\n decoder: undefined,\n decodeConfig: {} as WebWorkerDecodeConfig,\n};\n\nfunction getExceptionMessage(exception) {\n return typeof exception === 'number'\n ? local.codec.getExceptionMessage(exception)\n : exception;\n}\n\nexport function initialize(\n decodeConfig?: WebWorkerDecodeConfig\n): Promise<void> {\n local.decodeConfig = decodeConfig;\n\n if (local.codec) {\n return Promise.resolve();\n }\n\n const charlsModule = charlsFactory({\n locateFile: (f) => {\n if (f.endsWith('.wasm')) {\n return charlsWasm.toString();\n }\n\n return f;\n },\n });\n\n return new Promise((resolve, reject) => {\n charlsModule.then((instance) => {\n local.codec = instance;\n local.decoder = new instance.JpegLSDecoder();\n resolve();\n }, reject);\n });\n}\n\n/**\n *\n * @param {*} compressedImageFrame\n * @param {object} imageInfo\n * @param {boolean} imageInfo.signed - (pixelRepresentation === 1)\n */\nasync function decodeAsync(\n compressedImageFrame,\n imageInfo\n): Promise<Types.IImageFrame> {\n try {\n await initialize();\n const decoder = local.decoder;\n\n // get pointer to the source/encoded bit stream buffer in WASM memory\n // that can hold the encoded bitstream\n const encodedBufferInWASM = decoder.getEncodedBuffer(\n compressedImageFrame.length\n );\n\n // copy the encoded bitstream into WASM memory buffer\n encodedBufferInWASM.set(compressedImageFrame);\n\n // decode it\n decoder.decode();\n\n // get information about the decoded image\n const frameInfo = decoder.getFrameInfo();\n const interleaveMode = decoder.getInterleaveMode();\n const nearLossless = decoder.getNearLossless();\n\n // get the decoded pixels\n const decodedPixelsInWASM = decoder.getDecodedBuffer();\n\n const encodedImageInfo = {\n columns: frameInfo.width,\n rows: frameInfo.height,\n bitsPerPixel: frameInfo.bitsPerSample,\n signed: imageInfo.signed,\n bytesPerPixel: imageInfo.bytesPerPixel,\n componentsPerPixel: frameInfo.componentCount,\n };\n\n const pixelData = getPixelData(\n frameInfo,\n decodedPixelsInWASM,\n imageInfo.signed\n );\n\n const encodeOptions = {\n nearLossless,\n interleaveMode,\n frameInfo,\n };\n\n // local.codec.doLeakCheck();\n\n return {\n ...imageInfo,\n pixelData,\n imageInfo: encodedImageInfo,\n encodeOptions,\n ...encodeOptions,\n ...encodedImageInfo,\n };\n } catch (error) {\n // Handle cases where WASM throws an error internally, and it only gives JS a number\n // See https://emscripten.org/docs/porting/Debugging.html#handling-c-exceptions-from-javascript\n // TODO: Copy to other codecs as well\n throw getExceptionMessage(error);\n }\n}\n\nfunction getPixelData(frameInfo, decodedBuffer: ByteArray, signed: boolean) {\n if (frameInfo.bitsPerSample > 8) {\n if (signed) {\n return new Int16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n return new Uint16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n if (signed) {\n return new Int8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n }\n\n return new Uint8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n}\n\nexport default decodeAsync;\n","// https://emscripten.org/docs/api_reference/module.html\nimport type {\n J2KDecoder,\n OpenJpegModule,\n} from '@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode';\n// @ts-ignore\nimport openJpegFactory from '@cornerstonejs/codec-openjpeg/decodewasmjs';\n\n// Webpack asset/resource copies this to our output folder\n\n// TODO: At some point maybe we can use this instead.\n// This is closer to what Webpack 5 wants but it doesn't seem to work now\n// const wasm = new URL('./blah.wasm', import.meta.url)\n// @ts-ignore\n// import openjpegWasm from '@cornerstonejs/codec-openjpeg/decodewasm';\nconst openjpegWasm = new URL(\n '@cornerstonejs/codec-openjpeg/decodewasm',\n import.meta.url\n);\n\nimport type { Types } from '@cornerstonejs/core';\nimport type { WebWorkerDecodeConfig } from '../../types';\n\nconst local: {\n codec: OpenJpegModule;\n decoder: J2KDecoder;\n decodeConfig: WebWorkerDecodeConfig;\n} = {\n codec: undefined,\n decoder: undefined,\n decodeConfig: {} as WebWorkerDecodeConfig,\n};\n\nexport function initialize(\n decodeConfig?: WebWorkerDecodeConfig\n): Promise<void> {\n local.decodeConfig = decodeConfig;\n\n if (local.codec) {\n return Promise.resolve();\n }\n\n const openJpegModule = openJpegFactory({\n locateFile: (f) => {\n if (f.endsWith('.wasm')) {\n return openjpegWasm.toString();\n }\n\n return f;\n },\n });\n\n return new Promise((resolve, reject) => {\n openJpegModule.then((instance) => {\n local.codec = instance;\n local.decoder = new instance.J2KDecoder();\n resolve();\n }, reject);\n });\n}\n\n// https://github.com/chafey/openjpegjs/blob/master/test/browser/index.html\nasync function decodeAsync(\n compressedImageFrame,\n imageInfo\n): Promise<Types.IImageFrame> {\n await initialize();\n const decoder = local.decoder;\n\n // get pointer to the source/encoded bit stream buffer in WASM memory\n // that can hold the encoded bitstream\n const encodedBufferInWASM = decoder.getEncodedBuffer(\n compressedImageFrame.length\n );\n\n // copy the encoded bitstream into WASM memory buffer\n encodedBufferInWASM.set(compressedImageFrame);\n\n // decode it\n decoder.decode();\n // decoder.decodeSubResolution(decodeLevel, decodeLayer);\n // const resolutionAtLevel = decoder.calculateSizeAtDecompositionLevel(decodeLevel);\n\n // get information about the decoded image\n const frameInfo = decoder.getFrameInfo();\n // get the decoded pixels\n const decodedBufferInWASM = decoder.getDecodedBuffer();\n const imageFrame = new Uint8Array(decodedBufferInWASM.length);\n\n imageFrame.set(decodedBufferInWASM);\n\n const imageOffset = `x: ${decoder.getImageOffset().x}, y: ${\n decoder.getImageOffset().y\n }`;\n const numDecompositions = decoder.getNumDecompositions();\n const numLayers = decoder.getNumLayers();\n const progessionOrder = ['unknown', 'LRCP', 'RLCP', 'RPCL', 'PCRL', 'CPRL'][\n decoder.getProgressionOrder() + 1\n ];\n const reversible = decoder.getIsReversible();\n const blockDimensions = `${decoder.getBlockDimensions().width} x ${\n decoder.getBlockDimensions().height\n }`;\n const tileSize = `${decoder.getTileSize().width} x ${\n decoder.getTileSize().height\n }`;\n const tileOffset = `${decoder.getTileOffset().x}, ${\n decoder.getTileOffset().y\n }`;\n const colorTransform = decoder.getColorSpace();\n\n const decodedSize = `${decodedBufferInWASM.length.toLocaleString()} bytes`;\n const compressionRatio = `${(\n decodedBufferInWASM.length / encodedBufferInWASM.length\n ).toFixed(2)}:1`;\n\n const encodedImageInfo = {\n columns: frameInfo.width,\n rows: frameInfo.height,\n bitsPerPixel: frameInfo.bitsPerSample,\n signed: frameInfo.isSigned,\n bytesPerPixel: imageInfo.bytesPerPixel,\n componentsPerPixel: frameInfo.componentCount,\n };\n const pixelData = getPixelData(frameInfo, decodedBufferInWASM);\n\n const encodeOptions = {\n imageOffset,\n numDecompositions,\n numLayers,\n progessionOrder,\n reversible,\n blockDimensions,\n tileSize,\n tileOffset,\n colorTransform,\n decodedSize,\n compressionRatio,\n };\n\n return {\n ...imageInfo,\n pixelData,\n imageInfo: encodedImageInfo,\n encodeOptions,\n ...encodeOptions,\n ...encodedImageInfo,\n };\n}\n\nfunction getPixelData(frameInfo, decodedBuffer) {\n if (frameInfo.bitsPerSample > 8) {\n if (frameInfo.isSigned) {\n return new Int16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n return new Uint16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n if (frameInfo.isSigned) {\n return new Int8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n }\n\n return new Uint8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n}\n\nexport default decodeAsync;\n","import type { ByteArray } from 'dicom-parser';\n// @ts-ignore\nimport openJphFactory from '@cornerstonejs/codec-openjph/wasmjs';\n// @ts-ignore\n// import openjphWasm from '@cornerstonejs/codec-openjph/wasm';\nconst openjphWasm = new URL(\n '@cornerstonejs/codec-openjph/wasm',\n import.meta.url\n);\n\nimport type { LoaderDecodeOptions } from '../../types';\n\nconst local: {\n codec: unknown;\n decoder: unknown;\n decodeConfig: LoaderDecodeOptions;\n} = {\n codec: undefined,\n decoder: undefined,\n decodeConfig: {},\n};\n\nfunction calculateSizeAtDecompositionLevel(\n decompositionLevel: number,\n frameWidth: number,\n frameHeight: number\n) {\n const result = { width: frameWidth, height: frameHeight };\n while (decompositionLevel > 0) {\n result.width = Math.ceil(result.width / 2);\n result.height = Math.ceil(result.height / 2);\n decompositionLevel--;\n }\n return result;\n}\n\nexport function initialize(decodeConfig?: LoaderDecodeOptions): Promise<void> {\n local.decodeConfig = decodeConfig;\n\n if (local.codec) {\n return Promise.resolve();\n }\n\n const openJphModule = openJphFactory({\n locateFile: (f) => {\n if (f.endsWith('.wasm')) {\n return openjphWasm.toString();\n }\n\n return f;\n },\n });\n\n return new Promise<void>((resolve, reject) => {\n openJphModule.then((instance) => {\n local.codec = instance;\n local.decoder = new instance.HTJ2KDecoder();\n resolve();\n }, reject);\n });\n}\n\n// https://github.com/chafey/openjpegjs/blob/master/test/browser/index.html\nasync function decodeAsync(compressedImageFrame: ByteArray, imageInfo) {\n await initialize();\n // const decoder = local.decoder; // This is much slower for some reason\n // @ts-expect-error\n const decoder = new local.codec.HTJ2KDecoder();\n\n // get pointer to the source/encoded bit stream buffer in WASM memory\n // that can hold the encoded bitstream\n const encodedBufferInWASM = decoder.getEncodedBuffer(\n compressedImageFrame.length\n );\n\n // copy the encoded bitstream into WASM memory buffer\n encodedBufferInWASM.set(compressedImageFrame);\n\n // decode it\n // decoder.decode();\n const decodeLevel = imageInfo.decodeLevel || 0;\n decoder.decodeSubResolution(decodeLevel);\n // decoder.decodeSubResolution(decodeLevel, decodeLayer);\n // const resolutionAtLevel = decoder.calculateSizeAtDecompositionLevel(decodeLevel);\n\n // get information about the decoded image\n const frameInfo = decoder.getFrameInfo();\n // Overwrite width/height if subresolution\n if (imageInfo.decodeLevel > 0) {\n const { width, height } = calculateSizeAtDecompositionLevel(\n imageInfo.decodeLevel,\n frameInfo.width,\n frameInfo.height\n );\n frameInfo.width = width;\n frameInfo.height = height;\n // console.log(`Decoded sub-resolution of size: ${width} x ${height}`);\n }\n // get the decoded pixels\n const decodedBufferInWASM = decoder.getDecodedBuffer();\n const imageFrame = new Uint8Array(decodedBufferInWASM.length);\n\n imageFrame.set(decodedBufferInWASM);\n\n const imageOffset = `x: ${decoder.getImageOffset().x}, y: ${\n decoder.getImageOffset().y\n }`;\n const numDecompositions = decoder.getNumDecompositions();\n const numLayers = decoder.getNumLayers();\n const progessionOrder = ['unknown', 'LRCP', 'RLCP', 'RPCL', 'PCRL', 'CPRL'][\n decoder.getProgressionOrder() + 1\n ];\n const reversible = decoder.getIsReversible();\n const blockDimensions = `${decoder.getBlockDimensions().width} x ${\n decoder.getBlockDimensions().height\n }`;\n const tileSize = `${decoder.getTileSize().width} x ${\n decoder.getTileSize().height\n }`;\n const tileOffset = `${decoder.getTileOffset().x}, ${\n decoder.getTileOffset().y\n }`;\n // const colorTransform = decoder.getColorSpace();\n\n const decodedSize = `${decodedBufferInWASM.length.toLocaleString()} bytes`;\n const compressionRatio = `${(\n decodedBufferInWASM.length / encodedBufferInWASM.length\n ).toFixed(2)}:1`;\n\n const encodedImageInfo = {\n columns: frameInfo.width,\n rows: frameInfo.height,\n bitsPerPixel: frameInfo.bitsPerSample,\n signed: frameInfo.isSigned,\n bytesPerPixel: imageInfo.bytesPerPixel,\n componentsPerPixel: frameInfo.componentCount,\n };\n // const pixelData = getPixelData(frameInfo, decodedBufferInWASM);\n\n /**\n * Have to truncate the arraybuffer here to the length of the typed array. Not\n * sure why the arraybuffer is so huge, maybe this is allocated by the WASM\n * module? In any case, I think it's too big to postMessage in it's entirety.\n */\n let pixelData = getPixelData(frameInfo, decodedBufferInWASM);\n const { buffer: b, byteOffset, byteLength } = pixelData;\n const pixelDataArrayBuffer = b.slice(byteOffset, byteOffset + byteLength);\n\n // @ts-ignore\n pixelData = new pixelData.constructor(pixelDataArrayBuffer);\n\n const encodeOptions = {\n imageOffset,\n numDecompositions,\n numLayers,\n progessionOrder,\n reversible,\n blockDimensions,\n tileSize,\n tileOffset,\n // colorTransform,\n decodedSize,\n compressionRatio,\n };\n\n return {\n ...imageInfo,\n pixelData,\n imageInfo: encodedImageInfo,\n encodeOptions,\n ...encodeOptions,\n ...encodedImageInfo,\n };\n}\n\nfunction getPixelData(frameInfo, decodedBuffer) {\n if (frameInfo.bitsPerSample > 8) {\n if (frameInfo.isSigned) {\n return new Int16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n return new Uint16Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength / 2\n );\n }\n\n if (frameInfo.isSigned) {\n return new Int8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n }\n\n return new Uint8Array(\n decodedBuffer.buffer,\n decodedBuffer.byteOffset,\n decodedBuffer.byteLength\n );\n}\n\nexport default decodeAsync;\n","import type { Types } from '@cornerstonejs/core';\n\n/**\n * Calculate the minimum and maximum values in an Array\n *\n * @param {Number[]} storedPixelData\n * @return {{min: Number, max: Number}}\n */\nfunction getMinMax(storedPixelData: Types.PixelDataTypedArray): {\n min: number;\n max: number;\n} {\n // we always calculate the min max values since they are not always\n // present in DICOM and we don't want to trust them anyway as cornerstone\n // depends on us providing reliable values for these\n let min = storedPixelData[0];\n\n let max = storedPixelData[0];\n\n let storedPixel;\n const numPixels = storedPixelData.length;\n\n for (let index = 1; index < numPixels; index++) {\n storedPixel = storedPixelData[index];\n min = Math.min(min, storedPixel);\n max = Math.max(max, storedPixel);\n }\n\n return {\n min,\n max,\n };\n}\n\nexport default getMinMax;\n","/* eslint-disable complexity */\nimport bilinear from './shared/scaling/bilinear';\nimport replicate from './shared/scaling/replicate';\nimport { expose } from 'comlink';\n\nimport decodeLittleEndian from './shared/decoders/decodeLittleEndian';\nimport decodeBigEndian from './shared/decoders/decodeBigEndian';\nimport decodeRLE from './shared/decoders/decodeRLE';\nimport decodeJPEGBaseline8Bit from './shared/decoders/decodeJPEGBaseline8Bit';\n// import decodeJPEGBaseline12Bit from './shared/decoders/decodeJPEGBaseline12Bit';\nimport decodeJPEGBaseline12Bit from './shared/decoders/decodeJPEGBaseline12Bit-js';\nimport decodeJPEGLossless from './shared/decoders/decodeJPEGLossless';\nimport decodeJPEGLS from './shared/decoders/decodeJPEGLS';\nimport decodeJPEG2000 from './shared/decoders/decodeJPEG2000';\nimport decodeHTJ2K from './shared/decoders/decodeHTJ2K';\n// Note that the scaling is pixel value scaling, which is applying a modality LUT\nimport applyModalityLUT from './shared/scaling/scaleArray';\nimport getMinMax from './shared/getMinMax';\nimport getPixelDataTypeFromMinMax from './shared/getPixelDataTypeFromMinMax';\nimport isColorImage from './shared/isColorImage';\n\nconst imageUtils = {\n bilinear,\n replicate,\n};\n\n/**\n * Decodes the provided image frame.\n * This is an async function return the result, or you can provide an optional\n * callbackFn that is called with the results.\n */\nasync function decodeImageFrame(\n imageFrame,\n transferSyntax,\n pixelData,\n decodeConfig,\n options,\n callbackFn\n) {\n const start = new Date().getTime();\n\n let decodePromise = null;\n\n let opts;\n\n switch (transferSyntax) {\n case '1.2.840.10008.1.2':\n case '1.2.840.10008.1.2.1':\n // Implicit or Explicit VR Little Endian\n decodePromise = decodeLittleEndian(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.2':\n // Explicit VR Big Endian (retired)\n decodePromise = decodeBigEndian(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.1.99':\n // Deflate transfer syntax (deflated by dicomParser)\n decodePromise = decodeLittleEndian(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.5':\n // RLE Lossless\n decodePromise = decodeRLE(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.4.50':\n // JPEG Baseline lossy process 1 (8 bit)\n opts = {\n ...imageFrame,\n };\n\n decodePromise = decodeJPEGBaseline8Bit(pixelData, opts);\n break;\n case '1.2.840.10008.1.2.4.51':\n // JPEG Baseline lossy process 2 & 4 (12 bit)\n // opts = {\n // ...imageFrame,\n // };\n // decodePromise = decodeJPEGBaseline12Bit(pixelData, opts);\n //throw new Error('Currently unsupported: 1.2.840.10008.1.2.4.51');\n decodePromise = decodeJPEGBaseline12Bit(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.4.57':\n // JPEG Lossless, Nonhierarchical (Processes 14)\n decodePromise = decodeJPEGLossless(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.4.70':\n // JPEG Lossless, Nonhierarchical (Processes 14 [Selection 1])\n decodePromise = decodeJPEGLossless(imageFrame, pixelData);\n break;\n case '1.2.840.10008.1.2.4.80':\n // JPEG-LS Lossless Image Compression\n opts = {\n signed: imageFrame.pixelRepresentation === 1, // imageFrame.signed,\n // shouldn't need...\n bytesPerPixel: imageFrame.bitsAllocated <= 8 ? 1 : 2,\n ...imageFrame,\n };\n\n decodePromise = decodeJPEGLS(pixelData, opts);\n break;\n case '1.2.840.10008.1.2.4.81':\n // JPEG-LS Lossy (Near-Lossless) Image Compression\n opts = {\n signed: imageFrame.pixelRepresentation === 1, // imageFrame.signed,\n // shouldn't need...\n bytesPerPixel: imageFrame.bitsAllocated <= 8 ? 1 : 2,\n ...imageFrame,\n };\n\n decodePromise = decodeJPEGLS(pixelData, opts);\n break;\n case '1.2.840.10008.1.2.4.90':\n opts = {\n ...imageFrame,\n };\n\n // JPEG 2000 Lossless\n // imageFrame, pixelData, decodeConfig, options\n decodePromise = decodeJPEG2000(pixelData, opts);\n break;\n case '1.2.840.10008.1.2.4.91':\n // JPEG 2000 Lossy\n opts = {\n ...imageFrame,\n };\n\n // JPEG 2000 Lossy\n // imageFrame, pixelData, decodeConfig, options\n decodePromise = decodeJPEG2000(pixelData, opts);\n break;\n case '3.2.840.10008.1.2.4.96':\n case '1.2.840.10008.1.2.4.201':\n case '1.2.840.10008.1.2.4.202':\n case '1.2.840.10008.1.2.4.203':\n // HTJ2K\n opts = {\n ...imageFrame,\n };\n\n decodePromise = decodeHTJ2K(pixelData, opts);\n break;\n default:\n throw new Error(`no decoder for transfer syntax ${transferSyntax}`);\n }\n\n /* Don't know if these work...\n // JPEG 2000 Part 2 Multicomponent Image Compression (Lossless Only)\n else if(transferSyntax === \"1.2.840.10008.1.2.4.92\")\n {\n return decodeJPEG2000(dataSet, frame);\n }\n // JPEG 2000 Part 2 Multicomponent Image Compression\n else if(transferSyntax === \"1.2.840.10008.1.2.4.93\")\n {\n return decodeJPEG2000(dataSet, frame);\n }\n */\n\n if (!decodePromise) {\n throw new Error('decodePromise not defined');\n }\n\n const decodedFrame = await decodePromise;\n\n const postProcessed = postProcessDecodedPixels(\n decodedFrame,\n options,\n start,\n decodeConfig\n );\n\n // Call the callbackFn to agree with older arguments\n callbackFn?.(postProcessed);\n\n return postProcessed;\n}\n\nfunction postProcessDecodedPixels(imageFrame, options, start, decodeConfig) {\n const shouldShift =\n imageFrame.pixelRepresentation !== undefined &&\n imageFrame.pixelRepresentation === 1;\n const shift =\n shouldShift && imageFrame.bitsStored !== undefined\n ? 32 - imageFrame.bitsStored\n : undefined;\n\n if (shouldShift && shift !== undefined) {\n for (let i = 0; i < imageFrame.pixelData.length; i++) {\n // eslint-disable-next-line no-bitwise\n imageFrame.pixelData[i] = (imageFrame.pixelData[i] << shift) >> shift;\n }\n }\n\n // Cache the pixelData reference quickly incase we want to set a targetBuffer _and_ scale.\n let pixelDataArray = imageFrame.pixelData;\n imageFrame.pixelDataLength = imageFrame.pixelData.length;\n const { min: minBeforeScale, max: maxBeforeScale } = getMinMax(\n imageFrame.pixelData\n );\n\n const typedArrayConstructors = {\n Uint8Array,\n Uint16Array,\n Int16Array,\n Float32Array,\n };\n\n const type = options.targetBuffer?.type;\n\n const canRenderFloat =\n typeof options.allowFloatRendering !== 'undefined'\n ? options.allowFloatRendering\n : true;\n\n // Sometimes the type is specified before the DICOM header data has been\n // read. This is fine except for color data, where the wrong type gets\n // specified. Don't use the target buffer in that case.\n const invalidType =\n isColorImage(imageFrame.photometricInterpretation) &&\n options.targetBuffer?.offset === undefined;\n\n const willScale = options.preScale?.enabled;\n\n const hasFloatRescale =\n willScale &&\n Object.values(options.preScale.scalingParameters).some(\n (v) => typeof v === 'number' && !Number.isInteger(v)\n );\n const disableScale =\n !options.preScale.enabled || (!canRenderFloat && hasFloatRescale);\n\n if (type && !invalidType) {\n pixelDataArray = _handleTargetBuffer(\n options,\n imageFrame,\n typedArrayConstructors,\n pixelDataArray\n );\n } else if (options.preScale.enabled && !disableScale) {\n pixelDataArray = _handlePreScaleSetup(\n options,\n minBeforeScale,\n maxBeforeScale,\n imageFrame\n );\n } else {\n pixelDataArray = _getDefaultPixelDataArray(\n minBeforeScale,\n maxBeforeScale,\n imageFrame\n );\n }\n\n let minAfterScale = minBeforeScale;\n let maxAfterScale = maxBeforeScale;\n\n if (options.preScale.enabled && !disableScale) {\n const scalingParameters = options.preScale.scalingParameters;\n _validateScalingParameters(scalingParameters);\n\n const { rescaleSlope, rescaleIntercept } = scalingParameters;\n const isSlopeAndInterceptNumbers =\n typeof rescaleSlope === 'number' && typeof rescaleIntercept === 'number';\n\n if (isSlopeAndInterceptNumbers) {\n applyModalityLUT(pixelDataArray, scalingParameters);\n imageFrame.preScale = {\n ...options.preScale,\n scaled: true,\n };\n\n // calculate the min and max after scaling\n const { rescaleIntercept, rescaleSlope, suvbw } = scalingParameters;\n minAfterScale = rescaleSlope * minBeforeScale + rescaleIntercept;\n maxAfterScale = rescaleSlope * maxBeforeScale + rescaleIntercept;\n\n if (suvbw) {\n minAfterScale = minAfterScale * suvbw;\n maxAfterScale = maxAfterScale * suvbw;\n }\n }\n } else if (disableScale) {\n imageFrame.preScale = {\n enabled: true,\n scaled: false,\n };\n\n minAfterScale = minBeforeScale;\n maxAfterScale = maxBeforeScale;\n }\n\n imageFrame.pixelData = pixelDataArray;\n imageFrame.smallestPixelValue = minAfterScale;\n imageFrame.largestPixelValue = maxAfterScale;\n\n const end = new Date().getTime();\n imageFrame.decodeTimeInMS = end - start;\n\n return imageFrame;\n}\n\nfunction _handleTargetBuffer(\n options,\n imageFrame,\n typedArrayConstructors,\n pixelDataArray\n) {\n const {\n arrayBuffer,\n type,\n offset: rawOffset = 0,\n length: rawLength,\n rows,\n } = options.targetBuffer;\n\n const TypedArrayConstructor = typedArrayConstructors[type];\n\n if (!TypedArrayConstructor) {\n throw new Error(`target array ${type} is not supported, or doesn't exist.`);\n }\n\n if (rows && rows != imageFrame.rows) {\n scaleImageFrame(imageFrame, options.targetBuffer, TypedArrayConstructor);\n }\n const imageFrameLength = imageFrame.pixelDataLength;\n\n const offset = rawOffset;\n const length =\n rawLength !== null && rawLength !== undefined\n ? rawLength\n : imageFrameLength - offset;\n\n const imageFramePixelData = imageFrame.pixelData;\n\n if (length !== imageFramePixelData.length) {\n throw new Error(\n `target array for image does not have the same length (${length}) as the decoded image length (${imageFramePixelData.length}).`\n );\n }\n\n // TypedArray.Set is api level and ~50x faster than copying elements even for\n // Arrays of different types, which aren't simply memcpy ops.\n const typedArray = arrayBuffer\n ? new TypedArrayConstructor(arrayBuffer, offset, length)\n : new TypedArrayConstructor(length);\n\n typedArray.set(imageFramePixelData, 0);\n\n // If need to scale, need to scale correct array.\n pixelDataArray = typedArray;\n return pixelDataArray;\n}\n\nfunction _handlePreScaleSetup(\n options,\n minBeforeScale,\n maxBeforeScale,\n imageFrame\n) {\n const scalingParameters = options.preScale.scalingParameters;\n _validateScalingParameters(scalingParameters);\n\n const { rescaleSlope, rescaleIntercept } = scalingParameters;\n const areSlopeAndInterceptNumbers =\n typeof rescaleSlope === 'number' && typeof rescaleIntercept === 'number';\n\n let scaledMin = minBeforeScale;\n let scaledMax = maxBeforeScale;\n\n if (areSlopeAndInterceptNumbers) {\n scaledMin = rescaleSlope * minBeforeScale + rescaleIntercept;\n scaledMax = rescaleSlope * maxBeforeScale + rescaleIntercept;\n }\n\n return _getDefaultPixelDataArray(scaledMin, scaledMax, imageFrame);\n}\n\nfunction _getDefaultPixelDataArray(min, max, imageFrame) {\n const TypedArrayConstructor = getPixelDataTypeFromMinMax(min, max);\n // @ts-ignore\n const typedArray = new TypedArrayConstructor(imageFrame.pixelData.length);\n typedArray.set(imageFrame.pixelData, 0);\n\n return typedArray;\n}\n\nfunction _validateScalingParameters(scalingParameters) {\n if (!scalingParameters) {\n throw new Error(\n 'options.preScale.scalingParameters must be defined if preScale.enabled is true, and scalingParameters cannot be derived from the metadata providers.'\n );\n }\n}\n\nfunction createDestinationImage(\n imageFrame,\n targetBuffer,\n TypedArrayConstructor\n) {\n const { samplesPerPixel } = imageFrame;\n const { rows, columns } = targetBuffer;\n const typedLength = rows * columns * samplesPerPixel;\n const pixelData = new TypedArrayConstructor(typedLength);\n const bytesPerPixel = pixelData.byteLength / typedLength;\n return {\n pixelData,\n rows,\n columns,\n frameInfo: {\n ...imageFrame.frameInfo,\n rows,\n columns,\n },\n imageInfo: {\n ...imageFrame.imageInfo,\n rows,\n columns,\n bytesPerPixel,\n },\n };\n}\n\n/** Scales the image frame, updating the frame in place with a new scaled\n * version of it (in place modification)\n */\nfunction scaleImageFrame(imageFrame, targetBuffer, TypedArrayConstructor) {\n const dest = createDestinationImage(\n imageFrame,\n targetBuffer,\n TypedArrayConstructor\n );\n const { scalingType = 'replicate' } = targetBuffer;\n imageUtils[scalingType](imageFrame, dest);\n Object.assign(imageFrame, dest);\n imageFrame.pixelDataLength = imageFrame.pixelData.length;\n return imageFrame;\n}\n\nconst obj = {\n decodeTask({\n imageFrame,\n transferSyntax,\n decodeConfig,\n options,\n pixelData,\n callbackFn,\n }) {\n return decodeImageFrame(\n imageFrame,\n transferSyntax,\n pixelData,\n decodeConfig,\n options,\n callbackFn\n );\n },\n};\n\nexpose(obj);\n","/**\n * Performs a bilinear scaling, both scaling up and scaling down.\n * Only supports 1 channel per pixel (grayscale)\n * @param src - src image frame to get map from\n * @param dest - dest image frame to write to\n * @returns destination data buffer\n */\nexport default function bilinear(src, dest) {\n const { rows: srcRows, columns: srcColumns, data: srcData } = src;\n const { rows, columns, data } = dest;\n\n const xSrc1Off = [];\n const xSrc2Off = [];\n const xFrac = [];\n\n // Precompute offsets\n for (let x = 0; x < columns; x++) {\n const xSrc = (x * (srcColumns - 1)) / (columns - 1);\n xSrc1Off[x] = Math.floor(xSrc);\n xSrc2Off[x] = Math.min(xSrc1Off[x] + 1, srcColumns - 1);\n xFrac[x] = xSrc - xSrc1Off[x];\n // console.log(\"x src info\", x, xSrc, xFrac[x]);\n }\n\n for (let y = 0; y < rows; y++) {\n const ySrc = (y * (srcRows - 1)) / (rows - 1);\n const ySrc1Off = Math.floor(ySrc) * srcColumns;\n // Get the second offset, but duplicate the last row so the lookup works\n const ySrc2Off = Math.min(\n ySrc1Off + srcColumns,\n (srcRows - 1) * srcColumns\n );\n const yFrac = ySrc - Math.floor(ySrc);\n const yFracInv = 1 - yFrac;\n const yOff = y * columns;\n\n for (let x = 0; x < columns; x++) {\n // TODO - put the pXY into the data calculation\n const p00 = srcData[ySrc1Off + xSrc1Off[x]];\n const p10 = srcData[ySrc1Off + xSrc2Off[x]];\n const p01 = srcData[ySrc2Off + xSrc1Off[x]];\n const p11 = srcData[ySrc2Off + xSrc2Off[x]];\n const xFracInv = 1 - xFrac[x];\n\n // console.log(\"bilinear for\", x,y, \"from\", ySrc1Off + xSrc1Off[x], ySrc1Off + xSrc2Off[x], ySrc2Off + xSrc1Off[x], ySrc2Off + xSrc2Off[x]);\n // console.log(\"values\", p00, p10, p01, p11);\n // console.log(\"fractions\", xFracInv, xFrac[x], yFracInv, yFrac);\n\n data[yOff + x] =\n (p00 * xFracInv + p10 * xFrac[x]) * yFracInv +\n (p01 * xFracInv + p11 * xFrac[x]) * yFrac;\n }\n }\n return data;\n}\n","/** Handle replicate scaling. Use this function for samplesPerPixel>1 */\n\nexport default function replicate(src, dest) {\n const {\n rows: srcRows,\n columns: srcColumns,\n pixelData: srcData,\n samplesPerPixel = 1,\n } = src;\n const { rows, columns, pixelData } = dest;\n\n const xSrc1Off = [];\n\n // Precompute offsets\n for (let x = 0; x < columns; x++) {\n const xSrc = (x * (srcColumns - 1)) / (columns - 1);\n xSrc1Off[x] = Math.floor(xSrc) * samplesPerPixel;\n // console.log(\"x src info\", x, xSrc, xFrac[x]);\n }\n\n for (let y = 0; y < rows; y++) {\n const ySrc = (y * (srcRows - 1)) / (rows - 1);\n const ySrc1Off = Math.floor(ySrc) * srcColumns * samplesPerPixel;\n const yOff = y * columns;\n\n for (let x = 0; x < columns; x++) {\n for (let sample = 0; sample < samplesPerPixel; sample++) {\n pixelData[yOff + x + sample] = srcData[ySrc1Off + xSrc1Off[x] + sample];\n }\n }\n }\n return pixelData;\n}\n","export default function (photoMetricInterpretation: string): boolean {\n return (\n photoMetricInterpretation === 'RGB' ||\n photoMetricInterpretation === 'PALETTE COLOR' ||\n photoMetricInterpretation === 'YBR_FULL' ||\n photoMetricInterpretation === 'YBR_FULL_422' ||\n photoMetricInterpretation === 'YBR_PARTIAL_422' ||\n photoMetricInterpretation === 'YBR_PARTIAL_420' ||\n photoMetricInterpretation === 'YBR_RCT' ||\n photoMetricInterpretation === 'YBR_ICT'\n );\n}\n","import type { Types } from '@cornerstonejs/core';\n\nexport default function scaleArray(\n array: Types.PixelDataTypedArray,\n scalingParameters\n): boolean {\n const arrayLength = array.length;\n const { rescaleSlope, rescaleIntercept, suvbw } = scalingParameters;\n\n if (\n scalingParameters.modality === 'PT' &&\n typeof suvbw === 'number' &&\n !isNaN(suvbw)\n ) {\n for (let i = 0; i < arrayLength; i++) {\n array[i] = suvbw * (array[i] * rescaleSlope + rescaleIntercept);\n }\n } else {\n for (let i = 0; i < arrayLength; i++) {\n array[i] = array[i] * rescaleSlope + rescaleIntercept;\n }\n }\n\n return true;\n}\n","import type { Types } from '@cornerstonejs/core';\n\nexport default function getPixelDataTypeFromMinMax(\n min: number,\n max: number\n): Types.PixelDataTypedArray {\n let pixelDataType;\n if (Number.isInteger(min) && Number.isInteger(max)) {\n if (min >= 0) {\n if (max <= 255) {\n pixelDataType = Uint8Array;\n } else if (max <= 65535) {\n pixelDataType = Uint16Array;\n }\n } else {\n if (min >= -128 && max <= 127) {\n pixelDataType = Int8Array;\n } else if (min >= -32768 && max <= 32767) {\n pixelDataType = Int16Array;\n }\n }\n }\n\n return pixelDataType || Float32Array;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [958], () => (__webpack_require__(760)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".min.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t918: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = this[\"webpackChunk\"] = this[\"webpackChunk\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["root","factory","exports","module","define","amd","this","deferred","leafPrototypes","getProto","next","async","imageFrame","pixelData","arrayBuffer","buffer","offset","byteOffset","length","bitsAllocated","slice","pixelRepresentation","Uint16Array","Int16Array","Float32Array","i","val","planarConfiguration","frameData","frameSize","rows","columns","outFrame","ArrayBuffer","samplesPerPixel","header","DataView","data","Int8Array","out","outIndex","numSegments","getInt32","s","inIndex","maxIndex","endOfSegment","n","value","j","Uint8Array","decode8Planar","decode8","highByte","decode16","Error","libjpegTurboWasm","URL","local","codec","undefined","decoder","compressedImageFrame","imageInfo","Promise","resolve","libjpegTurboModule","libjpegTurboFactory","locateFile","f","endsWith","toString","reject","then","instance","JPEGDecoder","initLibjpegTurbo","getEncodedBuffer","set","decode","frameInfo","getFrameInfo","decodedPixelsInWASM","getDecodedBuffer","encodedImageInfo","width","height","bitsPerPixel","bitsPerSample","signed","bytesPerPixel","componentsPerPixel","componentCount","decodedBuffer","isSigned","byteLength","getPixelData","encodeOptions","JpegImage","decodeConfig","jpeg","parse","colorTransform","getData","getData16","lossless","Decoder","byteOutput","decompressedData","charlsWasm","charlsModule","charlsFactory","JpegLSDecoder","initialize","interleaveMode","getInterleaveMode","nearLossless","getNearLossless","error","exception","getExceptionMessage","openjpegWasm","openJpegModule","openJpegFactory","J2KDecoder","encodedBufferInWASM","decodedBufferInWASM","imageOffset","getImageOffset","x","y","numDecompositions","getNumDecompositions","numLayers","getNumLayers","progessionOrder","getProgressionOrder","reversible","getIsReversible","blockDimensions","getBlockDimensions","tileSize","getTileSize","tileOffset","getTileOffset","getColorSpace","decodedSize","toLocaleString","compressionRatio","toFixed","openjphWasm","openJphModule","openJphFactory","HTJ2KDecoder","decodeLevel","decodeSubResolution","decompositionLevel","frameWidth","frameHeight","result","Math","ceil","calculateSizeAtDecompositionLevel","b","pixelDataArrayBuffer","constructor","storedPixelData","storedPixel","min","max","numPixels","index","imageUtils","bilinear","src","dest","srcRows","srcColumns","srcData","xSrc1Off","xSrc2Off","xFrac","xSrc","floor","ySrc","ySrc1Off","ySrc2Off","yFrac","yFracInv","yOff","p00","p10","p01","p11","xFracInv","replicate","sample","decodeImageFrame","transferSyntax","options","callbackFn","start","Date","getTime","opts","decodePromise","decodeLittleEndian","decodeBigEndian","decodeRLE","decodeJPEGBaseline8Bit","decodeJPEGBaseline12Bit","decodeJPEGLossless","decodeJPEGLS","decodeJPEG2000","decodeHTJ2K","postProcessed","shouldShift","shift","bitsStored","pixelDataArray","pixelDataLength","minBeforeScale","maxBeforeScale","getMinMax","typedArrayConstructors","type","targetBuffer","canRenderFloat","allowFloatRendering","invalidType","photoMetricInterpretation","photometricInterpretation","willScale","preScale","enabled","hasFloatRescale","Object","values","scalingParameters","some","v","Number","isInteger","disableScale","rawOffset","rawLength","TypedArrayConstructor","typedLength","createDestinationImage","scalingType","assign","scaleImageFrame","imageFrameLength","imageFramePixelData","typedArray","_handleTargetBuffer","_validateScalingParameters","rescaleSlope","rescaleIntercept","scaledMin","scaledMax","_getDefaultPixelDataArray","_handlePreScaleSetup","minAfterScale","maxAfterScale","array","arrayLength","suvbw","modality","isNaN","applyModalityLUT","scaled","smallestPixelValue","largestPixelValue","end","decodeTimeInMS","postProcessDecodedPixels","pixelDataType","getPixelDataTypeFromMinMax","obj","decodeTask","expose","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","m","__webpack_exports__","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","keys","every","key","splice","r","getter","__esModule","d","a","getPrototypeOf","t","mode","ns","create","def","current","indexOf","getOwnPropertyNames","forEach","definition","o","defineProperty","enumerable","get","e","chunkId","all","reduce","promises","u","g","globalThis","Function","window","prop","prototype","hasOwnProperty","Symbol","toStringTag","scriptUrl","importScripts","location","document","currentScript","scripts","getElementsByTagName","replace","p","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","push","bind","moreModules","runtime","pop"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 958.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk=this.webpackChunk||[]).push([[958],{37:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="object"==typeof window,p="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(h){var v=r(716),y=r(401);d=p?y.dirname(d)+"/":"//",a=(t,e)=>(t=q(t)?new URL(t):y.normalize(t),v.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=q(t)?new URL(t):y.normalize(t),v.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof X))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},p&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});i.print||console.log.bind(console);var m,g=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(m=i.wasmBinary);var w;i.noExitRuntime;"object"!=typeof WebAssembly&&V("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e){return t?function(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(C,t,e):""}function j(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=$=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=C=new Uint8Array(t),i.HEAPU16=P=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=k=new Float64Array(t)}i.INITIAL_MEMORY;var O,x=[],D=[],U=[],I=0,H=null,M=null;function V(t){i.onAbort&&i.onAbort(t),g(t="Aborted("+t+")"),S=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var z,L,N="data:application/octet-stream;base64,";function B(t){return t.startsWith(N)}function q(t){return t.startsWith("file://")}function G(t){try{if(t==z&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){V(t)}}function X(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Y(t){for(;t.length>0;)t.shift()(i)}function J(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(De(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}B(z="charlswasm_decode.wasm")||(L=z,z=i.locateFile?i.locateFile(L,d):d+L);var Z={};function Q(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function K(t){return this.fromWireType(_[t>>2])}var tt={},et={},rt={},nt=48,ot=57;function it(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=nt&&e<=ot?"_"+t:t}function at(t,e){return t=it(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function st(t,e){var r=at(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ut=void 0;function ct(t){throw new ut(t)}function lt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ct("Mismatched type converter count");for(var o=0;o<t.length;++o)yt(t[o],n[o])}t.forEach((function(t){rt[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{et.hasOwnProperty(t)?o[e]=et[t]:(i.push(t),tt.hasOwnProperty(t)||(tt[t]=[]),tt[t].push((()=>{o[e]=et[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var pt=void 0;function ht(t){for(var e="",r=t;C[r];)e+=pt[C[r++]];return e}var dt=void 0;function vt(t){throw new dt(t)}function yt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||vt('type "'+n+'" must have a positive integer typeid pointer'),et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;vt("Cannot register type '"+n+"' twice")}if(et[t]=e,delete rt[t],tt.hasOwnProperty(t)){var o=tt[t];delete tt[t],o.forEach((t=>t()))}}function mt(t){if(!(this instanceof Ht))return!1;if(!(t instanceof Ht))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function gt(t){vt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var wt=!1;function bt(t){}function Tt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Ct(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ct(t,e,r.baseClass);return null===n?null:r.downcast(n)}var $t={};function Pt(){return Object.keys(Wt).length}function _t(){var t=[];for(var e in Wt)Wt.hasOwnProperty(e)&&t.push(Wt[e]);return t}var At=[];function Et(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var kt=void 0;function St(t){kt=t,At.length&&kt&&kt(Et)}var Wt={};function Rt(t,e){return e=function(t,e){for(void 0===e&&vt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Wt[e]}function jt(t,e){return e.ptrType&&e.ptr||ct("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ct("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ot(Object.create(t,{$$:{value:e}}))}function Ft(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Rt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=$t[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Ct(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ot(t){return"undefined"==typeof FinalizationRegistry?(Ot=t=>t,t):(wt=new FinalizationRegistry((t=>{Tt(t.$$)})),Ot=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};wt.register(t,r,t)}return t},bt=t=>wt.unregister(t),Ot(t))}function xt(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ot(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Dt(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),bt(this),Tt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ut(){return!this.$$.ptr}function It(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),At.push(this),1===At.length&&kt&&kt(Et),this.$$.deleteScheduled=!0,this}function Ht(){}function Mt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||vt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Vt(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&vt("Cannot register public name '"+t+"' twice"),Mt(i,t,t),i.hasOwnProperty(r)&&vt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}function zt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Lt(t,e,r){for(;e!==r;)e.upcast||vt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Nt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Lt(e.$$.ptr,r,this.registeredClass)}function Bt(t,e){var r;if(null===e)return this.isReference&&vt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Lt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&vt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,pe.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:vt("Unsupporting sharing policy")}return r}function qt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Lt(e.$$.ptr,r,this.registeredClass)}function Gt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Xt(t){this.rawDestructor&&this.rawDestructor(t)}function Yt(t){null!==t&&t.delete()}function Jt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Bt:n?(this.toWireType=Nt,this.destructorFunction=null):(this.toWireType=qt,this.destructorFunction=null)}function Zt(t,e,r){i.hasOwnProperty(t)||ct("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}var Qt=[];function Kt(t){var e=Qt[t];return e||(t>=Qt.length&&(Qt.length=t+1),Qt[t]=e=O.get(t)),e}function te(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Kt(e).apply(null,r)}function ee(t,e){var r,n,o,i=(t=ht(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),te(r,n,o)}):Kt(e);return"function"!=typeof i&&vt("unknown function pointer with signature "+t+": "+e),i}var re=void 0;function ne(t){var e=Re(t),r=ht(e);return je(e),r}function oe(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||et[e]||(rt[e]?rt[e].forEach(t):(r.push(e),n[e]=!0))})),new re(t+": "+r.map(ne).join([", "]))}function ie(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ae(t,e,r,n,o){var i=e.length;i<2&&vt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+it(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[vt,n,o,Q,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=at(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var se=[],ue=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ce(t){t>4&&0==--ue[t].refcount&&(ue[t]=void 0,se.push(t))}function le(){for(var t=0,e=5;e<ue.length;++e)void 0!==ue[e]&&++t;return t}function fe(){for(var t=5;t<ue.length;++t)if(void 0!==ue[t])return ue[t];return null}var pe={toValue:t=>(t||vt("Cannot use deleted val. handle = "+t),ue[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=se.length?se.pop():ue.length;return ue[e]={refcount:1,value:t},e}}};function he(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function de(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ve(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ye="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function me(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&ye)return ye.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ge(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function we(t){return 2*t.length}function be(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function Ce(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var $e={};function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function _e(t,e){var r=et[t];return void 0===r&&vt(e+" has unknown type "+ne(t)),r}var Ae={};function Ee(t){try{return w.grow(t-b.byteLength+65535>>>16),F(w.buffer),1}catch(t){}}ut=i.InternalError=st(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pt=t}(),dt=i.BindingError=st(Error,"BindingError"),Ht.prototype.isAliasOf=mt,Ht.prototype.clone=xt,Ht.prototype.delete=Dt,Ht.prototype.isDeleted=Ut,Ht.prototype.deleteLater=It,i.getInheritedInstanceCount=Pt,i.getLiveInheritedInstances=_t,i.flushPendingDeletes=Et,i.setDelayFunction=St,Jt.prototype.getPointee=Gt,Jt.prototype.destructor=Xt,Jt.prototype.argPackAdvance=8,Jt.prototype.readValueFromPointer=K,Jt.prototype.deleteObject=Yt,Jt.prototype.fromWireType=Ft,re=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=le,i.get_first_emval=fe;var ke,Se={h:function(t,e,r){throw new J(t).init(e,r),t},q:function(t){var e=Z[t];delete Z[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;lt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),Q(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:K,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=ht(l),i=ee(o,i),s&&(s=ee(a,s)),c&&(c=ee(u,c)),p=ee(f,p);var h=it(l);Vt(h,(function(){oe("Cannot construct "+l+" due to unbound types",[n])})),lt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Ht.prototype;var a=at(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new dt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new dt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new dt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new zt(l,a,u,p,r,i,s,c),d=new Jt(l,f,!0,!1,!1),v=new Jt(l+"*",f,!1,!1,!1),y=new Jt(l+" const*",f,!1,!0,!1);return $t[t]={pointerType:v,constPointerType:y},Zt(h,a),[d,v,y]}))},o:function(t,e,r,n,o,i){var a;e>0||V(a);var s=ie(e,r);o=ee(n,o),lt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new dt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{oe("Cannot construct "+t.name+" due to unbound types",s)},lt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ae(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ie(r,n);e=ht(e),i=ee(o,i),lt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){oe("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Mt(c,e,n),c[e].overloadTable[r-2]=o),lt([],u,(function(o){var s=ae(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},v:function(t,e){yt(t,{name:e=ht(e),fromWireType:function(t){var e=pe.toValue(t);return ce(t),e},toWireType:function(t,e){return pe.toHandle(e)},argPackAdvance:8,readValueFromPointer:K,destructorFunction:null})},k:function(t,e,r){var n=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:de(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=ie(e,r);t=ht(t),o=ee(n,o),Vt(t,(function(){oe("Cannot call "+t+" due to unbound types",a)}),e-1),lt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Zt(t,ae(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=ht(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");yt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ve(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}yt(t,{name:r=ht(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=ht(e));yt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=R(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return je(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||vt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=We(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)j(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(je(a),vt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(je,i),i},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){je(t)}})},g:function(t,e,r){var n,o,i,a,s;r=ht(r),2===e?(n=me,o=ge,a=we,i=()=>P,s=1):4===e&&(n=be,o=Te,a=Ce,i=()=>A,s=2),yt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return je(t),r},toWireType:function(t,n){"string"!=typeof n&&vt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=We(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(je,u),u},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){je(t)}})},u:function(t,e,r,n,o,i){Z[t]={name:ht(e),rawConstructor:ee(r,n),rawDestructor:ee(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){Z[t].fields.push({fieldName:ht(e),getterReturnType:r,getter:ee(n,o),getterContext:i,setterArgumentType:a,setter:ee(s,u),setterContext:c})},x:function(t,e){yt(t,{isVoid:!0,name:e=ht(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ce,m:function(t){return 0===t?pe.toHandle(Pe()):(t=void 0===(r=$e[e=t])?ht(e):r,pe.toHandle(Pe()[t]));var e,r},l:function(t){t>4&&(ue[t].refcount+=1)},y:function(t,e,r,n){t=pe.toValue(t);var o=Ae[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(_e,i,pe.toHandle,(()=>A))}(e),Ae[e]=o),o(t,r,n)},n:function(t,e){var r=(t=_e(t,"_emval_take_value")).readValueFromPointer(e);return pe.toHandle(r)},f:function(){V("")},t:function(t,e,r){C.copyWithin(t,e,e+r)},s:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Ee(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},We=(function(){var t={a:Se};function e(t,e){var r,n=t.exports;i.asm=n,F((w=i.asm.z).buffer),O=i.asm.C,r=i.asm.A,D.unshift(r),function(){if(I--,i.monitorRunDependencies&&i.monitorRunDependencies(I),0==I&&(null!==H&&(clearInterval(H),H=null),M)){var t=M;M=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(f||p)){if("function"==typeof fetch&&!q(z))return fetch(z,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+z+"'";return t.arrayBuffer()})).catch((function(){return G(z)}));if(s)return new Promise((function(t,e){s(z,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(z)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){g("failed to asynchronously prepare wasm: "+t),V(t)}))}if(I++,i.monitorRunDependencies&&i.monitorRunDependencies(I),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||B(z)||q(z)||h||"function"!=typeof fetch?n(r):fetch(z,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.A).apply(null,arguments)},i._malloc=function(){return(We=i._malloc=i.asm.B).apply(null,arguments)}),Re=i.___getTypeName=function(){return(Re=i.___getTypeName=i.asm.D).apply(null,arguments)},je=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(je=i._free=i.asm.F).apply(null,arguments)}),Fe=i.stackSave=function(){return(Fe=i.stackSave=i.asm.G).apply(null,arguments)},Oe=i.stackRestore=function(){return(Oe=i.stackRestore=i.asm.H).apply(null,arguments)},xe=i.stackAlloc=function(){return(xe=i.stackAlloc=i.asm.I).apply(null,arguments)},De=i.___cxa_is_pointer_type=function(){return(De=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Ue(t){function r(){ke||(ke=!0,i.calledRun=!0,S||(Y(D),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),U.unshift(t);var t;Y(U)}()))}t=t||l,I>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),x.unshift(t);var t;Y(x)}(),I>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);j(t,e=xe(r),r)}return e},array:t=>{var e=xe(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Fe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Oe(c),function(t){return"string"===e?R(t):"boolean"===e?Boolean(t):t}(t)}(p)},M=function t(){ke||Ue(),ke||(M=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ue(),t.ready});t.exports=o},851:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p=(t,e)=>{throw e},h="object"==typeof window,d="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(v){var m=r(491),g=r(33);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=Q(t)?new URL(t):g.normalize(t),m.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Q(t)?new URL(t):g.normalize(t),m.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof tt))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(L())throw process.exitCode=t,e;var r;(r=e)instanceof tt||T("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(h||d)&&(d?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),n&&(y=n),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var w,b=i.print||console.log.bind(console),T=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&(p=i.quit),i.wasmBinary&&(w=i.wasmBinary);var C,$=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var P,_,A,E,k,S,W,R,j,F=!1,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&O)return O.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(t,e){return t?x(A,t,e):""}function U(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,A,e,r)}function I(t){P=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=E=new Int16Array(t),i.HEAP32=S=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=k=new Uint16Array(t),i.HEAPU32=W=new Uint32Array(t),i.HEAPF32=R=new Float32Array(t),i.HEAPF64=j=new Float64Array(t)}i.INITIAL_MEMORY;var H,M=[],V=[],z=[];function L(){return $}var N=0,B=null,q=null;function G(t){i.onAbort&&i.onAbort(t),T(t="Aborted("+t+")"),F=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var X,Y,J="data:application/octet-stream;base64,";function Z(t){return t.startsWith(J)}function Q(t){return t.startsWith("file://")}function K(t){try{if(t==X&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){G(t)}}function tt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function et(t){for(;t.length>0;)t.shift()(i)}function rt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){W[this.ptr+4>>2]=t},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(t){W[this.ptr+8>>2]=t},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(t){S[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return 0!=_[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=_[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=S[this.ptr>>2];S[this.ptr>>2]=t+1},this.release_ref=function(){var t=S[this.ptr>>2];return S[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){W[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return W[this.ptr+16>>2]},this.get_exception_ptr=function(){if(qe(this.get_type()))return W[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}Z(X="libjpegturbowasm_decode.wasm")||(Y=X,X=i.locateFile?i.locateFile(Y,y):y+Y);var nt={};function ot(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function it(t){return this.fromWireType(S[t>>2])}var at={},st={},ut={},ct=48,lt=57;function ft(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ct&&e<=lt?"_"+t:t}function pt(t,e){return t=ft(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ht(t,e){var r=pt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var dt=void 0;function vt(t){throw new dt(t)}function yt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&vt("Mismatched type converter count");for(var o=0;o<t.length;++o)Ct(t[o],n[o])}t.forEach((function(t){ut[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{st.hasOwnProperty(t)?o[e]=st[t]:(i.push(t),at.hasOwnProperty(t)||(at[t]=[]),at[t].push((()=>{o[e]=st[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function mt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var gt=void 0;function wt(t){for(var e="",r=t;A[r];)e+=gt[A[r++]];return e}var bt=void 0;function Tt(t){throw new bt(t)}function Ct(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||Tt('type "'+n+'" must have a positive integer typeid pointer'),st.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;Tt("Cannot register type '"+n+"' twice")}if(st[t]=e,delete ut[t],at.hasOwnProperty(t)){var o=at[t];delete at[t],o.forEach((t=>t()))}}function $t(t){if(!(this instanceof Bt))return!1;if(!(t instanceof Bt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Pt(t){Tt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function At(t){}function Et(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function kt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=kt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var St={};function Wt(){return Object.keys(Dt).length}function Rt(){var t=[];for(var e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t}var jt=[];function Ft(){for(;jt.length;){var t=jt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ot=void 0;function xt(t){Ot=t,jt.length&&Ot&&Ot(Ft)}var Dt={};function Ut(t,e){return e=function(t,e){for(void 0===e&&Tt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Dt[e]}function It(t,e){return e.ptrType&&e.ptr||vt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&vt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Mt(Object.create(t,{$$:{value:e}}))}function Ht(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ut(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=St[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=kt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Mt(t){return"undefined"==typeof FinalizationRegistry?(Mt=t=>t,t):(_t=new FinalizationRegistry((t=>{Et(t.$$)})),Mt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};_t.register(t,r,t)}return t},At=t=>_t.unregister(t),Mt(t))}function Vt(){if(this.$$.ptr||Pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Mt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function zt(){this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),At(this),Et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Lt(){return!this.$$.ptr}function Nt(){return this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),jt.push(this),1===jt.length&&Ot&&Ot(Ft),this.$$.deleteScheduled=!0,this}function Bt(){}function qt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||Tt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Xt(t,e,r){for(;e!==r;)e.upcast||Tt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Yt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Jt(t,e){var r;if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Xt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Tt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ye.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:Tt("Unsupporting sharing policy")}return r}function Zt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+me(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Kt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Jt:n?(this.toWireType=Yt,this.destructorFunction=null):(this.toWireType=Zt,this.destructorFunction=null)}var re=[];function ne(t){var e=re[t];return e||(t>=re.length&&(re.length=t+1),re[t]=e=H.get(t)),e}function oe(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):ne(e).apply(null,r)}function ie(t,e){var r,n,o,i=(t=wt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),oe(r,n,o)}):ne(e);return"function"!=typeof i&&Tt("unknown function pointer with signature "+t+": "+e),i}var ae=void 0;function se(t){var e=Ve(t),r=wt(e);return Me(e),r}function ue(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||st[e]||(ut[e]?ut[e].forEach(t):(r.push(e),n[e]=!0))})),new ae(t+": "+r.map(se).join([", "]))}function ce(t,e){for(var r=[],n=0;n<t;n++)r.push(W[e+4*n>>2]);return r}function le(t,e,r,n,o){var i=e.length;i<2&&Tt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ft(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[Tt,n,o,ot,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=pt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var fe=[],pe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function he(t){t>4&&0==--pe[t].refcount&&(pe[t]=void 0,fe.push(t))}function de(){for(var t=0,e=5;e<pe.length;++e)void 0!==pe[e]&&++t;return t}function ve(){for(var t=5;t<pe.length;++t)if(void 0!==pe[t])return pe[t];return null}var ye={toValue:t=>(t||Tt("Cannot use deleted val. handle = "+t),pe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=fe.length?fe.pop():pe.length;return pe[e]={refcount:1,value:t},e}}};function me(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ge(t,e){switch(e){case 2:return function(t){return this.fromWireType(R[t>>2])};case 3:return function(t){return this.fromWireType(j[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function we(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return A[t]};case 1:return r?function(t){return E[t>>1]}:function(t){return k[t>>1]};case 2:return r?function(t){return S[t>>2]}:function(t){return W[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var be="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Te(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&k[n];)++n;if((r=n<<1)-t>32&&be)return be.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=E[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Ce(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);E[e>>1]=a,e+=2}return E[e>>1]=0,e-n}function $e(t){return 2*t.length}function Pe(t,e){for(var r=0,n="";!(r>=e/4);){var o=S[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function _e(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),S[e>>2]=a,(e+=4)+4>o)break}return S[e>>2]=0,e-n}function Ae(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Ee={};function ke(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Se(t,e){var r=st[t];return void 0===r&&Tt(e+" has unknown type "+se(t)),r}var We={};function Re(t){try{return C.grow(t-P.byteLength+65535>>>16),I(C.buffer),1}catch(t){}}var je={};function Fe(){if(!Fe.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in je)void 0===je[e]?delete t[e]:t[e]=je[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Fe.strings=r}return Fe.strings}var Oe=function(t,e){var r;r=t,L()||(i.onExit&&i.onExit(r),F=!0),p(r,new tt(r))},xe=[null,[],[]];function De(t,e){var r=xe[t];0===e||10===e?((1===t?b:T)(x(r,0)),r.length=0):r.push(e)}dt=i.InternalError=ht(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);gt=t}(),bt=i.BindingError=ht(Error,"BindingError"),Bt.prototype.isAliasOf=$t,Bt.prototype.clone=Vt,Bt.prototype.delete=zt,Bt.prototype.isDeleted=Lt,Bt.prototype.deleteLater=Nt,i.getInheritedInstanceCount=Wt,i.getLiveInheritedInstances=Rt,i.flushPendingDeletes=Ft,i.setDelayFunction=xt,ee.prototype.getPointee=Qt,ee.prototype.destructor=Kt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=it,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Ht,ae=i.UnboundTypeError=ht(Error,"UnboundTypeError"),i.count_emval_handles=de,i.get_first_emval=ve;var Ue,Ie={g:function(t,e,r){throw new rt(t).init(e,r),t},A:function(t){var e=nt[t];delete nt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;yt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),ot(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:it,destructorFunction:n}]}))},w:function(t,e,r,n,o){},F:function(t,e,r,n,o){var i=mt(r);Ct(t,{name:e=wt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_;else if(2===r)n=E;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=S}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=wt(f),a=ie(o,a),u&&(u=ie(s,u)),l&&(l=ie(c,l)),h=ie(p,h);var d=ft(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&Tt("Cannot register public name '"+t+"' twice"),qt(i,t,t),i.hasOwnProperty(r)&&Tt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){ue("Cannot construct "+f+" due to unbound types",[n])})),yt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Bt.prototype;var s=pt(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new bt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new bt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new bt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Gt(f,s,c,h,r,a,u,l),v=new ee(f,p,!0,!1,!1),y=new ee(f+"*",p,!1,!1,!1),m=new ee(f+" const*",p,!1,!0,!1);return St[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||vt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},t:function(t,e,r,n,o,i){var a;e>0||G(a);var s=ce(e,r);o=ie(n,o),yt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new bt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ue("Cannot construct "+t.name+" due to unbound types",s)},yt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=le(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ce(r,n);e=wt(e),i=ie(o,i),yt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ue("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(qt(c,e,n),c[e].overloadTable[r-2]=o),yt([],u,(function(o){var s=le(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},E:function(t,e){Ct(t,{name:e=wt(e),fromWireType:function(t){var e=ye.toValue(t);return he(t),e},toWireType:function(t,e){return ye.toHandle(e)},argPackAdvance:8,readValueFromPointer:it,destructorFunction:null})},m:function(t,e,r){var n=mt(r);Ct(t,{name:e=wt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ge(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=wt(e),-1===o&&(o=4294967295);var i=mt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Ct(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:we(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=W,r=e[t>>=2],o=e[t+1];return new n(P,o,r)}Ct(t,{name:r=wt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=wt(e));Ct(t,{name:e,fromWireType:function(t){var e,n=W[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==A[s]){var u=D(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(A[o+a]);e=c.join("")}return Me(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Tt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=He(4+n+1),a=i+4;if(W[i>>2]=n,r&&o)U(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Me(a),Tt("String has UTF-16 code units that do not fit in 8 bits")),A[a+s]=u}else for(s=0;s<n;++s)A[a+s]=e[s];return null!==t&&t.push(Me,i),i},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Me(t)}})},h:function(t,e,r){var n,o,i,a,s;r=wt(r),2===e?(n=Te,o=Ce,a=$e,i=()=>k,s=1):4===e&&(n=Pe,o=_e,a=Ae,i=()=>W,s=2),Ct(t,{name:r,fromWireType:function(t){for(var r,o=W[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Me(t),r},toWireType:function(t,n){"string"!=typeof n&&Tt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=He(4+i+e);return W[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Me,u),u},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Me(t)}})},J:function(t,e,r,n,o,i){nt[t]={name:wt(e),rawConstructor:ie(r,n),rawDestructor:ie(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){nt[t].fields.push({fieldName:wt(e),getterReturnType:r,getter:ie(n,o),getterContext:i,setterArgumentType:a,setter:ie(s,u),setterContext:c})},G:function(t,e){Ct(t,{isVoid:!0,name:e=wt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:he,r:function(t){return 0===t?ye.toHandle(ke()):(t=void 0===(r=Ee[e=t])?wt(e):r,ye.toHandle(ke()[t]));var e,r},p:function(t){t>4&&(pe[t].refcount+=1)},q:function(t,e,r,n){t=ye.toValue(t);var o=We[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Se,i,ye.toHandle,(()=>W))}(e),We[e]=o),o(t,r,n)},s:function(t,e){var r=(t=Se(t,"_emval_take_value")).readValueFromPointer(e);return ye.toHandle(r)},j:function(){G("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r,n=A.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Re(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},z:function(t,e){var r=0;return Fe().forEach((function(n,o){var i=e+r;W[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)_[0|e++]=t.charCodeAt(n);r||(_[0|e]=0)}(n,i),r+=n.length+1})),0},B:function(t,e){var r=Fe();W[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),W[e>>2]=n,0},I:Oe,C:function(t){return 52},v:function(t,e,r,n,o){return 70},k:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=W[e>>2],s=W[e+4>>2];e+=8;for(var u=0;u<s;u++)De(t,A[a+u]);o+=s}return W[n>>2]=o,0},o:function(t,e){var r=Le();try{return ne(t)(e)}catch(t){if(Ne(r),t!==t+0)throw t;ze(1,0)}},n:function(t,e,r){var n=Le();try{return ne(t)(e,r)}catch(t){if(Ne(n),t!==t+0)throw t;ze(1,0)}},H:function(t,e,r,n){var o=Le();try{return ne(t)(e,r,n)}catch(t){if(Ne(o),t!==t+0)throw t;ze(1,0)}},f:function(t,e){var r=Le();try{ne(t)(e)}catch(t){if(Ne(r),t!==t+0)throw t;ze(1,0)}},e:function(t,e,r,n){var o=Le();try{ne(t)(e,r,n)}catch(t){if(Ne(o),t!==t+0)throw t;ze(1,0)}}},He=(function(){var t={a:Ie};function e(t,e){var r,n=t.exports;i.asm=n,I((C=i.asm.K).buffer),H=i.asm.M,r=i.asm.L,V.unshift(r),function(){if(N--,i.monitorRunDependencies&&i.monitorRunDependencies(N),0==N&&(null!==B&&(clearInterval(B),B=null),q)){var t=q;q=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(h||d)){if("function"==typeof fetch&&!Q(X))return fetch(X,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+X+"'";return t.arrayBuffer()})).catch((function(){return K(X)}));if(s)return new Promise((function(t,e){s(X,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return K(X)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),G(t)}))}if(N++,i.monitorRunDependencies&&i.monitorRunDependencies(N),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){T("Module.instantiateWasm callback failed with error: "+t),o(t)}(w||"function"!=typeof WebAssembly.instantiateStreaming||Z(X)||Q(X)||v||"function"!=typeof fetch?n(r):fetch(X,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return T("wasm streaming compile failed: "+t),T("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.L).apply(null,arguments)},i._malloc=function(){return(He=i._malloc=i.asm.N).apply(null,arguments)}),Me=i._free=function(){return(Me=i._free=i.asm.O).apply(null,arguments)},Ve=i.___getTypeName=function(){return(Ve=i.___getTypeName=i.asm.P).apply(null,arguments)},ze=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(ze=i._setThrew=i.asm.R).apply(null,arguments)}),Le=i.stackSave=function(){return(Le=i.stackSave=i.asm.S).apply(null,arguments)},Ne=i.stackRestore=function(){return(Ne=i.stackRestore=i.asm.T).apply(null,arguments)},Be=i.stackAlloc=function(){return(Be=i.stackAlloc=i.asm.U).apply(null,arguments)},qe=i.___cxa_is_pointer_type=function(){return(qe=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Ge(t){function r(){Ue||(Ue=!0,i.calledRun=!0,F||(et(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),z.unshift(t);var t;et(z)}()))}t=t||l,N>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),M.unshift(t);var t;et(M)}(),N>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.W).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);U(t,e=Be(r),r)}return e},array:t=>{var e=Be(t.length);return function(t,e){_.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Le()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ne(c),function(t){return"string"===e?D(t):"boolean"===e?Boolean(t):t}(t)}(p)},q=function t(){Ue||Ge(),Ue||(q=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ge(),t.ready});t.exports=o},272:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p="object"==typeof window,h="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(d){var y=r(261),m=r(926);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=Y(t)?new URL(t):m.normalize(t),y.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Y(t)?new URL(t):m.normalize(t),y.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Z))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},h&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var g,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary);var T;i.noExitRuntime;"object"!=typeof WebAssembly&&N("no native wasm support detected");var C,$,P,_,A,E,k,S,W,R=!1,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&j)return j.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function O(t,e){return t?F(P,t,e):""}function x(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function D(t){C=t,i.HEAP8=$=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=E=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=k=new Uint32Array(t),i.HEAPF32=S=new Float32Array(t),i.HEAPF64=W=new Float64Array(t)}i.INITIAL_MEMORY;var U,I=[],H=[],M=[],V=0,z=null,L=null;function N(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),R=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var B,q,G="data:application/octet-stream;base64,";function X(t){return t.startsWith(G)}function Y(t){return t.startsWith("file://")}function J(t){try{if(t==B&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){N(t)}}function Z(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Q(t){for(;t.length>0;)t.shift()(i)}function K(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){k[this.ptr+4>>2]=t},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(t){k[this.ptr+8>>2]=t},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(t){E[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,$[this.ptr+12|0]=t},this.get_caught=function(){return 0!=$[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,$[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=$[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=E[this.ptr>>2];E[this.ptr>>2]=t+1},this.release_ref=function(){var t=E[this.ptr>>2];return E[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){k[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ve(this.get_type()))return k[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}X(B="openjpegwasm_decode.wasm")||(q=B,B=i.locateFile?i.locateFile(q,v):v+q);var tt={};function et(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function rt(t){return this.fromWireType(E[t>>2])}var nt={},ot={},it={},at=48,st=57;function ut(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=at&&e<=st?"_"+t:t}function ct(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function lt(t,e){var r=ct(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ft=void 0;function pt(t){throw new ft(t)}function ht(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var o=0;o<t.length;++o)wt(t[o],n[o])}t.forEach((function(t){it[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{ot.hasOwnProperty(t)?o[e]=ot[t]:(i.push(t),nt.hasOwnProperty(t)||(nt[t]=[]),nt[t].push((()=>{o[e]=ot[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function dt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var vt=void 0;function yt(t){for(var e="",r=t;P[r];)e+=vt[P[r++]];return e}var mt=void 0;function gt(t){throw new mt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||gt('type "'+n+'" must have a positive integer typeid pointer'),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;gt("Cannot register type '"+n+"' twice")}if(ot[t]=e,delete it[t],nt.hasOwnProperty(t)){var o=nt[t];delete nt[t],o.forEach((t=>t()))}}function bt(t){if(!(this instanceof zt))return!1;if(!(t instanceof zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Tt(t){gt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Ct=!1;function $t(t){}function Pt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function _t(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=_t(t,e,r.baseClass);return null===n?null:r.downcast(n)}var At={};function Et(){return Object.keys(Ft).length}function kt(){var t=[];for(var e in Ft)Ft.hasOwnProperty(e)&&t.push(Ft[e]);return t}var St=[];function Wt(){for(;St.length;){var t=St.pop();t.$$.deleteScheduled=!1,t.delete()}}var Rt=void 0;function jt(t){Rt=t,St.length&&Rt&&Rt(Wt)}var Ft={};function Ot(t,e){return e=function(t,e){for(void 0===e&>("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ft[e]}function xt(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ut(Object.create(t,{$$:{value:e}}))}function Dt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ot(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=At[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=_t(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ut(t){return"undefined"==typeof FinalizationRegistry?(Ut=t=>t,t):(Ct=new FinalizationRegistry((t=>{Pt(t.$$)})),Ut=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Ct.register(t,r,t)}return t},$t=t=>Ct.unregister(t),Ut(t))}function It(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ut(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ht(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),$t(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Mt(){return!this.$$.ptr}function Vt(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),St.push(this),1===St.length&&Rt&&Rt(Wt),this.$$.deleteScheduled=!0,this}function zt(){}function Lt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||gt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Nt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Bt(t,e,r){for(;e!==r;)e.upcast||gt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function qt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Gt(t,e){var r;if(null===e)return this.isReference&>("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&>("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Bt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:gt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,he.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:gt("Unsupporting sharing policy")}return r}function Xt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&>("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Yt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Zt(t){null!==t&&t.delete()}function Qt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Gt:n?(this.toWireType=qt,this.destructorFunction=null):(this.toWireType=Xt,this.destructorFunction=null)}var Kt=[];function te(t){var e=Kt[t];return e||(t>=Kt.length&&(Kt.length=t+1),Kt[t]=e=U.get(t)),e}function ee(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):te(e).apply(null,r)}function re(t,e){var r,n,o,i=(t=yt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ee(r,n,o)}):te(e);return"function"!=typeof i&>("unknown function pointer with signature "+t+": "+e),i}var ne=void 0;function oe(t){var e=Ue(t),r=yt(e);return De(e),r}function ie(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||ot[e]||(it[e]?it[e].forEach(t):(r.push(e),n[e]=!0))})),new ne(t+": "+r.map(oe).join([", "]))}function ae(t,e){for(var r=[],n=0;n<t;n++)r.push(k[e+4*n>>2]);return r}function se(t,e,r,n,o){var i=e.length;i<2&>("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ut(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[gt,n,o,et,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ct(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var ue=[],ce=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function le(t){t>4&&0==--ce[t].refcount&&(ce[t]=void 0,ue.push(t))}function fe(){for(var t=0,e=5;e<ce.length;++e)void 0!==ce[e]&&++t;return t}function pe(){for(var t=5;t<ce.length;++t)if(void 0!==ce[t])return ce[t];return null}var he={toValue:t=>(t||gt("Cannot use deleted val. handle = "+t),ce[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=ue.length?ue.pop():ce.length;return ce[e]={refcount:1,value:t},e}}};function de(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ve(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(W[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ye(t,e,r){switch(e){case 0:return r?function(t){return $[t]}:function(t){return P[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return E[t>>2]}:function(t){return k[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var me="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ge(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&me)return me.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=_[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function we(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);_[e>>1]=a,e+=2}return _[e>>1]=0,e-n}function be(t){return 2*t.length}function Te(t,e){for(var r=0,n="";!(r>=e/4);){var o=E[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Ce(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),E[e>>2]=a,(e+=4)+4>o)break}return E[e>>2]=0,e-n}function $e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Pe={};function _e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(t,e){var r=ot[t];return void 0===r&>(e+" has unknown type "+oe(t)),r}var Ee={};function ke(t){try{return T.grow(t-C.byteLength+65535>>>16),D(T.buffer),1}catch(t){}}var Se={};function We(){if(!We.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Se)void 0===Se[e]?delete t[e]:t[e]=Se[e];var r=[];for(var e in t)r.push(e+"="+t[e]);We.strings=r}return We.strings}var Re=[null,[],[]];function je(t,e){var r=Re[t];0===e||10===e?((1===t?w:b)(F(r,0)),r.length=0):r.push(e)}ft=i.InternalError=lt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);vt=t}(),mt=i.BindingError=lt(Error,"BindingError"),zt.prototype.isAliasOf=bt,zt.prototype.clone=It,zt.prototype.delete=Ht,zt.prototype.isDeleted=Mt,zt.prototype.deleteLater=Vt,i.getInheritedInstanceCount=Et,i.getLiveInheritedInstances=kt,i.flushPendingDeletes=Wt,i.setDelayFunction=jt,Qt.prototype.getPointee=Yt,Qt.prototype.destructor=Jt,Qt.prototype.argPackAdvance=8,Qt.prototype.readValueFromPointer=rt,Qt.prototype.deleteObject=Zt,Qt.prototype.fromWireType=Dt,ne=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=fe,i.get_first_emval=pe;var Fe,Oe={D:function(t,e,r){throw new K(t).init(e,r),t},e:function(t){var e=tt[t];delete tt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;ht([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),et(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:n}]}))},t:function(t,e,r,n,o){},B:function(t,e,r,n,o){var i=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=$;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=E}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=yt(f),a=re(o,a),u&&(u=re(s,u)),l&&(l=re(c,l)),h=re(p,h);var d=ut(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&>("Cannot register public name '"+t+"' twice"),Lt(i,t,t),i.hasOwnProperty(r)&>("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){ie("Cannot construct "+f+" due to unbound types",[n])})),ht([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:zt.prototype;var s=ct(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new mt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new mt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new mt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Nt(f,s,c,h,r,a,u,l),v=new Qt(f,p,!0,!1,!1),y=new Qt(f+"*",p,!1,!1,!1),m=new Qt(f+" const*",p,!1,!0,!1);return At[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},q:function(t,e,r,n,o,i){var a;e>0||N(a);var s=ae(e,r);o=re(n,o),ht([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new mt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ie("Cannot construct "+t.name+" due to unbound types",s)},ht([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=se(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=ae(r,n);e=yt(e),i=re(o,i),ht([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ie("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Lt(c,e,n),c[e].overloadTable[r-2]=o),ht([],u,(function(o){var s=se(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},A:function(t,e){wt(t,{name:e=yt(e),fromWireType:function(t){var e=he.toValue(t);return le(t),e},toWireType:function(t,e){return he.toHandle(e)},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:null})},l:function(t,e,r){var n=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ve(e,n),destructorFunction:null})},d:function(t,e,r,n,o){e=yt(e),-1===o&&(o=4294967295);var i=dt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");wt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ye(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=k,r=e[t>>=2],o=e[t+1];return new n(C,o,r)}wt(t,{name:r=yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=yt(e));wt(t,{name:e,fromWireType:function(t){var e,n=k[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=O(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return De(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||gt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=xe(4+n+1),a=i+4;if(k[i>>2]=n,r&&o)x(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(De(a),gt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(De,i),i},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){De(t)}})},f:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=ge,o=we,a=be,i=()=>A,s=1):4===e&&(n=Te,o=Ce,a=$e,i=()=>k,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=k[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return De(t),r},toWireType:function(t,n){"string"!=typeof n&>("Cannot pass non-string to C++ string type "+r);var i=a(n),u=xe(4+i+e);return k[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(De,u),u},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){De(t)}})},g:function(t,e,r,n,o,i){tt[t]={name:yt(e),rawConstructor:re(r,n),rawDestructor:re(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){tt[t].fields.push({fieldName:yt(e),getterReturnType:r,getter:re(n,o),getterContext:i,setterArgumentType:a,setter:re(s,u),setterContext:c})},C:function(t,e){wt(t,{isVoid:!0,name:e=yt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:le,o:function(t){return 0===t?he.toHandle(_e()):(t=void 0===(r=Pe[e=t])?yt(e):r,he.toHandle(_e()[t]));var e,r},m:function(t){t>4&&(ce[t].refcount+=1)},n:function(t,e,r,n){t=he.toValue(t);var o=Ee[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Ae,i,he.toHandle,(()=>k))}(e),Ee[e]=o),o(t,r,n)},p:function(t,e){var r=(t=Ae(t,"_emval_take_value")).readValueFromPointer(e);return he.toHandle(r)},i:function(){N("")},v:function(){return 2147483648},z:function(t,e,r){P.copyWithin(t,e,e+r)},u:function(t){var e,r,n=P.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ke(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},w:function(t,e){var r=0;return We().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)$[0|e++]=t.charCodeAt(n);r||($[0|e]=0)}(n,i),r+=n.length+1})),0},x:function(t,e){var r=We();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0},y:function(t){return 52},s:function(t,e,r,n,o){return 70},j:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;for(var u=0;u<s;u++)je(t,P[a+u]);o+=s}return k[n>>2]=o,0}},xe=(function(){var t={a:Oe};function e(t,e){var r,n=t.exports;i.asm=n,D((T=i.asm.E).buffer),U=i.asm.G,r=i.asm.F,H.unshift(r),function(){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==z&&(clearInterval(z),z=null),L)){var t=L;L=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(p||h)){if("function"==typeof fetch&&!Y(B))return fetch(B,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+B+"'";return t.arrayBuffer()})).catch((function(){return J(B)}));if(s)return new Promise((function(t,e){s(B,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return J(B)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),N(t)}))}if(V++,i.monitorRunDependencies&&i.monitorRunDependencies(V),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){b("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||X(B)||Y(B)||d||"function"!=typeof fetch?n(r):fetch(B,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.F).apply(null,arguments)},i._malloc=function(){return(xe=i._malloc=i.asm.H).apply(null,arguments)}),De=i._free=function(){return(De=i._free=i.asm.I).apply(null,arguments)},Ue=i.___getTypeName=function(){return(Ue=i.___getTypeName=i.asm.J).apply(null,arguments)},Ie=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(Ie=i.stackSave=i.asm.L).apply(null,arguments)}),He=i.stackRestore=function(){return(He=i.stackRestore=i.asm.M).apply(null,arguments)},Me=i.stackAlloc=function(){return(Me=i.stackAlloc=i.asm.N).apply(null,arguments)},Ve=i.___cxa_is_pointer_type=function(){return(Ve=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function ze(t){function r(){Fe||(Fe=!0,i.calledRun=!0,R||(Q(H),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),M.unshift(t);var t;Q(M)}()))}t=t||l,V>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),I.unshift(t);var t;Q(I)}(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_iji=function(){return(i.dynCall_iji=i.asm.P).apply(null,arguments)},i.dynCall_jji=function(){return(i.dynCall_jji=i.asm.Q).apply(null,arguments)},i.dynCall_iiji=function(){return(i.dynCall_iiji=i.asm.R).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.S).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);x(t,e=Me(r),r)}return e},array:t=>{var e=Me(t.length);return function(t,e){$.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Ie()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&He(c),function(t){return"string"===e?O(t):"boolean"===e?Boolean(t):t}(t)}(p)},L=function t(){Fe||ze(),Fe||(L=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ze(),t.ready});t.exports=o},430:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){e=t,o=r}));var i,a,s,u=Object.assign({},t),c=[],l="object"==typeof window,f="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(p){var d=r(280),v=r(103);h=f?v.dirname(h)+"/":"//",i=(t,e)=>(t=G(t)?new URL(t):v.normalize(t),d.readFileSync(t,e?void 0:"utf8")),s=t=>{var e=i(t,!0);return e.buffer||(e=new Uint8Array(e)),e},a=(t,e,r)=>{t=G(t)?new URL(t):v.normalize(t),d.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Y))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},f&&(s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,m=t.print||console.log.bind(console),g=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&(c=t.arguments),t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(y=t.wasmBinary);var w;t.noExitRuntime;"object"!=typeof WebAssembly&&z("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function j(t,e){return t?R(C,t,e):""}function F(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function O(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=$=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=C=new Uint8Array(e),t.HEAPU16=P=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=E=new Float32Array(e),t.HEAPF64=k=new Float64Array(e)}t.INITIAL_MEMORY;var x,D=[],U=[],I=[],H=0,M=null,V=null;function z(e){t.onAbort&&t.onAbort(e),g(e="Aborted("+e+")"),S=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var L,N,B="data:application/octet-stream;base64,";function q(t){return t.startsWith(B)}function G(t){return t.startsWith("file://")}function X(t){try{if(t==L&&y)return new Uint8Array(y);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function Y(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function J(e){for(;e.length>0;)e.shift()(t)}q(L="openjphjs.wasm")||(N=L,L=t.locateFile?t.locateFile(N,h):h+N);var Z=[],Q=0,K=[];function tt(t){var e=K[t];return e||(t>=K.length&&(K.length=t+1),K[t]=e=x.get(t)),e}function et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Me(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(_[t>>2])}var it={},at={},st={},ut=48,ct=57;function lt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ut&&e<=ct?"_"+t:t}function ft(t,e){return t=lt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function pt(t,e){var r=ft(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ht=void 0;function dt(t){throw new ht(t)}function vt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&dt("Mismatched type converter count");for(var o=0;o<t.length;++o)Tt(t[o],n[o])}t.forEach((function(t){st[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{at.hasOwnProperty(t)?o[e]=at[t]:(i.push(t),it.hasOwnProperty(t)||(it[t]=[]),it[t].push((()=>{o[e]=at[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function yt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var mt=void 0;function gt(t){for(var e="",r=t;C[r];)e+=mt[C[r++]];return e}var wt=void 0;function bt(t){throw new wt(t)}function Tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||bt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;bt("Cannot register type '"+n+"' twice")}if(at[t]=e,delete st[t],it.hasOwnProperty(t)){var o=it[t];delete it[t],o.forEach((t=>t()))}}function Ct(t){if(!(this instanceof Nt))return!1;if(!(t instanceof Nt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function $t(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Pt=!1;function _t(t){}function At(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Et(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Et(t,e,r.baseClass);return null===n?null:r.downcast(n)}var kt={};function St(){return Object.keys(xt).length}function Wt(){var t=[];for(var e in xt)xt.hasOwnProperty(e)&&t.push(xt[e]);return t}var Rt=[];function jt(){for(;Rt.length;){var t=Rt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ft=void 0;function Ot(t){Ft=t,Rt.length&&Ft&&Ft(jt)}var xt={};function Dt(t,e){return e=function(t,e){for(void 0===e&&bt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),xt[e]}function Ut(t,e){return e.ptrType&&e.ptr||dt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&dt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ht(Object.create(t,{$$:{value:e}}))}function It(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Dt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Ut(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ut(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=kt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Et(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ht(t){return"undefined"==typeof FinalizationRegistry?(Ht=t=>t,t):(Pt=new FinalizationRegistry((t=>{At(t.$$)})),Ht=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Pt.register(t,r,t)}return t},_t=t=>Pt.unregister(t),Ht(t))}function Mt(){if(this.$$.ptr||$t(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ht(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Vt(){this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),_t(this),At(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function zt(){return!this.$$.ptr}function Lt(){return this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Rt.push(this),1===Rt.length&&Ft&&Ft(jt),this.$$.deleteScheduled=!0,this}function Nt(){}function Bt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||bt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function qt(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&bt("Cannot register public name '"+e+"' twice"),Bt(t,e,e),t.hasOwnProperty(n)&&bt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Xt(t,e,r){for(;e!==r;)e.upcast||bt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Yt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Jt(t,e){var r;if(null===e)return this.isReference&&bt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Xt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ve.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function Zt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ye(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Xt(e.$$.ptr,r,this.registeredClass)}function Qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Kt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Jt:n?(this.toWireType=Yt,this.destructorFunction=null):(this.toWireType=Zt,this.destructorFunction=null)}function re(e,r,n){t.hasOwnProperty(e)||dt("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}function ne(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):tt(r).apply(null,n)}function oe(t,e){var r,n,o,i=(t=gt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ne(r,n,o)}):tt(e);return"function"!=typeof i&&bt("unknown function pointer with signature "+t+": "+e),i}var ie=void 0;function ae(t){var e=Oe(t),r=gt(e);return Fe(e),r}function se(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||at[e]||(st[e]?st[e].forEach(t):(r.push(e),n[e]=!0))})),new ie(t+": "+r.map(ae).join([", "]))}function ue(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ce(t,e,r,n,o){var i=e.length;i<2&&bt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+lt(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[bt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ft(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var le=[],fe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function pe(t){t>4&&0==--fe[t].refcount&&(fe[t]=void 0,le.push(t))}function he(){for(var t=0,e=5;e<fe.length;++e)void 0!==fe[e]&&++t;return t}function de(){for(var t=5;t<fe.length;++t)if(void 0!==fe[t])return fe[t];return null}var ve={toValue:t=>(t||bt("Cannot use deleted val. handle = "+t),fe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=le.length?le.pop():fe.length;return fe[e]={refcount:1,value:t},e}}};function ye(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function me(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ge(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var we="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function be(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&we)return we.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function Ce(t){return 2*t.length}function $e(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Pe(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function _e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function Ae(t){try{return w.grow(t-b.byteLength+65535>>>16),O(w.buffer),1}catch(t){}}var Ee=[null,[],[]];function ke(t,e){var r=Ee[t];0===e||10===e?((1===t?m:g)(R(r,0)),r.length=0):r.push(e)}ht=t.InternalError=pt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);mt=t}(),wt=t.BindingError=pt(Error,"BindingError"),Nt.prototype.isAliasOf=Ct,Nt.prototype.clone=Mt,Nt.prototype.delete=Vt,Nt.prototype.isDeleted=zt,Nt.prototype.deleteLater=Lt,t.getInheritedInstanceCount=St,t.getLiveInheritedInstances=Wt,t.flushPendingDeletes=jt,t.setDelayFunction=Ot,ee.prototype.getPointee=Qt,ee.prototype.destructor=Kt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=ot,ee.prototype.deleteObject=te,ee.prototype.fromWireType=It,ie=t.UnboundTypeError=pt(Error,"UnboundTypeError"),t.count_emval_handles=he,t.get_first_emval=de;var Se,We={L:function(t){var e=new et(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),Z.push(e),function(t){t.add_ref()}(e),e.get_exception_ptr()},v:function(){_setThrew(0),function(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&tt(e)(t.excPtr),je(t.excPtr)}}(Z.pop()),Q=0},c:function(){var t=Q;if(!t)return xe(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return xe(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return xe(o),t}return xe(r),t},k:function(){var t=Q;if(!t)return xe(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return xe(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return xe(o),t}return xe(r),t},i:function(t,e,r){throw new et(t).init(e,r),Q=t,t},f:function(t){throw Q||(Q=t),t},A:function(t){var e=rt[t];delete rt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;vt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),nt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:n}]}))},D:function(t,e,r,n,o){},I:function(t,e,r,n,o){var i=yt(r);Tt(t,{name:e=gt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},y:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=gt(l),i=oe(o,i),s&&(s=oe(a,s)),c&&(c=oe(u,c)),p=oe(f,p);var h=lt(l);qt(h,(function(){se("Cannot construct "+l+" due to unbound types",[n])})),vt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Nt.prototype;var a=ft(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new wt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new wt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new wt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Gt(l,a,u,p,r,i,s,c),d=new ee(l,f,!0,!1,!1),v=new ee(l+"*",f,!1,!1,!1),y=new ee(l+" const*",f,!1,!0,!1);return kt[t]={pointerType:v,constPointerType:y},re(h,a),[d,v,y]}))},x:function(t,e,r,n,o,i){var a;e>0||z(a);var s=ue(e,r);o=oe(n,o),vt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new wt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{se("Cannot construct "+t.name+" due to unbound types",s)},vt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ce(r,n,null,o,i),[]})),[]}))},a:function(t,e,r,n,o,i,a,s){var u=ue(r,n);e=gt(e),i=oe(o,i),vt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){se("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Bt(c,e,n),c[e].overloadTable[r-2]=o),vt([],u,(function(o){var s=ce(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},H:function(t,e){Tt(t,{name:e=gt(e),fromWireType:function(t){var e=ve.toValue(t);return pe(t),e},toWireType:function(t,e){return ve.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},u:function(t,e,r){var n=yt(r);Tt(t,{name:e=gt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:me(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=ue(e,r);t=gt(t),o=oe(n,o),qt(t,(function(){se("Cannot call "+t+" due to unbound types",a)}),e-1),vt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return re(t,ce(t,n,null,o,i),e-1),[]}))},h:function(t,e,r,n,o){e=gt(e),-1===o&&(o=4294967295);var i=yt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Tt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ge(e,i,0!==n),destructorFunction:null})},d:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}Tt(t,{name:r=gt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=gt(e));Tt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=j(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return Fe(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||bt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=Re(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)F(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Fe(a),bt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(Fe,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},q:function(t,e,r){var n,o,i,a,s;r=gt(r),2===e?(n=be,o=Te,a=Ce,i=()=>P,s=1):4===e&&(n=$e,o=Pe,a=_e,i=()=>A,s=2),Tt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Fe(t),r},toWireType:function(t,n){"string"!=typeof n&&bt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Re(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Fe,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},p:function(t,e,r,n,o,i){rt[t]={name:gt(e),rawConstructor:oe(r,n),rawDestructor:oe(o,i),fields:[]}},B:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:gt(e),getterReturnType:r,getter:oe(n,o),getterContext:i,setterArgumentType:a,setter:oe(s,u),setterContext:c})},J:function(t,e){Tt(t,{isVoid:!0,name:e=gt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},N:pe,O:function(t){t>4&&(fe[t].refcount+=1)},n:function(t,e){var r,n,o;n="_emval_take_value",void 0===(o=at[r=t])&&bt(n+" has unknown type "+ae(r));var i=(t=o).readValueFromPointer(e);return ve.toHandle(i)},r:function(){z("")},G:function(t,e,r){C.copyWithin(t,e,e+r)},E:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Ae(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},F:function(t){return 52},C:function(t,e,r,n,o){return 70},s:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)ke(t,C[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=De();try{return tt(t)(e)}catch(t){if(Ue(r),t!==t+0)throw t;_setThrew(1,0)}},z:function(t,e,r){var n=De();try{return tt(t)(e,r)}catch(t){if(Ue(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=De();try{return tt(t)(e,r,n)}catch(t){if(Ue(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=De();try{tt(t)(e)}catch(t){if(Ue(r),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r){var n=De();try{tt(t)(e,r)}catch(t){if(Ue(n),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n){var o=De();try{tt(t)(e,r,n)}catch(t){if(Ue(o),t!==t+0)throw t;_setThrew(1,0)}},j:function(t,e,r,n,o){var i=De();try{tt(t)(e,r,n,o)}catch(t){if(Ue(i),t!==t+0)throw t;_setThrew(1,0)}},K:function(t,e,r,n,o,i,a){var s=De();try{tt(t)(e,r,n,o,i,a)}catch(t){if(Ue(s),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=De();try{tt(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Ue(f),t!==t+0)throw t;_setThrew(1,0)}},M:function(t){return t}},Re=(function(){var e={a:We};function r(e,r){var n,o=e.exports;t.asm=o,O((w=t.asm.P).buffer),x=t.asm.T,n=t.asm.Q,U.unshift(n),function(){if(H--,t.monitorRunDependencies&&t.monitorRunDependencies(H),0==H&&(null!==M&&(clearInterval(M),M=null),V)){var e=V;V=null,e()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!y&&(l||f)){if("function"==typeof fetch&&!G(L))return fetch(L,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+L+"'";return t.arrayBuffer()})).catch((function(){return X(L)}));if(a)return new Promise((function(t,e){a(L,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return X(L)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){g("failed to asynchronously prepare wasm: "+t),z(t)}))}if(H++,t.monitorRunDependencies&&t.monitorRunDependencies(H),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(y||"function"!=typeof WebAssembly.instantiateStreaming||q(L)||G(L)||p||"function"!=typeof fetch?i(n):fetch(L,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.Q).apply(null,arguments)},t._malloc=function(){return(Re=t._malloc=t.asm.R).apply(null,arguments)}),je=t.___cxa_free_exception=function(){return(je=t.___cxa_free_exception=t.asm.S).apply(null,arguments)},Fe=t._free=function(){return(Fe=t._free=t.asm.U).apply(null,arguments)},Oe=t.___getTypeName=function(){return(Oe=t.___getTypeName=t.asm.V).apply(null,arguments)},xe=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.W).apply(null,arguments)},t.setTempRet0=function(){return(xe=t.setTempRet0=t.asm.X).apply(null,arguments)}),De=t.stackSave=function(){return(De=t.stackSave=t.asm.Y).apply(null,arguments)},Ue=t.stackRestore=function(){return(Ue=t.stackRestore=t.asm.Z).apply(null,arguments)},Ie=t.stackAlloc=function(){return(Ie=t.stackAlloc=t.asm._).apply(null,arguments)},He=t.___cxa_can_catch=function(){return(He=t.___cxa_can_catch=t.asm.$).apply(null,arguments)},Me=t.___cxa_is_pointer_type=function(){return(Me=t.___cxa_is_pointer_type=t.asm.aa).apply(null,arguments)};function Ve(r){function n(){Se||(Se=!0,t.calledRun=!0,S||(J(U),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),I.unshift(e);var e;J(I)}()))}r=r||c,H>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),D.unshift(e);var e;J(D)}(),H>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),n()}),1)):n()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.ba).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.ca).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.da).apply(null,arguments)},t.ccall=function(e,r,n,o,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);F(t,e=Ie(r),r)}return e},array:t=>{var e=Ie(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(e){return t["_"+e]}(e),u=[],c=0;if(o)for(var l=0;l<o.length;l++){var f=a[n[l]];f?(0===c&&(c=De()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ue(c),function(t){return"string"===r?j(t):"boolean"===r?Boolean(t):t}(t)}(p)},V=function t(){Se||Ve(),Se||(V=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Ve(),t.ready});t.exports=o},69:(t,e,r)=>{"use strict";t.exports=r.p+"5004fdc02f329ce53b69.wasm"},427:(t,e,r)=>{"use strict";t.exports=r.p+"c22b37c3488e1d6c3aa4.wasm"},699:(t,e,r)=>{"use strict";t.exports=r.p+"031089e563a18ada8441.wasm"},813:(t,e,r)=>{"use strict";t.exports=r.p+"20fc4c659b85ccd2a9c0.wasm"},635:(t,e,r)=>{"use strict";r.d(e,{Jj:()=>l});const n=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),u=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>u(t)&&t[n],serialize(t){const{port1:e,port2:r}=new MessageChannel;return l(t,e),[r,[r]]},deserialize(t){return t.start(),y(t,[],e);var e}}],["throw",{canHandle:t=>u(t)&&s in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function l(t,e=globalThis,r=["*"]){e.addEventListener("message",(function o(i){if(!i||!i.data)return;if(!function(t,e){for(const r of t){if(e===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}return!1}(r,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:u,type:c,path:p}=Object.assign({path:[]},i.data),h=(i.data.argumentList||[]).map(b);let d;try{const e=p.slice(0,-1).reduce(((t,e)=>t[e]),t),r=p.reduce(((t,e)=>t[e]),t);switch(c){case"GET":d=r;break;case"SET":e[p.slice(-1)[0]]=b(i.data.value),d=!0;break;case"APPLY":d=r.apply(e,h);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[n]:!0})}(new r(...h));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;l(t,r),d=function(t,e){return g.set(t,e),t}(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(t){d={value:t,[s]:0}}Promise.resolve(d).catch((t=>({value:t,[s]:0}))).then((r=>{const[n,i]=w(r);e.postMessage(Object.assign(Object.assign({},n),{id:u}),i),"RELEASE"===c&&(e.removeEventListener("message",o),f(e),a in t&&"function"==typeof t[a]&&t[a]())})).catch((t=>{const[r,n]=w({value:new TypeError("Unserializable return value"),[s]:0});e.postMessage(Object.assign(Object.assign({},r),{id:u}),n)}))})),e.start&&e.start()}function f(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function p(t){if(t)throw new Error("Proxy has been released and is not useable")}function h(t){return T(t,{type:"RELEASE"}).then((()=>{f(t)}))}const d=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(d.get(t)||0)-1;d.set(t,e),0===e&&h(t)}));function y(t,e=[],r=function(){}){let n=!1;const a=new Proxy(r,{get(r,o){if(p(n),o===i)return()=>{!function(t){v&&v.unregister(t)}(a),h(t),n=!0};if("then"===o){if(0===e.length)return{then:()=>a};const r=T(t,{type:"GET",path:e.map((t=>t.toString()))}).then(b);return r.then.bind(r)}return y(t,[...e,o])},set(r,o,i){p(n);const[a,s]=w(i);return T(t,{type:"SET",path:[...e,o].map((t=>t.toString())),value:a},s).then(b)},apply(r,i,a){p(n);const s=e[e.length-1];if(s===o)return T(t,{type:"ENDPOINT"}).then(b);if("bind"===s)return y(t,e.slice(0,-1));const[u,c]=m(a);return T(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:u},c).then(b)},construct(r,o){p(n);const[i,a]=m(o);return T(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:i},a).then(b)}});return function(t,e){const r=(d.get(e)||0)+1;d.set(e,r),v&&v.register(t,e,t)}(a,t),a}function m(t){const e=t.map(w);return[e.map((t=>t[0])),(r=e.map((t=>t[1])),Array.prototype.concat.apply([],r))];var r}const g=new WeakMap;function w(t){for(const[e,r]of c)if(r.canHandle(t)){const[n,o]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},o]}return[{type:"RAW",value:t},g.get(t)||[]]}function b(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function T(t,e,r){return new Promise((n=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.addEventListener("message",(function e(r){r.data&&r.data.id&&r.data.id===o&&(t.removeEventListener("message",e),n(r.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:o},e),r)}))}}}]);
|
|
3
|
+
//# sourceMappingURL=958.min.js.map
|