scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.2
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/@types/barcode-scanner-view.d.ts +10 -10
- package/@types/consume-type.d.ts +7 -0
- package/@types/core/bridge/common.d.ts +24 -0
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +198 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +104 -0
- package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +186 -0
- package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +198 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +104 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +186 -0
- package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/utils.d.ts +7 -0
- package/@types/core/bridge/worker-bridge.d.ts +362 -0
- package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core.d.ts +75 -0
- package/@types/core-types.d.ts +23 -0
- package/@types/cropping-view.d.ts +4 -2
- package/@types/document-scanner-view.d.ts +5 -5
- package/@types/generic-document-recognizer-view.d.ts +22 -0
- package/@types/index.d.ts +12 -19
- package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
- package/@types/model/barcode/barcode-result.d.ts +6 -8
- package/@types/model/barcode/barcode.d.ts +3 -14
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +12 -8
- package/@types/model/configuration/cropping-view-configuration.d.ts +2 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +5 -20
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
- package/@types/model/configuration/initialization-options.d.ts +2 -1
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
- package/@types/model/configuration/scanner-configuration.d.ts +1 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
- package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
- package/@types/model/response/cropping-result.d.ts +2 -1
- package/@types/scanbot-sdk.d.ts +208 -29
- package/@types/service/document-quality-analyzer.d.ts +7 -5
- package/@types/service/generic-document-recognizer.d.ts +11 -0
- package/@types/service/ocr-engine.d.ts +8 -5
- package/@types/service/pdf-generator.d.ts +7 -95
- package/@types/service/public-utils.d.ts +1 -1
- package/@types/service/simple-mrz-recognizer.d.ts +5 -5
- package/@types/service/text-data-recognizer.d.ts +5 -4
- package/@types/service/tiff-generator.d.ts +12 -10
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeItem.d.ts +4 -28
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +12 -155
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +2 -18
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +6 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +0 -60
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +3 -0
- package/@types/ui2/configuration/CameraConfiguration.d.ts +22 -23
- package/@types/ui2/configuration/CameraPermission.d.ts +0 -15
- package/@types/ui2/configuration/Common.d.ts +0 -37
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +2 -2
- package/@types/ui2/configuration/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +1 -1
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +1 -1
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +0 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +6 -3
- package/@types/ui2/configuration.d.ts +1 -1
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +2 -1
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +2 -1
- package/@types/ui2/model/counted-barcodes.d.ts +13 -12
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/utils/barcode-mapper.d.ts +15 -3
- package/@types/ui2/utils/camera-config.d.ts +2 -2
- package/@types/ui2/utils/styled-input.d.ts +1 -1
- package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
- package/@types/ui2/views/barcode-scanner.d.ts +4 -3
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +3 -3
- package/@types/ui2/views/form/dialog-button.d.ts +2 -2
- package/@types/utils/dto/MagneticLine.d.ts +4 -4
- package/@types/utils/dto/Point.d.ts +2 -2
- package/@types/utils/image-utils.d.ts +1 -0
- package/@types/utils/react/usePromise.d.ts +3 -1
- package/@types/utils/utils.d.ts +1 -1
- package/@types/utils/video-stream.d.ts +1 -0
- package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
- package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +6 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/cropping/draggable-base-container.d.ts +8 -2
- package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
- package/@types/view/view-finder.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +349 -5
- package/Libraries.txt +307 -174
- package/README.md +3 -3
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +108 -161
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +4 -3
- package/ui.d.ts +3 -0
- package/ui.js +2 -0
- package/webpack/fileLoader.js +3 -5
- package/@types/core/compiled/ParametricFilters.d.ts +0 -181
- package/@types/core/utils.d.ts +0 -1
- package/@types/core/worker-bridge.d.ts +0 -20
- package/@types/model/barcode/barcode-format.d.ts +0 -1
- package/@types/model/barcode/engine-mode.d.ts +0 -1
- package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
- package/@types/model/document/contour-detection-result.d.ts +0 -11
- package/@types/model/document/detection-status.d.ts +0 -11
- package/@types/model/document/document-detection-result.d.ts +0 -8
- package/@types/model/filter-types.d.ts +0 -6
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
- package/@types/model/mrz/mrz-result.d.ts +0 -41
- package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
- package/@types/service/image-processor.d.ts +0 -35
- package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
- package/@types/utils/networking.d.ts +0 -7
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=t(1);let o;const a={};function i(e){const r=Math.random().toString(36);return a[r]=e,r}function s(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function u(e){const r=s(e);r.delete&&r.delete(),delete a[e]}function c(e,r){for(let t in r){if(e===r[t])return t}}const l={initialize:async function(e,r,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality:f=80,requestSuffix:d=""}=s||{};u&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const h=t(3),p=t(4),m={locateFile:function(e,t){let o;return o=r?(0,n.isRemote)(r)?r:"":i,e.endsWith(".worker.js")&&p?p.default:new URL(o+e+d,location).href}},y=(0,n.getBuildType)(s),v=y.includes("-threads");m.mainScriptUrlOrBlob=m.locateFile(`ScanbotSDK.Asm${y}.js`);let g;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&v){let e=[2147483648,805306368,536870912],r=134217728;const t=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&t.includes(SCANBOTSDK_FLAVOR)&&(r=n,e.push(4*n));for(let t=0;t<e.length;t++){const n=e[t];try{g=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),g.grow(r/65536);break}catch(r){if(t===e.length-1)throw r}}}return g&&(m.wasmMemory=g),await h(m),o=m,o.initialize(e||"",a,f)}catch(e){throw console.error(e),e}},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(e,r){return h(o.applyFilter(m(e),r),d)},rotateImageCcw:function(e,r){return h(o.rotateImageCcw(m(e),r),d)},cropAndRotateImageCcw:function(e,r,t){const n=function(e){const r=[];for(let t=0;t<e.length;++t)r.push(e[t].x,e[t].y);return r}(r);return h(o.cropAndRotateImageCcw(m(e),n,t),d)},detectDocument:async function(e,r,t){const n=new o.DocumentDetector({acceptedAngleScore:r,acceptedSizeScore:t}),a=n.detect(m(e));return n.delete(),await f(a)},detectAndCropDocument:async function(e){return await f(o.detectAndCropDocument(m(e)))},createDocumentDetector:async function(e){return i(new o.DocumentDetector(e||{}))},documentDetectorDetect:async function(e,r){const t=s(e);return await f(t.detect(m(r)))},createBarcodeRecognizer:async function(e){return i(new o.BarcodeRecognizer(e||{}))},recognizeBarcodes:async function(e,r,t){let n,a=!1;"string"==typeof e?n=s(e):(t=r,r=e,n=new o.BarcodeRecognizer(t),a=!0);try{const e=n.recognize(m(r),t||{});if(!e)return null;let i;return e.length?(i=e.map((e=>({format:c(e.format,o.BarcodeFormat),text:e.text,parsedText:e.parsedText,rawBytes:d(e.rawBytes),quad:e.quad,barcodeImage:d(e.barcodeImage)}))),e.forEach((e=>e.delete()))):i=[],{result:i,originalImage:r}}finally{a&&n.delete()}},beginPdf:async function(e){return i(new o.PdfGenerationContext(e||{}))},addPageToPdf:async function(e,r){h(s(e).addPage(r))},completePdf:async function(e){const r=h(s(e).complete(),d);return u(e),r},beginTiff:async function(e){const r=new o.TiffGenerationContext(e||{});return h(r.begin()),i(r)},addPageToTiff:async function(e,r){const t=s(e);if("string"==typeof r){let e=s(r).nativeImageContainer();const n=h(t.addPageFromContainer(e));return e.delete(),n}return h(t.addPageFromJsImage(m(r)))},completeTiff:async function(e){try{const r=s(e).complete();return h(r,d)}finally{u(e)}},createMRZRecognizer:async function(e){return i(new o.MrzRecognizerContext(e||{}))},recognizeMRZ:async function(e,r){return s(e).recognize(m(r))},releaseObject:async function(e){u(e)},createOcrEngine:async function(e){return i(new o.TLDROcrContext(e||{}))},performOcr:async function(e,r){return s(e).performOcr(m(r))},createGenericTextLineScanner:async function(e){e.languages||(e.languages=["eng"]);return i(new o.GenericTextLineScanner(e))},recognizeTextLine:async function(e,r){return s(e).recognize(m(r))},cleanTextLineRecognitionQueue:async function(e){s(e).cleanRecognitionQueue()},createDocumentQualityAnalyzer:async function(e){return i(new o.DocumentQualityAnalyzer(e||{}))},documentQualityAnalyzerAnalyze:async function(e,r){return s(e).analyze(m(r))},imageProcessorCreate:async function(e){return i(new o.ImageProcessor(m(e)))},imageProcessorCopy:async function(e){return i(s(e).copy())},imageProcessorApplyFilter:async function(e,r){s(e).applyFilter(r)},imageProcessorCrop:async function(e,r){s(e).crop(r)},imageProcessorResize:async function(e,r){s(e).resize(r)},imageProcessorRotate:async function(e,r){s(e).rotate(r)},imageProcessorEncodedProcessedImage:async function(e,r){return h(s(e).encodedProcessedImage(r),d)},__hasModuleFunction:async function(e){return o.hasOwnProperty(e)},__callModuleFunction:async function(e,r=[]){return o[e].apply(r)}};async function f(e){if(!e)return{success:!1,detectionStatus:"Error_License"};const r=y[e.status],t={detectionStatus:r,success:(n=r,"OK"===n.substr(0,2))};var n;return t.original=d(e.originalImageJpegData),t.success&&(t.cropped=d(e.croppedImageJpegData),t.polygon=function(e){if(e.length%2!=0)throw Error("pointCoords size is not even.");const r=[];for(let t=0;t<e.length;t+=2)r.push({x:e[t],y:e[t+1]});return r}(d(e.polygon)),t.horizontalLines=p(d(e.horizontalLines)),t.verticalLines=p(d(e.verticalLines))),e.delete(),t}function d(e){return e&&e.slice()}function h(e,r){try{if(e.errorMessage){throw new Error(e.errorMessage)}return(r||(e=>e))(e.result)}finally{e.delete()}}function p(e){const r=[];if(!e)return r;if(e.length%4!=0)throw Error("lineCoords size invalid.");for(let t=0;t<e.length;t+=4)r.push({p1:{x:e[t],y:e[t+1]},p2:{x:e[t+2],y:e[t+3]}});return r}function m(e){if(!e)throw new Error("null image data or buffer");return"number"==typeof e.width?e:{data:e,width:-1,height:-1}}const y={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(e){const{command:r,args:t,ticket:a}=e.data;o||"initialize"===r?(async()=>await l[r].apply(null,t))().then((e=>{const r=(0,n.gatherTransferables)(e);self.postMessage({ticket:a,result:e},r)})).catch((e=>{const r="number"==typeof e?Error(o.stringFromException(e)):e;console.error(r),self.postMessage({ticket:a,error:r})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(e,r,t){"use strict";(function(e){function t(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.gatherTransferables=function(e,r){const t=[];return function e(n){if(!n)return;if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return t.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=r?n.slice(0):n;if(t.push(e),r)return n}else if(ArrayBuffer.isView(n)){let e;if(r){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(t.push(e.buffer),r)return n}else if(Array.isArray(n))for(let r=0;r<n.length;++r){const t=e(n[r]);t&&(n[r]=t)}else if(n.constructor===Object)for(const r in n)if(n.hasOwnProperty(r)){const t=e(n[r]);t&&(n[r]=t)}}(e),t},r.isRemote=function(e){return e.startsWith("http:")||e.startsWith("https:")},r.areThreadsAvailable=t,r.getBuildType=function(e){const{allowSimd:r=!0,allowThreads:n=!0}=e||{};let o="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){o+="-simd";n&&t()&&(o+="-threads")}return o}}).call(this,t(2))},function(e,r){var t,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var r=c.length;r;){for(u=c,c=[];++f<r;)u&&u[f].run();f=-1,r=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function p(e,r){this.fun=e,this.array=r}function m(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];c.push(new p(e,r)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,t){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var r,t,o=e;o.ready=new Promise(((e,n)=>{r=e,t=n}));var a,i,s,u=Object.assign({},o),c="./this.program",l=(e,r)=>{throw r},f="";f=self.location.href,n&&(f=n),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var d,h=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(d=o.wasmBinary);var m,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&L("no native wasm support detected");var v,g,w,b,E,_,T,k,C,P=!1;function $(){var e=m.buffer;o.HEAP8=v=new Int8Array(e),o.HEAP16=w=new Int16Array(e),o.HEAPU8=g=new Uint8Array(e),o.HEAPU16=b=new Uint16Array(e),o.HEAP32=E=new Int32Array(e),o.HEAPU32=_=new Uint32Array(e),o.HEAPF32=T=new Float32Array(e),o.HEAPF64=k=new Float64Array(e)}var S,D,A,F,j=[],O=[],M=[],W=0,x=null,R=null;function z(e){W++,o.monitorRunDependencies&&o.monitorRunDependencies(W)}function I(e){if(W--,o.monitorRunDependencies&&o.monitorRunDependencies(W),0==W&&(null!==x&&(clearInterval(x),x=null),R)){var r=R;R=null,r()}}function L(e){o.onAbort&&o.onAbort(e),p(e="Aborted("+e+")"),P=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}function B(e){return e.startsWith("data:application/octet-stream;base64,")}function N(e){if(e==S&&d)return new Uint8Array(d);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return d||"function"!=typeof fetch?Promise.resolve().then((()=>N(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>N(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),L(e)}))}B(S="ScanbotSDK.Asm-simd.wasm")||(D=S,S=o.locateFile?o.locateFile(D,f):f+D);var H={1147040:e=>vt(function(){return this[me(e)].toString()}.apply((0,eval)("(()=>this)()")))};function V(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var Y=e=>{for(;e.length>0;)e.shift()(o)},q=[],G=0,K=0;function X(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(xt(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Q=e=>{var r=K;if(!r)return $t(0),0;var t=new X(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return $t(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Wt(a,n,i))return $t(a),r}return $t(n),r},J=()=>{var e=q.pop();e||L("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(q.push(e),e.set_rethrown(!0),e.set_caught(!1),G++),K=r},Z={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Z.isAbs(e),t="/"===e.substr(-1);return(e=Z.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Z.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Z.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Z.normalize(e.join("/"))},join2:(e,r)=>Z.normalize(e+"/"+r)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);L("initRandomDevice")})())(e),re={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Z.isAbs(n)}return(r?"/":"")+(e=Z.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=re.resolve(e).substr(1),r=re.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},te="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ne=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&te)return te.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},oe=[],ae=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ie=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function se(e,r,t){var n=t>0?t:ae(e)+1,o=new Array(n),a=ie(e,o,0,o.length);return r&&(o.length=a),o}var ue={ttys:[],init(){},shutdown(){},register(e,r){ue.ttys[e]={input:[],output:[],ops:r},pe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var r=ue.ttys[e.node.rdev];if(!r)throw new pe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new pe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new pe.ErrnoError(29)}if(void 0===s&&0===a)throw new pe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new pe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new pe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!oe.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;oe=se(e,!0)}return oe.shift()})(),put_char(e,r){null===r||10===r?(h(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(h(ne(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(ne(e.output,0)),e.output=[])}}},ce=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=Dt(65536,e);return r?((e,r)=>(g.fill(0,e,e+r),e))(r,e):0},le={ops_table:null,mount:e=>le.createNode(null,"/",16895,0),createNode(e,r,t,n){if(pe.isBlkdev(t)||pe.isFIFO(t))throw new pe.ErrnoError(63);le.ops_table||(le.ops_table={dir:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,lookup:le.node_ops.lookup,mknod:le.node_ops.mknod,rename:le.node_ops.rename,unlink:le.node_ops.unlink,rmdir:le.node_ops.rmdir,readdir:le.node_ops.readdir,symlink:le.node_ops.symlink},stream:{llseek:le.stream_ops.llseek}},file:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:{llseek:le.stream_ops.llseek,read:le.stream_ops.read,write:le.stream_ops.write,allocate:le.stream_ops.allocate,mmap:le.stream_ops.mmap,msync:le.stream_ops.msync}},link:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,readlink:le.node_ops.readlink},stream:{}},chrdev:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:pe.chrdev_stream_ops}});var o=pe.createNode(e,r,t,n);return pe.isDir(o.mode)?(o.node_ops=le.ops_table.dir.node,o.stream_ops=le.ops_table.dir.stream,o.contents={}):pe.isFile(o.mode)?(o.node_ops=le.ops_table.file.node,o.stream_ops=le.ops_table.file.stream,o.usedBytes=0,o.contents=null):pe.isLink(o.mode)?(o.node_ops=le.ops_table.link.node,o.stream_ops=le.ops_table.link.stream):pe.isChrdev(o.mode)&&(o.node_ops=le.ops_table.chrdev.node,o.stream_ops=le.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=pe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,pe.isDir(e.mode)?r.size=4096:pe.isFile(e.mode)?r.size=e.usedBytes:pe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&le.resizeFileStorage(e,r.size)},lookup(e,r){throw pe.genericErrors[44]},mknod:(e,r,t,n)=>le.createNode(e,r,t,n),rename(e,r,t){if(pe.isDir(e.mode)){var n;try{n=pe.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new pe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=pe.lookupNode(e,r);for(var n in t.contents)throw new pe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=le.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!pe.isLink(e.mode))throw new pe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(le.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&pe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new pe.ErrnoError(28);return n},allocate(e,r,t){le.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ce(r)))throw new pe.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(le.stream_ops.write(e,r,0,n,t,!1),0)}},fe=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{var n;n=`Loading data file "${e}" failed (no arrayBuffer).`,t||L(n),r(new Uint8Array(t)),o&&I()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&z()},de=o.preloadPlugins||[],he=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=re.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new pe.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=pe.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=pe.lookupNode(n,t[a]),o=Z.join2(o,t[a]),pe.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;pe.isLink(n.mode);){var u=pe.readlink(o);if(o=re.resolve(Z.dirname(o),u),n=pe.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new pe.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(pe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%pe.nameTable.length},hashAddNode(e){var r=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[r],pe.nameTable[r]=e},hashRemoveNode(e){var r=pe.hashName(e.parent.id,e.name);if(pe.nameTable[r]===e)pe.nameTable[r]=e.name_next;else for(var t=pe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=pe.mayLookup(e);if(t)throw new pe.ErrnoError(t,e);for(var n=pe.hashName(e.id,r),o=pe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return pe.lookup(e,r)},createNode(e,r,t,n){var o=new pe.FSNode(e,r,t,n);return pe.hashAddNode(o),o},destroyNode(e){pe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>pe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=pe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return pe.lookupNode(e,r),20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=pe.lookupNode(e,r)}catch(e){return e.errno}var o=pe.nodePermissions(e,"wx");if(o)return o;if(t){if(!pe.isDir(n.mode))return 54;if(pe.isRoot(n)||pe.getPath(n)===pe.cwd())return 10}else if(pe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(r)||512&r)?31:pe.nodePermissions(e,pe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=pe.MAX_OPEN_FDS;e++)if(!pe.streams[e])return e;throw new pe.ErrnoError(33)},getStreamChecked(e){var r=pe.getStream(e);if(!r)throw new pe.ErrnoError(8);return r},getStream:e=>pe.streams[e],createStream:(e,r=-1)=>(pe.FSStream||(pe.FSStream=function(){this.shared={}},pe.FSStream.prototype={},Object.defineProperties(pe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new pe.FSStream,e),-1==r&&(r=pe.nextfd()),e.fd=r,pe.streams[r]=e,e),closeStream(e){pe.streams[e]=null},chrdev_stream_ops:{open(e){var r=pe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new pe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){pe.devices[e]={stream_ops:r}},getDevice:e=>pe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),pe.syncFSRequests++,pe.syncFSRequests>1&&p(`warning: ${pe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=pe.getMounts(pe.root.mount),n=0;function o(e){return pe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&pe.root)throw new pe.ErrnoError(10);if(!o&&!a){var i=pe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,pe.isMountpoint(n))throw new pe.ErrnoError(10);if(!pe.isDir(n.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(r.node))throw new pe.ErrnoError(28);var t=r.node,n=t.mounted,o=pe.getMounts(n);Object.keys(pe.nameTable).forEach((e=>{for(var r=pe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&pe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=pe.lookupPath(e,{parent:!0}).node,o=Z.basename(e);if(!o||"."===o||".."===o)throw new pe.ErrnoError(28);var a=pe.mayCreate(n,o);if(a)throw new pe.ErrnoError(a);if(!n.node_ops.mknod)throw new pe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,pe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,pe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{pe.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,pe.mknod(e,r,t)),symlink(e,r){if(!re.resolve(e))throw new pe.ErrnoError(44);var t=pe.lookupPath(r,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var n=Z.basename(r),o=pe.mayCreate(t,n);if(o)throw new pe.ErrnoError(o);if(!t.node_ops.symlink)throw new pe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Z.dirname(e),a=Z.dirname(r),i=Z.basename(e),s=Z.basename(r);if(t=pe.lookupPath(e,{parent:!0}).node,n=pe.lookupPath(r,{parent:!0}).node,!t||!n)throw new pe.ErrnoError(44);if(t.mount!==n.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(t,i),l=re.relative(e,a);if("."!==l.charAt(0))throw new pe.ErrnoError(28);if("."!==(l=re.relative(r,o)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(n,s)}catch(e){}if(c!==u){var f=pe.isDir(c.mode),d=pe.mayDelete(t,i,f);if(d)throw new pe.ErrnoError(d);if(d=u?pe.mayDelete(n,s,f):pe.mayCreate(n,s))throw new pe.ErrnoError(d);if(!t.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(n!==t&&(d=pe.nodePermissions(t,"w")))throw new pe.ErrnoError(d);pe.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir(e){var r=pe.lookupPath(e,{parent:!0}).node,t=Z.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!0);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.rmdir(r,t),pe.destroyNode(n)},readdir(e){var r=pe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new pe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=pe.lookupPath(e,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var t=Z.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!1);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.unlink(r,t),pe.destroyNode(n)},readlink(e){var r=pe.lookupPath(e).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.readlink)throw new pe.ErrnoError(28);return re.resolve(pe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=pe.lookupPath(e,{follow:!r}).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.getattr)throw new pe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>pe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?pe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){pe.chmod(e,r,!0)},fchmod(e,r){var t=pe.getStreamChecked(e);pe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?pe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){pe.chown(e,r,t,!0)},fchown(e,r,t){var n=pe.getStreamChecked(e);pe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new pe.ErrnoError(28);var t;if(!(t="string"==typeof e?pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(t.mode))throw new pe.ErrnoError(31);if(!pe.isFile(t.mode))throw new pe.ErrnoError(28);var n=pe.nodePermissions(t,"w");if(n)throw new pe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=pe.getStreamChecked(e);if(0==(2097155&t.flags))throw new pe.ErrnoError(28);pe.truncate(t.node,r)},utime(e,r,t){var n=pe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new pe.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=Z.normalize(e);try{n=pe.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new pe.ErrnoError(20)}else n=pe.mknod(e,t,0),a=!0;if(!n)throw new pe.ErrnoError(44);if(pe.isChrdev(n.mode)&&(r&=-513),65536&r&&!pe.isDir(n.mode))throw new pe.ErrnoError(54);if(!a){var i=pe.mayOpen(n,r);if(i)throw new pe.ErrnoError(i)}512&r&&!a&&pe.truncate(n,0),r&=-131713;var s=pe.createStream({node:n,path:pe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(pe.readFiles||(pe.readFiles={}),e in pe.readFiles||(pe.readFiles[e]=1)),s},close(e){if(pe.isClosed(e))throw new pe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{pe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new pe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(1==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.read)throw new pe.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.write)throw new pe.ErrnoError(28);e.seekable&&1024&e.flags&&pe.llseek(e,0,2);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(r<0||t<=0)throw new pe.ErrnoError(28);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(!pe.isFile(e.node.mode)&&!pe.isDir(e.node.mode))throw new pe.ErrnoError(43);if(!e.stream_ops.allocate)throw new pe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new pe.ErrnoError(2);if(1==(2097155&e.flags))throw new pe.ErrnoError(2);if(!e.stream_ops.mmap)throw new pe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new pe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=pe.open(e,r.flags),o=pe.stat(e).size,a=new Uint8Array(o);return pe.read(n,a,0,o,0),"utf8"===r.encoding?t=ne(a,0):"binary"===r.encoding&&(t=a),pe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=pe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ae(r)+1),a=ie(r,o,0,o.length);pe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");pe.write(n,r,0,r.byteLength,void 0,t.canOwn)}pe.close(n)},cwd:()=>pe.currentPath,chdir(e){var r=pe.lookupPath(e,{follow:!0});if(null===r.node)throw new pe.ErrnoError(44);if(!pe.isDir(r.node.mode))throw new pe.ErrnoError(54);var t=pe.nodePermissions(r.node,"x");if(t)throw new pe.ErrnoError(t);pe.currentPath=r.path},createDefaultDirectories(){pe.mkdir("/tmp"),pe.mkdir("/home"),pe.mkdir("/home/web_user")},createDefaultDevices(){pe.mkdir("/dev"),pe.registerDevice(pe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),pe.mkdev("/dev/null",pe.makedev(1,3)),ue.register(pe.makedev(5,0),ue.default_tty_ops),ue.register(pe.makedev(6,0),ue.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ee(e).byteLength),e[--r]);pe.createDevice("/dev","random",t),pe.createDevice("/dev","urandom",t),pe.mkdir("/dev/shm"),pe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){pe.mkdir("/proc");var e=pe.mkdir("/proc/self");pe.mkdir("/proc/self/fd"),pe.mount({mount(){var r=pe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=pe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?pe.createDevice("/dev","stdin",o.stdin):pe.symlink("/dev/tty","/dev/stdin"),o.stdout?pe.createDevice("/dev","stdout",null,o.stdout):pe.symlink("/dev/tty","/dev/stdout"),o.stderr?pe.createDevice("/dev","stderr",null,o.stderr):pe.symlink("/dev/tty1","/dev/stderr"),pe.open("/dev/stdin",0),pe.open("/dev/stdout",1),pe.open("/dev/stderr",1)},ensureErrnoError(){pe.ErrnoError||(pe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},pe.ErrnoError.prototype=new Error,pe.ErrnoError.prototype.constructor=pe.ErrnoError,[44].forEach((e=>{pe.genericErrors[e]=new pe.ErrnoError(e),pe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){pe.ensureErrnoError(),pe.nameTable=new Array(4096),pe.mount(le,{},"/"),pe.createDefaultDirectories(),pe.createDefaultDevices(),pe.createSpecialDirectories(),pe.filesystems={MEMFS:le}},init(e,r,t){pe.init.initialized=!0,pe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,pe.createStandardStreams()},quit(){pe.init.initialized=!1;for(var e=0;e<pe.streams.length;e++){var r=pe.streams[e];r&&pe.close(r)}},findObject(e,r){var t=pe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=pe.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=pe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Z.basename(e),n=pe.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:pe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Z.join2(e,a);try{pe.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=Z.join2("string"==typeof e?e:pe.getPath(e),r),i=he(n,o);return pe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:pe.getPath(e),i=r?Z.join2(e,r):e);var s=he(n,o),u=pe.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}pe.chmod(u,146|s);var d=pe.open(u,577);pe.write(d,t,0,t.length,0,a),pe.close(d),pe.chmod(u,s)}return u},createDevice(e,r,t,n){var o=Z.join2("string"==typeof e?e:pe.getPath(e),r),a=he(!!t,!!n);pe.createDevice.major||(pe.createDevice.major=64);var i=pe.makedev(pe.createDevice.major++,0);return pe.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new pe.ErrnoError(29)}if(void 0===u&&0===i)throw new pe.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new pe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),pe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):se(o.responseText||"",!0)})(r,o)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=pe.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((e=>{var r=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),r.apply(null,arguments)}})),c.read=(e,r,t,n,o)=>(pe.forceLoadFile(u),l(e,r,t,n,o)),c.mmap=(e,r,t,n,o)=>{pe.forceLoadFile(u);var a=ce(r);if(!a)throw new pe.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},u.stream_ops=c,u}},me=(e,r)=>e?ne(g,e,r):"",ye={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(Z.isAbs(r))return r;var n;if(n=-100===e?pe.cwd():ye.getStreamFromFD(e).path,0==r.length){if(!t)throw new pe.ErrnoError(44);return n}return Z.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Z.normalize(r)!==Z.normalize(pe.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,F=[n.size>>>0,(A=n.size,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[t+24>>2]=F[0],E[t+28>>2]=F[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return F=[Math.floor(o/1e3)>>>0,(A=Math.floor(o/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[t+40>>2]=F[0],E[t+44>>2]=F[1],_[t+48>>2]=o%1e3*1e3,F=[Math.floor(a/1e3)>>>0,(A=Math.floor(a/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[t+56>>2]=F[0],E[t+60>>2]=F[1],_[t+64>>2]=a%1e3*1e3,F=[Math.floor(i/1e3)>>>0,(A=Math.floor(i/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[t+72>>2]=F[0],E[t+76>>2]=F[1],_[t+80>>2]=i%1e3*1e3,F=[n.ino>>>0,(A=n.ino,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[t+88>>2]=F[0],E[t+92>>2]=F[1],0},doMsync(e,r,t,n,o){if(!pe.isFile(r.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);pe.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[ye.varargs>>2];return ye.varargs+=4,e},getp:()=>ye.get(),getStr:e=>me(e),getStreamFromFD:e=>pe.getStreamChecked(e)},ve={},ge=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function we(e){return this.fromWireType(E[e>>2])}var be={},Ee={},_e={},Te=void 0,ke=e=>{throw new Te(e)},Ce=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&ke("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){_e[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Ee.hasOwnProperty(e)?o[r]=Ee[e]:(a.push(e),be.hasOwnProperty(e)||(be[e]=[]),be[e].push((()=>{o[r]=Ee[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Pe={},$e=void 0,Se=e=>{for(var r="",t=e;g[t];)r+=$e[g[t++]];return r},De=void 0,Ae=e=>{throw new De(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Ae(`type "${n}" must have a positive integer typeid pointer`),Ee.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${n}' twice`)}if(Ee[e]=r,delete _e[e],be.hasOwnProperty(e)){var o=be[e];delete be[e],o.forEach((e=>e()))}}(e,r,t)}var je=8;function Oe(e){if(!(this instanceof rr))return!1;if(!(e instanceof rr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}var Me=e=>{Ae(e.$$.ptrType.registeredClass.name+" instance already deleted")},We=!1,xe=e=>{},Re=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},ze=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=ze(e,r,t.baseClass);return null===n?null:t.downcast(n)},Ie={},Le=()=>Object.keys(Ye).length,Be=()=>{var e=[];for(var r in Ye)Ye.hasOwnProperty(r)&&e.push(Ye[r]);return e},Ne=[],Ue=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},He=void 0,Ve=e=>{He=e,Ne.length&&He&&He(Ue)},Ye={},qe=(e,r)=>(r=((e,r)=>{for(void 0===r&&Ae("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),Ye[r]),Ge=(e,r)=>(r.ptrType&&r.ptr||ke("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&ke("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Xe(Object.create(e,{$$:{value:r}})));function Ke(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=qe(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ge(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Ge(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Ie[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=ze(r,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ge(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):Ge(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Xe=e=>"undefined"==typeof FinalizationRegistry?(Xe=e=>e,e):(We=new FinalizationRegistry((e=>{Re(e.$$)})),Xe=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};We.register(e,t,e)}return e},xe=e=>We.unregister(e),Xe(e));function Qe(){if(this.$$.ptr||Me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=Xe(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function Je(){this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),xe(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ze(){return!this.$$.ptr}function er(){return this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Ne.push(this),1===Ne.length&&He&&He(Ue),this.$$.deleteScheduled=!0,this}function rr(){}var tr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e};function nr(e,r){return{[e=tr(e)]:function(){return r.apply(this,arguments)}}[e]}var or=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ae(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ar=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ae(`Cannot register public name '${e}' twice`),or(o,e,e),o.hasOwnProperty(t)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))};function ir(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var sr=(e,r,t)=>{for(;r!==t;)r.upcast||Ae(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function ur(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function cr(e,r){var t;if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=sr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Or.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ae("Unsupporting sharing policy")}return t}function lr(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function fr(e){return this.fromWireType(_[e>>2])}function dr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function hr(e){this.rawDestructor&&this.rawDestructor(e)}var pr=e=>{null!==e&&e.delete()};function mr(e,r,t,n,o,a,i,s,u,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==r.baseClass?this.toWireType=cr:n?(this.toWireType=ur,this.destructorFunction=null):(this.toWireType=lr,this.destructorFunction=null)}var yr=(e,r,t)=>{o.hasOwnProperty(e)||ke("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},vr=[],gr=e=>{var r=vr[e];return r||(e>=vr.length&&(vr.length=e+1),vr[e]=r=C.get(e)),r},wr=(e,r,t)=>e.includes("j")?((e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):gr(r).apply(null,t),br=(e,r)=>{var t,n,o,a=(e=Se(e)).includes("j")?(t=e,n=r,o=[],function(){return o.length=0,Object.assign(o,arguments),wr(t,n,o)}):gr(r);return"function"!=typeof a&&Ae(`unknown function pointer with signature ${e}: ${r}`),a},Er=void 0,_r=e=>{var r=St(e),t=Se(r);return Ct(r),t},Tr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Ee[r]||(_e[r]?_e[r].forEach(e):(t.push(r),n[r]=!0))})),new Er(`${e}: `+t.map(_r).join([", "]))},kr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t};function Cr(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=nr(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Pr(e,r,t,n,o,a){var i=r.length;i<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,c=1;c<r.length;++c)if(null!==r[c]&&void 0===r[c].destructorFunction){u=!0;break}var l="void"!==r[0].name,f="",d="";for(c=0;c<i-2;++c)f+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tr(e)}(${f}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Ae,n,o,ge,r[0],r[1]];for(s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+r[c+2].name+"\n",m.push("argType"+c),y.push(r[c+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),h+=(l||a?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<r.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==r[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+r[c].name+"\n",m.push(v+"_dtor"),y.push(r[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),Cr(Function,m).apply(null,y)}var $r=(e,r,t)=>(e instanceof Object||Ae(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Ae(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Ae(`cannot call emscripten binding method ${t} on deleted object`),sr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass));function Sr(){this.allocated=[void 0],this.freelist=[]}var Dr,Ar=new Sr,Fr=e=>{e>=Ar.reserved&&0==--Ar.get(e).refcount&&Ar.free(e)},jr=()=>{for(var e=0,r=Ar.reserved;r<Ar.allocated.length;++r)void 0!==Ar.allocated[r]&&++e;return e},Or={toValue:e=>(e||Ae("Cannot use deleted val. handle = "+e),Ar.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ar.allocate({refcount:1,value:e})}}},Mr=(e,r,t)=>{switch(r){case 1:return t?function(e){return this.fromWireType(v[e>>0])}:function(e){return this.fromWireType(g[e>>0])};case 2:return t?function(e){return this.fromWireType(w[e>>1])}:function(e){return this.fromWireType(b[e>>1])};case 4:return t?function(e){return this.fromWireType(E[e>>2])}:function(e){return this.fromWireType(_[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Wr=(e,r)=>{var t=Ee[e];return void 0===t&&Ae(r+" has unknown type "+_r(e)),t},xr=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Rr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},zr=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>g[e>>0];case 2:return t?e=>w[e>>1]:e=>b[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Ir=(e,r,t)=>ie(e,g,r,t),Lr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Br=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&b[n];)++n;if((t=n<<1)-e>32&&Lr)return Lr.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Nr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Ur=e=>2*e.length,Hr=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Vr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Yr=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},qr=(e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Wr(_[r+4*n>>2],"parameter "+n);return t},Gr={},Kr=e=>{var r=Gr[e];return void 0===r?Se(e):r},Xr=[],Qr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Jr=[],Zr=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,et=e=>e%4==0&&(e%100!=0||e%400==0),rt=[0,31,60,91,121,152,182,213,244,274,305,335],tt=[0,31,59,90,120,151,181,212,243,273,304,334],nt=e=>{var r=ae(e)+1,t=kt(r);return t&&Ir(e,t,r),t},ot=[],at=(e,r,t)=>{var n=((e,r)=>{var t;for(ot.length=0;t=g[e++];)r+=105!=t&&r%8?4:0,ot.push(105==t?E[r>>2]:k[r>>3]),r+=105==t?4:8;return ot})(r,t);return H[e].apply(null,n)};Dr=()=>performance.now();var it,st,ut,ct=e=>{var r=(e-m.buffer.byteLength+65535)/65536;try{return m.grow(r),$(),1}catch(e){}},lt={},ft=()=>{if(!ft.strings){var e={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",_:c||"./this.program"};for(var r in lt)void 0===lt[r]?delete e[r]:e[r]=lt[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);ft.strings=t}return ft.strings},dt=e=>{y||(o.onExit&&o.onExit(e),P=!0),l(e,new V(e))},ht=(e,r)=>{dt(e)},pt=[31,29,31,30,31,30,31,31,30,31,30,31],mt=[31,28,31,30,31,30,31,31,30,31,30,31],yt=(e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?me(o):""},i=me(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return f(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=et(t.getFullYear()),o=t.getMonth(),a=(n?pt:mt)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>l[e.tm_mon].substring(0,3),"%B":e=>l[e.tm_mon],"%C":e=>d((e.tm_year+1900)/100|0,2),"%d":e=>d(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>m(e).toString().substring(2),"%G":e=>m(e),"%H":e=>d(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":e=>d(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(et(e.tm_year+1900)?pt:mt,e.tm_mon-1),3),"%m":e=>d(e.tm_mon+1,2),"%M":e=>d(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>d(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&et(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&et(e.tm_year%400-1))&&r++}return d(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var g,w,b=se(i=i.replace(/\0\0/g,"%"),!1);return b.length>r?0:(g=b,w=e,v.set(g,w),b.length-1)},vt=nt,gt=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},wt=365,bt=146;Object.defineProperties(gt.prototype,{read:{get:function(){return(this.mode&wt)===wt},set:function(e){e?this.mode|=wt:this.mode&=-366}},write:{get:function(){return(this.mode&bt)===bt},set:function(e){e?this.mode|=bt:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=gt,pe.createPreloadedFile=(e,r,t,n,o,a,i,s,u,c)=>{var l=r?re.resolve(Z.join2(e,r)):e;function f(t){function f(t){c&&c(),s||pe.createDataFile(e,r,t,n,o,u),a&&a(),I()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return de.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,l,f,(()=>{i&&i(),I()}))||f(t)}z(),"string"==typeof t?fe(t,(e=>f(e)),i):f(t)},pe.staticInit(),Te=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);$e=e})(),De=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},rr.prototype.isAliasOf=Oe,rr.prototype.clone=Qe,rr.prototype.delete=Je,rr.prototype.isDeleted=Ze,rr.prototype.deleteLater=er,o.getInheritedInstanceCount=Le,o.getLiveInheritedInstances=Be,o.flushPendingDeletes=Ue,o.setDelayFunction=Ve,mr.prototype.getPointee=dr,mr.prototype.destructor=hr,mr.prototype.argPackAdvance=je,mr.prototype.readValueFromPointer=fr,mr.prototype.deleteObject=pr,mr.prototype.fromWireType=Ke,Er=o.UnboundTypeError=(it=Error,(ut=nr(st="UnboundTypeError",(function(e){this.name=st,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(it.prototype),ut.prototype.constructor=ut,ut.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},ut),Object.assign(Sr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Ar.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Ar.reserved=Ar.allocated.length,o.count_emval_handles=jr;var Et,_t={q:e=>{var r=new X(e);return r.get_caught()||(r.set_caught(!0),G--),r.set_rethrown(!1),q.push(r),Mt(r.excPtr),r.get_exception_ptr()},vb:()=>{if(!q.length)return 0;var e=q[q.length-1];return Mt(e.excPtr),e.excPtr},r:()=>{At(0,0);var e=q.pop();Ot(e.excPtr),K=0},a:()=>Q([]),f:e=>Q([e]),o:(e,r)=>Q([e,r]),ta:J,ub:e=>{if(e){var r=new X(e);q.push(r),r.set_rethrown(!0),J()}},n:(e,r,t)=>{throw new X(e).init(r,t),G++,K=e},wb:()=>G,b:e=>{throw K||(K=e),K},Bb:function(e,r,t,n,o){try{for(var a=0,i=r?E[r>>2]:0,s=r?E[r+4>>2]:0,u=t?E[t>>2]:0,c=t?E[t+4>>2]:0,l=n?E[n>>2]:0,f=n?E[n+4>>2]:0,d=0,h=0,p=0,m=0,y=0,v=0,g=(r?E[r>>2]:0)|(t?E[t>>2]:0)|(n?E[n>>2]:0),w=(r?E[r+4>>2]:0)|(t?E[t+4>>2]:0)|(n?E[n+4>>2]:0),b=function(e,r,t,n){return e<32?r&n:t&n},_=0;_<e;_++){var T=1<<_%32;if(b(_,g,w,T)){var k=ye.getStreamFromFD(_),C=ye.DEFAULT_POLLMASK;if(k.stream_ops.poll){var P=-1;o&&(P=1e3*((r?E[o>>2]:0)+(r?E[o+8>>2]:0)/1e6)),C=k.stream_ops.poll(k,P)}1&C&&b(_,i,s,T)&&(_<32?d|=T:h|=T,a++),4&C&&b(_,u,c,T)&&(_<32?p|=T:m|=T,a++),2&C&&b(_,l,f,T)&&(_<32?y|=T:v|=T,a++)}}return r&&(E[r>>2]=d,E[r+4>>2]=h),t&&(E[t>>2]=p,E[t+4>>2]=m),n&&(E[n>>2]=y,E[n+4>>2]=v),a}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},xa:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 0:if((o=ye.get())<0)return-28;for(;pe.streams[o];)o++;return pe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return o=ye.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,E[Pt()>>2]=a,-1}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}var a},Jb:function(e,r){try{var t=ye.getStreamFromFD(e);return ye.doStat(pe.stat,t.path,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Kb:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=ye.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=ye.getp();var s=E[a>>2],u=E[a+4>>2],c=E[a+8>>2],l=E[a+12>>2],f=[];for(i=0;i<32;i++)f.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:f})}return 0;case 21519:return n.tty?(a=ye.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=ye.getp(),pe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=ye.getp(),w[a>>1]=d[0],w[a+2>>1]=d[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Hb:function(e,r,t,n){try{r=ye.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=ye.calculateAt(e,r,a),ye.doStat(o?pe.lstat:pe.stat,r,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ya:function(e,r,t,n){ye.varargs=n;try{r=ye.getStr(r),r=ye.calculateAt(e,r);var o=n?ye.get():0;return pe.open(r,t,o).fd}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Cb:function(e){try{return e=ye.getStr(e),pe.rmdir(e),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ib:function(e,r){try{return e=ye.getStr(e),ye.doStat(pe.stat,e,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Db:function(e,r,t){try{return r=ye.getStr(r),r=ye.calculateAt(e,r),0===t?pe.unlink(r):512===t?pe.rmdir(r):L("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},cb:e=>{var r=ve[e];delete ve[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Ce([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],u=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];u(c,e,s.toWireType(t,r)),ge(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==e&&e.push(i,s),s},argPackAdvance:je,readValueFromPointer:we,destructorFunction:i}]}))},bb:e=>{var r=Pe[e];delete Pe[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Ce([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],l=r.setter,f=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];l(f,e,c.toWireType(t,r)),ge(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:je,readValueFromPointer:we,destructorFunction:n}]}))},ob:(e,r,t,n,o)=>{},Ba:(e,r,t,n)=>{Fe(e,{name:r=Se(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:je,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},I:(e,r,t,n,o,a,i,s,u,c,l,f,d)=>{l=Se(l),a=br(o,a),s&&(s=br(i,s)),c&&(c=br(u,c)),d=br(f,d);var h=tr(l);ar(h,(function(){Tr(`Cannot construct ${l} due to unbound types`,[n])})),Ce([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:rr.prototype;var i=nr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new De("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new De(l+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new De(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(f.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var f=new ir(l,i,u,d,t,a,s,c);f.baseClass&&(void 0===f.baseClass.__derivedClasses&&(f.baseClass.__derivedClasses=[]),f.baseClass.__derivedClasses.push(f));var p=new mr(l,f,!0,!1,!1),m=new mr(l+"*",f,!1,!1,!1),y=new mr(l+" const*",f,!1,!0,!1);return Ie[e]={pointerType:m,constPointerType:y},yr(h,i),[p,m,y]}))},ga:(e,r,t,n,o,a)=>{var i=kr(r,t);o=br(n,o),Ce([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new De(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Tr(`Cannot construct ${e.name} due to unbound types`,i)},Ce([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Pr(t,n,null,o,a),[]))),[]}))},H:(e,r,t,n,o,a,i,s,u)=>{var c=kr(t,n);r=Se(r),a=br(o,a),Ce([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){Tr(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var l=e.registeredClass.instancePrototype,f=l[r];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===t-2?(o.argCount=t-2,o.className=e.name,l[r]=o):(or(l,r,n),l[r].overloadTable[t-2]=o),Ce([],c,(function(o){var s=Pr(n,o,e,a,i,u);return void 0===l[r].overloadTable?(s.argCount=t-2,l[r]=s):l[r].overloadTable[t-2]=s,[]})),[]}))},D:(e,r,t,n,o,a,i,s,u,c)=>{r=Se(r),o=br(n,o),Ce([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,l={get(){Tr(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>Tr(`Cannot access ${n} due to unbound types`,[t,i]):e=>Ae(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,l),Ce([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var r=$r(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(u){u=br(s,u);var f=t[1];l.set=function(r){var t=$r(this,e,n+" setter"),o=[];u(c,t,f.toWireType(o,r)),ge(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,l),[]})),[]}))},Nb:(e,r)=>{Fe(e,{name:r=Se(r),fromWireType:e=>{var r=Or.toValue(e);return Fr(e),r},toWireType:(e,r)=>Or.toHandle(r),argPackAdvance:je,readValueFromPointer:we,destructorFunction:null})},fb:(e,r,t,n)=>{function o(){}r=Se(r),o.values={},Fe(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:je,readValueFromPointer:Mr(r,t,n),destructorFunction:null}),ar(r,o)},Q:(e,r,t)=>{var n=Wr(e,"enum");r=Se(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:nr(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},Aa:(e,r,t)=>{Fe(e,{name:r=Se(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:je,readValueFromPointer:Rr(r,t),destructorFunction:null})},N:(e,r,t,n,o,a,i)=>{var s=kr(r,t);e=Se(e),o=br(n,o),ar(e,(function(){Tr(`Cannot call ${e} due to unbound types`,s)}),r-1),Ce([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return yr(e,Pr(e,n,null,o,a,i),r-1),[]}))},L:(e,r,t,n,o)=>{r=Se(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:je,readValueFromPointer:zr(r,t,0!==n),destructorFunction:null})},x:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=Se(t),fromWireType:o,argPackAdvance:je,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ab:(e,r,t,n,o,a,i,s,u,c,l,f)=>{t=Se(t),a=br(o,a),s=br(i,s),c=br(u,c),f=br(l,f),Ce([e],[r],(function(e){return e=e[0],[new mr(t,e.registeredClass,!1,!1,!0,e,n,a,s,c,f)]}))},za:(e,r)=>{var t="std::string"===(r=Se(r));Fe(e,{name:r,fromWireType:e=>{var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==g[s]){var u=me(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(g[o+i]);r=c.join("")}return Ct(e),r},toWireType:(e,r)=>{var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Ae("Cannot pass non-string to std::string"),n=t&&o?ae(r):r.length;var a=kt(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)Ir(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(Ct(i),Ae("String has UTF-16 code units that do not fit in 8 bits")),g[i+s]=u}else for(s=0;s<n;++s)g[i+s]=r[s];return null!==e&&e.push(Ct,a),a},argPackAdvance:je,readValueFromPointer:fr,destructorFunction:e=>Ct(e)})},ka:(e,r,t)=>{var n,o,a,i,s;t=Se(t),2===r?(n=Br,o=Nr,i=Ur,a=()=>b,s=1):4===r&&(n=Hr,o=Vr,i=Yr,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var l=e+4+c*r;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=l+r}}return Ct(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ae(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=kt(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(Ct,u),u},argPackAdvance:je,readValueFromPointer:we,destructorFunction:e=>Ct(e)})},eb:(e,r,t,n,o,a)=>{ve[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),elements:[]}},db:(e,r,t,n,o,a,i,s,u)=>{ve[e].elements.push({getterReturnType:r,getter:br(t,n),getterContext:o,setterArgumentType:a,setter:br(i,s),setterContext:u})},W:(e,r,t,n,o,a)=>{Pe[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),fields:[]}},A:(e,r,t,n,o,a,i,s,u,c)=>{Pe[e].fields.push({fieldName:Se(r),getterReturnType:t,getter:br(n,o),getterContext:a,setterArgumentType:i,setter:br(s,u),setterContext:c})},Ca:(e,r)=>{Fe(e,{isVoid:!0,name:r=Se(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Lb:()=>!0,xb:()=>{throw 1/0},E:(e,r,t)=>{e=Or.toValue(e),r=Wr(r,"emval::as");var n=[],o=Or.toHandle(n);return _[t>>2]=o,r.toWireType(n,e)},Za:(e,r,t,n)=>{e=Or.toValue(e);for(var o=qr(r,t),a=new Array(r),i=0;i<r;++i){var s=o[i];a[i]=s.readValueFromPointer(n),n+=s.argPackAdvance}var u=e.apply(void 0,a);return Or.toHandle(u)},qa:(e,r,t,n,o)=>(e=Xr[e])(r=Or.toValue(r),t=Kr(t),(e=>{var r=[];return _[e>>2]=Or.toHandle(r),r})(n),o),gb:Fr,sa:e=>0===e?Or.toHandle(Qr()):(e=Kr(e),Or.toHandle(Qr()[e])),ra:(e,r)=>{var t=qr(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Jr[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(t[1+c]);var l="return function "+tr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)t[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var d,h,p=Cr(Function,i).apply(null,s);return d=p,h=Xr.length,Xr.push(d),a=h,Jr[o]=a,a},Ya:(e,r)=>(e=Or.toValue(e),r=Or.toValue(r),Or.toHandle(e[r])),ha:e=>{e>4&&(Ar.get(e).refcount+=1)},Ua:e=>"number"==typeof(e=Or.toValue(e)),Sa:e=>"string"==typeof(e=Or.toValue(e)),Z:e=>Or.toHandle(Kr(e)),$a:e=>{var r=Or.toValue(e);ge(r),Fr(e)},_a:(e,r,t)=>{e=Or.toValue(e),r=Or.toValue(r),t=Or.toValue(t),e[r]=t},B:(e,r)=>{var t=(e=Wr(e,"_emval_take_value")).readValueFromPointer(r);return Or.toHandle(t)},lb:function(e,r,t){var n=Zr(e,r),o=new Date(1e3*n);E[t>>2]=o.getUTCSeconds(),E[t+4>>2]=o.getUTCMinutes(),E[t+8>>2]=o.getUTCHours(),E[t+12>>2]=o.getUTCDate(),E[t+16>>2]=o.getUTCMonth(),E[t+20>>2]=o.getUTCFullYear()-1900,E[t+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-a)/864e5|0;E[t+28>>2]=i},mb:function(e,r,t){var n=Zr(e,r),o=new Date(1e3*n);E[t>>2]=o.getSeconds(),E[t+4>>2]=o.getMinutes(),E[t+8>>2]=o.getHours(),E[t+12>>2]=o.getDate(),E[t+16>>2]=o.getMonth(),E[t+20>>2]=o.getFullYear()-1900,E[t+24>>2]=o.getDay();var a=0|(e=>(et(e.getFullYear())?rt:tt)[e.getMonth()]+e.getDate()-1)(o);E[t+28>>2]=a,E[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=i.getTimezoneOffset(),c=0|(s!=u&&o.getTimezoneOffset()==Math.min(u,s));E[t+32>>2]=c},kb:function(e,r,t,n,o,a,i){var s=Zr(a,i);try{if(isNaN(s))return 61;var u=ye.getStreamFromFD(o);2&t&&ye.doMsync(e,u,r,n,s),pe.munmap(u)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},zb:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}_[e>>2]=60*u,E[r>>2]=Number(i!=s);var l=c(o),f=c(a),d=nt(l),h=nt(f);s<i?(_[t>>2]=d,_[t+4>>2]=h):(_[t>>2]=h,_[t+4>>2]=d)},v:()=>{L("")},Va:(e,r,t)=>at(e,r,t),V:()=>Date.now(),Ab:()=>2147483648,S:Dr,Mb:(e,r,t)=>g.copyWithin(e,r,r+t),yb:e=>{var r=g.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(ct(s))return!0}return!1},Fb:(e,r)=>{var t=0;return ft().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0})(n,a),t+=n.length+1})),0},Gb:(e,r)=>{var t=ft();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},Da:ht,ja:function(e){try{var r=ye.getStreamFromFD(e);return pe.close(r),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Eb:function(e,r){try{var t=ye.getStreamFromFD(e),n=t.tty?2:pe.isDir(t.mode)?3:pe.isLink(t.mode)?7:4;return v[r>>0]=n,w[r+2>>1]=0,F=[0,(A=0,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[r+8>>2]=F[0],E[r+12>>2]=F[1],F=[0,(A=0,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[r+16>>2]=F[0],E[r+20>>2]=F[1],0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},wa:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=pe.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},nb:function(e,r,t,n,o){var a=Zr(r,t);try{if(isNaN(a))return 61;var i=ye.getStreamFromFD(e);return pe.llseek(i,a,n),F=[i.position>>>0,(A=i.position,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],E[o>>2]=F[0],E[o+4>>2]=F[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},ia:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=pe.write(e,v,i,s,n);if(u<0)return-1;o+=u,"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Xa:function(){return vt(location.toString())},Wa:function(){return vt((e=Ht,self[e(123,"G]^J")][e(112,"$*jk")]()));var e},Ta:function(e,r){var t=Ft();try{return gr(e)(r)}catch(e){if(jt(t),e!==e+0)throw e;At(1,0)}},J:function(e,r,t,n,o,a){var i=Ft();try{return gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},P:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},fa:function(e,r,t,n,o,a){var i=Ft();try{return gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},Y:function(e,r){var t=Ft();try{return gr(e)(r)}catch(e){if(jt(t),e!==e+0)throw e;At(1,0)}},Pa:function(e,r,t){var n=Ft();try{return gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},ua:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},O:function(e,r,t,n,o){var a=Ft();try{return gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},p:function(e){var r=Ft();try{return gr(e)()}catch(e){if(jt(r),e!==e+0)throw e;At(1,0)}},e:function(e,r){var t=Ft();try{return gr(e)(r)}catch(e){if(jt(t),e!==e+0)throw e;At(1,0)}},La:function(e,r,t){var n=Ft();try{return gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},Ma:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},Oa:function(e,r,t,n,o){var a=Ft();try{return gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},Na:function(e,r,t,n,o,a,i,s){var u=Ft();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},la:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},d:function(e,r,t){var n=Ft();try{return gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},Qa:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},k:function(e,r,t,n){var o=Ft();try{return gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},M:function(e,r,t,n,o){var a=Ft();try{return gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},j:function(e,r,t,n,o){var a=Ft();try{return gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},tb:function(e,r,t,n,o,a){var i=Ft();try{return gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},pa:function(e,r,t,n,o,a,i){var s=Ft();try{return gr(e)(r,t,n,o,a,i)}catch(e){if(jt(s),e!==e+0)throw e;At(1,0)}},y:function(e,r,t,n,o,a){var i=Ft();try{return gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},C:function(e,r,t,n,o,a,i){var s=Ft();try{return gr(e)(r,t,n,o,a,i)}catch(e){if(jt(s),e!==e+0)throw e;At(1,0)}},va:function(e,r,t,n,o,a,i,s){var u=Ft();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},Fa:function(e,r,t,n,o,a,i,s,u){var c=Ft();try{return gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(jt(c),e!==e+0)throw e;At(1,0)}},Ea:function(e,r,t,n,o,a,i,s,u,c){var l=Ft();try{return gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(jt(l),e!==e+0)throw e;At(1,0)}},$:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=Ft();try{return gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(jt(d),e!==e+0)throw e;At(1,0)}},qb:function(e,r,t,n){var o=Ft();try{return It(e,r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},jb:function(e){var r=Ft();try{return Lt(e)}catch(e){if(jt(r),e!==e+0)throw e;At(1,0)}},rb:function(e,r){var t=Ft();try{return Rt(e,r)}catch(e){if(jt(t),e!==e+0)throw e;At(1,0)}},ib:function(e,r,t){var n=Ft();try{return Bt(e,r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},hb:function(e,r,t,n,o){var a=Ft();try{return Nt(e,r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},m:function(e){var r=Ft();try{gr(e)()}catch(e){if(jt(r),e!==e+0)throw e;At(1,0)}},h:function(e,r){var t=Ft();try{gr(e)(r)}catch(e){if(jt(t),e!==e+0)throw e;At(1,0)}},X:function(e,r,t){var n=Ft();try{gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},ca:function(e,r,t,n){var o=Ft();try{gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},R:function(e,r,t,n,o,a,i,s){var u=Ft();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},Ia:function(e,r,t){var n=Ft();try{gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},c:function(e,r,t){var n=Ft();try{gr(e)(r,t)}catch(e){if(jt(n),e!==e+0)throw e;At(1,0)}},w:function(e,r,t,n){var o=Ft();try{gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},ea:function(e,r,t,n,o){var a=Ft();try{gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},Ja:function(e,r,t,n,o,a,i){var s=Ft();try{gr(e)(r,t,n,o,a,i)}catch(e){if(jt(s),e!==e+0)throw e;At(1,0)}},U:function(e,r,t,n,o,a,i,s){var u=Ft();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},Ka:function(e,r,t,n,o){var a=Ft();try{gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},Ga:function(e,r,t,n,o,a,i,s){var u=Ft();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},Ha:function(e,r,t,n){var o=Ft();try{gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},aa:function(e,r,t,n,o,a){var i=Ft();try{gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},ma:function(e,r,t,n,o){var a=Ft();try{gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},na:function(e,r,t,n,o,a){var i=Ft();try{gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},g:function(e,r,t,n){var o=Ft();try{gr(e)(r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},K:function(e,r,t,n,o,a){var i=Ft();try{gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},u:function(e,r,t,n,o,a,i){var s=Ft();try{gr(e)(r,t,n,o,a,i)}catch(e){if(jt(s),e!==e+0)throw e;At(1,0)}},T:function(e,r,t,n,o,a){var i=Ft();try{gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},i:function(e,r,t,n,o){var a=Ft();try{gr(e)(r,t,n,o)}catch(e){if(jt(a),e!==e+0)throw e;At(1,0)}},ba:function(e,r,t,n,o,a,i,s){var u=Ft();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},l:function(e,r,t,n,o,a){var i=Ft();try{gr(e)(r,t,n,o,a)}catch(e){if(jt(i),e!==e+0)throw e;At(1,0)}},s:function(e,r,t,n,o,a,i){var s=Ft();try{gr(e)(r,t,n,o,a,i)}catch(e){if(jt(s),e!==e+0)throw e;At(1,0)}},oa:function(e,r,t,n,o,a,i,s,u,c){var l=Ft();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(jt(l),e!==e+0)throw e;At(1,0)}},t:function(e,r,t,n,o,a,i,s){var u=Ft();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(jt(u),e!==e+0)throw e;At(1,0)}},da:function(e,r,t,n,o,a,i,s,u){var c=Ft();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(jt(c),e!==e+0)throw e;At(1,0)}},F:function(e,r,t,n,o,a,i,s,u,c){var l=Ft();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(jt(l),e!==e+0)throw e;At(1,0)}},z:function(e,r,t,n,o,a,i,s,u,c,l){var f=Ft();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(jt(f),e!==e+0)throw e;At(1,0)}},_:function(e,r,t,n,o,a,i,s,u,c,l,f,d,h,p,m){var y=Ft();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(e){if(jt(y),e!==e+0)throw e;At(1,0)}},pb:function(e,r,t,n){var o=Ft();try{zt(e,r,t,n)}catch(e){if(jt(o),e!==e+0)throw e;At(1,0)}},G:e=>e,Ra:yt,sb:(e,r,t,n,o)=>yt(e,r,t,n)},Tt=function(){var e,r,n,a,i={a:_t};function s(e,r){var t,n=e.exports;return m=(Tt=n).Ob,$(),C=Tt.Rb,t=Tt.Pb,O.unshift(t),I(),n}if(z(),o.instantiateWasm)try{return o.instantiateWasm(i,s)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return(e=d,r=S,n=i,a=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||B(r)||"function"!=typeof fetch?U(r,n,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,n).then(a,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,n,a)}))))).catch(t),{}}(),kt=o._malloc=e=>(kt=o._malloc=Tt.Qb)(e),Ct=o._free=e=>(Ct=o._free=Tt.Sb)(e),Pt=()=>(Pt=Tt.Tb)(),$t=e=>($t=Tt.Ub)(e),St=e=>(St=Tt.Vb)(e),Dt=(o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=Tt.Wb)(),(e,r)=>(Dt=Tt.Xb)(e,r)),At=(e,r)=>(At=Tt.Yb)(e,r),Ft=()=>(Ft=Tt.Zb)(),jt=e=>(jt=Tt._b)(e),Ot=e=>(Ot=Tt.$b)(e),Mt=e=>(Mt=Tt.ac)(e),Wt=(e,r,t)=>(Wt=Tt.bc)(e,r,t),xt=e=>(xt=Tt.cc)(e),Rt=o.dynCall_ji=(e,r)=>(Rt=o.dynCall_ji=Tt.dc)(e,r),zt=o.dynCall_vij=(e,r,t,n)=>(zt=o.dynCall_vij=Tt.ec)(e,r,t,n),It=o.dynCall_iij=(e,r,t,n)=>(It=o.dynCall_iij=Tt.fc)(e,r,t,n),Lt=(o.dynCall_iiiijj=(e,r,t,n,a,i,s,u)=>(o.dynCall_iiiijj=Tt.gc)(e,r,t,n,a,i,s,u),o.dynCall_viijj=(e,r,t,n,a,i,s)=>(o.dynCall_viijj=Tt.hc)(e,r,t,n,a,i,s),o.dynCall_viiijjj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_viiijjj=Tt.ic)(e,r,t,n,a,i,s,u,c,l),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=Tt.jc)(e,r,t,n,a),o.dynCall_j=e=>(Lt=o.dynCall_j=Tt.kc)(e)),Bt=o.dynCall_jii=(e,r,t)=>(Bt=o.dynCall_jii=Tt.lc)(e,r,t),Nt=(o.dynCall_viijii=(e,r,t,n,a,i,s)=>(o.dynCall_viijii=Tt.mc)(e,r,t,n,a,i,s),o.dynCall_jiiii=(e,r,t,n,a)=>(Nt=o.dynCall_jiiii=Tt.nc)(e,r,t,n,a));function Ut(){function e(){Et||(Et=!0,o.calledRun=!0,P||(o.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,ue.init(),Y(O),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),M.unshift(e);var e;Y(M)}()))}W>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),j.unshift(e);var e;Y(j)}(),W>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiij=(e,r,t,n,a,i,s)=>(o.dynCall_iiiiij=Tt.oc)(e,r,t,n,a,i,s),o.dynCall_iiiiijj=(e,r,t,n,a,i,s,u,c)=>(o.dynCall_iiiiijj=Tt.pc)(e,r,t,n,a,i,s,u,c),o.dynCall_iiiiiijj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_iiiiiijj=Tt.qc)(e,r,t,n,a,i,s,u,c,l),o.___start_em_js=1146932,o.___stop_em_js=1147040,o.UTF8ToString=me,o.stringToUTF8=Ir,o.lengthBytesUTF8=ae,o.allocateUTF8=vt,R=function e(){Et||Ut(),Et||(R=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ht(e,r){var t=Vt();return Ht=function(r,n){var o=t[r-=110];if(void 0===Ht.OhfiOk){var a=function(e){for(var r,t,n="",o="",a=0,i=0;t=e.charAt(i++);~t&&(r=a%4?64*r+t:t,a++%4)?n+=String.fromCharCode(255&r>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(e,r){var t,n,o=[],i=0,s="";for(e=a(e),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+r.charCodeAt(n%r.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<e.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(e.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Ht.IuySUZ=i,e=arguments,Ht.OhfiOk=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Ht.uLQAlY&&(Ht.uLQAlY=!0),o=Ht.IuySUZ(o,n),e[u]=o),o},Ht(e,r)}function Vt(){var e=["WPBdLCkSg8oOWOOHWOqWW4BdHmoS","WRtdTSkuxNH4dSkqFdBcNCoipG","W6auWOFdPComW7zpxmkDe1BcHCkm","haSCis85W6G","ASkvWQaneHZcOW","pe9EWPTTgCoKESk4uCkVsMi","c2zXWRvnCSoJW6RcTmkEW5umW5pdUG","tt0uW7Ghi8k8WR0","eNdcHdzMgCk1W4xdV8k9WQhdSSo0","WQldO8kgWP0mCSo2pw3dV8oncg0","reVdKLpdHxKXpSokWPHGjmo6","WPtdI8kAW4KneKfHW5tdNaRcGmoQ","W6fhcde6ax/dK0juWPXQBG","W4ZdP8oNWROJBwj/e8o6rCoJW7m","uf9fW6alWOZdRG/dOCoAWP1gW5G","drjvw0KhWOy","BdJcT3L/W7NcKq","WPXDWO1fF8kghW","W7bcpdSxWOZcHSoP","y8oPiCk5W57cNCkPW7BdRCk0WRFcPW","cIHpW4isW7uaW5VdOSk6WPJcQGrB","WPCrFKTKmfy"];return(Vt=function(){return e})()}Ut(),function(e,r){for(var t=Ht,n=e();;)try{if(887095==parseInt(t(127,"awWN"))/1+-parseInt(t(110,"at!U"))/2*(-parseInt(t(130,"*hQM"))/3)+parseInt(t(113,"om%q"))/4*(parseInt(t(122,"9fEl"))/5)+-parseInt(t(128,"WwRp"))/6+parseInt(t(116,"4thD"))/7+parseInt(t(115,"Z7S9"))/8*(parseInt(t(126,"0id!"))/9)+-parseInt(t(111,"$*jk"))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vt);var ighnua,Yt=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),qt=Yt(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(qt)};return e()}));return qt(),e.ready});e.exports=o},function(e,r){}]);
|
|
1
|
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function n(e,t=!1){const r=[];return function e(n){if(n){if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return r.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=t?n.slice(0):n;if(r.push(e),t)return n}else if(ArrayBuffer.isView(n)){let e;if(t){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(r.push(e.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const r=e(n[t]);r&&(n[t]=r)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const r=e(n[t]);r&&(n[t]=r)}}}(e),r}function i(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:n=!0}=t||{};let i="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){i+="-simd";n&&function(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}()&&(i+="-threads")}return i}r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],l=!1,d=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||a(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n,i=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,i=e;i.ready=new Promise(((e,n)=>{t=e,r=n}));var o,s,a,u=Object.assign({},i),c="./this.program",l=(e,t)=>{throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},s=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var h,m=i.print||console.log.bind(console),f=i.printErr||console.error.bind(console);Object.assign(i,u),u=null,i.arguments&&i.arguments,i.thisProgram&&(c=i.thisProgram),i.quit&&(l=i.quit),i.wasmBinary&&(h=i.wasmBinary);var p,g=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&N("no native wasm support detected");var v,y,w,_,C,E,b,x,F,D=!1;function T(){var e=p.buffer;i.HEAP8=v=new Int8Array(e),i.HEAP16=w=new Int16Array(e),i.HEAPU8=y=new Uint8Array(e),i.HEAPU16=_=new Uint16Array(e),i.HEAP32=C=new Int32Array(e),i.HEAPU32=E=new Uint32Array(e),i.HEAPF32=b=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var S,A,P,k,M=[],O=[],R=[],$=0,z=null,L=null;function I(e){$++,i.monitorRunDependencies&&i.monitorRunDependencies($)}function j(e){if($--,i.monitorRunDependencies&&i.monitorRunDependencies($),0==$&&(null!==z&&(clearInterval(z),z=null),L)){var t=L;L=null,t()}}function N(e){i.onAbort&&i.onAbort(e),f(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function W(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){if(e==S&&h)return new Uint8Array(h);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function B(e,t,r){return function(e){return h||"function"!=typeof fetch?Promise.resolve().then((()=>Q(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{f(`failed to asynchronously prepare wasm: ${e}`),N(e)}))}W(S="ScanbotSDK.Asm-simd.wasm")||(A=S,S=i.locateFile?i.locateFile(A,d):d+A);var H={3713456:e=>hr(function(){return this[pe(e)].toString()}.apply((0,eval)("(()=>this)()")))};function U(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var Z=e=>{for(;e.length>0;)e.shift()(i)},V=[],q=0,G=0;function Y(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(kr(this.get_type()))return E[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var X=e=>{var t=G;if(!t)return Er(0),0;var r=new Y(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Er(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var s=r.ptr+16;if(Pr(o,n,s))return Er(o),t}return Er(n),t},J=()=>{var e=V.pop();e||N("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(V.push(e),e.set_rethrown(!0),e.set_caught(!1),q++),G=t},K={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=K.isAbs(e),r="/"===e.substr(-1);return(e=K.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=K.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=K.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return K.normalize(e.join("/"))},join2:(e,t)=>K.normalize(e+"/"+t)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);N("initRandomDevice")})())(e),te={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=K.isAbs(n)}return(t?"/":"")+(e=K.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=te.resolve(e).substr(1),t=te.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),s=o,a=0;a<o;a++)if(n[a]!==i[a]){s=a;break}var u=[];for(a=s;a<n.length;a++)u.push("..");return(u=u.concat(i.slice(s))).join("/")}},re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ne=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&re)return re.decode(e.subarray(t,i));for(var o="";t<i;){var s=e[t++];if(128&s){var a=63&e[t++];if(192!=(224&s)){var u=63&e[t++];if((s=224==(240&s)?(15&s)<<12|a<<6|u:(7&s)<<18|a<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(s);else{var c=s-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o},ie=[],oe=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},se=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,s=0;s<e.length;++s){var a=e.charCodeAt(s);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=o)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ae(e,t,r){var n=r>0?r:oe(e)+1,i=new Array(n),o=se(e,i,0,i.length);return t&&(i.length=o),i}var ue={ttys:[],init(){},shutdown(){},register(e,t){ue.ttys[e]={input:[],output:[],ops:t},fe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var t=ue.ttys[e.node.rdev];if(!t)throw new fe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new fe.ErrnoError(60);for(var o=0,s=0;s<n;s++){var a;try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new fe.ErrnoError(29)}if(void 0===a&&0===o)throw new fe.ErrnoError(6);if(null==a)break;o++,t[r+s]=a}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new fe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ie.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ie=ae(e,!0)}return ie.shift()})(),put_char(e,t){null===t||10===t?(m(ne(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(m(ne(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(f(ne(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(f(ne(e.output,0)),e.output=[])}}},ce=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=xr(65536,e);return t?((e,t)=>(y.fill(0,e,e+t),e))(t,e):0},le={ops_table:null,mount:e=>le.createNode(null,"/",16895,0),createNode(e,t,r,n){if(fe.isBlkdev(r)||fe.isFIFO(r))throw new fe.ErrnoError(63);le.ops_table||(le.ops_table={dir:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,lookup:le.node_ops.lookup,mknod:le.node_ops.mknod,rename:le.node_ops.rename,unlink:le.node_ops.unlink,rmdir:le.node_ops.rmdir,readdir:le.node_ops.readdir,symlink:le.node_ops.symlink},stream:{llseek:le.stream_ops.llseek}},file:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:{llseek:le.stream_ops.llseek,read:le.stream_ops.read,write:le.stream_ops.write,allocate:le.stream_ops.allocate,mmap:le.stream_ops.mmap,msync:le.stream_ops.msync}},link:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,readlink:le.node_ops.readlink},stream:{}},chrdev:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:fe.chrdev_stream_ops}});var i=fe.createNode(e,t,r,n);return fe.isDir(i.mode)?(i.node_ops=le.ops_table.dir.node,i.stream_ops=le.ops_table.dir.stream,i.contents={}):fe.isFile(i.mode)?(i.node_ops=le.ops_table.file.node,i.stream_ops=le.ops_table.file.stream,i.usedBytes=0,i.contents=null):fe.isLink(i.mode)?(i.node_ops=le.ops_table.link.node,i.stream_ops=le.ops_table.link.stream):fe.isChrdev(i.mode)&&(i.node_ops=le.ops_table.chrdev.node,i.stream_ops=le.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,fe.isDir(e.mode)?t.size=4096:fe.isFile(e.mode)?t.size=e.usedBytes:fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&le.resizeFileStorage(e,t.size)},lookup(e,t){throw fe.genericErrors[44]},mknod:(e,t,r,n)=>le.createNode(e,t,r,n),rename(e,t,r){if(fe.isDir(e.mode)){var n;try{n=fe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=fe.lookupNode(e,t);for(var n in r.contents)throw new fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=le.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!fe.isLink(e.mode))throw new fe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-i,n);if(s>8&&o.subarray)t.set(o.subarray(i,i+s),r);else for(var a=0;a<s;a++)t[r+a]=o[i+a];return s},write(e,t,r,n,i,o){if(t.buffer===v.buffer&&(o=!1),!n)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(o)return s.contents=t.subarray(r,r+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===i)return s.contents=t.slice(r,r+n),s.usedBytes=n,n;if(i+n<=s.usedBytes)return s.contents.set(t.subarray(r,r+n),i),n}if(le.expandFileStorage(s,i+n),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)s.contents[i+a]=t[r+a];return s.usedBytes=Math.max(s.usedBytes,i+n),n},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new fe.ErrnoError(28);return n},allocate(e,t,r){le.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,n,i){if(!fe.isFile(e.node.mode))throw new fe.ErrnoError(43);var o,s,a=e.node.contents;if(2&i||a.buffer!==v.buffer){if((r>0||r+t<a.length)&&(a=a.subarray?a.subarray(r,r+t):Array.prototype.slice.call(a,r,r+t)),s=!0,!(o=ce(t)))throw new fe.ErrnoError(48);v.set(a,o)}else s=!1,o=a.byteOffset;return{ptr:o,allocated:s}},msync:(e,t,r,n,i)=>(le.stream_ops.write(e,t,0,n,r,!1),0)}},de=(e,t,r,n)=>{var i=n?"":`al ${e}`;s(e,(r=>{var n;n=`Loading data file "${e}" failed (no arrayBuffer).`,r||N(n),t(new Uint8Array(r)),i&&j()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&I()},he=i.preloadPlugins||[],me=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=te.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new fe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=fe.root,i="/",o=0;o<r.length;o++){var s=o===r.length-1;if(s&&t.parent)break;if(n=fe.lookupNode(n,r[o]),i=K.join2(i,r[o]),fe.isMountpoint(n)&&(!s||s&&t.follow_mount)&&(n=n.mounted.root),!s||t.follow)for(var a=0;fe.isLink(n.mode);){var u=fe.readlink(i);if(i=te.resolve(K.dirname(i),u),n=fe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,a++>40)throw new fe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%fe.nameTable.length},hashAddNode(e){var t=fe.hashName(e.parent.id,e.name);e.name_next=fe.nameTable[t],fe.nameTable[t]=e},hashRemoveNode(e){var t=fe.hashName(e.parent.id,e.name);if(fe.nameTable[t]===e)fe.nameTable[t]=e.name_next;else for(var r=fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=fe.mayLookup(e);if(r)throw new fe.ErrnoError(r,e);for(var n=fe.hashName(e.id,t),i=fe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return fe.lookup(e,t)},createNode(e,t,r,n){var i=new fe.FSNode(e,t,r,n);return fe.hashAddNode(i),i},destroyNode(e){fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return fe.lookupNode(e,t),20}catch(e){}return fe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=fe.lookupNode(e,t)}catch(e){return e.errno}var i=fe.nodePermissions(e,"wx");if(i)return i;if(r){if(!fe.isDir(n.mode))return 54;if(fe.isRoot(n)||fe.getPath(n)===fe.cwd())return 10}else if(fe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?fe.isLink(e.mode)?32:fe.isDir(e.mode)&&("r"!==fe.flagsToPermissionString(t)||512&t)?31:fe.nodePermissions(e,fe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=fe.MAX_OPEN_FDS;e++)if(!fe.streams[e])return e;throw new fe.ErrnoError(33)},getStreamChecked(e){var t=fe.getStream(e);if(!t)throw new fe.ErrnoError(8);return t},getStream:e=>fe.streams[e],createStream:(e,t=-1)=>(fe.FSStream||(fe.FSStream=function(){this.shared={}},fe.FSStream.prototype={},Object.defineProperties(fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new fe.FSStream,e),-1==t&&(t=fe.nextfd()),e.fd=t,fe.streams[t]=e,e),closeStream(e){fe.streams[e]=null},chrdev_stream_ops:{open(e){var t=fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){fe.devices[e]={stream_ops:t}},getDevice:e=>fe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),fe.syncFSRequests++,fe.syncFSRequests>1&&f(`warning: ${fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=fe.getMounts(fe.root.mount),n=0;function i(e){return fe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var n,i="/"===r,o=!r;if(i&&fe.root)throw new fe.ErrnoError(10);if(!i&&!o){var s=fe.lookupPath(r,{follow_mount:!1});if(r=s.path,n=s.node,fe.isMountpoint(n))throw new fe.ErrnoError(10);if(!fe.isDir(n.mode))throw new fe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(a);return u.mount=a,a.root=u,i?fe.root=u:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),u},unmount(e){var t=fe.lookupPath(e,{follow_mount:!1});if(!fe.isMountpoint(t.node))throw new fe.ErrnoError(28);var r=t.node,n=r.mounted,i=fe.getMounts(n);Object.keys(fe.nameTable).forEach((e=>{for(var t=fe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&fe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=fe.lookupPath(e,{parent:!0}).node,i=K.basename(e);if(!i||"."===i||".."===i)throw new fe.ErrnoError(28);var o=fe.mayCreate(n,i);if(o)throw new fe.ErrnoError(o);if(!n.node_ops.mknod)throw new fe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,fe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,fe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{fe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,fe.mknod(e,t,r)),symlink(e,t){if(!te.resolve(e))throw new fe.ErrnoError(44);var r=fe.lookupPath(t,{parent:!0}).node;if(!r)throw new fe.ErrnoError(44);var n=K.basename(t),i=fe.mayCreate(r,n);if(i)throw new fe.ErrnoError(i);if(!r.node_ops.symlink)throw new fe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=K.dirname(e),o=K.dirname(t),s=K.basename(e),a=K.basename(t);if(r=fe.lookupPath(e,{parent:!0}).node,n=fe.lookupPath(t,{parent:!0}).node,!r||!n)throw new fe.ErrnoError(44);if(r.mount!==n.mount)throw new fe.ErrnoError(75);var u,c=fe.lookupNode(r,s),l=te.relative(e,o);if("."!==l.charAt(0))throw new fe.ErrnoError(28);if("."!==(l=te.relative(t,i)).charAt(0))throw new fe.ErrnoError(55);try{u=fe.lookupNode(n,a)}catch(e){}if(c!==u){var d=fe.isDir(c.mode),h=fe.mayDelete(r,s,d);if(h)throw new fe.ErrnoError(h);if(h=u?fe.mayDelete(n,a,d):fe.mayCreate(n,a))throw new fe.ErrnoError(h);if(!r.node_ops.rename)throw new fe.ErrnoError(63);if(fe.isMountpoint(c)||u&&fe.isMountpoint(u))throw new fe.ErrnoError(10);if(n!==r&&(h=fe.nodePermissions(r,"w")))throw new fe.ErrnoError(h);fe.hashRemoveNode(c);try{r.node_ops.rename(c,n,a)}catch(e){throw e}finally{fe.hashAddNode(c)}}},rmdir(e){var t=fe.lookupPath(e,{parent:!0}).node,r=K.basename(e),n=fe.lookupNode(t,r),i=fe.mayDelete(t,r,!0);if(i)throw new fe.ErrnoError(i);if(!t.node_ops.rmdir)throw new fe.ErrnoError(63);if(fe.isMountpoint(n))throw new fe.ErrnoError(10);t.node_ops.rmdir(t,r),fe.destroyNode(n)},readdir(e){var t=fe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new fe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=fe.lookupPath(e,{parent:!0}).node;if(!t)throw new fe.ErrnoError(44);var r=K.basename(e),n=fe.lookupNode(t,r),i=fe.mayDelete(t,r,!1);if(i)throw new fe.ErrnoError(i);if(!t.node_ops.unlink)throw new fe.ErrnoError(63);if(fe.isMountpoint(n))throw new fe.ErrnoError(10);t.node_ops.unlink(t,r),fe.destroyNode(n)},readlink(e){var t=fe.lookupPath(e).node;if(!t)throw new fe.ErrnoError(44);if(!t.node_ops.readlink)throw new fe.ErrnoError(28);return te.resolve(fe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=fe.lookupPath(e,{follow:!t}).node;if(!r)throw new fe.ErrnoError(44);if(!r.node_ops.getattr)throw new fe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>fe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?fe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){fe.chmod(e,t,!0)},fchmod(e,t){var r=fe.getStreamChecked(e);fe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){fe.chown(e,t,r,!0)},fchown(e,t,r){var n=fe.getStreamChecked(e);fe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new fe.ErrnoError(28);var r;if(!(r="string"==typeof e?fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);if(fe.isDir(r.mode))throw new fe.ErrnoError(31);if(!fe.isFile(r.mode))throw new fe.ErrnoError(28);var n=fe.nodePermissions(r,"w");if(n)throw new fe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=fe.getStreamChecked(e);if(0==(2097155&r.flags))throw new fe.ErrnoError(28);fe.truncate(r.node,t)},utime(e,t,r){var n=fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new fe.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=K.normalize(e);try{n=fe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(n){if(128&t)throw new fe.ErrnoError(20)}else n=fe.mknod(e,r,0),o=!0;if(!n)throw new fe.ErrnoError(44);if(fe.isChrdev(n.mode)&&(t&=-513),65536&t&&!fe.isDir(n.mode))throw new fe.ErrnoError(54);if(!o){var s=fe.mayOpen(n,t);if(s)throw new fe.ErrnoError(s)}512&t&&!o&&fe.truncate(n,0),t&=-131713;var a=fe.createStream({node:n,path:fe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(fe.readFiles||(fe.readFiles={}),e in fe.readFiles||(fe.readFiles[e]=1)),a},close(e){if(fe.isClosed(e))throw new fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new fe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(1==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.read)throw new fe.ErrnoError(28);var o="undefined"!=typeof i;if(o){if(!e.seekable)throw new fe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=s),s},write(e,t,r,n,i,o){if(n<0||i<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.write)throw new fe.ErrnoError(28);e.seekable&&1024&e.flags&&fe.llseek(e,0,2);var s="undefined"!=typeof i;if(s){if(!e.seekable)throw new fe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,o);return s||(e.position+=a),a},allocate(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(t<0||r<=0)throw new fe.ErrnoError(28);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(!fe.isFile(e.node.mode)&&!fe.isDir(e.node.mode))throw new fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new fe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new fe.ErrnoError(2);if(1==(2097155&e.flags))throw new fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new fe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new fe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=fe.open(e,t.flags),i=fe.stat(e).size,o=new Uint8Array(i);return fe.read(n,o,0,i,0),"utf8"===t.encoding?r=ne(o,0):"binary"===t.encoding&&(r=o),fe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=fe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(oe(t)+1),o=se(t,i,0,i.length);fe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");fe.write(n,t,0,t.byteLength,void 0,r.canOwn)}fe.close(n)},cwd:()=>fe.currentPath,chdir(e){var t=fe.lookupPath(e,{follow:!0});if(null===t.node)throw new fe.ErrnoError(44);if(!fe.isDir(t.node.mode))throw new fe.ErrnoError(54);var r=fe.nodePermissions(t.node,"x");if(r)throw new fe.ErrnoError(r);fe.currentPath=t.path},createDefaultDirectories(){fe.mkdir("/tmp"),fe.mkdir("/home"),fe.mkdir("/home/web_user")},createDefaultDevices(){fe.mkdir("/dev"),fe.registerDevice(fe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),fe.mkdev("/dev/null",fe.makedev(1,3)),ue.register(fe.makedev(5,0),ue.default_tty_ops),ue.register(fe.makedev(6,0),ue.default_tty1_ops),fe.mkdev("/dev/tty",fe.makedev(5,0)),fe.mkdev("/dev/tty1",fe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ee(e).byteLength),e[--t]);fe.createDevice("/dev","random",r),fe.createDevice("/dev","urandom",r),fe.mkdir("/dev/shm"),fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){fe.mkdir("/proc");var e=fe.mkdir("/proc/self");fe.mkdir("/proc/self/fd"),fe.mount({mount(){var t=fe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=fe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?fe.createDevice("/dev","stdin",i.stdin):fe.symlink("/dev/tty","/dev/stdin"),i.stdout?fe.createDevice("/dev","stdout",null,i.stdout):fe.symlink("/dev/tty","/dev/stdout"),i.stderr?fe.createDevice("/dev","stderr",null,i.stderr):fe.symlink("/dev/tty1","/dev/stderr"),fe.open("/dev/stdin",0),fe.open("/dev/stdout",1),fe.open("/dev/stderr",1)},ensureErrnoError(){fe.ErrnoError||(fe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},fe.ErrnoError.prototype=new Error,fe.ErrnoError.prototype.constructor=fe.ErrnoError,[44].forEach((e=>{fe.genericErrors[e]=new fe.ErrnoError(e),fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){fe.ensureErrnoError(),fe.nameTable=new Array(4096),fe.mount(le,{},"/"),fe.createDefaultDirectories(),fe.createDefaultDevices(),fe.createSpecialDirectories(),fe.filesystems={MEMFS:le}},init(e,t,r){fe.init.initialized=!0,fe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,fe.createStandardStreams()},quit(){fe.init.initialized=!1;for(var e=0;e<fe.streams.length;e++){var t=fe.streams[e];t&&fe.close(t)}},findObject(e,t){var r=fe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=fe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=fe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=K.basename(e),n=fe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:fe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var s=K.join2(e,o);try{fe.mkdir(s)}catch(e){}e=s}}return s},createFile(e,t,r,n,i){var o=K.join2("string"==typeof e?e:fe.getPath(e),t),s=me(n,i);return fe.create(o,s)},createDataFile(e,t,r,n,i,o){var s=t;e&&(e="string"==typeof e?e:fe.getPath(e),s=t?K.join2(e,t):e);var a=me(n,i),u=fe.create(s,a);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,d=r.length;l<d;++l)c[l]=r.charCodeAt(l);r=c}fe.chmod(u,146|a);var h=fe.open(u,577);fe.write(h,r,0,r.length,0,o),fe.close(h),fe.chmod(u,a)}return u},createDevice(e,t,r,n){var i=K.join2("string"==typeof e?e:fe.getPath(e),t),o=me(!!r,!!n);fe.createDevice.major||(fe.createDevice.major=64);var s=fe.makedev(fe.createDevice.major++,0);return fe.registerDevice(s,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var s=0,a=0;a<i;a++){var u;try{u=r()}catch(e){throw new fe.ErrnoError(29)}if(void 0===u&&0===s)throw new fe.ErrnoError(6);if(null==u)break;s++,t[n+a]=u}return s&&(e.node.timestamp=Date.now()),s},write(e,t,r,i,o){for(var s=0;s<i;s++)try{n(t[r+s])}catch(e){throw new fe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),s}}),fe.mkdev(i,o,s)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ae(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new fe.ErrnoError(29)}},createLazyFile(e,t,r,n,i){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;i||(s=n);var a=this;a.setDataGetter((e=>{var t=e*s,i=(e+1)*s-1;if(i=Math.min(i,n-1),"undefined"==typeof a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==s&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ae(i.responseText||"",!0)})(t,i)),"undefined"==typeof a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&n||(s=n=1,n=this.getter(0).length,s=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new o;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:s}}else a={isDevice:!1,url:r};var u=fe.createFile(e,t,a,n,i);a.contents?u.contents=a.contents:a.url&&(u.contents=null,u.url=a.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var s=Math.min(o.length-i,n);if(o.slice)for(var a=0;a<s;a++)t[r+a]=o[i+a];else for(a=0;a<s;a++)t[r+a]=o.get(i+a);return s}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];c[e]=function(){return fe.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(e,t,r,n,i)=>(fe.forceLoadFile(u),l(e,t,r,n,i)),c.mmap=(e,t,r,n,i)=>{fe.forceLoadFile(u);var o=ce(t);if(!o)throw new fe.ErrnoError(48);return l(e,v,o,t,r),{ptr:o,allocated:!0}},u.stream_ops=c,u}},pe=(e,t)=>e?ne(y,e,t):"",ge={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(K.isAbs(t))return t;var n;if(n=-100===e?fe.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!r)throw new fe.ErrnoError(44);return n}return K.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&K.normalize(t)!==K.normalize(fe.getPath(e.node)))return-54;throw e}C[r>>2]=n.dev,C[r+4>>2]=n.mode,E[r+8>>2]=n.nlink,C[r+12>>2]=n.uid,C[r+16>>2]=n.gid,C[r+20>>2]=n.rdev,k=[n.size>>>0,(P=n.size,+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[r+24>>2]=k[0],C[r+28>>2]=k[1],C[r+32>>2]=4096,C[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),s=n.ctime.getTime();return k=[Math.floor(i/1e3)>>>0,(P=Math.floor(i/1e3),+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[r+40>>2]=k[0],C[r+44>>2]=k[1],E[r+48>>2]=i%1e3*1e3,k=[Math.floor(o/1e3)>>>0,(P=Math.floor(o/1e3),+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[r+56>>2]=k[0],C[r+60>>2]=k[1],E[r+64>>2]=o%1e3*1e3,k=[Math.floor(s/1e3)>>>0,(P=Math.floor(s/1e3),+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[r+72>>2]=k[0],C[r+76>>2]=k[1],E[r+80>>2]=s%1e3*1e3,k=[n.ino>>>0,(P=n.ino,+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[r+88>>2]=k[0],C[r+92>>2]=k[1],0},doMsync(e,t,r,n,i){if(!fe.isFile(t.node.mode))throw new fe.ErrnoError(43);if(2&n)return 0;var o=y.slice(e,e+r);fe.msync(t,o,i,r,n)},varargs:void 0,get(){var e=C[ge.varargs>>2];return ge.varargs+=4,e},getp:()=>ge.get(),getStr:e=>pe(e),getStreamFromFD:e=>fe.getStreamChecked(e)},ve={},ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function we(e){return this.fromWireType(C[e>>2])}var _e={},Ce={},Ee={},be=void 0,xe=e=>{throw new be(e)},Fe=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&xe("Mismatched type converter count");for(var i=0;i<e.length;++i)Pe(e[i],n[i])}e.forEach((function(e){Ee[e]=t}));var i=new Array(t.length),o=[],s=0;t.forEach(((e,t)=>{Ce.hasOwnProperty(e)?i[t]=Ce[e]:(o.push(e),_e.hasOwnProperty(e)||(_e[e]=[]),_e[e].push((()=>{i[t]=Ce[e],++s===o.length&&n(i)})))})),0===o.length&&n(i)},De=void 0,Te=e=>{for(var t="",r=e;y[r];)t+=De[y[r++]];return t},Se=void 0,Ae=e=>{throw new Se(e)};function Pe(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||Ae(`type "${n}" must have a positive integer typeid pointer`),Ce.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${n}' twice`)}if(Ce[e]=t,delete Ee[e],_e.hasOwnProperty(e)){var i=_e[e];delete _e[e],i.forEach((e=>e()))}}(e,t,r)}var ke=8;function Me(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}var Oe=e=>{Ae(e.$$.ptrType.registeredClass.name+" instance already deleted")},Re=!1,$e=e=>{},ze=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Le=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=Le(e,t,r.baseClass);return null===n?null:r.downcast(n)},Ie={},je=()=>Object.keys(Ue).length,Ne=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},We=[],Qe=()=>{for(;We.length;){var e=We.pop();e.$$.deleteScheduled=!1,e.delete()}},Be=void 0,He=e=>{Be=e,We.length&&Be&&Be(Qe)},Ue={},Ze=(e,t)=>(t=((e,t)=>{for(void 0===t&&Ae("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Ue[t]),Ve=(e,t)=>(t.ptrType&&t.ptr||xe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&xe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ge(Object.create(e,{$$:{value:t}})));function qe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Ze(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?Ve(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ve(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,s=this.registeredClass.getActualType(t),a=Ie[s];if(!a)return i.call(this);o=this.isConst?a.constPointerType:a.pointerType;var u=Le(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Ge=e=>"undefined"==typeof FinalizationRegistry?(Ge=e=>e,e):(Re=new FinalizationRegistry((e=>{ze(e.$$)})),Ge=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Re.register(e,r,e)}return e},$e=e=>Re.unregister(e),Ge(e));function Ye(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ge(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Xe(){this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),$e(this),ze(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Je(){return!this.$$.ptr}function Ke(){return this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),We.push(this),1===We.length&&Be&&Be(Qe),this.$$.deleteScheduled=!0,this}function et(){}var tt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function rt(e,t){return{[e=tt(e)]:function(){return t.apply(this,arguments)}}[e]}var nt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ae(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},it=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ae(`Cannot register public name '${e}' twice`),nt(i,e,e),i.hasOwnProperty(r)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))};function ot(e,t,r,n,i,o,s,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=s,this.downcast=a,this.pureVirtualFunctions=[]}var st=(e,t,r)=>{for(;t!==r;)t.upcast||Ae(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function at(e,t){if(null===t)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;t.$$||Ae(`Cannot pass "${kt(t)}" as a ${this.name}`),t.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return st(t.$$.ptr,r,this.registeredClass)}function ut(e,t){var r;if(null===t)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ae(`Cannot pass "${kt(t)}" as a ${this.name}`),t.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=st(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ae(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,Pt.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ae("Unsupporting sharing policy")}return r}function ct(e,t){if(null===t)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;t.$$||Ae(`Cannot pass "${kt(t)}" as a ${this.name}`),t.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return st(t.$$.ptr,r,this.registeredClass)}function lt(e){return this.fromWireType(E[e>>2])}function dt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function ht(e){this.rawDestructor&&this.rawDestructor(e)}var mt=e=>{null!==e&&e.delete()};function ft(e,t,r,n,i,o,s,a,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=a,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=ut:n?(this.toWireType=at,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var pt=(e,t,r)=>{i.hasOwnProperty(e)||xe("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},gt=e=>F.get(e),vt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)})(e,t,r):gt(t).apply(null,r),yt=(e,t)=>{var r,n,i,o=(e=Te(e)).includes("j")?(r=e,n=t,i=[],function(){return i.length=0,Object.assign(i,arguments),vt(r,n,i)}):gt(t);return"function"!=typeof o&&Ae(`unknown function pointer with signature ${e}: ${t}`),o},wt=void 0,_t=e=>{var t=br(e),r=Te(t);return _r(t),r},Ct=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||Ce[t]||(Ee[t]?Ee[t].forEach(e):(r.push(t),n[t]=!0))})),new wt(`${e}: `+r.map(_t).join([", "]))},Et=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(E[t+4*n>>2]);return r};function bt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=rt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function xt(e,t,r,n,i,o){var s=t.length;s<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var l="void"!==t[0].name,d="",h="";for(c=0;c<s-2;++c)d+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${tt(e)}(${d}) {\n if (arguments.length !== ${s-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${s-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Ae,n,i,ye,t[0],t[1]];for(a&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<s-2;++c)m+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(a&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(l||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(m+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return l&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),bt(Function,p).apply(null,g)}function Ft(){this.allocated=[void 0],this.freelist=[]}var Dt,Tt=new Ft,St=e=>{e>=Tt.reserved&&0==--Tt.get(e).refcount&&Tt.free(e)},At=()=>{for(var e=0,t=Tt.reserved;t<Tt.allocated.length;++t)void 0!==Tt.allocated[t]&&++e;return e},Pt={toValue:e=>(e||Ae("Cannot use deleted val. handle = "+e),Tt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Tt.allocate({refcount:1,value:e})}}},kt=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Mt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ot=(e,t,r)=>{switch(t){case 1:return r?e=>v[e>>0]:e=>y[e>>0];case 2:return r?e=>w[e>>1]:e=>_[e>>1];case 4:return r?e=>C[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Rt=(e,t,r)=>se(e,y,t,r),$t="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,zt=(e,t)=>{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&_[n];)++n;if((r=n<<1)-e>32&&$t)return $t.decode(y.subarray(e,r));for(var o="",s=0;!(s>=t/2);++s){var a=w[e+2*s>>1];if(0==a)break;o+=String.fromCharCode(a)}return o},Lt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o<i;++o){var s=e.charCodeAt(o);w[t>>1]=s,t+=2}return w[t>>1]=0,t-n},It=e=>2*e.length,jt=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=C[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},Nt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),C[t>>2]=s,(t+=4)+4>i)break}return C[t>>2]=0,t-n},Wt=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Qt=(e,t)=>{var r=Ce[e];return void 0===r&&Ae(t+" has unknown type "+_t(e)),r},Bt={},Ht=e=>{var t=Bt[e];return void 0===t?Te(e):t},Ut=[],Zt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Vt=[],qt=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Gt=e=>e%4==0&&(e%100!=0||e%400==0),Yt=[0,31,60,91,121,152,182,213,244,274,305,335],Xt=[0,31,59,90,120,151,181,212,243,273,304,334],Jt=e=>{var t=oe(e)+1,r=wr(t);return r&&Rt(e,r,t),r},Kt=[],er=(e,t,r)=>{var n=((e,t)=>{var r;for(Kt.length=0;r=y[e++];)t+=105!=r&&t%8?4:0,Kt.push(105==r?C[t>>2]:x[t>>3]),t+=105==r?4:8;return Kt})(t,r);return H[e].apply(null,n)};Dt=()=>performance.now();var tr,rr,nr,ir=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),T(),1}catch(e){}},or={},sr=()=>{if(!sr.strings){var e={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",_:c||"./this.program"};for(var t in or)void 0===or[t]?delete e[t]:e[t]=or[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);sr.strings=r}return sr.strings},ar=e=>{g||(i.onExit&&i.onExit(e),D=!0),l(e,new U(e))},ur=(e,t)=>{ar(e)},cr=[31,29,31,30,31,30,31,31,30,31,30,31],lr=[31,28,31,30,31,30,31,31,30,31,30,31],dr=(e,t,r,n)=>{var i=E[n+40>>2],o={tm_sec:C[n>>2],tm_min:C[n+4>>2],tm_hour:C[n+8>>2],tm_mday:C[n+12>>2],tm_mon:C[n+16>>2],tm_year:C[n+20>>2],tm_wday:C[n+24>>2],tm_yday:C[n+28>>2],tm_isdst:C[n+32>>2],tm_gmtoff:C[n+36>>2],tm_zone:i?pe(i):""},s=pe(r),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in a)s=s.replace(new RegExp(u,"g"),a[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function h(e,t){return d(e,t,"0")}function m(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=((e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Gt(r.getFullYear()),i=r.getMonth(),o=(n?cr:lr)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r})(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=f(r),o=f(n);return m(i,t)<=0?m(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>l[e.tm_mon].substring(0,3),"%B":e=>l[e.tm_mon],"%C":e=>h((e.tm_year+1900)/100|0,2),"%d":e=>h(e.tm_mday,2),"%e":e=>d(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>h(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),h(t,2)},"%j":e=>h(e.tm_mday+((e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r})(Gt(e.tm_year+1900)?cr:lr,e.tm_mon-1),3),"%m":e=>h(e.tm_mon+1,2),"%M":e=>h(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>h(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return h(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Gt(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Gt(e.tm_year%400-1))&&t++}return h(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return h(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in s=s.replace(/%%/g,"\0\0"),g)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),g[u](o)));var y,w,_=ae(s=s.replace(/\0\0/g,"%"),!1);return _.length>t?0:(y=_,w=e,v.set(y,w),_.length-1)},hr=Jt,mr=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,pr=146;Object.defineProperties(mr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=-366}},write:{get:function(){return(this.mode&pr)===pr},set:function(e){e?this.mode|=pr:this.mode&=-147}},isFolder:{get:function(){return fe.isDir(this.mode)}},isDevice:{get:function(){return fe.isChrdev(this.mode)}}}),fe.FSNode=mr,fe.createPreloadedFile=(e,t,r,n,i,o,s,a,u,c)=>{var l=t?te.resolve(K.join2(e,t)):e;function d(r){function d(r){c&&c(),a||fe.createDataFile(e,t,r,n,i,u),o&&o(),j()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return he.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,l,d,(()=>{s&&s(),j()}))||d(r)}I(),"string"==typeof r?de(r,(e=>d(e)),s):d(r)},fe.staticInit(),be=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);De=e})(),Se=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},et.prototype.isAliasOf=Me,et.prototype.clone=Ye,et.prototype.delete=Xe,et.prototype.isDeleted=Je,et.prototype.deleteLater=Ke,i.getInheritedInstanceCount=je,i.getLiveInheritedInstances=Ne,i.flushPendingDeletes=Qe,i.setDelayFunction=He,ft.prototype.getPointee=dt,ft.prototype.destructor=ht,ft.prototype.argPackAdvance=ke,ft.prototype.readValueFromPointer=lt,ft.prototype.deleteObject=mt,ft.prototype.fromWireType=qe,wt=i.UnboundTypeError=(tr=Error,(nr=rt(rr="UnboundTypeError",(function(e){this.name=rr,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(tr.prototype),nr.prototype.constructor=nr,nr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nr),Object.assign(Ft.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Tt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Tt.reserved=Tt.allocated.length,i.count_emval_handles=At;var gr,vr={s:e=>{var t=new Y(e);return t.get_caught()||(t.set_caught(!0),q--),t.set_rethrown(!1),V.push(t),Ar(t.excPtr),t.get_exception_ptr()},ob:()=>{if(!V.length)return 0;var e=V[V.length-1];return Ar(e.excPtr),e.excPtr},t:()=>{Fr(0,0);var e=V.pop();Sr(e.excPtr),G=0},a:()=>X([]),f:e=>X([e]),o:(e,t)=>X([e,t]),ra:J,nb:e=>{if(e){var t=new Y(e);V.push(t),t.set_rethrown(!0),J()}},p:(e,t,r)=>{throw new Y(e).init(t,r),q++,G=e},pb:()=>q,b:e=>{throw G||(G=e),G},vb:function(e,t,r,n,i){try{for(var o=0,s=t?C[t>>2]:0,a=t?C[t+4>>2]:0,u=r?C[r>>2]:0,c=r?C[r+4>>2]:0,l=n?C[n>>2]:0,d=n?C[n+4>>2]:0,h=0,m=0,f=0,p=0,g=0,v=0,y=(t?C[t>>2]:0)|(r?C[r>>2]:0)|(n?C[n>>2]:0),w=(t?C[t+4>>2]:0)|(r?C[r+4>>2]:0)|(n?C[n+4>>2]:0),_=function(e,t,r,n){return e<32?t&n:r&n},E=0;E<e;E++){var b=1<<E%32;if(_(E,y,w,b)){var x=ge.getStreamFromFD(E),F=ge.DEFAULT_POLLMASK;if(x.stream_ops.poll){var D=-1;i&&(D=1e3*((t?C[i>>2]:0)+(t?C[i+8>>2]:0)/1e6)),F=x.stream_ops.poll(x,D)}1&F&&_(E,s,a,b)&&(E<32?h|=b:m|=b,o++),4&F&&_(E,u,c,b)&&(E<32?f|=b:p|=b,o++),2&F&&_(E,l,d,b)&&(E<32?g|=b:v|=b,o++)}}return t&&(C[t>>2]=h,C[t+4>>2]=m),r&&(C[r>>2]=f,C[r+4>>2]=p),n&&(C[n>>2]=g,C[n+4>>2]=v),o}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},wa:function(e,t,r){ge.varargs=r;try{var n=ge.getStreamFromFD(e);switch(t){case 0:if((i=ge.get())<0)return-28;for(;fe.streams[i];)i++;return fe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=ge.get();return n.flags|=i,0;case 5:return i=ge.getp(),w[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return o=28,C[Cr()>>2]=o,-1}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}var o},Db:function(e,t){try{var r=ge.getStreamFromFD(e);return ge.doStat(fe.stat,r.path,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Eb:function(e,t,r){ge.varargs=r;try{var n=ge.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var i=n.tty.ops.ioctl_tcgets(n),o=ge.getp();C[o>>2]=i.c_iflag||0,C[o+4>>2]=i.c_oflag||0,C[o+8>>2]=i.c_cflag||0,C[o+12>>2]=i.c_lflag||0;for(var s=0;s<32;s++)v[o+s+17>>0]=i.c_cc[s]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){o=ge.getp();var a=C[o>>2],u=C[o+4>>2],c=C[o+8>>2],l=C[o+12>>2],d=[];for(s=0;s<32;s++)d.push(v[o+s+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:a,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:d})}return 0;case 21519:return n.tty?(o=ge.getp(),C[o>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return o=ge.getp(),fe.ioctl(n,t,o);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var h=n.tty.ops.ioctl_tiocgwinsz(n.tty);o=ge.getp(),w[o>>1]=h[0],w[o+2>>1]=h[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Bb:function(e,t,r,n){try{t=ge.getStr(t);var i=256&n,o=4096&n;return n&=-6401,t=ge.calculateAt(e,t,o),ge.doStat(i?fe.lstat:fe.stat,t,r)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},xa:function(e,t,r,n){ge.varargs=n;try{t=ge.getStr(t),t=ge.calculateAt(e,t);var i=n?ge.get():0;return fe.open(t,r,i).fd}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},wb:function(e){try{return e=ge.getStr(e),fe.rmdir(e),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Cb:function(e,t){try{return e=ge.getStr(e),ge.doStat(fe.stat,e,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},xb:function(e,t,r){try{return t=ge.getStr(t),t=ge.calculateAt(e,t),0===r?fe.unlink(t):512===r?fe.rmdir(t):N("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Wa:e=>{var t=ve[e];delete ve[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType)));Fe([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,s=e[r],a=t.getter,u=t.getterContext,c=e[r+i.length],l=t.setter,d=t.setterContext;o[n]={read:e=>s.fromWireType(a(u,e)),write:(e,t)=>{var r=[];l(d,e,c.toWireType(r,t)),ye(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var i in o)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var s=r();for(i in o)o[i].write(s,t[i]);return null!==e&&e.push(n,s),s},argPackAdvance:ke,readValueFromPointer:we,destructorFunction:n}]}))},gb:(e,t,r,n,i)=>{},za:(e,t,r,n)=>{Pe(e,{name:t=Te(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:ke,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},ta:(e,t,r,n,i,o,s,a,u,c,l,d,h)=>{l=Te(l),o=yt(i,o),a&&(a=yt(s,a)),c&&(c=yt(u,c)),h=yt(d,h);var m=tt(l);it(m,(function(){Ct(`Cannot construct ${l} due to unbound types`,[n])})),Fe([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:et.prototype;var s=rt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new Se("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Se(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Se(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:s}});s.prototype=u;var d=new ot(l,s,u,h,r,o,a,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var f=new ft(l,d,!0,!1,!1),p=new ft(l+"*",d,!1,!1,!1),g=new ft(l+" const*",d,!1,!0,!1);return Ie[e]={pointerType:p,constPointerType:g},pt(m,s),[f,p,g]}))},sa:(e,t,r,n,i,o)=>{var s=Et(t,r);i=yt(n,i),Fe([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Se(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Ct(`Cannot construct ${e.name} due to unbound types`,s)},Fe([],s,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=xt(r,n,null,i,o),[]))),[]}))},ga:(e,t,r,n,i,o,s,a,u)=>{var c=Et(r,n);t=Te(t),o=yt(i,o),Fe([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Ct(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(nt(l,t,n),l[t].overloadTable[r-2]=i),Fe([],c,(function(i){var a=xt(n,i,e,o,s,u);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))},ya:(e,t)=>{Pe(e,{name:t=Te(t),fromWireType:e=>{var t=Pt.toValue(e);return St(e),t},toWireType:(e,t)=>Pt.toHandle(t),argPackAdvance:ke,readValueFromPointer:we,destructorFunction:null})},la:(e,t,r)=>{Pe(e,{name:t=Te(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:ke,readValueFromPointer:Mt(t,r),destructorFunction:null})},E:(e,t,r,n,i,o,s)=>{var a=Et(t,r);e=Te(e),i=yt(n,i),it(e,(function(){Ct(`Cannot call ${e} due to unbound types`,a)}),t-1),Fe([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return pt(e,xt(e,n,null,i,o,s),t-1),[]}))},G:(e,t,r,n,i)=>{t=Te(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var s=32-8*r;o=e=>e<<s>>>s}var a=t.includes("unsigned");Pe(e,{name:t,fromWireType:o,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:ke,readValueFromPointer:Ot(t,r,0!==n),destructorFunction:null})},z:(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=E[e>>2],r=E[e+4>>2];return new n(v.buffer,r,t)}Pe(e,{name:r=Te(r),fromWireType:i,argPackAdvance:ke,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},ka:(e,t)=>{var r="std::string"===(t=Te(t));Pe(e,{name:t,fromWireType:e=>{var t,n=E[e>>2],i=e+4;if(r)for(var o=i,s=0;s<=n;++s){var a=i+s;if(s==n||0==y[a]){var u=pe(o,a-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=a+1}}else{var c=new Array(n);for(s=0;s<n;++s)c[s]=String.fromCharCode(y[i+s]);t=c.join("")}return _r(e),t},toWireType:(e,t)=>{var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var i="string"==typeof t;i||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Ae("Cannot pass non-string to std::string"),n=r&&i?oe(t):t.length;var o=wr(4+n+1),s=o+4;if(E[o>>2]=n,r&&i)Rt(t,s,n+1);else if(i)for(var a=0;a<n;++a){var u=t.charCodeAt(a);u>255&&(_r(s),Ae("String has UTF-16 code units that do not fit in 8 bits")),y[s+a]=u}else for(a=0;a<n;++a)y[s+a]=t[a];return null!==e&&e.push(_r,o),o},argPackAdvance:ke,readValueFromPointer:lt,destructorFunction:e=>_r(e)})},aa:(e,t,r)=>{var n,i,o,s,a;r=Te(r),2===t?(n=zt,i=Lt,s=It,o=()=>_,a=1):4===t&&(n=jt,i=Nt,s=Wt,o=()=>E,a=2),Pe(e,{name:r,fromWireType:e=>{for(var r,i=E[e>>2],s=o(),u=e+4,c=0;c<=i;++c){var l=e+4+c*t;if(c==i||0==s[l>>a]){var d=n(u,l-u);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),u=l+t}}return _r(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ae(`Cannot pass non-string to C++ string type ${r}`);var o=s(n),u=wr(4+o+t);return E[u>>2]=o>>a,i(n,u+4,o+t),null!==e&&e.push(_r,u),u},argPackAdvance:ke,readValueFromPointer:we,destructorFunction:e=>_r(e)})},Xa:(e,t,r,n,i,o)=>{ve[e]={name:Te(t),rawConstructor:yt(r,n),rawDestructor:yt(i,o),fields:[]}},Va:(e,t,r,n,i,o,s,a,u,c)=>{ve[e].fields.push({fieldName:Te(t),getterReturnType:r,getter:yt(n,i),getterContext:o,setterArgumentType:s,setter:yt(a,u),setterContext:c})},Aa:(e,t)=>{Pe(e,{isVoid:!0,name:t=Te(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Fb:()=>!0,qb:()=>{throw 1/0},O:(e,t,r)=>{e=Pt.toValue(e),t=Qt(t,"emval::as");var n=[],i=Pt.toHandle(n);return E[r>>2]=i,t.toWireType(n,e)},ia:(e,t,r,n,i)=>(e=Ut[e])(t=Pt.toValue(t),r=Ht(r),(e=>{var t=[];return E[e>>2]=Pt.toHandle(t),t})(n),i),ha:(e,t,r,n)=>{(e=Ut[e])(t=Pt.toValue(t),r=Ht(r),null,n)},$a:St,Qa:e=>0===e?Pt.toHandle(Zt()):(e=Ht(e),Pt.toHandle(Zt()[e])),N:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Qt(E[t+4*n>>2],"parameter "+n);return r})(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Vt[i];if(void 0!==o)return o;for(var s=["retType"],a=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,s.push("argType"+c),a.push(r[1+c]);var l="return function "+tt("methodCaller_"+i)+"(handle, name, destructors, args) {\n",d=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=r[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",s.push(l);var h,m,f=bt(Function,s).apply(null,a);return h=f,m=Ut.length,Ut.push(h),o=m,Vt[i]=o,o},Za:(e,t)=>(e=Pt.toValue(e),t=Pt.toValue(t),Pt.toHandle(e[t])),q:e=>{e>4&&(Tt.get(e).refcount+=1)},S:()=>Pt.toHandle([]),J:e=>Pt.toHandle(Ht(e)),A:()=>Pt.toHandle({}),Ya:e=>{var t=Pt.toValue(e);ye(t),St(e)},rb:(e,t,r)=>{e=Pt.toValue(e),t=Pt.toValue(t),r=Pt.toValue(r),e[t]=r},I:(e,t)=>{var r=(e=Qt(e,"_emval_take_value")).readValueFromPointer(t);return Pt.toHandle(r)},db:function(e,t,r){var n=qt(e,t),i=new Date(1e3*n);C[r>>2]=i.getUTCSeconds(),C[r+4>>2]=i.getUTCMinutes(),C[r+8>>2]=i.getUTCHours(),C[r+12>>2]=i.getUTCDate(),C[r+16>>2]=i.getUTCMonth(),C[r+20>>2]=i.getUTCFullYear()-1900,C[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),s=(i.getTime()-o)/864e5|0;C[r+28>>2]=s},eb:function(e,t,r){var n=qt(e,t),i=new Date(1e3*n);C[r>>2]=i.getSeconds(),C[r+4>>2]=i.getMinutes(),C[r+8>>2]=i.getHours(),C[r+12>>2]=i.getDate(),C[r+16>>2]=i.getMonth(),C[r+20>>2]=i.getFullYear()-1900,C[r+24>>2]=i.getDay();var o=0|(e=>(Gt(e.getFullYear())?Yt:Xt)[e.getMonth()]+e.getDate()-1)(i);C[r+28>>2]=o,C[r+36>>2]=-60*i.getTimezoneOffset();var s=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),c=0|(a!=u&&i.getTimezoneOffset()==Math.min(u,a));C[r+32>>2]=c},cb:function(e,t,r,n,i,o,s){var a=qt(o,s);try{if(isNaN(a))return 61;var u=ge.getStreamFromFD(i);2&r&&ge.doMsync(e,u,t,n,a),fe.munmap(u)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},tb:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),s=i.getTimezoneOffset(),a=o.getTimezoneOffset(),u=Math.max(s,a);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}E[e>>2]=60*u,C[t>>2]=Number(s!=a);var l=c(i),d=c(o),h=Jt(l),m=Jt(d);a<s?(E[r>>2]=h,E[r+4>>2]=m):(E[r>>2]=m,E[r+4>>2]=h)},v:()=>{N("")},Ra:(e,t,r)=>er(e,t,r),U:()=>Date.now(),ub:()=>2147483648,P:Dt,Gb:(e,t,r)=>y.copyWithin(e,t,t+r),sb:e=>{var t=y.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,i,o=1;o<=4;o*=2){var s=t*(1+.2/o);s=Math.min(s,e+100663296);var a=Math.min(r,(n=Math.max(e,s))+((i=65536)-n%i)%i);if(ir(a))return!0}return!1},zb:(e,t)=>{var r=0;return sr().forEach(((n,i)=>{var o=t+r;E[e+4*i>>2]=o,((e,t)=>{for(var r=0;r<e.length;++r)v[t++>>0]=e.charCodeAt(r);v[t>>0]=0})(n,o),r+=n.length+1})),0},Ab:(e,t)=>{var r=sr();E[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),E[t>>2]=n,0},Ba:ur,$:function(e){try{var t=ge.getStreamFromFD(e);return fe.close(t),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},yb:function(e,t){try{var r=ge.getStreamFromFD(e),n=r.tty?2:fe.isDir(r.mode)?3:fe.isLink(r.mode)?7:4;return v[t>>0]=n,w[t+2>>1]=0,k=[0,(P=0,+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[t+8>>2]=k[0],C[t+12>>2]=k[1],k=[0,(P=0,+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[t+16>>2]=k[0],C[t+20>>2]=k[1],0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},va:function(e,t,r,n){try{var i=((e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var s=E[t>>2],a=E[t+4>>2];t+=8;var u=fe.read(e,v,s,a,n);if(u<0)return-1;if(i+=u,u<a)break;"undefined"!=typeof n&&(n+=u)}return i})(ge.getStreamFromFD(e),t,r);return E[n>>2]=i,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},fb:function(e,t,r,n,i){var o=qt(t,r);try{if(isNaN(o))return 61;var s=ge.getStreamFromFD(e);return fe.llseek(s,o,n),k=[s.position>>>0,(P=s.position,+Math.abs(P)>=1?P>0?+Math.floor(P/4294967296)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],C[i>>2]=k[0],C[i+4>>2]=k[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},ja:function(e,t,r,n){try{var i=((e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var s=E[t>>2],a=E[t+4>>2];t+=8;var u=fe.write(e,v,s,a,n);if(u<0)return-1;i+=u,"undefined"!=typeof n&&(n+=u)}return i})(ge.getStreamFromFD(e),t,r);return E[n>>2]=i,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},Ta:function(){return hr(location.toString())},kb:(e,t)=>(ee(y.subarray(e,e+t)),0),Sa:function(){return hr((e=jr,self[e(196,"6up7")][e(192,"yM#B")]()));var e},Ua:function(e,t){var r=Dr();try{return gt(e)(t)}catch(e){if(Tr(r),e!==e+0)throw e;Fr(1,0)}},H:function(e,t,r,n,i,o){var s=Dr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},K:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},fa:function(e,t,r,n,i,o){var s=Dr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},T:function(e,t){var r=Dr();try{return gt(e)(t)}catch(e){if(Tr(r),e!==e+0)throw e;Fr(1,0)}},Na:function(e,t,r){var n=Dr();try{return gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},V:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},r:function(e){var t=Dr();try{return gt(e)()}catch(e){if(Tr(t),e!==e+0)throw e;Fr(1,0)}},g:function(e,t){var r=Dr();try{return gt(e)(t)}catch(e){if(Tr(r),e!==e+0)throw e;Fr(1,0)}},Ja:function(e,t,r){var n=Dr();try{return gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},ma:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},Ka:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},Ma:function(e,t,r,n,i){var o=Dr();try{return gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},La:function(e,t,r,n,i,o,s,a){var u=Dr();try{return gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},e:function(e,t,r){var n=Dr();try{return gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},Oa:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},j:function(e,t,r,n){var i=Dr();try{return gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},L:function(e,t,r,n,i){var o=Dr();try{return gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},k:function(e,t,r,n,i){var o=Dr();try{return gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},mb:function(e,t,r,n,i,o){var s=Dr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},qa:function(e,t,r,n,i,o,s){var a=Dr();try{return gt(e)(t,r,n,i,o,s)}catch(e){if(Tr(a),e!==e+0)throw e;Fr(1,0)}},n:function(e,t,r,n,i,o){var s=Dr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},D:function(e,t,r,n,i,o,s){var a=Dr();try{return gt(e)(t,r,n,i,o,s)}catch(e){if(Tr(a),e!==e+0)throw e;Fr(1,0)}},ua:function(e,t,r,n,i,o,s,a){var u=Dr();try{return gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},Da:function(e,t,r,n,i,o,s,a,u){var c=Dr();try{return gt(e)(t,r,n,i,o,s,a,u)}catch(e){if(Tr(c),e!==e+0)throw e;Fr(1,0)}},Ca:function(e,t,r,n,i,o,s,a,u,c){var l=Dr();try{return gt(e)(t,r,n,i,o,s,a,u,c)}catch(e){if(Tr(l),e!==e+0)throw e;Fr(1,0)}},_:function(e,t,r,n,i,o,s,a,u,c,l,d){var h=Dr();try{return gt(e)(t,r,n,i,o,s,a,u,c,l,d)}catch(e){if(Tr(h),e!==e+0)throw e;Fr(1,0)}},ib:function(e,t,r,n){var i=Dr();try{return Rr(e,t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},bb:function(e){var t=Dr();try{return $r(e)}catch(e){if(Tr(t),e!==e+0)throw e;Fr(1,0)}},jb:function(e,t){var r=Dr();try{return Mr(e,t)}catch(e){if(Tr(r),e!==e+0)throw e;Fr(1,0)}},ab:function(e,t,r){var n=Dr();try{return zr(e,t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},_a:function(e,t,r,n,i){var o=Dr();try{return Lr(e,t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},m:function(e){var t=Dr();try{gt(e)()}catch(e){if(Tr(t),e!==e+0)throw e;Fr(1,0)}},c:function(e,t){var r=Dr();try{gt(e)(t)}catch(e){if(Tr(r),e!==e+0)throw e;Fr(1,0)}},Y:function(e,t,r){var n=Dr();try{gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},da:function(e,t,r,n){var i=Dr();try{gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},M:function(e,t,r,n,i,o,s,a){var u=Dr();try{gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},Ga:function(e,t,r){var n=Dr();try{gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},d:function(e,t,r){var n=Dr();try{gt(e)(t,r)}catch(e){if(Tr(n),e!==e+0)throw e;Fr(1,0)}},y:function(e,t,r,n){var i=Dr();try{gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},X:function(e,t,r,n,i){var o=Dr();try{gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},ba:function(e,t,r,n,i,o){var s=Dr();try{gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},Ha:function(e,t,r,n,i,o,s){var a=Dr();try{gt(e)(t,r,n,i,o,s)}catch(e){if(Tr(a),e!==e+0)throw e;Fr(1,0)}},R:function(e,t,r,n,i,o,s,a){var u=Dr();try{gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},Ia:function(e,t,r,n,i){var o=Dr();try{gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},Ea:function(e,t,r,n,i,o,s,a){var u=Dr();try{gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},Fa:function(e,t,r,n){var i=Dr();try{gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},na:function(e,t,r,n,i){var o=Dr();try{gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},oa:function(e,t,r,n,i,o){var s=Dr();try{gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},h:function(e,t,r,n){var i=Dr();try{gt(e)(t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},B:function(e,t,r,n,i,o){var s=Dr();try{gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},u:function(e,t,r,n,i,o,s){var a=Dr();try{gt(e)(t,r,n,i,o,s)}catch(e){if(Tr(a),e!==e+0)throw e;Fr(1,0)}},Q:function(e,t,r,n,i,o){var s=Dr();try{gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},i:function(e,t,r,n,i){var o=Dr();try{gt(e)(t,r,n,i)}catch(e){if(Tr(o),e!==e+0)throw e;Fr(1,0)}},ca:function(e,t,r,n,i,o,s,a){var u=Dr();try{gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},l:function(e,t,r,n,i,o){var s=Dr();try{gt(e)(t,r,n,i,o)}catch(e){if(Tr(s),e!==e+0)throw e;Fr(1,0)}},x:function(e,t,r,n,i,o,s){var a=Dr();try{gt(e)(t,r,n,i,o,s)}catch(e){if(Tr(a),e!==e+0)throw e;Fr(1,0)}},pa:function(e,t,r,n,i,o,s,a,u,c){var l=Dr();try{gt(e)(t,r,n,i,o,s,a,u,c)}catch(e){if(Tr(l),e!==e+0)throw e;Fr(1,0)}},w:function(e,t,r,n,i,o,s,a){var u=Dr();try{gt(e)(t,r,n,i,o,s,a)}catch(e){if(Tr(u),e!==e+0)throw e;Fr(1,0)}},ea:function(e,t,r,n,i,o,s,a,u){var c=Dr();try{gt(e)(t,r,n,i,o,s,a,u)}catch(e){if(Tr(c),e!==e+0)throw e;Fr(1,0)}},W:function(e,t,r,n,i,o,s,a,u,c){var l=Dr();try{gt(e)(t,r,n,i,o,s,a,u,c)}catch(e){if(Tr(l),e!==e+0)throw e;Fr(1,0)}},C:function(e,t,r,n,i,o,s,a,u,c,l){var d=Dr();try{gt(e)(t,r,n,i,o,s,a,u,c,l)}catch(e){if(Tr(d),e!==e+0)throw e;Fr(1,0)}},Z:function(e,t,r,n,i,o,s,a,u,c,l,d,h,m,f,p){var g=Dr();try{gt(e)(t,r,n,i,o,s,a,u,c,l,d,h,m,f,p)}catch(e){if(Tr(g),e!==e+0)throw e;Fr(1,0)}},hb:function(e,t,r,n){var i=Dr();try{Or(e,t,r,n)}catch(e){if(Tr(i),e!==e+0)throw e;Fr(1,0)}},F:e=>e,Pa:dr,lb:(e,t,r,n,i)=>dr(e,t,r,n)},yr=function(){var e,t,n,o,s={a:vr};function a(e,t){var r,n=e.exports;return p=(yr=n).Hb,T(),F=yr.Kb,r=yr.Ib,O.unshift(r),j(),n}if(I(),i.instantiateWasm)try{return i.instantiateWasm(s,a)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return(e=h,t=S,n=s,o=function(e){a(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||W(t)||"function"!=typeof fetch?B(t,n,o):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,n).then(o,(function(e){return f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation"),B(t,n,o)}))))).catch(r),{}}(),wr=i._malloc=e=>(wr=i._malloc=yr.Jb)(e),_r=i._free=e=>(_r=i._free=yr.Lb)(e),Cr=()=>(Cr=yr.Mb)(),Er=e=>(Er=yr.Nb)(e),br=e=>(br=yr.Ob)(e),xr=(i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=yr.Pb)(),(e,t)=>(xr=yr.Qb)(e,t)),Fr=(e,t)=>(Fr=yr.Rb)(e,t),Dr=()=>(Dr=yr.Sb)(),Tr=e=>(Tr=yr.Tb)(e),Sr=e=>(Sr=yr.Ub)(e),Ar=e=>(Ar=yr.Vb)(e),Pr=(e,t,r)=>(Pr=yr.Wb)(e,t,r),kr=e=>(kr=yr.Xb)(e),Mr=i.dynCall_ji=(e,t)=>(Mr=i.dynCall_ji=yr.Yb)(e,t),Or=i.dynCall_vij=(e,t,r,n)=>(Or=i.dynCall_vij=yr.Zb)(e,t,r,n),Rr=i.dynCall_iij=(e,t,r,n)=>(Rr=i.dynCall_iij=yr._b)(e,t,r,n),$r=(i.dynCall_iiiijj=(e,t,r,n,o,s,a,u)=>(i.dynCall_iiiijj=yr.$b)(e,t,r,n,o,s,a,u),i.dynCall_viijj=(e,t,r,n,o,s,a)=>(i.dynCall_viijj=yr.ac)(e,t,r,n,o,s,a),i.dynCall_viiijjj=(e,t,r,n,o,s,a,u,c,l)=>(i.dynCall_viiijjj=yr.bc)(e,t,r,n,o,s,a,u,c,l),i.dynCall_jiji=(e,t,r,n,o)=>(i.dynCall_jiji=yr.cc)(e,t,r,n,o),i.dynCall_j=e=>($r=i.dynCall_j=yr.dc)(e)),zr=i.dynCall_jii=(e,t,r)=>(zr=i.dynCall_jii=yr.ec)(e,t,r),Lr=(i.dynCall_viijii=(e,t,r,n,o,s,a)=>(i.dynCall_viijii=yr.fc)(e,t,r,n,o,s,a),i.dynCall_jiiii=(e,t,r,n,o)=>(Lr=i.dynCall_jiiii=yr.gc)(e,t,r,n,o));function Ir(){function e(){gr||(gr=!0,i.calledRun=!0,D||(i.noFSInit||fe.init.initialized||fe.init(),fe.ignorePermissions=!1,ue.init(),Z(O),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),R.unshift(e);var e;Z(R)}()))}$>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),M.unshift(e);var e;Z(M)}(),$>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_iiiiij=(e,t,r,n,o,s,a)=>(i.dynCall_iiiiij=yr.hc)(e,t,r,n,o,s,a),i.dynCall_iiiiijj=(e,t,r,n,o,s,a,u,c)=>(i.dynCall_iiiiijj=yr.ic)(e,t,r,n,o,s,a,u,c),i.dynCall_iiiiiijj=(e,t,r,n,o,s,a,u,c,l)=>(i.dynCall_iiiiiijj=yr.jc)(e,t,r,n,o,s,a,u,c,l),i.___start_em_js=3713348,i.___stop_em_js=3713456,i.UTF8ToString=pe,i.stringToUTF8=Rt,i.lengthBytesUTF8=oe,i.allocateUTF8=hr,L=function e(){gr||Ir(),gr||(L=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();function jr(e,t){var r=Nr();return jr=function(t,n){var i=r[t-=186];if(void 0===jr.TxoZvo){var o=function(e){for(var t,r,n="",i="",o=0,s=0;r=e.charAt(s++);~r&&(t=o%4?64*t+r:r,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var a=0,u=n.length;a<u;a++)i+="%"+("00"+n.charCodeAt(a).toString(16)).slice(-2);return decodeURIComponent(i)},s=function(e,t){var r,n,i=[],s=0,a="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)s=(s+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[s],i[s]=r;n=0,s=0;for(var u=0;u<e.length;u++)s=(s+i[n=(n+1)%256])%256,r=i[n],i[n]=i[s],i[s]=r,a+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[s])%256]);return a};jr.CMQyqV=s,e=arguments,jr.TxoZvo=!0}var a=r[0],u=t+a,c=e[u];return c?i=c:(void 0===jr.CJDOwN&&(jr.CJDOwN=!0),i=jr.CMQyqV(i,n),e[u]=i),i},jr(e,t)}function Nr(){var e=["WOz4W7zkuamlcCoDW5ZdJv0D","W5hcJw0HomkmWROzorfjWOZdSa","qCkAogRdUHHMfmkQn3BdO8oW","FLKSW7hdP0D/l8oedSoFja","iSkrgSk4W4TtDMvuuCoXhW","W48gW6/dLJ9sW73dNG","W4jrWQK8vNBcSCotEeCNW7qN","WQfcW60UWQlcRSkfEmk7fa","WQldPSkcdKD2W57dMNHRW7ra","WQtdGmkAmmoAmCkAhG","oSkBWQqxWPbfW5LEWQ4xWQO2ja","imo+W7evl3BdJCoOzCk5ASobta","aeTfxSk2lmoRw8oBgKX5wW","WOVcNH1SWRRcNwRdO8ocfG","W7HPW7qOW49XkIqzmaNcH8oZ","WQddO8kcceT/W7hdOxvCW5rD"];return(Nr=function(){return e})()}Ir(),function(e,t){for(var r=jr,n=e();;)try{if(701065==parseInt(r(191,"YU&F"))/1+-parseInt(r(194,"61hA"))/2+parseInt(r(188,"M4sU"))/3+parseInt(r(198,"BLET"))/4+-parseInt(r(199,"28*d"))/5+-parseInt(r(189,"sv)d"))/6+-parseInt(r(190,"R*W$"))/7)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Nr);var ighnua,Wr=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Qr=Wr(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Qr)};return e()}));return Qr(),e.ready});e.exports=i},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Ee})),r.d(t,"commands",(function(){return Te}));var n,i,o,s,a,u,c,l,d,h=r(0);class m{_marker(){}}class f extends m{constructor(e={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class p extends m{constructor(e={}){super(),this.attributes=new f({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new f(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class g extends m{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class v extends m{constructor(e={}){super(),this.accumulatedResultsVerifierConfig=new g({}),void 0!==e.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new g(e.accumulatedResultsVerifierConfig))}}class y extends m{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class w extends m{constructor(e={}){super(),this.qualityThresholds=[new y({symbolQuality:.5,symbolRatio:.5}),new y({symbolQuality:.7,symbolRatio:.3}),new y({symbolQuality:.85,symbolRatio:.3}),new y({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new y(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new _(e);case"CustomBinarizationFilter":return new C(e);case"ColorDocumentFilter":return new E(e);case"BrightnessFilter":return new b(e);case"ContrastFilter":return new x(e);case"GrayscaleFilter":return new F(e);case"LegacyFilter":return new D(e);case"WhiteBlackPointFilter":return new T(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class _ extends m{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class C extends m{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class E extends m{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class b extends m{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class x extends m{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class F extends m{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class D extends m{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class T extends m{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class S extends m{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class A extends m{constructor(e={}){super(),this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.requiredAspectRatios=[],this.rectangleOfInterest={x:0,y:0,width:0,height:0},void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.requiredAspectRatios&&(this.requiredAspectRatios=e.requiredAspectRatios.map((e=>new S(e)))),void 0!==e.rectangleOfInterest&&(this.rectangleOfInterest={x:e.rectangleOfInterest.x,y:e.rectangleOfInterest.y,width:e.rectangleOfInterest.width,height:e.rectangleOfInterest.height})}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new P(e);case"PresetContentValidator":return new k(e);case"PatternContentValidator":return new M(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class P extends m{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class k extends m{constructor(e={}){if(super(),this._type="PresetContentValidator",void 0===e.preset)throw new Error("preset must be present in constructor argument");this.preset=e.preset}}class M extends m{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class O extends m{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new P({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=i.From(e.validator))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new R(e);case"Code11Config":return new $(e);case"Code39Config":return new z(e);case"Code93Config":return new L(e);case"Code128Config":return new I(e);case"Code2Of5Config":return new j(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new W(e);case"DataBarLimitedConfig":return new Q(e);case"ITFConfig":return new B(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new U(e);case"PharmaCodeConfig":return new Z(e);case"AztecConfig":return new V(e);case"QRCodeConfig":return new q(e);case"PDF417Config":return new G(e);case"MicroPDF417Config":return new Y(e);case"DataMatrixConfig":return new X(e);case"MaxiCodeConfig":return new J(e);case"AustraliaPostConfig":return new K(e);case"JapanPostConfig":return new ee(e);case"RoyalMailConfig":return new te(e);case"RoyalTNTPostConfig":return new re(e);case"USPSIntelligentMailConfig":return new ne(e);case"PharmaCodeTwoTrackConfig":return new ie(e);case"GS1CompositeConfig":return new oe(e);case"GroupOneDConfig":return new se(e);case"GroupTwoDConfig":return new ae(e);case"GroupFourStateConfig":return new ue(e);case"GroupCommonConfig":return new ce(e);default:throw`Unknown child class name: ${t}`}}}(o||(o={})),function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new R(e);case"Code11Config":return new $(e);case"Code39Config":return new z(e);case"Code93Config":return new L(e);case"Code128Config":return new I(e);case"Code2Of5Config":return new j(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new W(e);case"DataBarLimitedConfig":return new Q(e);case"ITFConfig":return new B(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new U(e);case"PharmaCodeConfig":return new Z(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class R extends m{constructor(e={}){super(),this._type="CodabarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class $ extends m{constructor(e={}){super(),this._type="Code11Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class z extends m{constructor(e={}){super(),this._type="Code39Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class L extends m{constructor(e={}){super(),this._type="Code93Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class I extends m{constructor(e={}){super(),this._type="Code128Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class j extends m{constructor(e={}){super(),this._type="Code2Of5Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class N extends m{constructor(e={}){super(),this._type="DataBarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class W extends m{constructor(e={}){super(),this._type="DataBarExpandedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Q extends m{constructor(e={}){super(),this._type="DataBarLimitedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class B extends m{constructor(e={}){super(),this._type="ITFConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class H extends m{constructor(e={}){super(),this._type="MSIPlesseyConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class U extends m{constructor(e={}){super(),this._type="UpcEanConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class Z extends m{constructor(e={}){super(),this._type="PharmaCodeConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AztecConfig":return new V(e);case"QRCodeConfig":return new q(e);case"PDF417Config":return new G(e);case"MicroPDF417Config":return new Y(e);case"DataMatrixConfig":return new X(e);case"MaxiCodeConfig":return new J(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class V extends m{constructor(e={}){super(),this._type="AztecConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class q extends m{constructor(e={}){super(),this._type="QRCodeConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class G extends m{constructor(e={}){super(),this._type="PDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class Y extends m{constructor(e={}){super(),this._type="MicroPDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class X extends m{constructor(e={}){super(),this._type="DataMatrixConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class J extends m{constructor(e={}){super(),this._type="MaxiCodeConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AustraliaPostConfig":return new K(e);case"JapanPostConfig":return new ee(e);case"RoyalMailConfig":return new te(e);case"RoyalTNTPostConfig":return new re(e);case"USPSIntelligentMailConfig":return new ne(e);case"PharmaCodeTwoTrackConfig":return new ie(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class K extends m{constructor(e={}){super(),this._type="AustraliaPostConfig",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class ee extends m{constructor(e={}){super(),this._type="JapanPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class te extends m{constructor(e={}){super(),this._type="RoyalMailConfig",this.regexFilter="",this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class re extends m{constructor(e={}){super(),this._type="RoyalTNTPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ne extends m{constructor(e={}){super(),this._type="USPSIntelligentMailConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends m{constructor(e={}){super(),this._type="PharmaCodeTwoTrackConfig",this.regexFilter="",this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class oe extends m{constructor(e={}){super(),this._type="GS1CompositeConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class se extends m{constructor(e={}){super(),this._type="GroupOneDConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ae extends m{constructor(e={}){super(),this._type="GroupTwoDConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends m{constructor(e={}){super(),this._type="GroupFourStateConfig",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ce extends m{constructor(e={}){super(),this._type="GroupCommonConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class le extends m{constructor(e={}){super()}}(c=le||(le={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],c.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};class de extends m{constructor(e={}){super(),this.configurators=[new ce({})],this.engineMode="NEXT_GEN",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==e.configurators&&(this.configurators=e.configurators.map((e=>o.From(e)))),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage)}}class he extends m{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class me extends m{constructor(e={}){super(),this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class fe extends m{constructor(e={}){super(),this.resultAccumulationConfig=new me({}),this.fieldExcludeList=[],this.acceptedDocumentTypes=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new me(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0!==e.acceptedDocumentTypes&&(this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e)))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new pe(e);case"UserFieldStringValue":return new ge(e);case"UserFieldIntValue":return new ve(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class pe extends m{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ge extends m{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ve extends m{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ye extends m{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=l.From(e.value)}}class we extends m{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new ye(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(d=we||(we={})).defaultCompression="LZW",d.binaryDocumentOptimizedCompression="CCITTFAX4";var _e=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};let Ce;class Ee{constructor(e){this.id=e}}const be={};function xe(e){const t=Math.random().toString(36);return be[t]=e,new Ee(t)}function Fe(e){if(!be.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return be[e.id]}function De(e){const t=Fe(e);t.delete&&t.delete(),delete be[e.id]}const Te={initialize:function(e,t,n,i,o){return _e(this,void 0,void 0,(function*(){try{const{captureConsole:s,jpegQuality:a=80,requestSuffix:u=""}=o||{};s&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),l=r(3),d={locateFile:function(e,r){let n;return n=t?Object(h.c)(t)?t:"":i,e.endsWith(".worker.js")&&l?l.default:new URL(n+e+u,location.href).href}},m=Object(h.b)(o),f=m.includes("-threads");d.mainScriptUrlOrBlob=d.locateFile(`ScanbotSDK.Asm${m}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=n,e.push(4*n));for(let r=0;r<e.length;r++){const n=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(d.wasmMemory=p),yield c(d),Ce=d,Ce.initialize(e||"",n,a)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return _e(this,void 0,void 0,(function*(){return Ce.getLicenseInfo()}))},encodeJpeg:function(e){return _e(this,void 0,void 0,(function*(){const t=Ae(e);return Se(Ce.encodeJpeg(t))}))},detectDocument:function(e,t){return _e(this,void 0,void 0,(function*(){const r=new Ce.DocumentDetector(new A(t)),n=r.detect(Ae(e));return r.delete(),Se(n)}))},detectAndCropDocument:function(e){return _e(this,void 0,void 0,(function*(){let t=Se(Ce.detectAndCropDocument(Ae(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.DocumentDetector(new A(e)))}))},documentDetectorDetect:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).detect(Ae(t)))}))},parseBarcodeDocument:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Ce.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.BarcodeRecognizer(new de(e)))}))},recognizeBarcodes:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).recognize(Ae(t)))}))},beginPdf:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.PdfGenerationContext(new p(e)))}))},addPageToPdf:function(e,t){return _e(this,void 0,void 0,(function*(){Se(Fe(e).addPage(Ae(t)))}))},completePdf:function(e){return _e(this,void 0,void 0,(function*(){try{const t=Fe(e);return Se(t.complete())}finally{De(e)}}))},beginTiff:function(e){return _e(this,void 0,void 0,(function*(){const t=new Ce.TiffGenerationContext(new we(e));return Se(t.begin()),xe(t)}))},addPageToTiff:function(e,t,r){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).addPage(Ae(t),r))}))},completeTiff:function(e){return _e(this,void 0,void 0,(function*(){try{const t=Fe(e);return Se(t.complete())}finally{De(e)}}))},createMRZRecognizer:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.MrzRecognizerContext(new v(e)))}))},recognizeMRZ:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).recognize(Ae(t)))}))},releaseObject:function(e){return _e(this,void 0,void 0,(function*(){De(e)}))},createOcrEngine:function(){return _e(this,void 0,void 0,(function*(){return xe(new Ce.TLDROcrContext)}))},performOcr:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).performOcr(Ae(t)))}))},createGenericTextLineScanner:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.GenericTextLineScanner(new O(e)))}))},recognizeTextLine:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).recognize(Ae(t)))}))},cleanTextLineRecognitionQueue:function(e){return _e(this,void 0,void 0,(function*(){Fe(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.DocumentQualityAnalyzer(new w(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).analyze(Ae(t)))}))},imageApplyFilter:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Ce.imageApplyFilter(Ae(e),n.From(t)))}))},imageCrop:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Ce.imageCrop(Ae(e),t))}))},imageResize:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Ce.imageResize(Ae(e),t))}))},imageRotate:function(e,t){return _e(this,void 0,void 0,(function*(){return Se(Ce.imageRotate(Ae(e),t))}))},genericDocumentRecognizerCreate:function(e){return _e(this,void 0,void 0,(function*(){return xe(new Ce.GenericDocumentRecognizer(new fe(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return _e(this,void 0,void 0,(function*(){return Se(Fe(e).recognize(Ae(t),new he(r)))}))},__hasModuleFunction:function(e){return _e(this,void 0,void 0,(function*(){return Ce.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return _e(this,void 0,void 0,(function*(){return Ce[e].apply(t)}))}};function Se(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Ae(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;Ce||"initialize"===t?(()=>_e(this,void 0,void 0,(function*(){return yield Te[t].apply(null,r)})))().then((e=>{const t=Object(h.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{const t="number"==typeof e?Error(Ce.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,error:t})})):self.postMessage({ticket:n,error:new Error("WASM module not loaded yet.")})}}]);
|