scanbot-web-sdk 6.0.0-dev.6 → 7.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 +1 -1
- package/@types/core/bridge/compiled/{BarcodeConfigs.d.ts → BarcodeConfigurationTypes.d.ts} +558 -173
- package/@types/core/bridge/compiled/BarcodeDocumentModel.d.ts +1421 -0
- package/@types/core/bridge/compiled/BarcodeDocumentTypes.d.ts +14 -13
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +25 -14
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +58 -56
- package/@types/core/bridge/compiled/CheckDocumentModel.d.ts +130 -0
- package/@types/core/bridge/compiled/CheckScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +29 -28
- package/@types/core/bridge/compiled/CreditCardDocumentModel.d.ts +16 -0
- package/@types/core/bridge/compiled/CreditCardTypes.d.ts +35 -33
- package/@types/core/bridge/compiled/DocumentDataExtractorConfigurationTypes.d.ts +148 -0
- package/@types/core/bridge/compiled/DocumentDataExtractorTypes.d.ts +90 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +28 -23
- package/@types/core/bridge/compiled/{DocumentDetectorTypes.d.ts → DocumentScannerTypes.d.ts} +49 -47
- package/@types/core/bridge/compiled/DocumentsModel.d.ts +489 -0
- package/@types/core/bridge/compiled/{EhicTypes.d.ts → EuropeanHealthInsuranceCardTypes.d.ts} +51 -108
- package/@types/core/bridge/compiled/FrameAccumulationTypes.d.ts +37 -14
- package/@types/core/bridge/compiled/GenericDocument.d.ts +17 -17
- package/@types/core/bridge/compiled/Geometry.d.ts +2 -2
- package/@types/core/bridge/compiled/ImageTypes.d.ts +1 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +20 -19
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +108 -105
- package/@types/core/bridge/compiled/MrzTypes.d.ts +73 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +4 -3
- package/@types/core/bridge/compiled/{PdfConfig.d.ts → PdfConfigurationTypes.d.ts} +48 -45
- package/@types/core/bridge/compiled/{GenericTextLineScannerTypes.d.ts → TextPatternScannerTypes.d.ts} +20 -39
- package/@types/core/bridge/compiled/TiffTypes.d.ts +48 -50
- package/@types/core/bridge/compiled/VinScannerTypes.d.ts +79 -0
- package/@types/core/bridge/worker-bridge.d.ts +512 -374
- package/@types/core/worker/ScanbotSDK.Core.d.ts +28 -22
- package/@types/core-types.d.ts +15 -12
- package/@types/cropping-view.d.ts +8 -4
- package/@types/document-data-extractor-view.d.ts +22 -0
- package/@types/document-scanner-view.d.ts +16 -7
- package/@types/index.d.ts +37 -24
- package/@types/interfaces/i-cropping-view-handle.d.ts +2 -0
- package/@types/interfaces/i-document-data-extractor-scanner-handle.d.ts +3 -0
- package/@types/interfaces/{i-text-data-scanner-handle.d.ts → i-text-pattern-scanner-handle.d.ts} +1 -1
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +1 -0
- package/@types/model/configuration/cropping-view-configuration.d.ts +1 -0
- package/@types/model/configuration/document-data-extractor-configuration.d.ts +9 -0
- package/@types/model/configuration/document-scanner-configuration.d.ts +8 -4
- package/@types/model/configuration/initialization-options.d.ts +1 -2
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -4
- package/@types/model/configuration/selection-overlay-configuration.d.ts +5 -0
- package/@types/model/configuration/text-pattern-scanner-configuration.d.ts +9 -0
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +2 -1
- package/@types/model/configuration/vin-scanner-configuration.d.ts +4 -4
- package/@types/scanbot-sdk.d.ts +276 -210
- package/@types/scanner-view.d.ts +2 -0
- package/@types/service/document-data-extractor.d.ts +13 -0
- package/@types/service/ocr-engine.d.ts +3 -3
- package/@types/service/pdf-generator.d.ts +6 -1
- package/@types/service/simple-mrz-recognizer.d.ts +4 -4
- package/@types/service/storage/indexed-db/sb-indexed-db.d.ts +60 -0
- package/@types/service/storage/local/sb-local-storage.d.ts +11 -0
- package/@types/service/storage/sb-storage.d.ts +33 -0
- package/@types/service/storage/utils/create-worker-vite.d.ts +1 -0
- package/@types/service/storage/utils/create-worker.d.ts +1 -0
- package/@types/service/storage/utils/sb-storage-error.d.ts +5 -0
- package/@types/service/storage/utils/sb-storage-utils.d.ts +10 -0
- package/@types/service/text-pattern-scanner.d.ts +14 -0
- package/@types/service/tiff-generator.d.ts +7 -4
- package/@types/service/vin-scanner.d.ts +16 -0
- package/@types/{text-data-scanner-view.d.ts → text-pattern-scanner-view.d.ts} +10 -10
- package/@types/ui2/{controllers → barcode/controllers}/barcode-scanner-controller.d.ts +1 -1
- package/@types/ui2/{controllers → barcode/controllers}/multiple-scanning-mode-controller.d.ts +1 -1
- package/@types/ui2/{controllers → barcode/controllers}/single-scanning-mode-controller.d.ts +1 -1
- package/@types/ui2/{model → barcode/model}/counted-barcodes.d.ts +2 -2
- package/@types/ui2/{utils → barcode/utils}/barcode-mapper/expected-barcode-mapper.d.ts +2 -2
- package/@types/ui2/{utils → barcode/utils}/barcode-mapper/i-barcode-mapper.d.ts +2 -2
- package/@types/ui2/{utils → barcode/utils}/barcode-mapper/user-barcode-mapper.d.ts +1 -1
- package/@types/ui2/{utils → barcode/utils}/camera-config.d.ts +2 -2
- package/@types/ui2/{utils → barcode/utils}/styled-badge.d.ts +3 -1
- package/@types/ui2/{utils → barcode/utils}/styled-box.d.ts +1 -1
- package/@types/ui2/barcode/utils/styled-button.d.ts +14 -0
- package/@types/ui2/{utils → barcode/utils}/useScanningViewSize.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/action-button/action-button-container.d.ts +3 -3
- package/@types/ui2/{views → barcode/views}/action-button/action-button.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/ar/ar-badge.d.ts +2 -2
- package/@types/ui2/{views → barcode/views}/ar/ar-overlay-barcode-info.d.ts +2 -2
- package/@types/ui2/{views → barcode/views}/ar/vertical-positions.d.ts +2 -2
- package/@types/ui2/{views → barcode/views}/barcode-info/barcode-info.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/barcode-scanner.d.ts +8 -8
- package/@types/ui2/{views → barcode/views}/camera-permission-denied.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/dialog/barcode-info-dialog.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/dialog/barcode-mapping-error-dialog.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/dialog/base/confirmation-dialog.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/dialog/base/styled-dialog.d.ts +1 -0
- package/@types/ui2/{views → barcode/views}/dialog/count-edit-dialog.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/dialog/find-and-pick-submit-dialog.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/barcode-result-sidebar.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/hooks/use-drag-listener.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/subviews/barcode-list-item.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/subviews/barcode-list.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/drawer/subviews/swipe-underlay.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/form/dialog-button.d.ts +4 -1
- package/@types/ui2/{views → barcode/views}/navigation-bar.d.ts +1 -1
- package/@types/ui2/{views → barcode/views}/styled-text.d.ts +2 -1
- package/@types/ui2/configuration/DocumentQualityAnalyzerTypes.d.ts +1 -0
- package/@types/ui2/configuration/DocumentScannerTypes.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -1
- package/@types/ui2/configuration/ParametricFilters.d.ts +1 -0
- package/@types/ui2/configuration/{ActionBarConfiguration.d.ts → barcode/ActionBarConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/{ArTrackingOverlayConfiguration.d.ts → barcode/ArTrackingOverlayConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/{BarcodeInfoMapping.d.ts → barcode/BarcodeInfoMapping.d.ts} +1 -1
- package/@types/ui2/configuration/{BarcodeRecognizerConfiguration.d.ts → barcode/BarcodeRecognizerConfiguration.d.ts} +3 -3
- package/@types/ui2/configuration/{BarcodeScannerConfiguration.d.ts → barcode/BarcodeScannerConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/barcode/BarcodeScannerTypes.d.ts +2 -0
- package/@types/ui2/configuration/{BarcodeScannerUIResult.d.ts → barcode/BarcodeScannerUIResult.d.ts} +1 -1
- package/@types/ui2/configuration/{BarcodeTextLocalization.d.ts → barcode/BarcodeTextLocalization.d.ts} +1 -1
- package/@types/ui2/configuration/barcode/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/{CameraConfiguration.d.ts → barcode/CameraConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/{CameraPermission.d.ts → barcode/CameraPermission.d.ts} +1 -1
- package/@types/ui2/configuration/{Common.d.ts → barcode/Common.d.ts} +1 -1
- package/@types/ui2/configuration/barcode/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/{FindAndPickScanningModeUseCase.d.ts → barcode/FindAndPickScanningModeUseCase.d.ts} +1 -1
- package/@types/ui2/configuration/barcode/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/barcode/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/{MultipleScanningModeUseCase.d.ts → barcode/MultipleScanningModeUseCase.d.ts} +1 -1
- package/@types/ui2/configuration/{ScanbotAlertDialog.d.ts → barcode/ScanbotAlertDialog.d.ts} +1 -1
- package/@types/ui2/configuration/{SingleScanningModeUseCase.d.ts → barcode/SingleScanningModeUseCase.d.ts} +1 -1
- package/@types/ui2/configuration/{TopBarConfiguration.d.ts → barcode/TopBarConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/{UserGuidanceConfiguration.d.ts → barcode/UserGuidanceConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/{ViewFinderConfiguration.d.ts → barcode/ViewFinderConfiguration.d.ts} +1 -1
- package/@types/ui2/configuration/common/ActionBarConfiguration.d.ts +42 -0
- package/@types/ui2/configuration/common/CameraConfiguration.d.ts +60 -0
- package/@types/ui2/configuration/common/CameraPermission.d.ts +62 -0
- package/@types/ui2/configuration/common/Common.d.ts +467 -0
- package/@types/ui2/configuration/common/NavigationBarConfiguration.d.ts +11 -0
- package/@types/ui2/configuration/common/ScanbotAlertDialog.d.ts +74 -0
- package/@types/ui2/configuration/common/TopBarConfiguration.d.ts +55 -0
- package/@types/ui2/configuration/common/UserGuidanceConfiguration.d.ts +64 -0
- package/@types/ui2/configuration/common/ViewFinderConfiguration.d.ts +93 -0
- package/@types/ui2/configuration/document/AcknowledgementScreenConfiguration.d.ts +125 -0
- package/@types/ui2/configuration/document/CameraScreenConfiguration.d.ts +659 -0
- package/@types/ui2/configuration/document/CroppingConfiguration.d.ts +1 -0
- package/@types/ui2/configuration/document/CroppingResult.d.ts +1 -0
- package/@types/ui2/configuration/document/CroppingScreenConfiguration.d.ts +141 -0
- package/@types/ui2/configuration/document/CroppingTextLocalization.d.ts +1 -0
- package/@types/ui2/configuration/document/DocumentScannerCameraConfiguration.d.ts +60 -0
- package/@types/ui2/configuration/document/DocumentScannerGuidanceVisibility.d.ts +11 -0
- package/@types/ui2/configuration/document/DocumentScannerOutputSettings.d.ts +38 -0
- package/@types/ui2/configuration/document/DocumentScannerScreens.d.ts +26 -0
- package/@types/ui2/configuration/document/DocumentScannerTextLocalization.d.ts +608 -0
- package/@types/ui2/configuration/document/DocumentScannerUIResult.d.ts +5 -0
- package/@types/ui2/configuration/document/DocumentScannerUserGuidance.d.ts +99 -0
- package/@types/ui2/configuration/document/DocumentScanningFlow.d.ts +91 -0
- package/@types/ui2/configuration/document/IntroductionScreenConfiguration.d.ts +188 -0
- package/@types/ui2/configuration/document/ReorderPagesScreenConfiguration.d.ts +1 -0
- package/@types/ui2/configuration/document/ReviewScreenConfiguration.d.ts +372 -0
- package/@types/ui2/configuration/native/DocumentData.d.ts +37 -0
- package/@types/ui2/configuration/native/PageData.d.ts +58 -0
- package/@types/ui2/configuration/native/PageImageSource.d.ts +13 -0
- package/@types/ui2/configuration/utils.d.ts +8 -0
- package/@types/ui2/configuration.d.ts +46 -21
- package/@types/ui2/document/assets/auto-capture-disabled-icon.d.ts +4 -0
- package/@types/ui2/document/assets/auto-capture-icon.d.ts +4 -0
- package/@types/ui2/document/assets/captured-circle-icon.d.ts +5 -0
- package/@types/ui2/document/assets/delete-icon.d.ts +4 -0
- package/@types/ui2/document/assets/file-add-icon.d.ts +4 -0
- package/@types/ui2/document/assets/image-error-icon.d.ts +5 -0
- package/@types/ui2/document/assets/image-retake.d.ts +4 -0
- package/@types/ui2/document/assets/loading-spinner-icon.d.ts +2 -0
- package/@types/ui2/document/assets/shutter-button-auto-icon.d.ts +4 -0
- package/@types/ui2/document/assets/shutter-button-manual-icon.d.ts +5 -0
- package/@types/ui2/document/assets/shutter-button-spinner-icon.d.ts +4 -0
- package/@types/ui2/document/assets/the-hand.d.ts +10 -0
- package/@types/ui2/document/controller/acknowledgment-screen-controller.d.ts +16 -0
- package/@types/ui2/document/controller/camera-screen-controller.d.ts +20 -0
- package/@types/ui2/document/controller/cropping-screen-controller.d.ts +14 -0
- package/@types/ui2/document/controller/document-scanner-controller.d.ts +14 -0
- package/@types/ui2/document/controller/review-screen-controller.d.ts +18 -0
- package/@types/ui2/document/controller/zoom-screen-controller.d.ts +11 -0
- package/@types/ui2/document/model/document-detection-ui-result.d.ts +8 -0
- package/@types/ui2/document/model/sb-document.d.ts +62 -0
- package/@types/ui2/document/model/sb-page.d.ts +38 -0
- package/@types/ui2/document/model/utils/sb-document-data.d.ts +10 -0
- package/@types/ui2/document/model/utils/sb-page-data.d.ts +7 -0
- package/@types/ui2/document/utils/SBThemeProvider.d.ts +4 -0
- package/@types/ui2/document/utils/button-accessibility-styling.d.ts +40 -0
- package/@types/ui2/document/views/acknowledgement-screen/acknowledgement-confirmation.d.ts +19 -0
- package/@types/ui2/document/views/acknowledgement-screen/acknowledgement-fade.d.ts +9 -0
- package/@types/ui2/document/views/acknowledgement-screen/acknowledgement-image.d.ts +6 -0
- package/@types/ui2/document/views/acknowledgement-screen/acknowledgement-screen-bottom-bar.d.ts +12 -0
- package/@types/ui2/document/views/acknowledgement-screen/quality-insufficient-banner.d.ts +10 -0
- package/@types/ui2/document/views/camera-screen/bottom-bar.d.ts +33 -0
- package/@types/ui2/document/views/camera-screen/camera-permission-denied.d.ts +9 -0
- package/@types/ui2/document/views/camera-screen/camera-select-dropdown.d.ts +14 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/CheckIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/CreditCardsIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/DocumentsIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/IdCardsIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/MedicalCertsIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/Props.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/assets/ReceiptsIcon.d.ts +3 -0
- package/@types/ui2/document/views/camera-screen/introduction/introduction-image.d.ts +5 -0
- package/@types/ui2/document/views/camera-screen/introduction/introduction.d.ts +9 -0
- package/@types/ui2/document/views/camera-screen/preview-button.d.ts +11 -0
- package/@types/ui2/document/views/camera-screen/scanner-box.d.ts +21 -0
- package/@types/ui2/document/views/camera-screen/shutter-button.d.ts +10 -0
- package/@types/ui2/document/views/camera-screen/top-bar.d.ts +11 -0
- package/@types/ui2/document/views/camera-screen/top-user-guidance.d.ts +8 -0
- package/@types/ui2/document/views/camera-screen/use-document-scanner-view.d.ts +31 -0
- package/@types/ui2/document/views/camera-screen/user-guidance-text.d.ts +10 -0
- package/@types/ui2/document/views/common/alert-dialog.d.ts +11 -0
- package/@types/ui2/document/views/common/bar-button.d.ts +17 -0
- package/@types/ui2/document/views/common/common-top-bar.d.ts +12 -0
- package/@types/ui2/document/views/common/loading-spinner.d.ts +4 -0
- package/@types/ui2/document/views/common/styled-menu-item.d.ts +12 -0
- package/@types/ui2/document/views/common/styled-menu.d.ts +17 -0
- package/@types/ui2/document/views/review-screen/bottom-bar.d.ts +15 -0
- package/@types/ui2/document/views/review-screen/carousel-page.d.ts +13 -0
- package/@types/ui2/document/views/review-screen/carousel.d.ts +14 -0
- package/@types/ui2/document/views/review-screen/page-counter-and-zoom-button.d.ts +10 -0
- package/@types/ui2/document/views/review-screen/scroller-navigation-button.d.ts +11 -0
- package/@types/ui2/document/views/review-screen/top-bar.d.ts +11 -0
- package/@types/ui2/scanbot-sdk-ui.d.ts +4 -0
- package/@types/ui2/scanbot-ui-library.d.ts +7 -4
- package/@types/ui2/utils/text-styling.d.ts +8 -0
- package/@types/ui2/utils/use-time-since-first-render-has-passed.d.ts +1 -0
- package/@types/utils/constants.d.ts +0 -2
- package/@types/utils/dto/Frame.d.ts +2 -0
- package/@types/utils/image-utils.d.ts +2 -1
- package/@types/utils/parse-color.d.ts +9 -0
- package/@types/utils/react/useIsMounted.d.ts +2 -0
- package/@types/utils/react/usePromise.d.ts +4 -3
- package/@types/utils/supported-image-mime-types.d.ts +2 -0
- package/@types/utils/view-utils.d.ts +1 -1
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +8 -2
- package/@types/view/polygon/document-polygon.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +522 -384
- package/Libraries.txt +1510 -36
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +18 -18
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +10 -0
- 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 +3 -3
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +0 -29
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +0 -18
- package/@types/core/bridge/compiled/GDRTypes.d.ts +0 -38
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +0 -150
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +0 -83
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +0 -15
- package/@types/core/bridge/compiled/MRZTypes.d.ts +0 -52
- package/@types/generic-document-recognizer-view.d.ts +0 -22
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +0 -3
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +0 -9
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +0 -9
- package/@types/service/generic-document-recognizer.d.ts +0 -13
- package/@types/service/text-data-recognizer.d.ts +0 -14
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +0 -1
- package/@types/ui2/configuration/BarcodeTypes.d.ts +0 -1
- package/@types/ui2/configuration/CommonFieldType.d.ts +0 -1
- package/@types/ui2/configuration/GenericDocument.d.ts +0 -1
- package/@types/ui2/utils/styled-button.d.ts +0 -7
- /package/@types/core/bridge/compiled/{OcrElements.d.ts → OcrTypes.d.ts} +0 -0
- /package/@types/ui2/{utils → barcode/utils}/find-and-pick.ts/expected-barcode-counter.d.ts +0 -0
- /package/@types/ui2/{utils → barcode/utils}/styled-input.d.ts +0 -0
- /package/@types/ui2/{views → barcode/views}/drawer/subviews/barcode-drawer-header.d.ts +0 -0
- /package/@types/ui2/configuration/{BarcodeItemMapper.d.ts → barcode/BarcodeItemMapper.d.ts} +0 -0
- /package/@types/ui2/configuration/{BarcodeUseCase.d.ts → barcode/BarcodeUseCase.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
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=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(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 a(){throw new Error("clearTimeout has not been defined")}function s(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:a}catch(e){n=a}}();var u,c=[],d=!1,l=-1;function h(){d&&u&&(d=!1,u.length?c=u.concat(c):l=-1,c.length&&m())}function m(){if(!d){var e=s(h);d=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!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||d||s(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,a,s,u=Object.assign({},i),c="./this.program",d=(e,t)=>{throw t},l="";l=self.location.href,n&&(l=n),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},a=(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&&(d=i.quit),i.wasmBinary&&(h=i.wasmBinary);var p,g=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&W("no native wasm support detected");var v,y,w,F,b,C,E,_,x,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=F=new Uint16Array(e),i.HEAP32=b=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=E=new Float32Array(e),i.HEAPF64=_=new Float64Array(e)}var S,k,A,P,M=[],O=[],R=[],$=0,z=null,L=null;function B(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 W(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 I(e){return e.startsWith("data:application/octet-stream;base64,")}function N(e){if(e==S&&h)return new Uint8Array(h);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function H(e,t,r){return function(e){return h||"function"!=typeof fetch?Promise.resolve().then((()=>N(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>N(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{f(`failed to asynchronously prepare wasm: ${e}`),W(e)}))}I(S="ScanbotSDK.Asm.wasm")||(k=S,S=i.locateFile?i.locateFile(k,l):l+k);var Q={9104096:e=>vr(function(){return this[Y(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="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,q=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&V)return V.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},Y=(e,t)=>e?q(y,e,t):"",G=[],X=0,J=0;function K(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[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){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(zr(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ee=e=>{var t=J;if(!t)return Tr(0),0;var r=new K(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Tr(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var a=r.ptr+16;if($r(o,n,a))return Tr(o),t}return Tr(n),t},te=()=>{var e=G.pop();e||W("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(G.push(e),e.set_rethrown(!0),e.set_caught(!1),X++),J=t},re={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=re.isAbs(e),r="/"===e.substr(-1);return(e=re.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=re.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=re.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return re.normalize(e.join("/"))},join2:(e,t)=>re.normalize(e+"/"+t)},ne=e=>(ne=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);W("initRandomDevice")})())(e),ie={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=re.isAbs(n)}return(t?"/":"")+(e=re.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=ie.resolve(e).substr(1),t=ie.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),a=o,s=0;s<o;s++)if(n[s]!==i[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(a))).join("/")}},oe=[],ae=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,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i};function ue(e,t,r){var n=r>0?r:ae(e)+1,i=new Array(n),o=se(e,i,0,i.length);return t&&(i.length=o),i}var ce={ttys:[],init(){},shutdown(){},register(e,t){ce.ttys[e]={input:[],output:[],ops:t},pe.registerDevice(e,ce.stream_ops)},stream_ops:{open(e){var t=ce.ttys[e.node.rdev];if(!t)throw new pe.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 pe.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new pe.ErrnoError(29)}if(void 0===s&&0===o)throw new pe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new pe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new pe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},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=ue(e,!0)}return oe.shift()})(),put_char(e,t){null===t||10===t?(m(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(m(q(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(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(f(q(e.output,0)),e.output=[])}}},de=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=kr(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(pe.isBlkdev(r)||pe.isFIFO(r))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 i=pe.createNode(e,t,r,n);return pe.isDir(i.mode)?(i.node_ops=le.ops_table.dir.node,i.stream_ops=le.ops_table.dir.stream,i.contents={}):pe.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):pe.isLink(i.mode)?(i.node_ops=le.ops_table.link.node,i.stream_ops=le.ops_table.link.stream):pe.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=pe.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,pe.isDir(e.mode)?t.size=4096:pe.isFile(e.mode)?t.size=e.usedBytes:pe.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 pe.genericErrors[44]},mknod:(e,t,r,n)=>le.createNode(e,t,r,n),rename(e,t,r){if(pe.isDir(e.mode)){var n;try{n=pe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new pe.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=pe.lookupNode(e,t);for(var n in r.contents)throw new pe.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(!pe.isLink(e.mode))throw new pe.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 a=Math.min(e.node.usedBytes-i,n);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),r);else for(var s=0;s<a;s++)t[r+s]=o[i+s];return a},write(e,t,r,n,i,o){if(t.buffer===v.buffer&&(o=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===i)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(i+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),i),n}if(le.expandFileStorage(a,i+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)a.contents[i+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,i+n),n},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&pe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new pe.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(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var o,a,s=e.node.contents;if(2&i||s.buffer!==v.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(o=de(t)))throw new pe.ErrnoError(48);v.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:(e,t,r,n,i)=>(le.stream_ops.write(e,t,0,n,r,!1),0)}},he=(e,t,r,n)=>{var i=n?"":`al ${e}`;a(e,(r=>{var n;n=`Loading data file "${e}" failed (no arrayBuffer).`,r||W(n),t(new Uint8Array(r)),i&&j()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&B()},me=i.preloadPlugins||[],fe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},pe={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=ie.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new pe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=pe.root,i="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(n=pe.lookupNode(n,r[o]),i=re.join2(i,r[o]),pe.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;pe.isLink(n.mode);){var u=pe.readlink(i);if(i=ie.resolve(re.dirname(i),u),n=pe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new pe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(pe.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)%pe.nameTable.length},hashAddNode(e){var t=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[t],pe.nameTable[t]=e},hashRemoveNode(e){var t=pe.hashName(e.parent.id,e.name);if(pe.nameTable[t]===e)pe.nameTable[t]=e.name_next;else for(var r=pe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=pe.mayLookup(e);if(r)throw new pe.ErrnoError(r,e);for(var n=pe.hashName(e.id,t),i=pe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return pe.lookup(e,t)},createNode(e,t,r,n){var i=new pe.FSNode(e,t,r,n);return pe.hashAddNode(i),i},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 t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>pe.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=pe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return pe.lookupNode(e,t),20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=pe.lookupNode(e,t)}catch(e){return e.errno}var i=pe.nodePermissions(e,"wx");if(i)return i;if(r){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,t)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(t)||512&t)?31:pe.nodePermissions(e,pe.flagsToPermissionString(t)):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 t=pe.getStream(e);if(!t)throw new pe.ErrnoError(8);return t},getStream:e=>pe.streams[e],createStream:(e,t=-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==t&&(t=pe.nextfd()),e.fd=t,pe.streams[t]=e,e),closeStream(e){pe.streams[e]=null},chrdev_stream_ops:{open(e){var t=pe.getDevice(e.node.rdev);e.stream_ops=t.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,t)=>e<<8|t,registerDevice(e,t){pe.devices[e]={stream_ops:t}},getDevice:e=>pe.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),pe.syncFSRequests++,pe.syncFSRequests>1&&f(`warning: ${pe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=pe.getMounts(pe.root.mount),n=0;function i(e){return pe.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&&pe.root)throw new pe.ErrnoError(10);if(!i&&!o){var a=pe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,pe.isMountpoint(n))throw new pe.ErrnoError(10);if(!pe.isDir(n.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,i?pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(t.node))throw new pe.ErrnoError(28);var r=t.node,n=r.mounted,i=pe.getMounts(n);Object.keys(pe.nameTable).forEach((e=>{for(var t=pe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&pe.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=pe.lookupPath(e,{parent:!0}).node,i=re.basename(e);if(!i||"."===i||".."===i)throw new pe.ErrnoError(28);var o=pe.mayCreate(n,i);if(o)throw new pe.ErrnoError(o);if(!n.node_ops.mknod)throw new pe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,pe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,pe.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{pe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,pe.mknod(e,t,r)),symlink(e,t){if(!ie.resolve(e))throw new pe.ErrnoError(44);var r=pe.lookupPath(t,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var n=re.basename(t),i=pe.mayCreate(r,n);if(i)throw new pe.ErrnoError(i);if(!r.node_ops.symlink)throw new pe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=re.dirname(e),o=re.dirname(t),a=re.basename(e),s=re.basename(t);if(r=pe.lookupPath(e,{parent:!0}).node,n=pe.lookupPath(t,{parent:!0}).node,!r||!n)throw new pe.ErrnoError(44);if(r.mount!==n.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(r,a),d=ie.relative(e,o);if("."!==d.charAt(0))throw new pe.ErrnoError(28);if("."!==(d=ie.relative(t,i)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(n,s)}catch(e){}if(c!==u){var l=pe.isDir(c.mode),h=pe.mayDelete(r,a,l);if(h)throw new pe.ErrnoError(h);if(h=u?pe.mayDelete(n,s,l):pe.mayCreate(n,s))throw new pe.ErrnoError(h);if(!r.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(n!==r&&(h=pe.nodePermissions(r,"w")))throw new pe.ErrnoError(h);pe.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir(e){var t=pe.lookupPath(e,{parent:!0}).node,r=re.basename(e),n=pe.lookupNode(t,r),i=pe.mayDelete(t,r,!0);if(i)throw new pe.ErrnoError(i);if(!t.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);t.node_ops.rmdir(t,r),pe.destroyNode(n)},readdir(e){var t=pe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new pe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=pe.lookupPath(e,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var r=re.basename(e),n=pe.lookupNode(t,r),i=pe.mayDelete(t,r,!1);if(i)throw new pe.ErrnoError(i);if(!t.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);t.node_ops.unlink(t,r),pe.destroyNode(n)},readlink(e){var t=pe.lookupPath(e).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.readlink)throw new pe.ErrnoError(28);return ie.resolve(pe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=pe.lookupPath(e,{follow:!t}).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.getattr)throw new pe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>pe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?pe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){pe.chmod(e,t,!0)},fchmod(e,t){var r=pe.getStreamChecked(e);pe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?pe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){pe.chown(e,t,r,!0)},fchown(e,t,r){var n=pe.getStreamChecked(e);pe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new pe.ErrnoError(28);var r;if(!(r="string"==typeof e?pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(r.mode))throw new pe.ErrnoError(31);if(!pe.isFile(r.mode))throw new pe.ErrnoError(28);var n=pe.nodePermissions(r,"w");if(n)throw new pe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=pe.getStreamChecked(e);if(0==(2097155&r.flags))throw new pe.ErrnoError(28);pe.truncate(r.node,t)},utime(e,t,r){var n=pe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new pe.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=re.normalize(e);try{n=pe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(n){if(128&t)throw new pe.ErrnoError(20)}else n=pe.mknod(e,r,0),o=!0;if(!n)throw new pe.ErrnoError(44);if(pe.isChrdev(n.mode)&&(t&=-513),65536&t&&!pe.isDir(n.mode))throw new pe.ErrnoError(54);if(!o){var a=pe.mayOpen(n,t);if(a)throw new pe.ErrnoError(a)}512&t&&!o&&pe.truncate(n,0),t&=-131713;var s=pe.createStream({node:n,path:pe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&t||(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,t,r){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new pe.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 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 o="undefined"!=typeof i;if(o){if(!e.seekable)throw new pe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=a),a},write(e,t,r,n,i,o){if(n<0||i<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 a="undefined"!=typeof i;if(a){if(!e.seekable)throw new pe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,o);return a||(e.position+=s),s},allocate(e,t,r){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(t<0||r<=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,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&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,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 pe.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=pe.open(e,t.flags),i=pe.stat(e).size,o=new Uint8Array(i);return pe.read(n,o,0,i,0),"utf8"===t.encoding?r=q(o,0):"binary"===t.encoding&&(r=o),pe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=pe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(ae(t)+1),o=se(t,i,0,i.length);pe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");pe.write(n,t,0,t.byteLength,void 0,r.canOwn)}pe.close(n)},cwd:()=>pe.currentPath,chdir(e){var t=pe.lookupPath(e,{follow:!0});if(null===t.node)throw new pe.ErrnoError(44);if(!pe.isDir(t.node.mode))throw new pe.ErrnoError(54);var r=pe.nodePermissions(t.node,"x");if(r)throw new pe.ErrnoError(r);pe.currentPath=t.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,t,r,n,i)=>n}),pe.mkdev("/dev/null",pe.makedev(1,3)),ce.register(pe.makedev(5,0),ce.default_tty_ops),ce.register(pe.makedev(6,0),ce.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ne(e).byteLength),e[--t]);pe.createDevice("/dev","random",r),pe.createDevice("/dev","urandom",r),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 t=pe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=pe.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?pe.createDevice("/dev","stdin",i.stdin):pe.symlink("/dev/tty","/dev/stdin"),i.stdout?pe.createDevice("/dev","stdout",null,i.stdout):pe.symlink("/dev/tty","/dev/stdout"),i.stderr?pe.createDevice("/dev","stderr",null,i.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,t){this.name="ErrnoError",this.node=t,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,t,r){pe.init.initialized=!0,pe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,pe.createStandardStreams()},quit(){pe.init.initialized=!1;for(var e=0;e<pe.streams.length;e++){var t=pe.streams[e];t&&pe.close(t)}},findObject(e,t){var r=pe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=pe.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=pe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=re.basename(e),n=pe.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:pe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var a=re.join2(e,o);try{pe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,i){var o=re.join2("string"==typeof e?e:pe.getPath(e),t),a=fe(n,i);return pe.create(o,a)},createDataFile(e,t,r,n,i,o){var a=t;e&&(e="string"==typeof e?e:pe.getPath(e),a=t?re.join2(e,t):e);var s=fe(n,i),u=pe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),d=0,l=r.length;d<l;++d)c[d]=r.charCodeAt(d);r=c}pe.chmod(u,146|s);var h=pe.open(u,577);pe.write(h,r,0,r.length,0,o),pe.close(h),pe.chmod(u,s)}return u},createDevice(e,t,r,n){var i=re.join2("string"==typeof e?e:pe.getPath(e),t),o=fe(!!r,!!n);pe.createDevice.major||(pe.createDevice.major=64);var a=pe.makedev(pe.createDevice.major++,0);return pe.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var a=0,s=0;s<i;s++){var u;try{u=r()}catch(e){throw new pe.ErrnoError(29)}if(void 0===u&&0===a)throw new pe.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i,o){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new pe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),a}}),pe.mkdev(i,o,a)},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=ue(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.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,a=1048576;i||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,n-1),"undefined"==typeof s.chunks[e]&&(s.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!==a&&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||[]):ue(i.responseText||"",!0)})(t,i)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&n||(a=n=1,n=this.getter(0).length,a=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var a=new o;Object.defineProperties(a,{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:a}}else s={isDevice:!1,url:r};var u=pe.createFile(e,t,s,n,i);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 d(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[i+s];else for(s=0;s<a;s++)t[r+s]=o.get(i+s);return a}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(e,t,r,n,i)=>(pe.forceLoadFile(u),d(e,t,r,n,i)),c.mmap=(e,t,r,n,i)=>{pe.forceLoadFile(u);var o=de(t);if(!o)throw new pe.ErrnoError(48);return d(e,v,o,t,r),{ptr:o,allocated:!0}},u.stream_ops=c,u}},ge={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(re.isAbs(t))return t;var n;if(n=-100===e?pe.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!r)throw new pe.ErrnoError(44);return n}return re.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&re.normalize(t)!==re.normalize(pe.getPath(e.node)))return-54;throw e}b[r>>2]=n.dev,b[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,b[r+12>>2]=n.uid,b[r+16>>2]=n.gid,b[r+20>>2]=n.rdev,P=[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)],b[r+24>>2]=P[0],b[r+28>>2]=P[1],b[r+32>>2]=4096,b[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),a=n.ctime.getTime();return P=[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)],b[r+40>>2]=P[0],b[r+44>>2]=P[1],C[r+48>>2]=i%1e3*1e3,P=[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)],b[r+56>>2]=P[0],b[r+60>>2]=P[1],C[r+64>>2]=o%1e3*1e3,P=[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)],b[r+72>>2]=P[0],b[r+76>>2]=P[1],C[r+80>>2]=a%1e3*1e3,P=[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)],b[r+88>>2]=P[0],b[r+92>>2]=P[1],0},doMsync(e,t,r,n,i){if(!pe.isFile(t.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;var o=y.slice(e,e+r);pe.msync(t,o,i,r,n)},varargs:void 0,get(){var e=b[ge.varargs>>2];return ge.varargs+=4,e},getp:()=>ge.get(),getStr:e=>Y(e),getStreamFromFD:e=>pe.getStreamChecked(e)},ve={},ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function we(e){return this.fromWireType(b[e>>2])}var Fe={},be={},Ce={},Ee=void 0,_e=e=>{throw new Ee(e)},xe=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&_e("Mismatched type converter count");for(var i=0;i<e.length;++i)Ae(e[i],n[i])}e.forEach((function(e){Ce[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{be.hasOwnProperty(e)?i[t]=be[e]:(o.push(e),Fe.hasOwnProperty(e)||(Fe[e]=[]),Fe[e].push((()=>{i[t]=be[e],++a===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,ke=e=>{throw new Se(e)};function Ae(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||ke(`type "${n}" must have a positive integer typeid pointer`),be.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(be[e]=t,delete Ce[e],Fe.hasOwnProperty(e)){var i=Fe[e];delete Fe[e],i.forEach((e=>e()))}}(e,t,r)}var Pe=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=>{ke(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)},Be={},je=()=>Object.keys(Ue).length,We=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},Ie=[],Ne=()=>{for(;Ie.length;){var e=Ie.pop();e.$$.deleteScheduled=!1,e.delete()}},He=void 0,Qe=e=>{He=e,Ie.length&&He&&He(Ne)},Ue={},Ze=(e,t)=>(t=((e,t)=>{for(void 0===t&&ke("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||_e("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&_e("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ye(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,a=this.registeredClass.getActualType(t),s=Be[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.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 Ye=e=>"undefined"==typeof FinalizationRegistry?(Ye=e=>e,e):(Re=new FinalizationRegistry((e=>{ze(e.$$)})),Ye=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Re.register(e,r,e)}return e},$e=e=>Re.unregister(e),Ye(e));function Ge(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ye(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&&ke("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&&ke("Object already scheduled for deletion"),Ie.push(this),1===Ie.length&&He&&He(Ne),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)||ke(`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])&&ke(`Cannot register public name '${e}' twice`),nt(i,e,e),i.hasOwnProperty(r)&&ke(`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,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,r)=>{for(;t!==r;)t.upcast||ke(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function st(e,t){if(null===t)return this.isReference&&ke(`null is not a valid ${this.name}`),0;t.$$||ke(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||ke(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function ut(e,t){var r;if(null===t)return this.isReference&&ke(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||ke(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||ke(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&ke(`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=at(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ke("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:ke(`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,At.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:ke("Unsupporting sharing policy")}return r}function ct(e,t){if(null===t)return this.isReference&&ke(`null is not a valid ${this.name}`),0;t.$$||ke(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||ke(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&ke(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function dt(e){return this.fromWireType(C[e>>2])}function lt(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,a,s,u,c,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=d,i||void 0!==t.baseClass?this.toWireType=ut:n?(this.toWireType=st,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var pt=(e,t,r)=>{i.hasOwnProperty(e)||_e("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=>x.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&&ke(`unknown function pointer with signature ${e}: ${t}`),o},wt=void 0,Ft=e=>{var t=Sr(e),r=Te(t);return xr(t),r},bt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||be[t]||(Ce[t]?Ce[t].forEach(e):(r.push(t),n[t]=!0))})),new wt(`${e}: `+r.map(Ft).join([", "]))},Ct=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(C[t+4*n>>2]);return r};function Et(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 _t(e,t,r,n,i,o){var a=t.length;a<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=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 d="void"!==t[0].name,l="",h="";for(c=0;c<a-2;++c)l+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${tt(e)}(${l}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[ke,n,i,ye,t[0],t[1]];for(s&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-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(s&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(d||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=s?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 d&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),Et(Function,p).apply(null,g)}function xt(){this.allocated=[void 0],this.freelist=[]}var Dt,Tt=new xt,St=e=>{e>=Tt.reserved&&0==--Tt.get(e).refcount&&Tt.free(e)},kt=()=>{for(var e=0,t=Tt.reserved;t<Tt.allocated.length;++t)void 0!==Tt.allocated[t]&&++e;return e},At={toValue:e=>(e||ke("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})}}},Pt=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(E[e>>2])};case 8:return function(e){return this.fromWireType(_[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=>F[e>>1];case 4:return r?e=>b[e>>2]:e=>C[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)&&F[n];)++n;if((r=n<<1)-e>32&&$t)return $t.decode(y.subarray(e,r));for(var o="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}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 a=e.charCodeAt(o);w[t>>1]=a,t+=2}return w[t>>1]=0,t-n},Bt=e=>2*e.length,jt=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=b[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},Wt=(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 a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),b[t>>2]=a,(t+=4)+4>i)break}return b[t>>2]=0,t-n},It=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},Nt=(e,t)=>{var r=be[e];return void 0===r&&ke(t+" has unknown type "+Ft(e)),r},Ht={},Qt=e=>{var t=Ht[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,Yt=e=>e%4==0&&(e%100!=0||e%400==0),Gt=[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=>(Yt(e.getFullYear())?Gt:Xt)[e.getMonth()]+e.getDate()-1,Kt=e=>{var t=ae(e)+1,r=_r(t);return r&&Rt(e,r,t),r},er=[],tr=(e,t,r)=>{var n=((e,t)=>{var r;for(er.length=0;r=y[e++];)t+=105!=r&&t%8?4:0,er.push(105==r?b[t>>2]:_[t>>3]),t+=105==r?4:8;return er})(t,r);return Q[e].apply(null,n)};Dt=()=>performance.now();var rr,nr,ir,or=e=>{W("OOM")},ar=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),T(),1}catch(e){}},sr={},ur=()=>{if(!ur.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 sr)void 0===sr[t]?delete e[t]:e[t]=sr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);ur.strings=r}return ur.strings},cr=e=>{g||(i.onExit&&i.onExit(e),D=!0),d(e,new U(e))},dr=(e,t)=>{cr(e)},lr=(e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r},hr=[31,29,31,30,31,30,31,31,30,31,30,31],mr=[31,28,31,30,31,30,31,31,30,31,30,31],fr=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Yt(r.getFullYear()),i=r.getMonth(),o=(n?hr:mr)[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},pr=(e,t,r,n)=>{var i=C[n+40>>2],o={tm_sec:b[n>>2],tm_min:b[n+4>>2],tm_hour:b[n+8>>2],tm_mday:b[n+12>>2],tm_mon:b[n+16>>2],tm_year:b[n+20>>2],tm_wday:b[n+24>>2],tm_yday:b[n+28>>2],tm_isdst:b[n+32>>2],tm_gmtoff:b[n+36>>2],tm_zone:i?Y(i):""},a=Y(r),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)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(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 l(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=fr(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=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>h((e.tm_year+1900)/100|0,2),"%d":e=>h(e.tm_mday,2),"%e":e=>l(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+lr(Yt(e.tm_year+1900)?hr:mr,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&&Yt(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Yt(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 a=a.replace(/%%/g,"\0\0"),g)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),g[u](o)));var y,w,F=ue(a=a.replace(/\0\0/g,"%"),!1);return F.length>t?0:(y=F,w=e,v.set(y,w),F.length-1)},gr=e=>parseInt(e),vr=Kt,yr=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},wr=365,Fr=146;Object.defineProperties(yr.prototype,{read:{get:function(){return(this.mode&wr)===wr},set:function(e){e?this.mode|=wr:this.mode&=-366}},write:{get:function(){return(this.mode&Fr)===Fr},set:function(e){e?this.mode|=Fr:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=yr,pe.createPreloadedFile=(e,t,r,n,i,o,a,s,u,c)=>{var d=t?ie.resolve(re.join2(e,t)):e;function l(r){function l(r){c&&c(),s||pe.createDataFile(e,t,r,n,i,u),o&&o(),j()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return me.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,d,l,(()=>{a&&a(),j()}))||l(r)}B(),"string"==typeof r?he(r,(e=>l(e)),a):l(r)},pe.staticInit(),Ee=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=Ge,et.prototype.delete=Xe,et.prototype.isDeleted=Je,et.prototype.deleteLater=Ke,i.getInheritedInstanceCount=je,i.getLiveInheritedInstances=We,i.flushPendingDeletes=Ne,i.setDelayFunction=Qe,ft.prototype.getPointee=lt,ft.prototype.destructor=ht,ft.prototype.argPackAdvance=Pe,ft.prototype.readValueFromPointer=dt,ft.prototype.deleteObject=mt,ft.prototype.fromWireType=qe,wt=i.UnboundTypeError=(rr=Error,(ir=rt(nr="UnboundTypeError",(function(e){this.name=nr,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(rr.prototype),ir.prototype.constructor=ir,ir.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},ir),Object.assign(xt.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=kt;var br,Cr={o:(e,t,r,n)=>{W(`Assertion failed: ${Y(e)}, at: `+[t?Y(t):"unknown filename",r,n?Y(n):"unknown function"])},u:e=>{var t=new K(e);return t.get_caught()||(t.set_caught(!0),X--),t.set_rethrown(!1),G.push(t),Rr(t.excPtr),t.get_exception_ptr()},Qb:()=>{if(!G.length)return 0;var e=G[G.length-1];return Rr(e.excPtr),e.excPtr},H:()=>{Ar(0,0);var e=G.pop();Or(e.excPtr),J=0},a:()=>ee([]),h:e=>ee([e]),w:(e,t)=>ee([e,t]),Za:te,Pb:e=>{if(e){var t=new K(e);G.push(t),t.set_rethrown(!0),te()}},q:(e,t,r)=>{throw new K(e).init(t,r),X++,J=e},Rb:()=>X,c:e=>{throw J||(J=e),J},Wb:function(e,t,r,n,i){try{for(var o=0,a=t?b[t>>2]:0,s=t?b[t+4>>2]:0,u=r?b[r>>2]:0,c=r?b[r+4>>2]:0,d=n?b[n>>2]:0,l=n?b[n+4>>2]:0,h=0,m=0,f=0,p=0,g=0,v=0,y=(t?b[t>>2]:0)|(r?b[r>>2]:0)|(n?b[n>>2]:0),w=(t?b[t+4>>2]:0)|(r?b[r+4>>2]:0)|(n?b[n+4>>2]:0),F=function(e,t,r,n){return e<32?t&n:r&n},C=0;C<e;C++){var E=1<<C%32;if(F(C,y,w,E)){var _=ge.getStreamFromFD(C),x=ge.DEFAULT_POLLMASK;if(_.stream_ops.poll){var D=-1;i&&(D=1e3*((t?b[i>>2]:0)+(t?b[i+8>>2]:0)/1e6)),x=_.stream_ops.poll(_,D)}1&x&&F(C,a,s,E)&&(C<32?h|=E:m|=E,o++),4&x&&F(C,u,c,E)&&(C<32?f|=E:p|=E,o++),2&x&&F(C,d,l,E)&&(C<32?g|=E:v|=E,o++)}}return t&&(b[t>>2]=h,b[t+4>>2]=m),r&&(b[r>>2]=f,b[r+4>>2]=p),n&&(b[n>>2]=g,b[n+4>>2]=v),o}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ab: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(;pe.streams[i];)i++;return pe.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,b[Dr()>>2]=o,-1}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}var o},cc:function(e,t){try{var r=ge.getStreamFromFD(e);return ge.doStat(pe.stat,r.path,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},dc: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();b[o>>2]=i.c_iflag||0,b[o+4>>2]=i.c_oflag||0,b[o+8>>2]=i.c_cflag||0,b[o+12>>2]=i.c_lflag||0;for(var a=0;a<32;a++)v[o+a+17>>0]=i.c_cc[a]||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 s=b[o>>2],u=b[o+4>>2],c=b[o+8>>2],d=b[o+12>>2],l=[];for(a=0;a<32;a++)l.push(v[o+a+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:d,c_cc:l})}return 0;case 21519:return n.tty?(o=ge.getp(),b[o>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return o=ge.getp(),pe.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 pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ac: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?pe.lstat:pe.stat,t,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},bb: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 pe.open(t,r,i).fd}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Xb:function(e){try{return e=ge.getStr(e),pe.rmdir(e),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},bc:function(e,t){try{return e=ge.getStr(e),ge.doStat(pe.stat,e,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Yb:function(e,t,r){try{return t=ge.getStr(t),t=ge.calculateAt(e,t),0===r?pe.unlink(t):512===r?pe.rmdir(t):W("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ub: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)));xe([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],d=t.setter,l=t.setterContext;o[n]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];d(l,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 a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:n}]}))},Ib:(e,t,r,n,i)=>{},hc:(e,t,r,n)=>{Ae(e,{name:t=Te(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Pe,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},ba:(e,t,r,n,i,o,a,s,u,c,d,l,h)=>{d=Te(d),o=yt(i,o),s&&(s=yt(a,s)),c&&(c=yt(u,c)),h=yt(l,h);var m=tt(d);it(m,(function(){bt(`Cannot construct ${d} due to unbound types`,[n])})),xe([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:et.prototype;var a=rt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new Se("Use 'new' to construct "+d);if(void 0===l.constructor_body)throw new Se(d+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new Se(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(l.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var l=new ot(d,a,u,h,r,o,s,c);l.baseClass&&(void 0===l.baseClass.__derivedClasses&&(l.baseClass.__derivedClasses=[]),l.baseClass.__derivedClasses.push(l));var f=new ft(d,l,!0,!1,!1),p=new ft(d+"*",l,!1,!1,!1),g=new ft(d+" const*",l,!1,!0,!1);return Be[e]={pointerType:p,constPointerType:g},pt(m,a),[f,p,g]}))},aa:(e,t,r,n,i,o)=>{var a=Ct(t,r);i=yt(n,i),xe([],[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]=()=>{bt(`Cannot construct ${e.name} due to unbound types`,a)},xe([],a,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=_t(r,n,null,i,o),[]))),[]}))},V:(e,t,r,n,i,o,a,s,u)=>{var c=Ct(r,n);t=Te(t),o=yt(i,o),xe([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){bt(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,l=d[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(i.argCount=r-2,i.className=e.name,d[t]=i):(nt(d,t,n),d[t].overloadTable[r-2]=i),xe([],c,(function(i){var s=_t(n,i,e,o,a,u);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))},gc:(e,t)=>{Ae(e,{name:t=Te(t),fromWireType:e=>{var t=At.toValue(e);return St(e),t},toWireType:(e,t)=>At.toHandle(t),argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:null})},db:(e,t,r)=>{Ae(e,{name:t=Te(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Pe,readValueFromPointer:Mt(t,r),destructorFunction:null})},Z:(e,t,r,n,i,o,a)=>{var s=Ct(t,r);e=Te(e),i=yt(n,i),it(e,(function(){bt(`Cannot call ${e} due to unbound types`,s)}),t-1),xe([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return pt(e,_t(e,n,null,i,o,a),t-1),[]}))},ca:(e,t,r,n,i)=>{t=Te(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");Ae(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Pe,readValueFromPointer:Ot(t,r,0!==n),destructorFunction:null})},N:(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(v.buffer,r,t)}Ae(e,{name:r=Te(r),fromWireType:i,argPackAdvance:Pe,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},cb:(e,t)=>{var r="std::string"===(t=Te(t));Ae(e,{name:t,fromWireType:e=>{var t,n=C[e>>2],i=e+4;if(r)for(var o=i,a=0;a<=n;++a){var s=i+a;if(a==n||0==y[s]){var u=Y(o,s-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(y[i+a]);t=c.join("")}return xr(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||ke("Cannot pass non-string to std::string"),n=r&&i?ae(t):t.length;var o=_r(4+n+1),a=o+4;if(C[o>>2]=n,r&&i)Rt(t,a,n+1);else if(i)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(xr(a),ke("String has UTF-16 code units that do not fit in 8 bits")),y[a+s]=u}else for(s=0;s<n;++s)y[a+s]=t[s];return null!==e&&e.push(xr,o),o},argPackAdvance:Pe,readValueFromPointer:dt,destructorFunction:e=>xr(e)})},Oa:(e,t,r)=>{var n,i,o,a,s;r=Te(r),2===t?(n=zt,i=Lt,a=Bt,o=()=>F,s=1):4===t&&(n=jt,i=Wt,a=It,o=()=>C,s=2),Ae(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],a=o(),u=e+4,c=0;c<=i;++c){var d=e+4+c*t;if(c==i||0==a[d>>s]){var l=n(u,d-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=d+t}}return xr(e),r},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${r}`);var o=a(n),u=_r(4+o+t);return C[u>>2]=o>>s,i(n,u+4,o+t),null!==e&&e.push(xr,u),u},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:e=>xr(e)})},vb:(e,t,r,n,i,o)=>{ve[e]={name:Te(t),rawConstructor:yt(r,n),rawDestructor:yt(i,o),fields:[]}},tb:(e,t,r,n,i,o,a,s,u,c)=>{ve[e].fields.push({fieldName:Te(t),getterReturnType:r,getter:yt(n,i),getterContext:o,setterArgumentType:a,setter:yt(s,u),setterContext:c})},ic:(e,t)=>{Ae(e,{isVoid:!0,name:t=Te(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},ec:()=>!0,Sb:()=>{throw 1/0},na:(e,t,r)=>{e=At.toValue(e),t=Nt(t,"emval::as");var n=[],i=At.toHandle(n);return C[r>>2]=i,t.toWireType(n,e)},La:(e,t,r,n,i)=>(e=Ut[e])(t=At.toValue(t),r=Qt(r),(e=>{var t=[];return C[e>>2]=At.toHandle(t),t})(n),i),Ka:(e,t,r,n)=>{(e=Ut[e])(t=At.toValue(t),r=Qt(r),null,n)},jc:St,pb:e=>0===e?At.toHandle(Zt()):(e=Qt(e),At.toHandle(Zt()[e])),ma:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Nt(C[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 a=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,a.push("argType"+c),s.push(r[1+c]);var d="return function "+tt("methodCaller_"+i)+"(handle, name, destructors, args) {\n",l=0;for(c=0;c<e-1;++c)d+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=r[c+1].argPackAdvance;for(d+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(d+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var h,m,f=Et(Function,a).apply(null,s);return h=f,m=Ut.length,Ut.push(h),o=m,Vt[i]=o,o},Bb:(e,t)=>(e=At.toValue(e),t=At.toValue(t),At.toHandle(e[t])),s:e=>{e>4&&(Tt.get(e).refcount+=1)},P:()=>At.toHandle([]),da:e=>At.toHandle(Qt(e)),C:()=>At.toHandle({}),wb:e=>{var t=At.toValue(e);ye(t),St(e)},sc:(e,t,r)=>{e=At.toValue(e),t=At.toValue(t),r=At.toValue(r),e[t]=r},Y:(e,t)=>{var r=(e=Nt(e,"_emval_take_value")).readValueFromPointer(t);return At.toHandle(r)},Eb:function(e,t,r){var n=qt(e,t),i=new Date(1e3*n);b[r>>2]=i.getUTCSeconds(),b[r+4>>2]=i.getUTCMinutes(),b[r+8>>2]=i.getUTCHours(),b[r+12>>2]=i.getUTCDate(),b[r+16>>2]=i.getUTCMonth(),b[r+20>>2]=i.getUTCFullYear()-1900,b[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),a=(i.getTime()-o)/864e5|0;b[r+28>>2]=a},Fb:function(e,t,r){var n=qt(e,t),i=new Date(1e3*n);b[r>>2]=i.getSeconds(),b[r+4>>2]=i.getMinutes(),b[r+8>>2]=i.getHours(),b[r+12>>2]=i.getDate(),b[r+16>>2]=i.getMonth(),b[r+20>>2]=i.getFullYear()-1900,b[r+24>>2]=i.getDay();var o=0|Jt(i);b[r+28>>2]=o,b[r+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),0,1),s=new Date(i.getFullYear(),6,1).getTimezoneOffset(),u=a.getTimezoneOffset(),c=0|(s!=u&&i.getTimezoneOffset()==Math.min(u,s));b[r+32>>2]=c},Gb:function(e){var t=(()=>{var t=new Date(b[e+20>>2]+1900,b[e+16>>2],b[e+12>>2],b[e+8>>2],b[e+4>>2],b[e>>2],0),r=b[e+32>>2],n=t.getTimezoneOffset(),i=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=i.getTimezoneOffset(),s=Math.min(a,o);if(r<0)b[e+32>>2]=Number(o!=a&&s==n);else if(r>0!=(s==n)){var u=Math.max(a,o),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}b[e+24>>2]=t.getDay();var d=0|Jt(t);return b[e+28>>2]=d,b[e>>2]=t.getSeconds(),b[e+4>>2]=t.getMinutes(),b[e+8>>2]=t.getHours(),b[e+12>>2]=t.getDate(),b[e+16>>2]=t.getMonth(),b[e+20>>2]=t.getYear(),t.getTime()/1e3})();return Tr((A=t,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)),t>>>0},Cb:function(e,t,r,n,i,o,a,s){var u=qt(i,o);try{if(isNaN(u))return 61;var c=ge.getStreamFromFD(n),d=pe.mmap(c,e,u,t,r),l=d.ptr;return b[a>>2]=d.allocated,C[s>>2]=l,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Db:function(e,t,r,n,i,o,a){var s=qt(o,a);try{if(isNaN(s))return 61;var u=ge.getStreamFromFD(i);2&r&&ge.doMsync(e,u,t,n,s),pe.munmap(u)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ub:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),a=i.getTimezoneOffset(),s=o.getTimezoneOffset(),u=Math.max(a,s);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*u,b[t>>2]=Number(a!=s);var d=c(i),l=c(o),h=Kt(d),m=Kt(l);s<a?(C[r>>2]=h,C[r+4>>2]=m):(C[r>>2]=m,C[r+4>>2]=h)},D:()=>{W("")},qb:(e,t,r)=>tr(e,t,r),ua:()=>Date.now(),Vb:()=>2147483648,va:Dt,fc:(e,t,r)=>y.copyWithin(e,t,t+r),Tb:e=>{var t=y.length,r=2147483648;(e>>>=0)>r&&or();for(var n,i,o=1;o<=4;o*=2){var a=t*(1+.2/o);a=Math.min(a,e+100663296);var s=Math.min(r,(n=Math.max(e,a))+((i=65536)-n%i)%i);if(ar(s))return!0}or()},_b:(e,t)=>{var r=0;return ur().forEach(((n,i)=>{var o=t+r;C[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},$b:(e,t)=>{var r=ur();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0},kc:dr,Na:function(e){try{var t=ge.getStreamFromFD(e);return pe.close(t),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Zb:function(e,t){try{var r=ge.getStreamFromFD(e),n=r.tty?2:pe.isDir(r.mode)?3:pe.isLink(r.mode)?7:4;return v[t>>0]=n,w[t+2>>1]=0,P=[0,(A=0,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],b[t+8>>2]=P[0],b[t+12>>2]=P[1],P=[0,(A=0,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],b[t+16>>2]=P[0],b[t+20>>2]=P[1],0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},$a:function(e,t,r,n){try{var i=((e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=pe.read(e,v,a,s,n);if(u<0)return-1;if(i+=u,u<s)break;"undefined"!=typeof n&&(n+=u)}return i})(ge.getStreamFromFD(e),t,r);return C[n>>2]=i,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Hb:function(e,t,r,n,i){var o=qt(t,r);try{if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return pe.llseek(a,o,n),P=[a.position>>>0,(A=a.position,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],b[i>>2]=P[0],b[i+4>>2]=P[1],a.getdents&&0===o&&0===n&&(a.getdents=null),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Ma:function(e,t,r,n){try{var i=((e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=pe.write(e,v,a,s,n);if(u<0)return-1;i+=u,"undefined"!=typeof n&&(n+=u)}return i})(ge.getStreamFromFD(e),t,r);return C[n>>2]=i,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},sb:function(){return vr(location.toString())},Ob:(e,t)=>(ne(y.subarray(e,e+t)),0),rb:function(){return vr((e=Vr,self[e(165,"8(oE")][e(171,"m6VD")]()));var e},$:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},uc:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Sa:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Q:function(e,t,r,n,i,o){var a=Pr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},E:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},Ra:function(e,t,r,n,i,o){var a=Pr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},tc:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},r:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},z:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},pa:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},X:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},sa:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},vc:function(e,t,r,n,i,o){var a=Pr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},v:function(e){var t=Pr();try{return gt(e)()}catch(e){if(Mr(t),e!==e+0)throw e;Ar(1,0)}},i:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},Ec:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},eb:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},Ga:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},xc:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},zc:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},yc:function(e,t,r,n,i,o,a,s){var u=Pr();try{return gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},Dc:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{return gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},b:function(e,t,r){var n=Pr();try{return gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Ua:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},wc:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},g:function(e,t,r,n){var i=Pr();try{return gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},ga:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},Ja:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},k:function(e,t,r,n,i){var o=Pr();try{return gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},_a:function(e,t,r,n,i,o){var a=Pr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},gb:function(e,t,r,n,i,o,a){var s=Pr();try{return gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},n:function(e,t,r,n,i,o){var a=Pr();try{return gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},A:function(e,t,r,n,i,o,a){var s=Pr();try{return gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},_:function(e,t,r,n,i,o,a,s){var u=Pr();try{return gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},J:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{return gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},ha:function(e,t,r,n,i,o,a,s,u,c){var d=Pr();try{return gt(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(Mr(d),e!==e+0)throw e;Ar(1,0)}},ka:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{return gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},Ca:function(e,t,r,n,i,o,a,s,u,c,d,l){var h=Pr();try{return gt(e)(t,r,n,i,o,a,s,u,c,d,l)}catch(e){if(Mr(h),e!==e+0)throw e;Ar(1,0)}},yb:function(e,t,r,n,i,o,a){var s=Pr();try{return Qr(e,t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},Mb:function(e,t,r,n){var i=Pr();try{return jr(e,t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},Ab:function(e){var t=Pr();try{return Nr(e)}catch(e){if(Mr(t),e!==e+0)throw e;Ar(1,0)}},Nb:function(e,t){var r=Pr();try{return Lr(e,t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},zb:function(e,t,r){var n=Pr();try{return Hr(e,t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Lb:function(e,t,r,n){var i=Pr();try{return Wr(e,t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},xb:function(e,t,r,n,i){var o=Pr();try{return Ur(e,t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},l:function(e){var t=Pr();try{gt(e)()}catch(e){if(Mr(t),e!==e+0)throw e;Ar(1,0)}},e:function(e,t){var r=Pr();try{gt(e)(t)}catch(e){if(Mr(r),e!==e+0)throw e;Ar(1,0)}},Da:function(e,t,r){var n=Pr();try{gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Ea:function(e,t,r,n){var i=Pr();try{gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},oa:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},ta:function(e,t,r){var n=Pr();try{gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},Ya:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},d:function(e,t,r){var n=Pr();try{gt(e)(t,r)}catch(e){if(Mr(n),e!==e+0)throw e;Ar(1,0)}},F:function(e,t,r,n){var i=Pr();try{gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},Aa:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},Pa:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},Ac:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},xa:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},T:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},Fa:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},nc:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},L:function(e,t,r,n){var i=Pr();try{gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},la:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},Cc:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},za:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},ea:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},Va:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},Xa:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},f:function(e,t,r,n){var i=Pr();try{gt(e)(t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},hb:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},x:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},mb:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},Bc:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},y:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},ja:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},G:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},qa:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},wa:function(e,t,r,n,i,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(Mr(d),e!==e+0)throw e;Ar(1,0)}},ib:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},W:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},jb:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},Wa:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},nb:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},j:function(e,t,r,n,i){var o=Pr();try{gt(e)(t,r,n,i)}catch(e){if(Mr(o),e!==e+0)throw e;Ar(1,0)}},Qa:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},lc:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},Ia:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},I:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},fa:function(e,t,r,n,i,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(Mr(d),e!==e+0)throw e;Ar(1,0)}},kb:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},m:function(e,t,r,n,i,o){var a=Pr();try{gt(e)(t,r,n,i,o)}catch(e){if(Mr(a),e!==e+0)throw e;Ar(1,0)}},Fc:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},B:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},lb:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},U:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},p:function(e,t,r,n,i,o,a){var s=Pr();try{gt(e)(t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},fb:function(e,t,r,n,i,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(Mr(d),e!==e+0)throw e;Ar(1,0)}},Ha:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},rc:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},ya:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},t:function(e,t,r,n,i,o,a,s){var u=Pr();try{gt(e)(t,r,n,i,o,a,s)}catch(e){if(Mr(u),e!==e+0)throw e;Ar(1,0)}},qc:function(e,t,r,n,i,o,a,s,u,c,d,l){var h=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l)}catch(e){if(Mr(h),e!==e+0)throw e;Ar(1,0)}},pc:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},K:function(e,t,r,n,i,o,a,s,u){var c=Pr();try{gt(e)(t,r,n,i,o,a,s,u)}catch(e){if(Mr(c),e!==e+0)throw e;Ar(1,0)}},Ta:function(e,t,r,n,i,o,a,s,u,c,d,l){var h=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l)}catch(e){if(Mr(h),e!==e+0)throw e;Ar(1,0)}},R:function(e,t,r,n,i,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(Mr(d),e!==e+0)throw e;Ar(1,0)}},ra:function(e,t,r,n,i,o,a,s,u,c,d,l,h,m){var f=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l,h,m)}catch(e){if(Mr(f),e!==e+0)throw e;Ar(1,0)}},O:function(e,t,r,n,i,o,a,s,u,c,d){var l=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(Mr(l),e!==e+0)throw e;Ar(1,0)}},ob:function(e,t,r,n,i,o,a,s,u,c,d,l){var h=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l)}catch(e){if(Mr(h),e!==e+0)throw e;Ar(1,0)}},ia:function(e,t,r,n,i,o,a,s,u,c,d,l,h,m){var f=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l,h,m)}catch(e){if(Mr(f),e!==e+0)throw e;Ar(1,0)}},Ba:function(e,t,r,n,i,o,a,s,u,c,d,l,h,m,f,p){var g=Pr();try{gt(e)(t,r,n,i,o,a,s,u,c,d,l,h,m,f,p)}catch(e){if(Mr(g),e!==e+0)throw e;Ar(1,0)}},Jb:function(e,t,r,n,i,o,a){var s=Pr();try{Br(e,t,r,n,i,o,a)}catch(e){if(Mr(s),e!==e+0)throw e;Ar(1,0)}},Kb:function(e,t,r,n){var i=Pr();try{Ir(e,t,r,n)}catch(e){if(Mr(i),e!==e+0)throw e;Ar(1,0)}},M:e=>e,oc:pr,S:(e,t,r,n,i)=>pr(e,t,r,n),mc:(e,t,r)=>{for(var n=Y(t),i="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,a=i.length;o<a;++o)n=n.replace(new RegExp("\\"+i[o],"g"),"\\"+i[o]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var u in s)n=n.replace(u,s[u]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in c)n=n.replace(d,"("+d+c[d]+")");var l=[];for(o=n.indexOf("%");o>=0;o=n.indexOf("%"))l.push(n[o+1]),n=n.replace(new RegExp("\\%"+n[o+1],"g"),"");var h=new RegExp("^"+n,"i").exec(Y(e));if(h){var m,f=function(){function e(e,t,r){return"number"!=typeof e||isNaN(e)?t:e>=t?e<=r?e:r:t}return{year:e(b[r+20>>2]+1900,1970,9999),month:e(b[r+16>>2],0,11),day:e(b[r+12>>2],1,31),hour:e(b[r+8>>2],0,23),min:e(b[r+4>>2],0,59),sec:e(b[r>>2],0,59)}}(),p=e=>{var t=l.indexOf(e);if(t>=0)return h[t+1]};if((m=p("S"))&&(f.sec=gr(m)),(m=p("M"))&&(f.min=gr(m)),m=p("H"))f.hour=gr(m);else if(m=p("I")){var g=gr(m);(m=p("p"))&&(g+="P"===m.toUpperCase()[0]?12:0),f.hour=g}if(m=p("Y"))f.year=gr(m);else if(m=p("y")){var v=gr(m);(m=p("C"))?v+=100*gr(m):v+=v<69?2e3:1900,f.year=v}if((m=p("m"))?f.month=gr(m)-1:(m=p("b"))&&(f.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[m.substring(0,3).toUpperCase()]||0),m=p("d"))f.day=gr(m);else if(m=p("j"))for(var y=gr(m),w=Yt(f.year),F=0;F<12;++F){var C=lr(w?hr:mr,F-1);y<=C+(w?hr:mr)[F]&&(f.day=y-C)}else if(m=p("a")){var E=m.substring(0,3).toUpperCase();if(m=p("U")){var _={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[E],x=gr(m);T=0===(D=new Date(f.year,0,1)).getDay()?fr(D,_+7*(x-1)):fr(D,7-D.getDay()+_+7*(x-1)),f.day=T.getDate(),f.month=T.getMonth()}else if(m=p("W")){var D,T;_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[E],x=gr(m),T=1===(D=new Date(f.year,0,1)).getDay()?fr(D,_+7*(x-1)):fr(D,7-D.getDay()+1+_+7*(x-1)),f.day=T.getDate(),f.month=T.getMonth()}}var S=new Date(f.year,f.month,f.day,f.hour,f.min,f.sec,0);return b[r>>2]=S.getSeconds(),b[r+4>>2]=S.getMinutes(),b[r+8>>2]=S.getHours(),b[r+12>>2]=S.getDate(),b[r+16>>2]=S.getMonth(),b[r+20>>2]=S.getFullYear()-1900,b[r+24>>2]=S.getDay(),b[r+28>>2]=lr(Yt(S.getFullYear())?hr:mr,S.getMonth()-1)+S.getDate()-1,b[r+32>>2]=0,e+ue(h[0]).length-1}return 0}},Er=function(){var e,t,n,o,a={a:Cr};function s(e,t){var r,n=e.exports;return p=(Er=n).Gc,T(),x=Er.Jc,r=Er.Hc,O.unshift(r),j(),n}if(B(),i.instantiateWasm)try{return i.instantiateWasm(a,s)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return(e=h,t=S,n=a,o=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||I(t)||"function"!=typeof fetch?H(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"),H(t,n,o)}))))).catch(r),{}}(),_r=i._malloc=e=>(_r=i._malloc=Er.Ic)(e),xr=i._free=e=>(xr=i._free=Er.Kc)(e),Dr=()=>(Dr=Er.Lc)(),Tr=e=>(Tr=Er.Mc)(e),Sr=e=>(Sr=Er.Nc)(e),kr=(i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=Er.Oc)(),(e,t)=>(kr=Er.Pc)(e,t)),Ar=(e,t)=>(Ar=Er.Qc)(e,t),Pr=()=>(Pr=Er.Rc)(),Mr=e=>(Mr=Er.Sc)(e),Or=e=>(Or=Er.Tc)(e),Rr=e=>(Rr=Er.Uc)(e),$r=(e,t,r)=>($r=Er.Vc)(e,t,r),zr=e=>(zr=Er.Wc)(e),Lr=i.dynCall_ji=(e,t)=>(Lr=i.dynCall_ji=Er.Xc)(e,t),Br=i.dynCall_viijii=(e,t,r,n,o,a,s)=>(Br=i.dynCall_viijii=Er.Yc)(e,t,r,n,o,a,s),jr=i.dynCall_iij=(e,t,r,n)=>(jr=i.dynCall_iij=Er.Zc)(e,t,r,n),Wr=i.dynCall_jiii=(e,t,r,n)=>(Wr=i.dynCall_jiii=Er._c)(e,t,r,n),Ir=i.dynCall_vij=(e,t,r,n)=>(Ir=i.dynCall_vij=Er.$c)(e,t,r,n),Nr=(i.dynCall_jiji=(e,t,r,n,o)=>(i.dynCall_jiji=Er.ad)(e,t,r,n,o),i.dynCall_viij=(e,t,r,n,o)=>(i.dynCall_viij=Er.bd)(e,t,r,n,o),i.dynCall_jjj=(e,t,r,n,o)=>(i.dynCall_jjj=Er.cd)(e,t,r,n,o),i.dynCall_iiiijj=(e,t,r,n,o,a,s,u)=>(i.dynCall_iiiijj=Er.dd)(e,t,r,n,o,a,s,u),i.dynCall_viijj=(e,t,r,n,o,a,s)=>(i.dynCall_viijj=Er.ed)(e,t,r,n,o,a,s),i.dynCall_viiijjj=(e,t,r,n,o,a,s,u,c,d)=>(i.dynCall_viiijjj=Er.fd)(e,t,r,n,o,a,s,u,c,d),i.dynCall_j=e=>(Nr=i.dynCall_j=Er.gd)(e)),Hr=i.dynCall_jii=(e,t,r)=>(Hr=i.dynCall_jii=Er.hd)(e,t,r),Qr=i.dynCall_iiiiij=(e,t,r,n,o,a,s)=>(Qr=i.dynCall_iiiiij=Er.id)(e,t,r,n,o,a,s),Ur=i.dynCall_jiiii=(e,t,r,n,o)=>(Ur=i.dynCall_jiiii=Er.jd)(e,t,r,n,o);function Zr(){function e(){br||(br=!0,i.calledRun=!0,D||(i.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,ce.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_iiiiijj=(e,t,r,n,o,a,s,u,c)=>(i.dynCall_iiiiijj=Er.kd)(e,t,r,n,o,a,s,u,c),i.dynCall_iiiiiijj=(e,t,r,n,o,a,s,u,c,d)=>(i.dynCall_iiiiiijj=Er.ld)(e,t,r,n,o,a,s,u,c,d),i.___start_em_js=9103988,i.___stop_em_js=9104096,i.UTF8ToString=Y,i.stringToUTF8=Rt,i.lengthBytesUTF8=ae,i.allocateUTF8=vr,L=function e(){br||Zr(),br||(L=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();function Vr(e,t){var r=qr();return Vr=function(t,n){var i=r[t-=163];if(void 0===Vr.lmkgdF){var o=function(e){for(var t,r,n="",i="",o=0,a=0;r=e.charAt(a++);~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 s=0,u=n.length;s<u;s++)i+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(i)},a=function(e,t){var r,n,i=[],a=0,s="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)a=(a+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[a],i[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+i[n=(n+1)%256])%256,r=i[n],i[n]=i[a],i[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[a])%256]);return s};Vr.YJyfFJ=a,e=arguments,Vr.lmkgdF=!0}var s=r[0],u=t+s,c=e[u];return c?i=c:(void 0===Vr.PqcbKt&&(Vr.PqcbKt=!0),i=Vr.YJyfFJ(i,n),e[u]=i),i},Vr(e,t)}function qr(){var e=["qSkuWOpdV8kbi8k+WRxcNebieG","WRH9WRCdWPTgwtW","W7RdLmkndmkPgZm","rCkndGtcLYDGW7u","hmo8W406smogyw4XW5byW5q","WQScWOlcQmkTr8kYWQvfW7X0kW","aSkVWOBdHJXMW4tcKSoTAfr5ma","WQZcQSoJWRbAWQbQW4xdSW","E1/dRhldK3TqW47dVW","cCkRWOddGZ09WQlcLCoIyNa","aSkAWQ8LWPlcUHRcOq","WO9oWRxcSmkwjCoM","AvddQae3EmonWObVAG","CWBcO8kVW5X0WOXzgJJdVr3dJa","wSkEbCoBW74XWQziW53dVbynW7K","E8o9ifSWd8kNW5etWOtdTNK","hw7dOSoSWR7cRSkVeG","sI1XW6JcGbdcSSoM","xmoeW7v8W5ddPK3cQCoPctxcQ08","udFcGmkPW7NcQ8kxomkUiCoy","B1hdQGbbkCkrWQf0EYZcSSkz","F1RcLeNdT2z/W6W","cMKblIhdJLFcP8oKmW","n3bUAv1NlCkyW69NW5ZdLmo/"];return(qr=function(){return e})()}Zr(),function(e,t){for(var r=Vr,n=e();;)try{if(251770==-parseInt(r(174,"m6VD"))/1*(-parseInt(r(172,"yYTL"))/2)+parseInt(r(183,"4%U7"))/3+parseInt(r(186,"FaVJ"))/4*(-parseInt(r(177,"9PAp"))/5)+parseInt(r(179,"E5t!"))/6+parseInt(r(173,"8(oE"))/7*(-parseInt(r(166,"JbiT"))/8)+-parseInt(r(168,"N&3q"))/9+parseInt(r(176,"7phd"))/10*(parseInt(r(175,"8vuJ"))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qr);var ighnua,Yr=(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}),Gr=Yr(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Gr)};return e()}));return Gr(),e.ready});e.exports=i},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return De})),r.d(t,"commands",(function(){return Pe}));var n,i,o,a,s,u,c,d,l,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.detectOrientation=!1,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.detectOrientation&&(this.detectOrientation=e.detectOrientation),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 F(e);case"CustomBinarizationFilter":return new b(e);case"ColorDocumentFilter":return new C(e);case"BrightnessFilter":return new E(e);case"ContrastFilter":return new _(e);case"GrayscaleFilter":return new x(e);case"LegacyFilter":return new D(e);case"WhiteBlackPointFilter":return new T(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class F extends m{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class b 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 C extends m{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class E extends m{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class _ extends m{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class x 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 k extends m{constructor(e={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],this.ignoreOrientationMismatch=!1,void 0!==e.isLive&&(this.isLive=e.isLive),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.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=e.acceptedAspectRatioScore),void 0!==e.aspectRatios&&(this.aspectRatios=e.aspectRatios.map((e=>new S(e)))),void 0!==e.ignoreOrientationMismatch&&(this.ignoreOrientationMismatch=e.ignoreOrientationMismatch)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new A(e);case"PresetContentValidator":return new P(e);case"PatternContentValidator":return new M(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class A extends m{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class P 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 A({}),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"BarcodeFormatCodabarConfiguration":return new R(e);case"BarcodeFormatCode11Configuration":return new $(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new L(e);case"BarcodeFormatCode128Configuration":return new B(e);case"BarcodeFormatCode2Of5Configuration":return new j(e);case"BarcodeFormatDataBarConfiguration":return new W(e);case"BarcodeFormatDataBarExpandedConfiguration":return new I(e);case"BarcodeFormatDataBarLimitedConfiguration":return new N(e);case"BarcodeFormatITFConfiguration":return new H(e);case"BarcodeFormatMSIPlesseyConfiguration":return new Q(e);case"BarcodeFormatUpcEanConfiguration":return new U(e);case"BarcodeFormatPharmaCodeConfiguration":return new Z(e);case"BarcodeFormatAztecConfiguration":return new V(e);case"BarcodeFormatQRCodeConfiguration":return new q(e);case"BarcodeFormatPDF417Configuration":return new Y(e);case"BarcodeFormatMicroPDF417Configuration":return new G(e);case"BarcodeFormatDataMatrixConfiguration":return new X(e);case"BarcodeFormatMaxiCodeConfiguration":return new J(e);case"BarcodeFormatAustraliaPostConfiguration":return new K(e);case"BarcodeFormatJapanPostConfiguration":return new ee(e);case"BarcodeFormatRoyalMailConfiguration":return new te(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new re(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new ne(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new ie(e);case"BarcodeFormatGS1CompositeConfiguration":return new oe(e);case"BarcodeFormatCommonOneDConfiguration":return new ae(e);case"BarcodeFormatCommonTwoDConfiguration":return new se(e);case"BarcodeFormatCommonFourStateConfiguration":return new ue(e);case"BarcodeFormatCommonConfiguration":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"BarcodeFormatCodabarConfiguration":return new R(e);case"BarcodeFormatCode11Configuration":return new $(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new L(e);case"BarcodeFormatCode128Configuration":return new B(e);case"BarcodeFormatCode2Of5Configuration":return new j(e);case"BarcodeFormatDataBarConfiguration":return new W(e);case"BarcodeFormatDataBarExpandedConfiguration":return new I(e);case"BarcodeFormatDataBarLimitedConfiguration":return new N(e);case"BarcodeFormatITFConfiguration":return new H(e);case"BarcodeFormatMSIPlesseyConfiguration":return new Q(e);case"BarcodeFormatUpcEanConfiguration":return new U(e);case"BarcodeFormatPharmaCodeConfiguration":return new Z(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class R extends m{constructor(e={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),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="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,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.checksum&&(this.checksum=e.checksum)}}class z extends m{constructor(e={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,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.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.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="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class B extends m{constructor(e={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=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.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class j extends m{constructor(e={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,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.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 W extends m{constructor(e={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class I extends m{constructor(e={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class N extends m{constructor(e={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class H extends m{constructor(e={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class Q extends m{constructor(e={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],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.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class U extends m{constructor(e={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",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.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="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),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"BarcodeFormatAztecConfiguration":return new V(e);case"BarcodeFormatQRCodeConfiguration":return new q(e);case"BarcodeFormatPDF417Configuration":return new Y(e);case"BarcodeFormatMicroPDF417Configuration":return new G(e);case"BarcodeFormatDataMatrixConfiguration":return new X(e);case"BarcodeFormatMaxiCodeConfiguration":return new J(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class V extends m{constructor(e={}){super(),this._type="BarcodeFormatAztecConfiguration",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="BarcodeFormatQRCodeConfiguration",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 Y extends m{constructor(e={}){super(),this._type="BarcodeFormatPDF417Configuration",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 G extends m{constructor(e={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",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="BarcodeFormatDataMatrixConfiguration",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="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAustraliaPostConfiguration":return new K(e);case"BarcodeFormatJapanPostConfiguration":return new ee(e);case"BarcodeFormatRoyalMailConfiguration":return new te(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new re(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new ne(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new ie(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class K extends m{constructor(e={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",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="BarcodeFormatJapanPostConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class te extends m{constructor(e={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",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="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ne extends m{constructor(e={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends m{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",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="BarcodeFormatGS1CompositeConfiguration",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 ae extends m{constructor(e={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",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 se extends m{constructor(e={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",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="BarcodeFormatCommonFourStateConfiguration",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="BarcodeFormatCommonConfiguration",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 de extends m{constructor(e={}){super(),this.barcodeFormatConfigurations=[new ce({})],this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.onlyAcceptDocuments=!1,this.returnBarcodeImage=!0,this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,void 0!==e.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=e.barcodeFormatConfigurations.map((e=>o.From(e)))),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.onlyAcceptDocuments&&(this.onlyAcceptDocuments=e.onlyAcceptDocuments),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfig":return new le(e);case"EuropeanHealthInsuranceCardConfig":return new he(e);case"MRZFallbackConfig":return new me(e);case"GDRGroupConfig":return new fe(e);default:throw`Unknown child class name: ${t}`}}}(c||(c={}));class le extends m{constructor(e={}){if(super(),this._type="DateValidationConfig",this.minYear=0,this.maxYear=2999,void 0!==e.minYear&&(this.minYear=e.minYear),void 0!==e.maxYear&&(this.maxYear=e.maxYear),void 0===e.fieldTypeName)throw new Error("fieldTypeName must be present in constructor argument");this.fieldTypeName=e.fieldTypeName}}class he extends m{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.expectedCountry=null,void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry?e.expectedCountry:null)}}class me extends m{constructor(e={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class fe extends m{constructor(e={}){if(super(),this._type="GDRGroupConfig",void 0===e.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e))}}class pe extends m{constructor(e={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),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 ge extends m{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ve extends m{constructor(e={}){if(super(),this.resultAccumulationConfig=new pe({}),this.fieldExcludeList=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new pe(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0===e.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=e.configurations.map((e=>c.From(e)))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new ye(e);case"UserFieldStringValue":return new we(e);case"UserFieldIntValue":return new Fe(e);default:throw`Unknown child class name: ${t}`}}}(d||(d={}));class ye 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 we 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 Fe 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 be 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=d.From(e.value)}}class Ce 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 be(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(l=Ce||(Ce={})).defaultCompression="LZW",l.binaryDocumentOptimizedCompression="CCITTFAX4";var Ee=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(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(a,s)}u((n=n.apply(e,t||[])).next())}))};let _e;class xe extends Error{}class De{constructor(e){this.id=e}}const Te={};function Se(e){const t=Math.random().toString(36);return Te[t]=e,new De(t)}function ke(e){if(!Te.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return Te[e.id]}function Ae(e){const t=ke(e);t.delete&&t.delete(),delete Te[e.id]}const Pe={initialize:function(e,t,n,i,o){return Ee(this,void 0,void 0,(function*(){try{const{captureConsole:a,jpegQuality:s=80,requestSuffix:u=""}=o||{};a&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),d=r(3),l={locateFile:function(e,r){let n;return n=t?Object(h.c)(t)?t:"":i,e.endsWith(".worker.js")&&d?d.default:new URL(n+e+u,location.href).href}},m=Object(h.b)(o),f=m.includes("-threads");l.mainScriptUrlOrBlob=l.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&&(l.wasmMemory=p),l.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new xe("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield c(l),_e=l,_e.initialize(e||"",n,s)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Ee(this,void 0,void 0,(function*(){return _e.getLicenseInfo()}))},encodeJpeg:function(e){return Ee(this,void 0,void 0,(function*(){const t=Re(e);return Me(_e.encodeJpeg(t))}))},detectDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){const r=new _e.DocumentDetector(new k(t)),n=r.detect(Re(e));return r.delete(),Me(n)}))},detectAndCropDocument:function(e){return Ee(this,void 0,void 0,(function*(){let t=Me(_e.detectAndCropDocument(Re(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.DocumentDetector(new k(e)))}))},documentDetectorDetect:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).detect(Re(t)),t)}))},parseBarcodeDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.BarcodeRecognizer(new de(e)))}))},recognizeBarcodes:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},beginPdf:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.PdfGenerationContext(new p(e)))}))},addPageToPdf:function(e,t){return Ee(this,void 0,void 0,(function*(){Me(ke(e).addPage(Re(t)))}))},completePdf:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Ae(e)}}))},beginTiff:function(e){return Ee(this,void 0,void 0,(function*(){const t=new _e.TiffGenerationContext(new Ce(e));return Me(t.begin()),Se(t)}))},addPageToTiff:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).addPage(Re(t),r))}))},completeTiff:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Ae(e)}}))},createMRZRecognizer:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.MrzRecognizerContext(new v(e)))}))},recognizeMRZ:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},releaseObject:function(e){return Ee(this,void 0,void 0,(function*(){Ae(e)}))},createOcrEngine:function(){return Ee(this,void 0,void 0,(function*(){return Se(new _e.TLDROcrContext)}))},performOcr:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).performOcr(Re(t)))}))},createGenericTextLineScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.GenericTextLineScanner(new O(e)))}))},recognizeTextLine:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},cleanTextLineRecognitionQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.DocumentQualityAnalyzer(new w(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).analyze(Re(t)))}))},imageApplyFilter:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageApplyFilter(Re(e),n.From(t)))}))},imageCrop:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageCrop(Re(e),t))}))},imageResize:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageResize(Re(e),t))}))},imageRotate:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageRotate(Re(e),t))}))},genericDocumentRecognizerCreate:function(e){return Ee(this,void 0,void 0,(function*(){return Se(new _e.GenericDocumentRecognizer(new ve(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t),new ge(r)),t)}))},version:function(){return Ee(this,void 0,void 0,(function*(){return"6.0.0-dev.6"}))},__hasModuleFunction:function(e){return Ee(this,void 0,void 0,(function*(){return _e.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Ee(this,void 0,void 0,(function*(){return _e[e](...t)}))}};function Me(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},Me(e)),{originalImage:t})}function Re(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;_e||"initialize"===t?(()=>Ee(this,void 0,void 0,(function*(){return yield Pe[t].apply(null,r)})))().then((e=>{const t=Object(h.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof xe)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(_e.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")})}}]);
|
|
1
|
+
!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},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 i(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function n(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:i=!0}=t||{};let n="";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}}()){n+="-simd";i&&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}}()&&(n+="-threads")}return n}r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,i,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(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{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,c=[],d=!1,m=-1;function l(){d&&u&&(d=!1,u.length?c=u.concat(c):m=-1,c.length&&h())}function h(){if(!d){var e=s(l);d=!0;for(var t=c.length;t;){for(u=c,c=[];++m<t;)u&&u[m].run();m=-1,t=c.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.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||d||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,r){"use strict";var i,n=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,n=e;n.ready=new Promise(((e,i)=>{t=e,r=i}));var o,a,s,u=Object.assign({},n),c="./this.program",d=(e,t)=>{throw t},m="";m=self.location.href,i&&(m=i),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)};var l,h=n.print||console.log.bind(console),f=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(c=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(l=n.wasmBinary);var p,g=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&B("no native wasm support detected");var v,y,w,S,F,C,b,E,x,_=!1;function A(){var e=p.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=S=new Uint16Array(e),n.HEAP32=F=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=E=new Float64Array(e)}var D,T,k,P,z=[],M=[],R=[],O=0,Q=null,L=null;function $(e){O++,n.monitorRunDependencies&&n.monitorRunDependencies(O)}function Z(e){if(O--,n.monitorRunDependencies&&n.monitorRunDependencies(O),0==O&&(null!==Q&&(clearInterval(Q),Q=null),L)){var t=L;L=null,t()}}function B(e){n.onAbort&&n.onAbort(e),f(e="Aborted("+e+")"),_=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function N(e){return e.startsWith("data:application/octet-stream;base64,")}function j(e){if(e==D&&l)return new Uint8Array(l);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function I(e,t,r){return function(e){return l||"function"!=typeof fetch?Promise.resolve().then((()=>j(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>j(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{f(`failed to asynchronously prepare wasm: ${e}`),B(e)}))}N(D="ScanbotSDK.Asm.wasm")||(T=D,D=n.locateFile?n.locateFile(T,m):m+T);var W={9746080:e=>vr(function(){return this[Y(e)].toString()}.apply((0,eval)("(()=>this)()")))};function H(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var U=e=>{for(;e.length>0;)e.shift()(n)},V="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,q=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&V)return V.decode(e.subarray(t,n));for(var o="";t<n;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},Y=(e,t)=>e?q(y,e,t):"",G=[],X=0,J=0;function K(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[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){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Qr(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ee=e=>{var t=J;if(!t)return Ar(0),0;var r=new K(t);r.set_adjusted_ptr(t);var i=r.get_type();if(!i)return Ar(0),t;for(var n in e){var o=e[n];if(0===o||o===i)break;var a=r.ptr+16;if(Or(o,i,a))return Ar(o),t}return Ar(i),t},te=()=>{var e=G.pop();e||B("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(G.push(e),e.set_rethrown(!0),e.set_caught(!1),X++),J=t},re={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=re.isAbs(e),r="/"===e.substr(-1);return(e=re.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=re.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=re.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return re.normalize(e.join("/"))},join2:(e,t)=>re.normalize(e+"/"+t)},ie=e=>(ie=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);B("initRandomDevice")})())(e),ne={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:pe.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=re.isAbs(i)}return(t?"/":"")+(e=re.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=ne.resolve(e).substr(1),t=ne.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")}},oe=[],ae=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t},se=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,o=r+i-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n};function ue(e,t,r){var i=r>0?r:ae(e)+1,n=new Array(i),o=se(e,n,0,n.length);return t&&(n.length=o),n}var ce={ttys:[],init(){},shutdown(){},register(e,t){ce.ttys[e]={input:[],output:[],ops:t},pe.registerDevice(e,ce.stream_ops)},stream_ops:{open(e){var t=ce.ttys[e.node.rdev];if(!t)throw new pe.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,i,n){if(!e.tty||!e.tty.ops.get_char)throw new pe.ErrnoError(60);for(var o=0,a=0;a<i;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new pe.ErrnoError(29)}if(void 0===s&&0===o)throw new pe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new pe.ErrnoError(60);try{for(var o=0;o<i;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new pe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}},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=ue(e,!0)}return oe.shift()})(),put_char(e,t){null===t||10===t?(h(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(h(q(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(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(f(q(e.output,0)),e.output=[])}}},de=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=Tr(65536,e);return t?((e,t)=>(y.fill(0,e,e+t),e))(t,e):0},me={ops_table:null,mount:e=>me.createNode(null,"/",16895,0),createNode(e,t,r,i){if(pe.isBlkdev(r)||pe.isFIFO(r))throw new pe.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:pe.chrdev_stream_ops}});var n=pe.createNode(e,t,r,i);return pe.isDir(n.mode)?(n.node_ops=me.ops_table.dir.node,n.stream_ops=me.ops_table.dir.stream,n.contents={}):pe.isFile(n.mode)?(n.node_ops=me.ops_table.file.node,n.stream_ops=me.ops_table.file.stream,n.usedBytes=0,n.contents=null):pe.isLink(n.mode)?(n.node_ops=me.ops_table.link.node,n.stream_ops=me.ops_table.link.stream):pe.isChrdev(n.mode)&&(n.node_ops=me.ops_table.chrdev.node,n.stream_ops=me.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},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 i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.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=pe.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,pe.isDir(e.mode)?t.size=4096:pe.isFile(e.mode)?t.size=e.usedBytes:pe.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&&me.resizeFileStorage(e,t.size)},lookup(e,t){throw pe.genericErrors[44]},mknod:(e,t,r,i)=>me.createNode(e,t,r,i),rename(e,t,r){if(pe.isDir(e.mode)){var i;try{i=pe.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new pe.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=pe.lookupNode(e,t);for(var i in r.contents)throw new pe.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 i=me.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!pe.isLink(e.mode))throw new pe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var o=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&o.subarray)t.set(o.subarray(n,n+a),r);else for(var s=0;s<a;s++)t[r+s]=o[n+s];return a},write(e,t,r,i,n,o){if(t.buffer===v.buffer&&(o=!1),!i)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(r,r+i),a.usedBytes=i,i;if(0===a.usedBytes&&0===n)return a.contents=t.slice(r,r+i),a.usedBytes=i,i;if(n+i<=a.usedBytes)return a.contents.set(t.subarray(r,r+i),n),i}if(me.expandFileStorage(a,n+i),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+i),n);else for(var s=0;s<i;s++)a.contents[n+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,n+i),i},llseek(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&pe.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new pe.ErrnoError(28);return i},allocate(e,t,r){me.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,i,n){if(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var o,a,s=e.node.contents;if(2&n||s.buffer!==v.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(o=de(t)))throw new pe.ErrnoError(48);v.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:(e,t,r,i,n)=>(me.stream_ops.write(e,t,0,i,r,!1),0)}},le=(e,t,r,i)=>{var n=i?"":`al ${e}`;a(e,(r=>{var i;i=`Loading data file "${e}" failed (no arrayBuffer).`,r||B(i),t(new Uint8Array(r)),n&&Z()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&$()},he=n.preloadPlugins||[],fe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},pe={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=ne.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new pe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=pe.root,n="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(i=pe.lookupNode(i,r[o]),n=re.join2(n,r[o]),pe.isMountpoint(i)&&(!a||a&&t.follow_mount)&&(i=i.mounted.root),!a||t.follow)for(var s=0;pe.isLink(i.mode);){var u=pe.readlink(n);if(n=ne.resolve(re.dirname(n),u),i=pe.lookupPath(n,{recurse_count:t.recurse_count+1}).node,s++>40)throw new pe.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(pe.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,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%pe.nameTable.length},hashAddNode(e){var t=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[t],pe.nameTable[t]=e},hashRemoveNode(e){var t=pe.hashName(e.parent.id,e.name);if(pe.nameTable[t]===e)pe.nameTable[t]=e.name_next;else for(var r=pe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=pe.mayLookup(e);if(r)throw new pe.ErrnoError(r,e);for(var i=pe.hashName(e.id,t),n=pe.nameTable[i];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return pe.lookup(e,t)},createNode(e,t,r,i){var n=new pe.FSNode(e,t,r,i);return pe.hashAddNode(n),n},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 t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>pe.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=pe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return pe.lookupNode(e,t),20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=pe.lookupNode(e,t)}catch(e){return e.errno}var n=pe.nodePermissions(e,"wx");if(n)return n;if(r){if(!pe.isDir(i.mode))return 54;if(pe.isRoot(i)||pe.getPath(i)===pe.cwd())return 10}else if(pe.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(t)||512&t)?31:pe.nodePermissions(e,pe.flagsToPermissionString(t)):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 t=pe.getStream(e);if(!t)throw new pe.ErrnoError(8);return t},getStream:e=>pe.streams[e],createStream:(e,t=-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==t&&(t=pe.nextfd()),e.fd=t,pe.streams[t]=e,e),closeStream(e){pe.streams[e]=null},chrdev_stream_ops:{open(e){var t=pe.getDevice(e.node.rdev);e.stream_ops=t.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,t)=>e<<8|t,registerDevice(e,t){pe.devices[e]={stream_ops:t}},getDevice:e=>pe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),pe.syncFSRequests++,pe.syncFSRequests>1&&f(`warning: ${pe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=pe.getMounts(pe.root.mount),i=0;function n(e){return pe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var i,n="/"===r,o=!r;if(n&&pe.root)throw new pe.ErrnoError(10);if(!n&&!o){var a=pe.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,pe.isMountpoint(i))throw new pe.ErrnoError(10);if(!pe.isDir(i.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,n?pe.root=u:i&&(i.mounted=s,i.mount&&i.mount.mounts.push(s)),u},unmount(e){var t=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(t.node))throw new pe.ErrnoError(28);var r=t.node,i=r.mounted,n=pe.getMounts(i);Object.keys(pe.nameTable).forEach((e=>{for(var t=pe.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&pe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(i);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=pe.lookupPath(e,{parent:!0}).node,n=re.basename(e);if(!n||"."===n||".."===n)throw new pe.ErrnoError(28);var o=pe.mayCreate(i,n);if(o)throw new pe.ErrnoError(o);if(!i.node_ops.mknod)throw new pe.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,pe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,pe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{pe.mkdir(i,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,pe.mknod(e,t,r)),symlink(e,t){if(!ne.resolve(e))throw new pe.ErrnoError(44);var r=pe.lookupPath(t,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var i=re.basename(t),n=pe.mayCreate(r,i);if(n)throw new pe.ErrnoError(n);if(!r.node_ops.symlink)throw new pe.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=re.dirname(e),o=re.dirname(t),a=re.basename(e),s=re.basename(t);if(r=pe.lookupPath(e,{parent:!0}).node,i=pe.lookupPath(t,{parent:!0}).node,!r||!i)throw new pe.ErrnoError(44);if(r.mount!==i.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(r,a),d=ne.relative(e,o);if("."!==d.charAt(0))throw new pe.ErrnoError(28);if("."!==(d=ne.relative(t,n)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(i,s)}catch(e){}if(c!==u){var m=pe.isDir(c.mode),l=pe.mayDelete(r,a,m);if(l)throw new pe.ErrnoError(l);if(l=u?pe.mayDelete(i,s,m):pe.mayCreate(i,s))throw new pe.ErrnoError(l);if(!r.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(i!==r&&(l=pe.nodePermissions(r,"w")))throw new pe.ErrnoError(l);pe.hashRemoveNode(c);try{r.node_ops.rename(c,i,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir(e){var t=pe.lookupPath(e,{parent:!0}).node,r=re.basename(e),i=pe.lookupNode(t,r),n=pe.mayDelete(t,r,!0);if(n)throw new pe.ErrnoError(n);if(!t.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(i))throw new pe.ErrnoError(10);t.node_ops.rmdir(t,r),pe.destroyNode(i)},readdir(e){var t=pe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new pe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=pe.lookupPath(e,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var r=re.basename(e),i=pe.lookupNode(t,r),n=pe.mayDelete(t,r,!1);if(n)throw new pe.ErrnoError(n);if(!t.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(i))throw new pe.ErrnoError(10);t.node_ops.unlink(t,r),pe.destroyNode(i)},readlink(e){var t=pe.lookupPath(e).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.readlink)throw new pe.ErrnoError(28);return ne.resolve(pe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=pe.lookupPath(e,{follow:!t}).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.getattr)throw new pe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>pe.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?pe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){pe.chmod(e,t,!0)},fchmod(e,t){var r=pe.getStreamChecked(e);pe.chmod(r.node,t)},chown(e,t,r,i){var n;if(!(n="string"==typeof e?pe.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){pe.chown(e,t,r,!0)},fchown(e,t,r){var i=pe.getStreamChecked(e);pe.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new pe.ErrnoError(28);var r;if(!(r="string"==typeof e?pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(r.mode))throw new pe.ErrnoError(31);if(!pe.isFile(r.mode))throw new pe.ErrnoError(28);var i=pe.nodePermissions(r,"w");if(i)throw new pe.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=pe.getStreamChecked(e);if(0==(2097155&r.flags))throw new pe.ErrnoError(28);pe.truncate(r.node,t)},utime(e,t,r){var i=pe.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new pe.ErrnoError(44);var i;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)i=e;else{e=re.normalize(e);try{i=pe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new pe.ErrnoError(20)}else i=pe.mknod(e,r,0),o=!0;if(!i)throw new pe.ErrnoError(44);if(pe.isChrdev(i.mode)&&(t&=-513),65536&t&&!pe.isDir(i.mode))throw new pe.ErrnoError(54);if(!o){var a=pe.mayOpen(i,t);if(a)throw new pe.ErrnoError(a)}512&t&&!o&&pe.truncate(i,0),t&=-131713;var s=pe.createStream({node:i,path:pe.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&t||(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,t,r){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new pe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<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 o="undefined"!=typeof n;if(o){if(!e.seekable)throw new pe.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return o||(e.position+=a),a},write(e,t,r,i,n,o){if(i<0||n<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 a="undefined"!=typeof n;if(a){if(!e.seekable)throw new pe.ErrnoError(70)}else n=e.position;var s=e.stream_ops.write(e,t,r,i,n,o);return a||(e.position+=s),s},allocate(e,t,r){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(t<0||r<=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,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&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,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new pe.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,i=pe.open(e,t.flags),n=pe.stat(e).size,o=new Uint8Array(n);return pe.read(i,o,0,n,0),"utf8"===t.encoding?r=q(o,0):"binary"===t.encoding&&(r=o),pe.close(i),r},writeFile(e,t,r={}){r.flags=r.flags||577;var i=pe.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(ae(t)+1),o=se(t,n,0,n.length);pe.write(i,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");pe.write(i,t,0,t.byteLength,void 0,r.canOwn)}pe.close(i)},cwd:()=>pe.currentPath,chdir(e){var t=pe.lookupPath(e,{follow:!0});if(null===t.node)throw new pe.ErrnoError(44);if(!pe.isDir(t.node.mode))throw new pe.ErrnoError(54);var r=pe.nodePermissions(t.node,"x");if(r)throw new pe.ErrnoError(r);pe.currentPath=t.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,t,r,i,n)=>i}),pe.mkdev("/dev/null",pe.makedev(1,3)),ce.register(pe.makedev(5,0),ce.default_tty_ops),ce.register(pe.makedev(6,0),ce.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ie(e).byteLength),e[--t]);pe.createDevice("/dev","random",r),pe.createDevice("/dev","urandom",r),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 t=pe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=pe.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?pe.createDevice("/dev","stdin",n.stdin):pe.symlink("/dev/tty","/dev/stdin"),n.stdout?pe.createDevice("/dev","stdout",null,n.stdout):pe.symlink("/dev/tty","/dev/stdout"),n.stderr?pe.createDevice("/dev","stderr",null,n.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,t){this.name="ErrnoError",this.node=t,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(me,{},"/"),pe.createDefaultDirectories(),pe.createDefaultDevices(),pe.createSpecialDirectories(),pe.filesystems={MEMFS:me}},init(e,t,r){pe.init.initialized=!0,pe.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,pe.createStandardStreams()},quit(){pe.init.initialized=!1;for(var e=0;e<pe.streams.length;e++){var t=pe.streams[e];t&&pe.close(t)}},findObject(e,t){var r=pe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(i=pe.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 i=pe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=i.path,r.parentObject=i.node,r.name=re.basename(e),i=pe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=i.path,r.object=i.node,r.name=i.node.name,r.isRoot="/"===i.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,i){e="string"==typeof e?e:pe.getPath(e);for(var n=t.split("/").reverse();n.length;){var o=n.pop();if(o){var a=re.join2(e,o);try{pe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,i,n){var o=re.join2("string"==typeof e?e:pe.getPath(e),t),a=fe(i,n);return pe.create(o,a)},createDataFile(e,t,r,i,n,o){var a=t;e&&(e="string"==typeof e?e:pe.getPath(e),a=t?re.join2(e,t):e);var s=fe(i,n),u=pe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),d=0,m=r.length;d<m;++d)c[d]=r.charCodeAt(d);r=c}pe.chmod(u,146|s);var l=pe.open(u,577);pe.write(l,r,0,r.length,0,o),pe.close(l),pe.chmod(u,s)}return u},createDevice(e,t,r,i){var n=re.join2("string"==typeof e?e:pe.getPath(e),t),o=fe(!!r,!!i);pe.createDevice.major||(pe.createDevice.major=64);var a=pe.makedev(pe.createDevice.major++,0);return pe.registerDevice(a,{open(e){e.seekable=!1},close(e){i&&i.buffer&&i.buffer.length&&i(10)},read(e,t,i,n,o){for(var a=0,s=0;s<n;s++){var u;try{u=r()}catch(e){throw new pe.ErrnoError(29)}if(void 0===u&&0===a)throw new pe.ErrnoError(6);if(null==u)break;a++,t[i+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,n,o){for(var a=0;a<n;a++)try{i(t[r+a])}catch(e){throw new pe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}}),pe.mkdev(n,o,a)},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=ue(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.ErrnoError(29)}},createLazyFile(e,t,r,i,n){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,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var s=this;s.setDataGetter((e=>{var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):ue(n.responseText||"",!0)})(t,n)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&i||(a=i=1,i=this.getter(0).length,a=i,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var a=new o;Object.defineProperties(a,{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:a}}else s={isDevice:!1,url:r};var u=pe.createFile(e,t,s,i,n);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 d(e,t,r,i,n){var o=e.node.contents;if(n>=o.length)return 0;var a=Math.min(o.length-n,i);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[n+s];else for(s=0;s<a;s++)t[r+s]=o.get(n+s);return a}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(e,t,r,i,n)=>(pe.forceLoadFile(u),d(e,t,r,i,n)),c.mmap=(e,t,r,i,n)=>{pe.forceLoadFile(u);var o=de(t);if(!o)throw new pe.ErrnoError(48);return d(e,v,o,t,r),{ptr:o,allocated:!0}},u.stream_ops=c,u}},ge={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(re.isAbs(t))return t;var i;if(i=-100===e?pe.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!r)throw new pe.ErrnoError(44);return i}return re.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&re.normalize(t)!==re.normalize(pe.getPath(e.node)))return-54;throw e}F[r>>2]=i.dev,F[r+4>>2]=i.mode,C[r+8>>2]=i.nlink,F[r+12>>2]=i.uid,F[r+16>>2]=i.gid,F[r+20>>2]=i.rdev,P=[i.size>>>0,(k=i.size,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+24>>2]=P[0],F[r+28>>2]=P[1],F[r+32>>2]=4096,F[r+36>>2]=i.blocks;var n=i.atime.getTime(),o=i.mtime.getTime(),a=i.ctime.getTime();return P=[Math.floor(n/1e3)>>>0,(k=Math.floor(n/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+40>>2]=P[0],F[r+44>>2]=P[1],C[r+48>>2]=n%1e3*1e3,P=[Math.floor(o/1e3)>>>0,(k=Math.floor(o/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+56>>2]=P[0],F[r+60>>2]=P[1],C[r+64>>2]=o%1e3*1e3,P=[Math.floor(a/1e3)>>>0,(k=Math.floor(a/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+72>>2]=P[0],F[r+76>>2]=P[1],C[r+80>>2]=a%1e3*1e3,P=[i.ino>>>0,(k=i.ino,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+88>>2]=P[0],F[r+92>>2]=P[1],0},doMsync(e,t,r,i,n){if(!pe.isFile(t.node.mode))throw new pe.ErrnoError(43);if(2&i)return 0;var o=y.slice(e,e+r);pe.msync(t,o,n,r,i)},varargs:void 0,get(){var e=F[ge.varargs>>2];return ge.varargs+=4,e},getp:()=>ge.get(),getStr:e=>Y(e),getStreamFromFD:e=>pe.getStreamChecked(e)},ve={},ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function we(e){return this.fromWireType(F[e>>2])}var Se={},Fe={},Ce={},be=void 0,Ee=e=>{throw new be(e)},xe=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ee("Mismatched type converter count");for(var n=0;n<e.length;++n)ke(e[n],i[n])}e.forEach((function(e){Ce[e]=t}));var n=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{Fe.hasOwnProperty(e)?n[t]=Fe[e]:(o.push(e),Se.hasOwnProperty(e)||(Se[e]=[]),Se[e].push((()=>{n[t]=Fe[e],++a===o.length&&i(n)})))})),0===o.length&&i(n)},_e=void 0,Ae=e=>{for(var t="",r=e;y[r];)t+=_e[y[r++]];return t},De=void 0,Te=e=>{throw new De(e)};function ke(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var i=t.name;if(e||Te(`type "${i}" must have a positive integer typeid pointer`),Fe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Te(`Cannot register type '${i}' twice`)}if(Fe[e]=t,delete Ce[e],Se.hasOwnProperty(e)){var n=Se[e];delete Se[e],n.forEach((e=>e()))}}(e,t,r)}var Pe=8;function ze(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n}var Me=e=>{Te(e.$$.ptrType.registeredClass.name+" instance already deleted")},Re=!1,Oe=e=>{},Qe=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 i=Le(e,t,r.baseClass);return null===i?null:r.downcast(i)},$e={},Ze=()=>Object.keys(He).length,Be=()=>{var e=[];for(var t in He)He.hasOwnProperty(t)&&e.push(He[t]);return e},Ne=[],je=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},Ie=void 0,We=e=>{Ie=e,Ne.length&&Ie&&Ie(je)},He={},Ue=(e,t)=>(t=((e,t)=>{for(void 0===t&&Te("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),He[t]),Ve=(e,t)=>(t.ptrType&&t.ptr||Ee("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ee("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ye(Object.create(e,{$$:{value:t}})));function qe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Ue(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){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,a=this.registeredClass.getActualType(t),s=$e[a];if(!s)return n.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=Le(t,this.registeredClass,o.registeredClass);return null===u?n.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 Ye=e=>"undefined"==typeof FinalizationRegistry?(Ye=e=>e,e):(Re=new FinalizationRegistry((e=>{Qe(e.$$)})),Ye=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Re.register(e,r,e)}return e},Oe=e=>Re.unregister(e),Ye(e));function Ge(){if(this.$$.ptr||Me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ye(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||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),Oe(this),Qe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Je(){return!this.$$.ptr}function Ke(){return this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),Ne.push(this),1===Ne.length&&Ie&&Ie(je),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 it=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Te(`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[i.argCount]=i}},nt=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&Te(`Cannot register public name '${e}' twice`),it(n,e,e),n.hasOwnProperty(r)&&Te(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function ot(e,t,r,i,n,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,r)=>{for(;t!==r;)t.upcast||Te(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function st(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function ut(e,t){var r;if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=at(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Te("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Te(`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 n=t.clone();r=this.rawShare(r,kt.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Te("Unsupporting sharing policy")}return r}function ct(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function dt(e){return this.fromWireType(C[e>>2])}function mt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function lt(e){this.rawDestructor&&this.rawDestructor(e)}var ht=e=>{null!==e&&e.delete()};function ft(e,t,r,i,n,o,a,s,u,c,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=d,n||void 0!==t.baseClass?this.toWireType=ut:i?(this.toWireType=st,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var pt=(e,t,r)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},gt=e=>x.get(e),vt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)})(e,t,r):gt(t).apply(null,r),yt=(e,t)=>{var r,i,n,o=(e=Ae(e)).includes("j")?(r=e,i=t,n=[],function(){return n.length=0,Object.assign(n,arguments),vt(r,i,n)}):gt(t);return"function"!=typeof o&&Te(`unknown function pointer with signature ${e}: ${t}`),o},wt=void 0,St=e=>{var t=Dr(e),r=Ae(t);return xr(t),r},Ft=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Fe[t]||(Ce[t]?Ce[t].forEach(e):(r.push(t),i[t]=!0))})),new wt(`${e}: `+r.map(St).join([", "]))},Ct=(e,t)=>{for(var r=[],i=0;i<e;i++)r.push(C[t+4*i>>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 i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Et(e,t,r,i,n,o){var a=t.length;a<2&&Te("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=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 d="void"!==t[0].name,m="",l="";for(c=0;c<a-2;++c)m+=(0!==c?", ":"")+"arg"+c,l+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tt(e)}(${m}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(h+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Te,i,n,ye,t[0],t[1]];for(s&&(h+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)h+="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(s&&(l="thisWired"+(l.length>0?", ":"")+l),h+=(d||o?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return d&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",p.push(h),bt(Function,p).apply(null,g)}function xt(){this.allocated=[void 0],this.freelist=[]}var _t,At=new xt,Dt=e=>{e>=At.reserved&&0==--At.get(e).refcount&&At.free(e)},Tt=()=>{for(var e=0,t=At.reserved;t<At.allocated.length;++t)void 0!==At.allocated[t]&&++e;return e},kt={toValue:e=>(e||Te("Cannot use deleted val. handle = "+e),At.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 At.allocate({refcount:1,value:e})}}},Pt=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},zt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(E[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Mt=(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=>S[e>>1];case 4:return r?e=>F[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Rt=(e,t,r)=>se(e,y,t,r),Ot="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Qt=(e,t)=>{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&S[i];)++i;if((r=i<<1)-e>32&&Ot)return Ot.decode(y.subarray(e,r));for(var o="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o},Lt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,o=0;o<n;++o){var a=e.charCodeAt(o);w[t>>1]=a,t+=2}return w[t>>1]=0,t-i},$t=e=>2*e.length,Zt=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=F[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var o=n-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(n)}return i},Bt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),F[t>>2]=a,(t+=4)+4>n)break}return F[t>>2]=0,t-i},Nt=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&++r,t+=4}return t},jt=(e,t)=>{var r=Fe[e];return void 0===r&&Te(t+" has unknown type "+St(e)),r},It={},Wt=e=>{var t=It[e];return void 0===t?Ae(e):t},Ht=[],Ut=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Vt=[],qt=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Yt=e=>e%4==0&&(e%100!=0||e%400==0),Gt=[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=>(Yt(e.getFullYear())?Gt:Xt)[e.getMonth()]+e.getDate()-1,Kt=e=>{var t=ae(e)+1,r=Er(t);return r&&Rt(e,r,t),r},er=[],tr=(e,t,r)=>{var i=((e,t)=>{var r;for(er.length=0;r=y[e++];)t+=105!=r&&t%8?4:0,er.push(105==r?F[t>>2]:E[t>>3]),t+=105==r?4:8;return er})(t,r);return W[e].apply(null,i)};_t=()=>performance.now();var rr,ir,nr,or=e=>{B("OOM")},ar=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),A(),1}catch(e){}},sr={},ur=()=>{if(!ur.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 sr)void 0===sr[t]?delete e[t]:e[t]=sr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);ur.strings=r}return ur.strings},cr=e=>{g||(n.onExit&&n.onExit(e),_=!0),d(e,new H(e))},dr=(e,t)=>{cr(e)},mr=(e,t)=>{for(var r=0,i=0;i<=t;r+=e[i++]);return r},lr=[31,29,31,30,31,30,31,31,30,31,30,31],hr=[31,28,31,30,31,30,31,31,30,31,30,31],fr=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var i=Yt(r.getFullYear()),n=r.getMonth(),o=(i?lr:hr)[n];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),n<11?r.setMonth(n+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},pr=(e,t,r,i)=>{var n=C[i+40>>2],o={tm_sec:F[i>>2],tm_min:F[i+4>>2],tm_hour:F[i+8>>2],tm_mday:F[i+12>>2],tm_mon:F[i+16>>2],tm_year:F[i+20>>2],tm_wday:F[i+24>>2],tm_yday:F[i+28>>2],tm_isdst:F[i+32>>2],tm_gmtoff:F[i+36>>2],tm_zone:n?Y(n):""},a=Y(r),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)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(e,t,r){for(var i="number"==typeof e?e.toString():e||"";i.length<t;)i=r[0]+i;return i}function l(e,t){return m(e,t,"0")}function h(e,t){function r(e){return e<0?-1:e>0?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}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=fr(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),n=f(r),o=f(i);return h(n,t)<=0?h(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=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>l((e.tm_year+1900)/100|0,2),"%d":e=>l(e.tm_mday,2),"%e":e=>m(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>l(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),l(t,2)},"%j":e=>l(e.tm_mday+mr(Yt(e.tm_year+1900)?lr:hr,e.tm_mon-1),3),"%m":e=>l(e.tm_mon+1,2),"%M":e=>l(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>l(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return l(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&&Yt(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Yt(e.tm_year%400-1))&&t++}return l(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return l(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 a=a.replace(/%%/g,"\0\0"),g)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),g[u](o)));var y,w,S=ue(a=a.replace(/\0\0/g,"%"),!1);return S.length>t?0:(y=S,w=e,v.set(y,w),S.length-1)},gr=e=>parseInt(e),vr=Kt,yr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},wr=365,Sr=146;Object.defineProperties(yr.prototype,{read:{get:function(){return(this.mode&wr)===wr},set:function(e){e?this.mode|=wr:this.mode&=-366}},write:{get:function(){return(this.mode&Sr)===Sr},set:function(e){e?this.mode|=Sr:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=yr,pe.createPreloadedFile=(e,t,r,i,n,o,a,s,u,c)=>{var d=t?ne.resolve(re.join2(e,t)):e;function m(r){function m(r){c&&c(),s||pe.createDataFile(e,t,r,i,n,u),o&&o(),Z()}((e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return he.forEach((o=>{n||o.canHandle(t)&&(o.handle(e,t,r,i),n=!0)})),n})(r,d,m,(()=>{a&&a(),Z()}))||m(r)}$(),"string"==typeof r?le(r,(e=>m(e)),a):m(r)},pe.staticInit(),be=n.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);_e=e})(),De=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},et.prototype.isAliasOf=ze,et.prototype.clone=Ge,et.prototype.delete=Xe,et.prototype.isDeleted=Je,et.prototype.deleteLater=Ke,n.getInheritedInstanceCount=Ze,n.getLiveInheritedInstances=Be,n.flushPendingDeletes=je,n.setDelayFunction=We,ft.prototype.getPointee=mt,ft.prototype.destructor=lt,ft.prototype.argPackAdvance=Pe,ft.prototype.readValueFromPointer=dt,ft.prototype.deleteObject=ht,ft.prototype.fromWireType=qe,wt=n.UnboundTypeError=(rr=Error,(nr=rt(ir="UnboundTypeError",(function(e){this.name=ir,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(rr.prototype),nr.prototype.constructor=nr,nr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nr),Object.assign(xt.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)}}),At.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),At.reserved=At.allocated.length,n.count_emval_handles=Tt;var Fr,Cr={o:(e,t,r,i)=>{B(`Assertion failed: ${Y(e)}, at: `+[t?Y(t):"unknown filename",r,i?Y(i):"unknown function"])},u:e=>{var t=new K(e);return t.get_caught()||(t.set_caught(!0),X--),t.set_rethrown(!1),G.push(t),Rr(t.excPtr),t.get_exception_ptr()},Rb:()=>{if(!G.length)return 0;var e=G[G.length-1];return Rr(e.excPtr),e.excPtr},H:()=>{kr(0,0);var e=G.pop();Mr(e.excPtr),J=0},a:()=>ee([]),h:e=>ee([e]),w:(e,t)=>ee([e,t]),Ya:te,Qb:e=>{if(e){var t=new K(e);G.push(t),t.set_rethrown(!0),te()}},q:(e,t,r)=>{throw new K(e).init(t,r),X++,J=e},Sb:()=>X,c:e=>{throw J||(J=e),J},Xb:function(e,t,r,i,n){try{for(var o=0,a=t?F[t>>2]:0,s=t?F[t+4>>2]:0,u=r?F[r>>2]:0,c=r?F[r+4>>2]:0,d=i?F[i>>2]:0,m=i?F[i+4>>2]:0,l=0,h=0,f=0,p=0,g=0,v=0,y=(t?F[t>>2]:0)|(r?F[r>>2]:0)|(i?F[i>>2]:0),w=(t?F[t+4>>2]:0)|(r?F[r+4>>2]:0)|(i?F[i+4>>2]:0),S=function(e,t,r,i){return e<32?t&i:r&i},C=0;C<e;C++){var b=1<<C%32;if(S(C,y,w,b)){var E=ge.getStreamFromFD(C),x=ge.DEFAULT_POLLMASK;if(E.stream_ops.poll){var _=-1;n&&(_=1e3*((t?F[n>>2]:0)+(t?F[n+8>>2]:0)/1e6)),x=E.stream_ops.poll(E,_)}1&x&&S(C,a,s,b)&&(C<32?l|=b:h|=b,o++),4&x&&S(C,u,c,b)&&(C<32?f|=b:p|=b,o++),2&x&&S(C,d,m,b)&&(C<32?g|=b:v|=b,o++)}}return t&&(F[t>>2]=l,F[t+4>>2]=h),r&&(F[r>>2]=f,F[r+4>>2]=p),i&&(F[i>>2]=g,F[i+4>>2]=v),o}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},$a:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 0:if((n=ge.get())<0)return-28;for(;pe.streams[n];)n++;return pe.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=ge.get();return i.flags|=n,0;case 5:return n=ge.getp(),w[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return o=28,F[_r()>>2]=o,-1}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}var o},dc:function(e,t){try{var r=ge.getStreamFromFD(e);return ge.doStat(pe.stat,r.path,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ec:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return i.tty?0:-59;case 21505:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcgets){var n=i.tty.ops.ioctl_tcgets(i),o=ge.getp();F[o>>2]=n.c_iflag||0,F[o+4>>2]=n.c_oflag||0,F[o+8>>2]=n.c_cflag||0,F[o+12>>2]=n.c_lflag||0;for(var a=0;a<32;a++)v[o+a+17>>0]=n.c_cc[a]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcsets){o=ge.getp();var s=F[o>>2],u=F[o+4>>2],c=F[o+8>>2],d=F[o+12>>2],m=[];for(a=0;a<32;a++)m.push(v[o+a+17>>0]);return i.tty.ops.ioctl_tcsets(i.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:d,c_cc:m})}return 0;case 21519:return i.tty?(o=ge.getp(),F[o>>2]=0,0):-59;case 21520:return i.tty?-28:-59;case 21531:return o=ge.getp(),pe.ioctl(i,t,o);case 21523:if(!i.tty)return-59;if(i.tty.ops.ioctl_tiocgwinsz){var l=i.tty.ops.ioctl_tiocgwinsz(i.tty);o=ge.getp(),w[o>>1]=l[0],w[o+2>>1]=l[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},bc:function(e,t,r,i){try{t=ge.getStr(t);var n=256&i,o=4096&i;return i&=-6401,t=ge.calculateAt(e,t,o),ge.doStat(n?pe.lstat:pe.stat,t,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},ab:function(e,t,r,i){ge.varargs=i;try{t=ge.getStr(t),t=ge.calculateAt(e,t);var n=i?ge.get():0;return pe.open(t,r,n).fd}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Yb:function(e){try{return e=ge.getStr(e),pe.rmdir(e),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},cc:function(e,t){try{return e=ge.getStr(e),ge.doStat(pe.stat,e,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Zb:function(e,t,r){try{return t=ge.getStr(t),t=ge.calculateAt(e,t),0===r?pe.unlink(t):512===r?pe.rmdir(t):B("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},vb:e=>{var t=ve[e];delete ve[e];var r=t.rawConstructor,i=t.rawDestructor,n=t.fields,o=n.map((e=>e.getterReturnType)).concat(n.map((e=>e.setterArgumentType)));xe([e],o,(e=>{var o={};return n.forEach(((t,r)=>{var i=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+n.length],d=t.setter,m=t.setterContext;o[i]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];d(m,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 i(e),t},toWireType:(e,t)=>{for(var n in o)if(!(n in t))throw new TypeError(`Missing field: "${n}"`);var a=r();for(n in o)o[n].write(a,t[n]);return null!==e&&e.push(i,a),a},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:i}]}))},Jb:(e,t,r,i,n)=>{},ic:(e,t,r,i)=>{ke(e,{name:t=Ae(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Pe,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},ba:(e,t,r,i,n,o,a,s,u,c,d,m,l)=>{d=Ae(d),o=yt(n,o),s&&(s=yt(a,s)),c&&(c=yt(u,c)),l=yt(m,l);var h=tt(d);nt(h,(function(){Ft(`Cannot construct ${d} due to unbound types`,[i])})),xe([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:et.prototype;var a=rt(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new De("Use 'new' to construct "+d);if(void 0===m.constructor_body)throw new De(d+" has no accessible constructor");var e=m.constructor_body[arguments.length];if(void 0===e)throw new De(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(n,{constructor:{value:a}});a.prototype=u;var m=new ot(d,a,u,l,r,o,s,c);m.baseClass&&(void 0===m.baseClass.__derivedClasses&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var f=new ft(d,m,!0,!1,!1),p=new ft(d+"*",m,!1,!1,!1),g=new ft(d+" const*",m,!1,!0,!1);return $e[e]={pointerType:p,constPointerType:g},pt(h,a),[f,p,g]}))},aa:(e,t,r,i,n,o)=>{var a=Ct(t,r);n=yt(i,n),xe([],[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 De(`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]=()=>{Ft(`Cannot construct ${e.name} due to unbound types`,a)},xe([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Et(r,i,null,n,o),[]))),[]}))},R:(e,t,r,i,n,o,a,s,u)=>{var c=Ct(r,i);t=Ae(t),o=yt(n,o),xe([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Ft(`Cannot call ${i} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,m=d[t];return void 0===m||void 0===m.overloadTable&&m.className!==e.name&&m.argCount===r-2?(n.argCount=r-2,n.className=e.name,d[t]=n):(it(d,t,i),d[t].overloadTable[r-2]=n),xe([],c,(function(n){var s=Et(i,n,e,o,a,u);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))},hc:(e,t)=>{ke(e,{name:t=Ae(t),fromWireType:e=>{var t=kt.toValue(e);return Dt(e),t},toWireType:(e,t)=>kt.toHandle(t),argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:null})},cb:(e,t,r)=>{ke(e,{name:t=Ae(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Pe,readValueFromPointer:zt(t,r),destructorFunction:null})},_:(e,t,r,i,n,o,a)=>{var s=Ct(t,r);e=Ae(e),n=yt(i,n),nt(e,(function(){Ft(`Cannot call ${e} due to unbound types`,s)}),t-1),xe([],s,(function(r){var i=[r[0],null].concat(r.slice(1));return pt(e,Et(e,i,null,n,o,a),t-1),[]}))},da:(e,t,r,i,n)=>{t=Ae(t),-1===n&&(n=4294967295);var o=e=>e;if(0===i){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ke(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Pe,readValueFromPointer:Mt(t,r,0!==i),destructorFunction:null})},O:(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=C[e>>2],r=C[e+4>>2];return new i(v.buffer,r,t)}ke(e,{name:r=Ae(r),fromWireType:n,argPackAdvance:Pe,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},bb:(e,t)=>{var r="std::string"===(t=Ae(t));ke(e,{name:t,fromWireType:e=>{var t,i=C[e>>2],n=e+4;if(r)for(var o=n,a=0;a<=i;++a){var s=n+a;if(a==i||0==y[s]){var u=Y(o,s-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=s+1}}else{var c=new Array(i);for(a=0;a<i;++a)c[a]=String.fromCharCode(y[n+a]);t=c.join("")}return xr(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Te("Cannot pass non-string to std::string"),i=r&&n?ae(t):t.length;var o=Er(4+i+1),a=o+4;if(C[o>>2]=i,r&&n)Rt(t,a,i+1);else if(n)for(var s=0;s<i;++s){var u=t.charCodeAt(s);u>255&&(xr(a),Te("String has UTF-16 code units that do not fit in 8 bits")),y[a+s]=u}else for(s=0;s<i;++s)y[a+s]=t[s];return null!==e&&e.push(xr,o),o},argPackAdvance:Pe,readValueFromPointer:dt,destructorFunction:e=>xr(e)})},Pa:(e,t,r)=>{var i,n,o,a,s;r=Ae(r),2===t?(i=Qt,n=Lt,a=$t,o=()=>S,s=1):4===t&&(i=Zt,n=Bt,a=Nt,o=()=>C,s=2),ke(e,{name:r,fromWireType:e=>{for(var r,n=C[e>>2],a=o(),u=e+4,c=0;c<=n;++c){var d=e+4+c*t;if(c==n||0==a[d>>s]){var m=i(u,d-u);void 0===r?r=m:(r+=String.fromCharCode(0),r+=m),u=d+t}}return xr(e),r},toWireType:(e,i)=>{"string"!=typeof i&&Te(`Cannot pass non-string to C++ string type ${r}`);var o=a(i),u=Er(4+o+t);return C[u>>2]=o>>s,n(i,u+4,o+t),null!==e&&e.push(xr,u),u},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:e=>xr(e)})},wb:(e,t,r,i,n,o)=>{ve[e]={name:Ae(t),rawConstructor:yt(r,i),rawDestructor:yt(n,o),fields:[]}},ub:(e,t,r,i,n,o,a,s,u,c)=>{ve[e].fields.push({fieldName:Ae(t),getterReturnType:r,getter:yt(i,n),getterContext:o,setterArgumentType:a,setter:yt(s,u),setterContext:c})},jc:(e,t)=>{ke(e,{isVoid:!0,name:t=Ae(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},fc:()=>!0,Tb:()=>{throw 1/0},oa:(e,t,r)=>{e=kt.toValue(e),t=jt(t,"emval::as");var i=[],n=kt.toHandle(i);return C[r>>2]=n,t.toWireType(i,e)},Ma:(e,t,r,i,n)=>(e=Ht[e])(t=kt.toValue(t),r=Wt(r),(e=>{var t=[];return C[e>>2]=kt.toHandle(t),t})(i),n),La:(e,t,r,i)=>{(e=Ht[e])(t=kt.toValue(t),r=Wt(r),null,i)},kc:Dt,qb:e=>0===e?kt.toHandle(Ut()):(e=Wt(e),kt.toHandle(Ut()[e])),na:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),i=0;i<e;++i)r[i]=jt(C[t+4*i>>2],"parameter "+i);return r})(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Vt[n];if(void 0!==o)return o;for(var a=["retType"],s=[i],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,a.push("argType"+c),s.push(r[1+c]);var d="return function "+tt("methodCaller_"+n)+"(handle, name, destructors, args) {\n",m=0;for(c=0;c<e-1;++c)d+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=r[c+1].argPackAdvance;for(d+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(d+=" argType"+c+".deleteObject(arg"+c+");\n");i.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var l,h,f=bt(Function,a).apply(null,s);return l=f,h=Ht.length,Ht.push(l),o=h,Vt[n]=o,o},Cb:(e,t)=>(e=kt.toValue(e),t=kt.toValue(t),kt.toHandle(e[t])),s:e=>{e>4&&(At.get(e).refcount+=1)},P:()=>kt.toHandle([]),ea:e=>kt.toHandle(Wt(e)),B:()=>kt.toHandle({}),xb:e=>{var t=kt.toValue(e);ye(t),Dt(e)},Ac:(e,t,r)=>{e=kt.toValue(e),t=kt.toValue(t),r=kt.toValue(r),e[t]=r},Z:(e,t)=>{var r=(e=jt(e,"_emval_take_value")).readValueFromPointer(t);return kt.toHandle(r)},Fb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getUTCSeconds(),F[r+4>>2]=n.getUTCMinutes(),F[r+8>>2]=n.getUTCHours(),F[r+12>>2]=n.getUTCDate(),F[r+16>>2]=n.getUTCMonth(),F[r+20>>2]=n.getUTCFullYear()-1900,F[r+24>>2]=n.getUTCDay();var o=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),a=(n.getTime()-o)/864e5|0;F[r+28>>2]=a},Gb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getSeconds(),F[r+4>>2]=n.getMinutes(),F[r+8>>2]=n.getHours(),F[r+12>>2]=n.getDate(),F[r+16>>2]=n.getMonth(),F[r+20>>2]=n.getFullYear()-1900,F[r+24>>2]=n.getDay();var o=0|Jt(n);F[r+28>>2]=o,F[r+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),u=a.getTimezoneOffset(),c=0|(s!=u&&n.getTimezoneOffset()==Math.min(u,s));F[r+32>>2]=c},Hb:function(e){var t=(()=>{var t=new Date(F[e+20>>2]+1900,F[e+16>>2],F[e+12>>2],F[e+8>>2],F[e+4>>2],F[e>>2],0),r=F[e+32>>2],i=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=Math.min(a,o);if(r<0)F[e+32>>2]=Number(o!=a&&s==i);else if(r>0!=(s==i)){var u=Math.max(a,o),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-i))}F[e+24>>2]=t.getDay();var d=0|Jt(t);return F[e+28>>2]=d,F[e>>2]=t.getSeconds(),F[e+4>>2]=t.getMinutes(),F[e+8>>2]=t.getHours(),F[e+12>>2]=t.getDate(),F[e+16>>2]=t.getMonth(),F[e+20>>2]=t.getYear(),t.getTime()/1e3})();return Ar((k=t,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)),t>>>0},Db:function(e,t,r,i,n,o,a,s){var u=qt(n,o);try{if(isNaN(u))return 61;var c=ge.getStreamFromFD(i),d=pe.mmap(c,e,u,t,r),m=d.ptr;return F[a>>2]=d.allocated,C[s>>2]=m,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Eb:function(e,t,r,i,n,o,a){var s=qt(o,a);try{if(isNaN(s))return 61;var u=ge.getStreamFromFD(n);2&r&&ge.doMsync(e,u,t,i,s),pe.munmap(u)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Vb:(e,t,r)=>{var i=(new Date).getFullYear(),n=new Date(i,0,1),o=new Date(i,6,1),a=n.getTimezoneOffset(),s=o.getTimezoneOffset(),u=Math.max(a,s);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*u,F[t>>2]=Number(a!=s);var d=c(n),m=c(o),l=Kt(d),h=Kt(m);s<a?(C[r>>2]=l,C[r+4>>2]=h):(C[r>>2]=h,C[r+4>>2]=l)},D:()=>{B("")},rb:(e,t,r)=>tr(e,t,r),sa:()=>Date.now(),Wb:()=>2147483648,ta:_t,gc:(e,t,r)=>y.copyWithin(e,t,t+r),Ub:e=>{var t=y.length,r=2147483648;(e>>>=0)>r&&or();for(var i,n,o=1;o<=4;o*=2){var a=t*(1+.2/o);a=Math.min(a,e+100663296);var s=Math.min(r,(i=Math.max(e,a))+((n=65536)-i%n)%n);if(ar(s))return!0}or()},$b:(e,t)=>{var r=0;return ur().forEach(((i,n)=>{var o=t+r;C[e+4*n>>2]=o,((e,t)=>{for(var r=0;r<e.length;++r)v[t++>>0]=e.charCodeAt(r);v[t>>0]=0})(i,o),r+=i.length+1})),0},ac:(e,t)=>{var r=ur();C[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),C[t>>2]=i,0},lc:dr,Oa:function(e){try{var t=ge.getStreamFromFD(e);return pe.close(t),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},_b:function(e,t){try{var r=ge.getStreamFromFD(e),i=r.tty?2:pe.isDir(r.mode)?3:pe.isLink(r.mode)?7:4;return v[t>>0]=i,w[t+2>>1]=0,P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+8>>2]=P[0],F[t+12>>2]=P[1],P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+16>>2]=P[0],F[t+20>>2]=P[1],0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},_a:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=pe.read(e,v,a,s,i);if(u<0)return-1;if(n+=u,u<s)break;"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Ib:function(e,t,r,i,n){var o=qt(t,r);try{if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return pe.llseek(a,o,i),P=[a.position>>>0,(k=a.position,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[n>>2]=P[0],F[n+4>>2]=P[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},Na:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=pe.write(e,v,a,s,i);if(u<0)return-1;n+=u,"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},tb:function(){return vr(location.toString())},Pb:(e,t)=>(ie(y.subarray(e,e+t)),0),sb:function(){return vr((e=Vr,self[e(255,"SIx!")][e(269,"&FKe")]()));var e},$:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},kb:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},U:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Q:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},E:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Ka:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},rc:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},r:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},A:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},ua:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},X:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},qa:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},lb:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},v:function(e){var t=Pr();try{return gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},i:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},wc:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Ua:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Qa:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},nb:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},pb:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ob:function(e,t,r,i,n,o,a,s){var u=Pr();try{return gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},vc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},b:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Xa:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},mb:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},g:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},ha:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Ga:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},k:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Za:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Wa:function(e,t,r,i,n,o,a){var s=Pr();try{return gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},n:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},z:function(e,t,r,i,n,o,a){var s=Pr();try{return gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ca:function(e,t,r,i,n,o,a,s){var u=Pr();try{return gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},L:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},ia:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},ma:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},Da:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},zb:function(e,t,r,i,n,o,a){var s=Pr();try{return Wr(e,t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Mb:function(e,t,r,i){var n=Pr();try{return Zr(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Bb:function(e){var t=Pr();try{return jr(e)}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},Ob:function(e,t){var r=Pr();try{return Lr(e,t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},Ab:function(e,t,r){var i=Pr();try{return Ir(e,t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Kb:function(e,t,r,i){var n=Pr();try{return Nr(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},yb:function(e,t,r,i,n){var o=Pr();try{return Hr(e,t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},l:function(e){var t=Pr();try{gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},e:function(e,t){var r=Pr();try{gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},Ba:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},xa:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},la:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},ra:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},fb:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},d:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},F:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Aa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Ha:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},sc:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},za:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},S:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ja:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},jb:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},M:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},pa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},uc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},ya:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ga:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},gb:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ta:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},f:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},db:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},x:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Dc:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},tc:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},y:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ja:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},G:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},va:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Ea:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},yc:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Y:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},zc:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},hb:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Ec:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},j:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Ia:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},mc:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Sa:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},I:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},fa:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Bc:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},m:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},xc:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},C:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Cc:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},W:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},p:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Va:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Ra:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},qc:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},Fa:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},t:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},pc:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},oc:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},J:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},eb:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},T:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},wa:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},N:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},Fc:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},ka:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},Ca:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h,f,p){var g=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h,f,p)}catch(e){if(zr(g),e!==e+0)throw e;kr(1,0)}},Nb:function(e,t,r,i,n,o,a){var s=Pr();try{Br(e,t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Lb:function(e,t,r,i){var n=Pr();try{$r(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},K:e=>e,ib:pr,V:(e,t,r,i,n)=>pr(e,t,r,i),nc:(e,t,r)=>{for(var i=Y(t),n="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,a=n.length;o<a;++o)i=i.replace(new RegExp("\\"+n[o],"g"),"\\"+n[o]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var u in s)i=i.replace(u,s[u]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in c)i=i.replace(d,"("+d+c[d]+")");var m=[];for(o=i.indexOf("%");o>=0;o=i.indexOf("%"))m.push(i[o+1]),i=i.replace(new RegExp("\\%"+i[o+1],"g"),"");var l=new RegExp("^"+i,"i").exec(Y(e));if(l){var h,f=function(){function e(e,t,r){return"number"!=typeof e||isNaN(e)?t:e>=t?e<=r?e:r:t}return{year:e(F[r+20>>2]+1900,1970,9999),month:e(F[r+16>>2],0,11),day:e(F[r+12>>2],1,31),hour:e(F[r+8>>2],0,23),min:e(F[r+4>>2],0,59),sec:e(F[r>>2],0,59)}}(),p=e=>{var t=m.indexOf(e);if(t>=0)return l[t+1]};if((h=p("S"))&&(f.sec=gr(h)),(h=p("M"))&&(f.min=gr(h)),h=p("H"))f.hour=gr(h);else if(h=p("I")){var g=gr(h);(h=p("p"))&&(g+="P"===h.toUpperCase()[0]?12:0),f.hour=g}if(h=p("Y"))f.year=gr(h);else if(h=p("y")){var v=gr(h);(h=p("C"))?v+=100*gr(h):v+=v<69?2e3:1900,f.year=v}if((h=p("m"))?f.month=gr(h)-1:(h=p("b"))&&(f.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[h.substring(0,3).toUpperCase()]||0),h=p("d"))f.day=gr(h);else if(h=p("j"))for(var y=gr(h),w=Yt(f.year),S=0;S<12;++S){var C=mr(w?lr:hr,S-1);y<=C+(w?lr:hr)[S]&&(f.day=y-C)}else if(h=p("a")){var b=h.substring(0,3).toUpperCase();if(h=p("U")){var E={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[b],x=gr(h);A=0===(_=new Date(f.year,0,1)).getDay()?fr(_,E+7*(x-1)):fr(_,7-_.getDay()+E+7*(x-1)),f.day=A.getDate(),f.month=A.getMonth()}else if(h=p("W")){var _,A;E={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[b],x=gr(h),A=1===(_=new Date(f.year,0,1)).getDay()?fr(_,E+7*(x-1)):fr(_,7-_.getDay()+1+E+7*(x-1)),f.day=A.getDate(),f.month=A.getMonth()}}var D=new Date(f.year,f.month,f.day,f.hour,f.min,f.sec,0);return F[r>>2]=D.getSeconds(),F[r+4>>2]=D.getMinutes(),F[r+8>>2]=D.getHours(),F[r+12>>2]=D.getDate(),F[r+16>>2]=D.getMonth(),F[r+20>>2]=D.getFullYear()-1900,F[r+24>>2]=D.getDay(),F[r+28>>2]=mr(Yt(D.getFullYear())?lr:hr,D.getMonth()-1)+D.getDate()-1,F[r+32>>2]=0,e+ue(l[0]).length-1}return 0}},br=function(){var e,t,i,o,a={a:Cr};function s(e,t){var r,i=e.exports;return p=(br=i).Gc,A(),x=br.Jc,r=br.Hc,M.unshift(r),Z(),i}if($(),n.instantiateWasm)try{return n.instantiateWasm(a,s)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return(e=l,t=D,i=a,o=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||N(t)||"function"!=typeof fetch?I(t,i,o):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,i).then(o,(function(e){return f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation"),I(t,i,o)}))))).catch(r),{}}(),Er=n._malloc=e=>(Er=n._malloc=br.Ic)(e),xr=n._free=e=>(xr=n._free=br.Kc)(e),_r=()=>(_r=br.Lc)(),Ar=e=>(Ar=br.Mc)(e),Dr=e=>(Dr=br.Nc)(e),Tr=(n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=br.Oc)(),(e,t)=>(Tr=br.Pc)(e,t)),kr=(e,t)=>(kr=br.Qc)(e,t),Pr=()=>(Pr=br.Rc)(),zr=e=>(zr=br.Sc)(e),Mr=e=>(Mr=br.Tc)(e),Rr=e=>(Rr=br.Uc)(e),Or=(e,t,r)=>(Or=br.Vc)(e,t,r),Qr=e=>(Qr=br.Wc)(e),Lr=n.dynCall_ji=(e,t)=>(Lr=n.dynCall_ji=br.Xc)(e,t),$r=(n.dynCall_jiji=(e,t,r,i,o)=>(n.dynCall_jiji=br.Yc)(e,t,r,i,o),n.dynCall_viij=(e,t,r,i,o)=>(n.dynCall_viij=br.Zc)(e,t,r,i,o),n.dynCall_vij=(e,t,r,i)=>($r=n.dynCall_vij=br._c)(e,t,r,i)),Zr=n.dynCall_iij=(e,t,r,i)=>(Zr=n.dynCall_iij=br.$c)(e,t,r,i),Br=n.dynCall_viijii=(e,t,r,i,o,a,s)=>(Br=n.dynCall_viijii=br.ad)(e,t,r,i,o,a,s),Nr=n.dynCall_jiii=(e,t,r,i)=>(Nr=n.dynCall_jiii=br.bd)(e,t,r,i),jr=(n.dynCall_jjj=(e,t,r,i,o)=>(n.dynCall_jjj=br.cd)(e,t,r,i,o),n.dynCall_iiiijj=(e,t,r,i,o,a,s,u)=>(n.dynCall_iiiijj=br.dd)(e,t,r,i,o,a,s,u),n.dynCall_viijj=(e,t,r,i,o,a,s)=>(n.dynCall_viijj=br.ed)(e,t,r,i,o,a,s),n.dynCall_viiijjj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_viiijjj=br.fd)(e,t,r,i,o,a,s,u,c,d),n.dynCall_j=e=>(jr=n.dynCall_j=br.gd)(e)),Ir=n.dynCall_jii=(e,t,r)=>(Ir=n.dynCall_jii=br.hd)(e,t,r),Wr=n.dynCall_iiiiij=(e,t,r,i,o,a,s)=>(Wr=n.dynCall_iiiiij=br.id)(e,t,r,i,o,a,s),Hr=n.dynCall_jiiii=(e,t,r,i,o)=>(Hr=n.dynCall_jiiii=br.jd)(e,t,r,i,o);function Ur(){function e(){Fr||(Fr=!0,n.calledRun=!0,_||(n.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,ce.init(),U(M),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),R.unshift(e);var e;U(R)}()))}O>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),z.unshift(e);var e;U(z)}(),O>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_iiiiijj=(e,t,r,i,o,a,s,u,c)=>(n.dynCall_iiiiijj=br.kd)(e,t,r,i,o,a,s,u,c),n.dynCall_iiiiiijj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_iiiiiijj=br.ld)(e,t,r,i,o,a,s,u,c,d),n.___start_em_js=9745972,n.___stop_em_js=9746080,n.UTF8ToString=Y,n.stringToUTF8=Rt,n.lengthBytesUTF8=ae,n.allocateUTF8=vr,L=function e(){Fr||Ur(),Fr||(L=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Vr(e,t){var r=qr();return Vr=function(t,i){var n=r[t-=253];if(void 0===Vr.Ejifzc){var o=function(e){for(var t,r,i="",n="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?i+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=i.length;s<u;s++)n+="%"+("00"+i.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(e,t){var r,i,n=[],a=0,s="";for(e=o(e),i=0;i<256;i++)n[i]=i;for(i=0;i<256;i++)a=(a+n[i]+t.charCodeAt(i%t.length))%256,r=n[i],n[i]=n[a],n[a]=r;i=0,a=0;for(var u=0;u<e.length;u++)a=(a+n[i=(i+1)%256])%256,r=n[i],n[i]=n[a],n[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^n[(n[i]+n[a])%256]);return s};Vr.bRoFuW=a,e=arguments,Vr.Ejifzc=!0}var s=r[0],u=t+s,c=e[u];return c?n=c:(void 0===Vr.cclMPZ&&(Vr.cclMPZ=!0),n=Vr.bRoFuW(n,i),e[u]=n),n},Vr(e,t)}function qr(){var e=["WRVdJmkKWQ9yW68lWOtdMSk0","WRHfWQXneZTpsWX/","bJOFFCoSymoBW4hdLmoOp8kpW7e","W7iBfSk5WRXYW6dcP3fvWPOY","xmopvKddKL0igW","qH82WPL7o3SYW7rSW7rNW54","hvf9stJcSd/cJCo3WQ/dPNVdKq","adGrdmkpgmkiW4NdJq","p3C8xCkHdSkj","WRVcOf7dN1G0yq","gmkhWQ3cGxSJWOP8t1RcHs3dNmo3","W4qpFCkcDSoNWQ/cS8ouWQJcLHW","cmkubgldKgelix4","WRVdJmkOWQqmWPLXWQ7dP8kwimkCWPS","WODHuJpcRJBcVvXhW4D1WOu","bSktdrNcKanxix7dSmoyWOeu","WPRdQLj3W7pcR8kmW7Cl","W4/dHbPXr2OZWPHpWQy9mCoH","xSoCW4/dGJb7W5qR","v8oXW4JcICkXeN7cHLqzx0a","W4hdGXmkbWHVWPHp"];return(qr=function(){return e})()}Ur(),function(e,t){for(var r=Vr,i=e();;)try{if(743151==parseInt(r(271,"#KXB"))/1*(-parseInt(r(273,"C&#s"))/2)+-parseInt(r(256,"Ow2f"))/3+-parseInt(r(257,"k6]x"))/4+-parseInt(r(268,"#KXB"))/5+-parseInt(r(254,"&MQ%"))/6*(parseInt(r(260,"kUAQ"))/7)+-parseInt(r(258,"hK0I"))/8*(-parseInt(r(262,"#Jco"))/9)+parseInt(r(261,"&FKe"))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(qr);var ighnua,Yr=(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}),Gr=Yr(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Gr)};return e()}));return Gr(),e.ready});e.exports=n},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Ae})),r.d(t,"commands",(function(){return ze}));var i=r(0);class n{_marker(){}}class o extends n{constructor(e={}){super(),this.author="Created 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 a extends n{constructor(e={}){super(),this.attributes=new o({}),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 o(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 s extends n{constructor(e={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),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 u extends n{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 c extends n{constructor(e={}){super(),this.frameAccumulationConfiguration=new u({}),this.enableDetection=!0,this.incompleteResultHandling="ACCEPT",void 0!==e.frameAccumulationConfiguration&&(this.frameAccumulationConfiguration=new u(e.frameAccumulationConfiguration)),void 0!==e.enableDetection&&(this.enableDetection=e.enableDetection),void 0!==e.incompleteResultHandling&&(this.incompleteResultHandling=e.incompleteResultHandling)}}class d extends n{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 m extends n{constructor(e={}){super(),this.qualityThresholds=[new d({symbolQuality:.5,symbolRatio:.5}),new d({symbolQuality:.7,symbolRatio:.3}),new d({symbolQuality:.85,symbolRatio:.3}),new d({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.detectOrientation=!1,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 d(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.detectOrientation&&(this.detectOrientation=e.detectOrientation),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)}}var l;!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new h(e);case"CustomBinarizationFilter":return new f(e);case"ColorDocumentFilter":return new p(e);case"BrightnessFilter":return new g(e);case"ContrastFilter":return new v(e);case"GrayscaleFilter":return new y(e);case"LegacyFilter":return new w(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class h extends n{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class f extends n{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 p extends n{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class g extends n{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class v extends n{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class y extends n{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 w extends n{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends n{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 F extends n{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 C extends n{constructor(e={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],this.ignoreOrientationMismatch=!1,void 0!==e.isLive&&(this.isLive=e.isLive),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.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=e.acceptedAspectRatioScore),void 0!==e.aspectRatios&&(this.aspectRatios=e.aspectRatios.map((e=>new F(e)))),void 0!==e.ignoreOrientationMismatch&&(this.ignoreOrientationMismatch=e.ignoreOrientationMismatch)}}var b;!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new E(e);case"PatternContentValidator":return new x(e);default:throw`Unknown child class name: ${t}`}}}(b||(b={}));class E extends n{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class x extends n{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 _ extends n{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new E({}),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=b.From(e.validator))}}class A extends n{constructor(e={}){super(),this.extractVINFromBarcode=!1,this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.extractVINFromBarcode&&(this.extractVINFromBarcode=e.extractVINFromBarcode),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}var D,T;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new R(e);case"BarcodeFormatCode2Of5Configuration":return new O(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new L(e);case"BarcodeFormatDataBarLimitedConfiguration":return new $(e);case"BarcodeFormatITFConfiguration":return new Z(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new N(e);case"BarcodeFormatPharmaCodeConfiguration":return new j(e);case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);case"BarcodeFormatAustraliaPostConfiguration":return new X(e);case"BarcodeFormatJapanPostConfiguration":return new J(e);case"BarcodeFormatRoyalMailConfiguration":return new K(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);case"BarcodeFormatGS1CompositeConfiguration":return new ie(e);case"BarcodeFormatCommonOneDConfiguration":return new ne(e);case"BarcodeFormatCommonTwoDConfiguration":return new oe(e);case"BarcodeFormatCommonFourStateConfiguration":return new ae(e);case"BarcodeFormatCommonConfiguration":return new se(e);default:throw`Unknown child class name: ${t}`}}}(D||(D={})),function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new R(e);case"BarcodeFormatCode2Of5Configuration":return new O(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new L(e);case"BarcodeFormatDataBarLimitedConfiguration":return new $(e);case"BarcodeFormatITFConfiguration":return new Z(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new N(e);case"BarcodeFormatPharmaCodeConfiguration":return new j(e);default:throw`Unknown child class name: ${t}`}}}(T||(T={}));class k extends n{constructor(e={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),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 P extends n{constructor(e={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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.checksum&&(this.checksum=e.checksum)}}class z extends n{constructor(e={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,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.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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.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 M extends n{constructor(e={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class R extends n{constructor(e={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),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 O extends n{constructor(e={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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.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 Q extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class L extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class $ extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Z extends n{constructor(e={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class B extends n{constructor(e={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class N extends n{constructor(e={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="ALLOW_ANY",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),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 j extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}var I,W;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);default:throw`Unknown child class name: ${t}`}}}(I||(I={}));class H extends n{constructor(e={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class U extends n{constructor(e={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,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.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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 V extends n{constructor(e={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class q extends n{constructor(e={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class Y extends n{constructor(e={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class G extends n{constructor(e={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAustraliaPostConfiguration":return new X(e);case"BarcodeFormatJapanPostConfiguration":return new J(e);case"BarcodeFormatRoyalMailConfiguration":return new K(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);default:throw`Unknown child class name: ${t}`}}}(W||(W={}));class X extends n{constructor(e={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class J extends n{constructor(e={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class K extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ee extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class te extends n{constructor(e={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class re extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ie extends n{constructor(e={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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 ne extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,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.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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 oe extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXI_CODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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 n{constructor(e={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,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.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class se extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,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.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),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 ue extends n{constructor(e={}){super(),this.barcodeFormatConfigurations=[new se({})],this.extractedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.onlyAcceptDocuments=!1,this.returnBarcodeImage=!0,this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,void 0!==e.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=e.barcodeFormatConfigurations.map((e=>D.From(e)))),void 0!==e.extractedDocumentFormats&&(this.extractedDocumentFormats=e.extractedDocumentFormats.map((e=>e))),void 0!==e.onlyAcceptDocuments&&(this.onlyAcceptDocuments=e.onlyAcceptDocuments),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live)}}var ce;!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfiguration":return new de(e);case"EuropeanHealthInsuranceCardConfiguration":return new le(e);case"MRZFallbackConfiguration":return new he(e);case"DocumentDataExtractorCommonConfiguration":return new fe(e);default:throw`Unknown child class name: ${t}`}}}(ce||(ce={}));class de extends n{constructor(e={}){if(super(),this._type="DateValidationConfiguration",this.minYear=0,this.maxYear=2999,void 0!==e.minYear&&(this.minYear=e.minYear),void 0!==e.maxYear&&(this.maxYear=e.maxYear),void 0===e.fieldTypeName)throw new Error("fieldTypeName must be present in constructor argument");this.fieldTypeName=e.fieldTypeName}}const me=["AUSTRIA","BELGIUM","BULGARIA","CROATIA","CYPRUS","CZECH_REPUBLIC","DENMARK","ESTONIA","FINLAND","FRANCE","GERMANY","GREECE","HUNGARY","IRELAND","ITALY","LATVIA","LITHUANIA","LUXEMBOURG","MALTA","NETHERLANDS","POLAND","PORTUGAL","ROMANIA","SLOVAKIA","SLOVENIA","SPAIN","SWEDEN","SWITZERLAND"];class le extends n{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfiguration",this.expectedCountry=null,void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry&&me.includes(e.expectedCountry)?e.expectedCountry:null)}}class he extends n{constructor(e={}){super(),this._type="MRZFallbackConfiguration",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class fe extends n{constructor(e={}){if(super(),this._type="DocumentDataExtractorCommonConfiguration",void 0===e.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e))}}class pe extends n{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ge extends n{constructor(e={}){if(super(),this.resultAccumulationConfig=new s({}),this.fieldExcludeList=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new s(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0===e.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=e.configurations.map((e=>ce.From(e)))}}var ve,ye;!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new we(e);case"UserFieldStringValue":return new Se(e);case"UserFieldIntValue":return new Fe(e);default:throw`Unknown child class name: ${t}`}}}(ve||(ve={}));class we extends n{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 Se extends n{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 Fe extends n{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 Ce extends n{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=ve.From(e.value)}}class be extends n{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 Ce(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?l.From(e.binarizationFilter):null)}}(ye=be||(be={})).defaultCompression="LZW",ye.binaryDocumentOptimizedCompression="CCITT_T6";var Ee=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};let xe;class _e extends Error{}class Ae{constructor(e){this.id=e}}const De={};function Te(e){const t=Math.random().toString(36);return De[t]=e,new Ae(t)}function ke(e){if(!De.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return De[e.id]}function Pe(e){const t=ke(e);t.delete&&t.delete(),delete De[e.id]}const ze={initialize:function(e,t,n,o,a){return Ee(this,void 0,void 0,(function*(){try{const{captureConsole:s,jpegQuality:u=80,requestSuffix:c=""}=a||{};s&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const d=r(2),m=r(3),l={locateFile:function(e,r){let n;return n=t?Object(i.c)(t)?t:"":o,e.endsWith(".worker.js")&&m?m.default:new URL(n+e+c,location.href).href}},h=Object(i.b)(a),f=h.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${h}.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"],i=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=i,e.push(4*i));for(let r=0;r<e.length;r++){const i=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:i/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(l.wasmMemory=p),l.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new _e("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield d(l),xe=l,xe.initialize(e||"",n,u)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Ee(this,void 0,void 0,(function*(){return xe.getLicenseInfo()}))},encodeJpeg:function(e){return Ee(this,void 0,void 0,(function*(){const t=Oe(e);return Me(xe.encodeJpeg(t))}))},detectDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){const r=new xe.DocumentDetector(new C(t)),i=r.detect(Oe(e));return r.delete(),Me(i)}))},detectAndCropDocument:function(e){return Ee(this,void 0,void 0,(function*(){let t=Me(xe.detectAndCropDocument(Oe(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.DocumentDetector(new C(e)))}))},documentScannerDetect:function(e,t){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).detect(Oe(t)),t)}))},parseBarcodeDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.parseBarcodeDocument(e,t))}))},createBarcodeScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.BarcodeRecognizer(new ue(e)))}))},scanBarcodes:function(e,t){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).recognize(Oe(t)),t)}))},beginPdf:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.PdfGenerationContext(new a(e)))}))},addPageToPdf:function(e,t){return Ee(this,void 0,void 0,(function*(){Me(ke(e).addPage(Oe(t)))}))},completePdf:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},beginTiff:function(e){return Ee(this,void 0,void 0,(function*(){const t=new xe.TiffGenerationContext(new be(e));return Me(t.begin()),Te(t)}))},addPageToTiff:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).addPage(Oe(t),r))}))},completeTiff:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},createMRZScanner:function(e){return Ee(this,void 0,void 0,(function*(){e.incompleteResultHandling="REJECT",e.enableDetection=!1;return Te(new xe.MRZScannerContext(new c(e)))}))},scanMRZ:function(e,t){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).scan(Oe(t)),t)}))},releaseObject:function(e){return Ee(this,void 0,void 0,(function*(){Pe(e)}))},createOcrEngine:function(){return Ee(this,void 0,void 0,(function*(){return Te(new xe.TLDROcrContext)}))},performOcr:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).performOcr(Oe(t)))}))},createTextPatternScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.GenericTextLineScanner(new _(e)))}))},scanTextLine:function(e,t){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).recognize(Oe(t)),t)}))},cleanTextLineScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createVinScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.VinScanner(new A(e)))}))},scanVin:function(e,t){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).run(Oe(t)),t)}))},cleanVinScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.DocumentQualityAnalyzer(new m(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).analyze(Oe(t)))}))},imageApplyFilter:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageApplyFilter(Oe(e),l.From(t)))}))},imageCrop:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageCrop(Oe(e),t))}))},imageResize:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageResize(Oe(e),t))}))},imageRotate:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageRotate(Oe(e),t))}))},documentDataExtractorCreate:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.GenericDocumentRecognizer(new ge(e)))}))},documentDataExtractorExtract:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Re(ke(e).recognize(Oe(t),new pe(r)),t)}))},version:function(){return Ee(this,void 0,void 0,(function*(){return"7.0.0-dev.2"}))},__hasModuleFunction:function(e){return Ee(this,void 0,void 0,(function*(){return xe.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Ee(this,void 0,void 0,(function*(){return xe[e](...t)}))}};function Me(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Re(e,t){return Object.assign(Object.assign({},Me(e)),{originalImage:t})}function Oe(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;xe||"initialize"===t?(()=>Ee(this,void 0,void 0,(function*(){return yield ze[t].apply(null,r)})))().then((e=>{const t=Object(i.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof _e)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(xe.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")})}}]);
|