volview 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/app.925b979f.css +1 -0
- package/dist/css/chunk-vendors.43a6a19a.css +5 -0
- package/{public → dist}/favicon.ico +0 -0
- package/{public → dist}/global.css +0 -0
- package/{src/assets/KitwareHeadAndNeck.jpg → dist/img/KitwareHeadAndNeck.11db5ffb.jpg} +0 -0
- package/dist/index.html +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.js +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.js +1 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.js +1 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/MetaImageIOReadImage.js +1 -0
- package/dist/itk/image-io/MetaImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/MetaImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.js +1 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.js +1 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/PNGImageIOReadImage.js +1 -0
- package/dist/itk/image-io/PNGImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/PNGImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/ReadDICOMTags.js +1 -0
- package/dist/itk/image-io/ReadDICOMTags.umd.js +1 -0
- package/dist/itk/image-io/ReadDICOMTags.wasm +0 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.js +1 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.umd.js +1 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.wasm +0 -0
- package/dist/itk/image-io/VTKImageIOReadImage.js +1 -0
- package/dist/itk/image-io/VTKImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/VTKImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.wasm +0 -0
- package/dist/itk/pipelines/dicom.js +1 -0
- package/dist/itk/pipelines/dicom.umd.js +1 -0
- package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.umd.wasm +0 -0
- package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.wasm +0 -0
- package/dist/itk/web-workers/IOInput.d.ts +6 -0
- package/dist/itk/web-workers/IOInput.js +1 -0
- package/dist/itk/web-workers/ITKConfig.d.ts +8 -0
- package/dist/itk/web-workers/ITKConfig.js +1 -0
- package/dist/itk/web-workers/RunPipelineInput.d.ts +10 -0
- package/dist/itk/web-workers/RunPipelineInput.js +1 -0
- package/dist/itk/web-workers/WebWorkerInput.d.ts +6 -0
- package/dist/itk/web-workers/WebWorkerInput.js +1 -0
- package/dist/itk/web-workers/bundles/pipeline.worker.js +1 -0
- package/dist/itk/web-workers/loadImageIOPipelineModule.d.ts +4 -0
- package/dist/itk/web-workers/loadImageIOPipelineModule.js +1 -0
- package/dist/itk/web-workers/loadMeshIOPipelineModule.d.ts +4 -0
- package/dist/itk/web-workers/loadMeshIOPipelineModule.js +1 -0
- package/dist/itk/web-workers/loadPipelineModule.d.ts +3 -0
- package/dist/itk/web-workers/loadPipelineModule.js +1 -0
- package/dist/itk/web-workers/min-bundles/pipeline.worker.js +3 -0
- package/dist/itk/web-workers/pipeline.worker.d.ts +1 -0
- package/dist/itk/web-workers/pipeline.worker.js +1 -0
- package/dist/itk/web-workers/runPipeline.d.ts +5 -0
- package/dist/itk/web-workers/runPipeline.js +1 -0
- package/dist/js/23.be4d694e.js +21 -0
- package/dist/js/23.be4d694e.js.map +1 -0
- package/dist/js/385.51ca48a2.js +2 -0
- package/dist/js/385.51ca48a2.js.map +1 -0
- package/dist/js/422.c64a6aa7.js +2 -0
- package/dist/js/422.c64a6aa7.js.map +1 -0
- package/dist/js/979.c4823352.js +2 -0
- package/dist/js/979.c4823352.js.map +1 -0
- package/dist/js/app.81e49d9a.js +2 -0
- package/dist/js/app.81e49d9a.js.map +1 -0
- package/dist/js/chunk-vendors.0ab48f8d.js +33 -0
- package/dist/js/chunk-vendors.0ab48f8d.js.map +1 -0
- package/{public → dist}/pvm-sample.png +0 -0
- package/package.json +3 -2
- package/.browserslistrc +0 -4
- package/.editorconfig +0 -6
- package/.env +0 -6
- package/.eslintrc.js +0 -109
- package/.gitattributes +0 -1
- package/.github/workflows/checks.yml +0 -16
- package/.github/workflows/publish.yml +0 -52
- package/.prettierignore +0 -5
- package/CONTRIBUTING.md +0 -29
- package/babel.config.js +0 -3
- package/documentation/config.js +0 -15
- package/documentation/content/KWVolViewLogo.png +0 -0
- package/documentation/content/KWVolViewLogo.svg +0 -35
- package/documentation/content/VolViewLogo.png +0 -0
- package/documentation/content/VolViewLogo.svg +0 -22
- package/documentation/content/doc/index.md +0 -64
- package/documentation/content/doc/loading_data.md +0 -30
- package/documentation/content/doc/mouse_controls.md +0 -34
- package/documentation/content/doc/quick_start_guide.md +0 -75
- package/documentation/content/doc/rendering.md +0 -27
- package/documentation/content/doc/state_files.md +0 -18
- package/documentation/content/doc/toolbar.md +0 -20
- package/documentation/content/doc/welcome_screen.md +0 -23
- package/documentation/content/gallery/01-volview-welcome-notes.jpg +0 -0
- package/documentation/content/gallery/01-volview-welcome.jpg +0 -0
- package/documentation/content/gallery/02-volview-about.jpg +0 -0
- package/documentation/content/gallery/02-volview-notifications.jpg +0 -0
- package/documentation/content/gallery/02-volview-settings.jpg +0 -0
- package/documentation/content/gallery/03-volview-sample-datasets.jpg +0 -0
- package/documentation/content/gallery/04-volview-active-data.jpg +0 -0
- package/documentation/content/gallery/05-volview-select-data-to-delete.jpg +0 -0
- package/documentation/content/gallery/06-volview-corner-annotation.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout-notes.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout.jpg +0 -0
- package/documentation/content/gallery/09-volview-layout-3DPrimary.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom-notes.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint-notes.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint.jpg +0 -0
- package/documentation/content/gallery/12-volview-paint-options.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop-notes.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop.jpg +0 -0
- package/documentation/content/gallery/14-volview-ruler.jpg +0 -0
- package/documentation/content/gallery/15-volview-crosshairs.jpg +0 -0
- package/documentation/content/gallery/16-volview-rendering.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity2.jpg +0 -0
- package/documentation/content/gallery/18-volview-presets.jpg +0 -0
- package/documentation/content/gallery/19-volview-color.jpg +0 -0
- package/documentation/content/gallery/19-volview-color2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera0.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera1.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera3.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid-final.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.0.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.5.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid1.0.jpg +0 -0
- package/documentation/content/gallery/LocalAmbientOcclusion.jpg +0 -0
- package/documentation/content/gallery/Notes.pptx +0 -0
- package/documentation/content/gallery/VolView-Overview.jpg +0 -0
- package/documentation/content/gallery/index.md +0 -53
- package/documentation/content/icon/favicon-16x16.png +0 -0
- package/documentation/content/icon/favicon-196x196.png +0 -0
- package/documentation/content/icon/favicon-32x32.png +0 -0
- package/documentation/content/icon/favicon-96x96.png +0 -0
- package/documentation/content/index.pug +0 -43
- package/documentation/content/logo.png +0 -0
- package/documentation/content/logo.svg +0 -20
- package/documentation/data/menu.yml +0 -3
- package/documentation/themes/navy/layout/partial/footer.swig +0 -22
- package/documentation/tpl/__en__ +0 -31
- package/documentation/tpl/__sidebar__ +0 -11
- package/patches/jsdom-global+3.0.2.patch +0 -12
- package/patches/vue-toastification+1.7.14.patch +0 -41
- package/patches/vuetify+2.6.10.patch +0 -13
- package/prettier.config.js +0 -9
- package/public/index.html +0 -28
- package/server/helper.py +0 -147
- package/server/host.js +0 -134
- package/server/serialize.js +0 -111
- package/server/serialize.py +0 -203
- package/server/server.py +0 -84
- package/server/test.py +0 -17
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +0 -20
- package/src/assets/samples/3DUS-Fetus.jpg +0 -0
- package/src/assets/samples/CTA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRI-Cardiac.jpg +0 -0
- package/src/assets/samples/MRI-PROSTATEx.jpg +0 -0
- package/src/components/AboutBox.vue +0 -157
- package/src/components/AiModule.vue +0 -60
- package/src/components/AnnotationsModule.vue +0 -37
- package/src/components/App.vue +0 -539
- package/src/components/ColorFunctionSlider.vue +0 -181
- package/src/components/DataBrowser.vue +0 -173
- package/src/components/DragAndDrop.vue +0 -107
- package/src/components/GroupableItem.vue +0 -30
- package/src/components/ImageDataBrowser.vue +0 -186
- package/src/components/ImageListCard.vue +0 -114
- package/src/components/ItemGroup.vue +0 -74
- package/src/components/LabelmapList.vue +0 -36
- package/src/components/LayoutGrid.vue +0 -96
- package/src/components/MeasurementsList.vue +0 -134
- package/src/components/MessageCenter.vue +0 -189
- package/src/components/MessageItem.vue +0 -83
- package/src/components/MessageNotificationContent.vue +0 -20
- package/src/components/MessageNotifications.vue +0 -84
- package/src/components/ModelBrowser.vue +0 -83
- package/src/components/ModulePanel.vue +0 -137
- package/src/components/PaintControls.vue +0 -174
- package/src/components/PatientBrowser.vue +0 -280
- package/src/components/PatientStudyVolumeBrowser.vue +0 -325
- package/src/components/RenderingModule.vue +0 -49
- package/src/components/ResizableNavDrawer.vue +0 -158
- package/src/components/SampleDataBrowser.vue +0 -198
- package/src/components/SaveSession.vue +0 -57
- package/src/components/Settings.vue +0 -35
- package/src/components/SliceSlider.vue +0 -182
- package/src/components/SpleenModule.vue +0 -101
- package/src/components/ToolButton.vue +0 -58
- package/src/components/ToolStrip.vue +0 -186
- package/src/components/ViewOverlayGrid.vue +0 -84
- package/src/components/VolumePresets.vue +0 -165
- package/src/components/VolumeProperties.vue +0 -171
- package/src/components/VolumeRendering.vue +0 -365
- package/src/components/VtkThreeView.vue +0 -512
- package/src/components/VtkTwoView.vue +0 -665
- package/src/components/__tests__/ResizableNavDrawer.spec.js +0 -32
- package/src/components/__tests__/ToolButton.spec.js +0 -46
- package/src/components/icons/KitwareLogoIcon.vue +0 -54
- package/src/components/icons/VolViewFullLogo.vue +0 -139
- package/src/components/icons/VolViewLogo.vue +0 -78
- package/src/components/styles/utils.css +0 -16
- package/src/components/styles/vtk-view.css +0 -116
- package/src/components/tools/CropTool.vue +0 -61
- package/src/components/tools/CrosshairsTool.vue +0 -93
- package/src/components/tools/MouseManipulatorTool.vue +0 -108
- package/src/components/tools/PaintTool.vue +0 -54
- package/src/components/tools/PanTool.vue +0 -35
- package/src/components/tools/RulerTool.vue +0 -202
- package/src/components/tools/SliceScrollTool.vue +0 -123
- package/src/components/tools/WindowLevelTool.vue +0 -191
- package/src/components/tools/ZoomTool.vue +0 -35
- package/src/components/tools/crop/Crop2D.vue +0 -367
- package/src/components/tools/crop/Crop2DLineHandle.vue +0 -103
- package/src/components/tools/crop/Crop3D.vue +0 -192
- package/src/components/tools/crop/CropControls.vue +0 -38
- package/src/components/tools/crop/types.ts +0 -12
- package/src/components/tools/crosshairs/CrosshairSVG2D.vue +0 -125
- package/src/components/tools/crosshairs/CrosshairsWidget2D.vue +0 -100
- package/src/components/tools/paint/PaintWidget2D.vue +0 -192
- package/src/components/tools/ruler/RulerSVG2D.vue +0 -181
- package/src/components/tools/ruler/RulerWidget2D.vue +0 -154
- package/src/composables/__tests__/useDoubleRecord.spec.ts +0 -57
- package/src/composables/__tests__/useOrientationLabels.spec.ts +0 -29
- package/src/composables/isViewAnimating.ts +0 -25
- package/src/composables/manageVTKSubscription.ts +0 -6
- package/src/composables/onProxyManagerEvent.ts +0 -50
- package/src/composables/proxyManager.ts +0 -13
- package/src/composables/sync/__tests__/createPrimitiveSyncContext.spec.ts +0 -41
- package/src/composables/sync/__tests__/useWindowingSync.spec.ts +0 -51
- package/src/composables/sync/createPrimitiveSyncContext.ts +0 -83
- package/src/composables/sync/useWindowingSync.ts +0 -48
- package/src/composables/useAppLoadingNotifications.ts +0 -73
- package/src/composables/useCameraOrientation.ts +0 -34
- package/src/composables/useCurrentImage.ts +0 -74
- package/src/composables/useCurrentSlice.ts +0 -43
- package/src/composables/useDoubleRecord.ts +0 -77
- package/src/composables/useEventListener.ts +0 -26
- package/src/composables/useGlobalErrorHook.ts +0 -18
- package/src/composables/useMultiSelection.ts +0 -29
- package/src/composables/useOrientationLabels.ts +0 -62
- package/src/composables/usePanels.ts +0 -42
- package/src/composables/usePersistCameraConfig.ts +0 -138
- package/src/composables/useResizeObserver.ts +0 -37
- package/src/composables/useResizeToFit.ts +0 -50
- package/src/composables/useSceneBuilder.ts +0 -96
- package/src/composables/useToast.js +0 -11
- package/src/composables/useVTKCallback.ts +0 -33
- package/src/composables/useVTKWorldToDisplay.ts +0 -141
- package/src/composables/useViewProxy.ts +0 -87
- package/src/composables/useVolumeThumbnailing.ts +0 -173
- package/src/composables/useWebGLWatchdog.ts +0 -32
- package/src/composables/useWidgetManager.ts +0 -41
- package/src/config.ts +0 -182
- package/src/constants.ts +0 -38
- package/src/core/id.ts +0 -18
- package/src/core/provider.ts +0 -31
- package/src/core/proxies.ts +0 -90
- package/src/core/thumbnailers/__tests__/vtk-image.spec.ts +0 -58
- package/src/core/thumbnailers/index.ts +0 -5
- package/src/core/thumbnailers/volume-thumbnailer.ts +0 -130
- package/src/core/thumbnailers/vtk-image.ts +0 -142
- package/src/core/tools/__tests__/paint.spec.ts +0 -101
- package/src/core/tools/__tests__/ruler.spec.ts +0 -73
- package/src/core/tools/paint/brush.ts +0 -20
- package/src/core/tools/paint/ellipse-brush.ts +0 -96
- package/src/core/tools/paint/index.ts +0 -141
- package/src/core/tools/ruler.ts +0 -149
- package/src/global.d.ts +0 -24
- package/src/io/__tests__/io.spec.ts +0 -26
- package/src/io/dicom.ts +0 -187
- package/src/io/index.ts +0 -11
- package/src/io/io.ts +0 -157
- package/src/io/itk/itkConfig.js +0 -8
- package/src/io/itk-dicom/dicom.cpp +0 -327
- package/src/io/itk-dicom/web-build/dicom.js +0 -16
- package/src/io/itk-dicom/web-build/dicom.umd.js +0 -21
- package/src/io/manifest.ts +0 -30
- package/src/io/readers.ts +0 -36
- package/src/io/state-file/index.ts +0 -170
- package/src/io/state-file/schema.ts +0 -277
- package/src/io/state-file/utils.ts +0 -33
- package/src/io/types.ts +0 -4
- package/src/io/vtk/async.reader.worker.ts +0 -50
- package/src/io/vtk/async.ts +0 -58
- package/src/io/vtk/async.writer.worker.ts +0 -46
- package/src/io/vtk/common.ts +0 -30
- package/src/io/zip.ts +0 -31
- package/src/main.js +0 -66
- package/src/main.ts +0 -1
- package/src/plugins/vuetify.js +0 -25
- package/src/shims-itk.d.ts +0 -67
- package/src/shims-misc.d.ts +0 -4
- package/src/shims-tsx.d.ts +0 -13
- package/src/shims-vtk.d.ts +0 -1042
- package/src/shims-vue.d.ts +0 -5
- package/src/store/__tests__/datasets.spec.ts +0 -75
- package/src/store/__tests__/messages.spec.ts +0 -74
- package/src/store/__tests__/rulers.spec.ts +0 -77
- package/src/store/__tests__/view-configs.spec.ts +0 -37
- package/src/store/datasets-dicom.ts +0 -398
- package/src/store/datasets-files.ts +0 -35
- package/src/store/datasets-images.ts +0 -118
- package/src/store/datasets-labelmaps.ts +0 -136
- package/src/store/datasets-models.ts +0 -25
- package/src/store/datasets.ts +0 -341
- package/src/store/messages.ts +0 -144
- package/src/store/tools/crop.ts +0 -136
- package/src/store/tools/crosshairs.ts +0 -131
- package/src/store/tools/index.ts +0 -95
- package/src/store/tools/paint.ts +0 -191
- package/src/store/tools/rulers.ts +0 -305
- package/src/store/tools/types.ts +0 -54
- package/src/store/view-configs/camera.ts +0 -51
- package/src/store/view-configs/common.ts +0 -61
- package/src/store/view-configs/slicing.ts +0 -86
- package/src/store/view-configs/types.ts +0 -39
- package/src/store/view-configs/volume-coloring.ts +0 -193
- package/src/store/view-configs/windowing.ts +0 -69
- package/src/store/view-configs.ts +0 -78
- package/src/store/views.ts +0 -130
- package/src/types/index.ts +0 -16
- package/src/types/layout.ts +0 -10
- package/src/types/lps.ts +0 -40
- package/src/types/views.ts +0 -65
- package/src/types/vtk-types.ts +0 -29
- package/src/utils/__tests__/lps.spec.ts +0 -102
- package/src/utils/color.ts +0 -23
- package/src/utils/errors.js +0 -3
- package/src/utils/fetch.ts +0 -101
- package/src/utils/hacks.ts +0 -14
- package/src/utils/index.ts +0 -83
- package/src/utils/lps.ts +0 -129
- package/src/utils/manipulators.ts +0 -35
- package/src/utils/promise-worker.ts +0 -45
- package/src/utils/vtk-helpers.ts +0 -215
- package/src/utils/workerHandler.js +0 -42
- package/src/vtk/ColorMaps.ts +0 -72
- package/src/vtk/CrosshairsWidget/behavior.ts +0 -112
- package/src/vtk/CrosshairsWidget/index.d.ts +0 -22
- package/src/vtk/CrosshairsWidget/index.js +0 -73
- package/src/vtk/CrosshairsWidget/state.ts +0 -51
- package/src/vtk/IJKSliceRepresentationProxy/index.d.ts +0 -9
- package/src/vtk/IJKSliceRepresentationProxy/index.js +0 -59
- package/src/vtk/LPSView2DProxy/index.d.ts +0 -18
- package/src/vtk/LPSView2DProxy/index.js +0 -89
- package/src/vtk/LPSView3DProxy/index.d.ts +0 -16
- package/src/vtk/LPSView3DProxy/index.js +0 -78
- package/src/vtk/LabelMap/index.d.ts +0 -16
- package/src/vtk/LabelMap/index.js +0 -49
- package/src/vtk/LabelMapSliceRepProxy/index.d.ts +0 -6
- package/src/vtk/LabelMapSliceRepProxy/index.js +0 -104
- package/src/vtk/MedicalColorPresets.json +0 -1448
- package/src/vtk/PaintBrushContextRepresentation/index.js +0 -191
- package/src/vtk/PaintWidget/behavior.ts +0 -101
- package/src/vtk/PaintWidget/index.d.ts +0 -28
- package/src/vtk/PaintWidget/index.js +0 -56
- package/src/vtk/PaintWidget/state.ts +0 -41
- package/src/vtk/PiecewiseWidget/index.js +0 -203
- package/src/vtk/RulerWidget/behavior.ts +0 -185
- package/src/vtk/RulerWidget/index.d.ts +0 -25
- package/src/vtk/RulerWidget/index.js +0 -79
- package/src/vtk/RulerWidget/state.ts +0 -63
- package/src/vtk/TreJsonConverter/index.js +0 -150
- package/src/vtk/proxy.js +0 -66
- package/src/vtk/proxyUtils.js +0 -16
- package/src/vtk/webvr-empty.js +0 -1
- package/tests/testUtils.js +0 -12
- package/tsconfig.json +0 -46
- package/vue.config.js +0 -86
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var VTKImageIOWriteImage=(()=>{var r="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(r=r||__filename),function(e){e=e||{};var t,n,o="undefined"!=typeof e?e:{};o["ready"]=new Promise((function(r,e){t=r,n=e}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,c,f,l,d,m=Object.assign({},o),h=[],p="./this.program",E=(r,e)=>{throw e},w="object"==typeof window,v="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g="";function _(r){return o["locateFile"]?o["locateFile"](r,g):g+r}function k(r){if(r instanceof Ue)return;let e=r;D("exiting due to exception: "+e)}y?(g=v?require("path").dirname(g)+"/":__dirname+"/",d=()=>{l||(f=require("fs"),l=require("path"))},s=function(r,e){return d(),r=l["normalize"](r),f.readFileSync(r,e?void 0:"utf8")},c=r=>{var e=s(r,!0);return e.buffer||(e=new Uint8Array(e)),e},u=(r,e,t)=>{d(),r=l["normalize"](r),f.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process["argv"].length>1&&(p=process["argv"][1].replace(/\\/g,"/")),h=process["argv"].slice(2),process["on"]("uncaughtException",(function(r){if(!(r instanceof Ue))throw r})),process["on"]("unhandledRejection",(function(r){throw r})),E=(r,e)=>{if(tr())throw process["exitCode"]=r,e;k(e),process["exit"](r)},o["inspect"]=function(){return"[Emscripten Module object]"}):(w||v)&&(v?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},v&&(c=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var S,b=o["print"]||console.log.bind(console),D=o["printErr"]||console.warn.bind(console);Object.assign(o,m),m=null,o["arguments"]&&(h=o["arguments"]),o["thisProgram"]&&(p=o["thisProgram"]),o["quit"]&&(E=o["quit"]),o["wasmBinary"]&&(S=o["wasmBinary"]);var N,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Er("no native wasm support detected");var O,A=!1;function P(r,e){r||Er(e)}function M(r){var e=o["_"+r];return e}function T(r,e,t,n,o){var i={string:function(r){var e=0;if(null!==r&&void 0!==r&&0!==r){var t=1+(r.length<<2);e=ze(t),Y(r,e,t)}return e},array:function(r){var e=ze(r.length);return X(r,e),e}};function a(r){return"string"===e?H(r):"boolean"===e?Boolean(r):r}var s=M(r),u=[],c=0;if(n)for(var f=0;f<n.length;f++){var l=i[t[f]];l?(0===c&&(c=Be()),u[f]=l(n[f])):u[f]=n[f]}var d=s.apply(null,u);function m(r){return 0!==c&&xe(c),a(r)}return d=m(d),d}function R(r,e,t,n){t=t||[];var o=t.every((function(r){return"number"===r})),i="string"!==e;return i&&o&&!n?M(r):function(){return T(r,e,t,arguments,n)}}var C,I,L,B,x,z,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(r,e,t){var n=e+t,o=e;while(r[o]&&!(o>=n))++o;if(o-e>16&&r.buffer&&j)return j.decode(r.subarray(e,o));var i="";while(e<o){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++],a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function H(r,e){return r?U(L,r,e):""}function W(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343){var u=r.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function Y(r,e,t){return W(r,L,e,t)}function q(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function G(r){var e="";while(1){var t=L[r++>>0];if(!t)return e;e+=String.fromCharCode(t)}}function K(r){var e=q(r)+1,t=ze(e);return W(r,I,t,e),t}function X(r,e){I.set(r,e)}function V(r,e,t){for(var n=0;n<r.length;++n)I[e++>>0]=r.charCodeAt(n);t||(I[e>>0]=0)}function Q(r){C=r,o["HEAP8"]=I=new Int8Array(r),o["HEAP16"]=B=new Int16Array(r),o["HEAP32"]=x=new Int32Array(r),o["HEAPU8"]=L=new Uint8Array(r),o["HEAPU16"]=new Uint16Array(r),o["HEAPU32"]=z=new Uint32Array(r),o["HEAPF32"]=new Float32Array(r),o["HEAPF64"]=new Float64Array(r)}o["INITIAL_MEMORY"];var J,Z=[],$=[],rr=[],er=[];function tr(){return F}function nr(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)sr(o["preRun"].shift())}Nr(Z)}function or(){!0,o["noFSInit"]||Hr.init.initialized||Hr.init(),Hr.ignorePermissions=!1,Lr.init(),Nr($)}function ir(){Nr(rr)}function ar(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)cr(o["postRun"].shift())}Nr(er)}function sr(r){Z.unshift(r)}function ur(r){$.unshift(r)}function cr(r){er.unshift(r)}var fr=0,lr=null,dr=null;function mr(r){return r}function hr(r){fr++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](fr)}function pr(r){if(fr--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](fr),0==fr&&(null!==lr&&(clearInterval(lr),lr=null),dr)){var e=dr;dr=null,e()}}function Er(r){o["onAbort"]&&o["onAbort"](r),r="Aborted("+r+")",D(r),A=!0,O=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var wr,vr,yr,gr="data:application/octet-stream;base64,";function _r(r){return r.startsWith(gr)}function kr(r){return r.startsWith("file://")}function Sr(r){try{if(r==wr&&S)return new Uint8Array(S);if(c)return c(r);throw"both async and sync fetching of the wasm failed"}catch(D){Er(D)}}function br(){if(!S&&(w||v)){if("function"==typeof fetch&&!kr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r["ok"])throw"failed to load wasm binary file at '"+wr+"'";return r["arrayBuffer"]()})).catch((function(){return Sr(wr)}));if(u)return new Promise((function(r,e){u(wr,(function(e){r(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Sr(wr)}))}function Dr(){var r={a:Ce};function e(r,e){var t=r.exports;o["asm"]=t,N=o["asm"]["A"],Q(N.buffer),J=o["asm"]["M"],ur(o["asm"]["B"]),pr("wasm-instantiate")}function t(r){e(r["instance"])}function i(e){return br().then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){D("failed to asynchronously prepare wasm: "+r),Er(r)}))}function a(){return S||"function"!=typeof WebAssembly.instantiateStreaming||_r(wr)||kr(wr)||y||"function"!=typeof fetch?i(t):fetch(wr,{credentials:"same-origin"}).then((function(e){var n=WebAssembly.instantiateStreaming(e,r);return n.then(t,(function(r){return D("wasm streaming compile failed: "+r),D("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(hr("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](r,e);return s}catch(u){return D("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Nr(r){while(r.length>0){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Or(t)():Or(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}wr="VTKImageIOWriteImage.umd.wasm",_r(wr)||(wr=_(wr));var Fr=[];function Or(r){var e=Fr[r];return e||(r>=Fr.length&&(Fr.length=r+1),Fr[r]=e=J.get(r)),e}function Ar(r){if(r instanceof Ue||"unwind"==r)return O;E(1,r)}function Pr(r){return Ie(r+24)+24}function Mr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){z[this.ptr+4>>2]=r},this.get_type=function(){return z[this.ptr+4>>2]},this.set_destructor=function(r){z[this.ptr+8>>2]=r},this.get_destructor=function(){return z[this.ptr+8>>2]},this.set_refcount=function(r){x[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,I[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=I[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,I[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=I[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=x[this.ptr>>2];x[this.ptr>>2]=r+1},this.release_ref=function(){var r=x[this.ptr>>2];return x[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){z[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return z[this.ptr+16>>2]},this.get_exception_ptr=function(){var r=je(this.get_type());if(r)return z[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Tr(r,e,t){var n=new Mr(r);throw n.init(e,t),r,r}var Rr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Rr.isAbs(r),t="/"===r.substr(-1);return r=Rr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),r||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Rr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";r=Rr.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return Rr.normalize(r.join("/"))},join2:(r,e)=>Rr.normalize(r+"/"+e)};function Cr(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(y)try{var e=require("crypto");return function(){return e["randomBytes"](1)[0]}}catch(t){}return function(){Er("randomDevice")}}var Ir={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Hr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Rr.isAbs(n)}return r=Rr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),(e?"/":"")+r||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length;e++)if(""!==r[e])break;for(var t=r.length-1;t>=0;t--)if(""!==r[t])break;return e>t?[]:r.slice(e,t-e+1)}r=Ir.resolve(r).substr(1),e=Ir.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Lr={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Lr.ttys[r]={input:[],output:[],ops:e},Hr.registerDevice(r,Lr.stream_ops)},stream_ops:{open:function(r){var e=Lr.ttys[r.node.rdev];if(!e)throw new Hr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Hr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Hr.ErrnoError(29)}if(void 0===s&&0===i)throw new Hr.ErrnoError(6);if(null===s||void 0===s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Hr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(a){throw new Hr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(y){var t=256,n=Buffer.alloc(t),o=0;try{o=f.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}e=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(e=window.prompt("Input: "),null!==e&&(e+="\n")):"function"==typeof readline&&(e=readline(),null!==e&&(e+="\n"));if(!e)return null;r.input=Te(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(b(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(b(U(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(D(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(D(U(r.output,0)),r.output=[])}}};function Br(r){Er()}var xr={ops_table:null,mount:function(r){return xr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Hr.isBlkdev(t)||Hr.isFIFO(t))throw new Hr.ErrnoError(63);xr.ops_table||(xr.ops_table={dir:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,lookup:xr.node_ops.lookup,mknod:xr.node_ops.mknod,rename:xr.node_ops.rename,unlink:xr.node_ops.unlink,rmdir:xr.node_ops.rmdir,readdir:xr.node_ops.readdir,symlink:xr.node_ops.symlink},stream:{llseek:xr.stream_ops.llseek}},file:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:{llseek:xr.stream_ops.llseek,read:xr.stream_ops.read,write:xr.stream_ops.write,allocate:xr.stream_ops.allocate,mmap:xr.stream_ops.mmap,msync:xr.stream_ops.msync}},link:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,readlink:xr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:Hr.chrdev_stream_ops}});var o=Hr.createNode(r,e,t,n);return Hr.isDir(o.mode)?(o.node_ops=xr.ops_table.dir.node,o.stream_ops=xr.ops_table.dir.stream,o.contents={}):Hr.isFile(o.mode)?(o.node_ops=xr.ops_table.file.node,o.stream_ops=xr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Hr.isLink(o.mode)?(o.node_ops=xr.ops_table.link.node,o.stream_ops=xr.ops_table.link.stream):Hr.isChrdev(o.mode)&&(o.node_ops=xr.ops_table.chrdev.node,o.stream_ops=xr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Hr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Hr.isDir(r.mode)?e.size=4096:Hr.isFile(r.mode)?e.size=r.usedBytes:Hr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&xr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Hr.genericErrors[44]},mknod:function(r,e,t,n){return xr.createNode(r,e,t,n)},rename:function(r,e,t){if(Hr.isDir(r.mode)){var n;try{n=Hr.lookupNode(e,t)}catch(i){}if(n)for(var o in n.contents)throw new Hr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Hr.lookupNode(r,e);for(var n in t.contents)throw new Hr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=xr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Hr.isLink(r.mode))throw new Hr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===I.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(xr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Hr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Hr.ErrnoError(28);return n},allocate:function(r,e,t){xr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==C){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,i=Br(e),!i)throw new Hr.ErrnoError(48);I.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;xr.stream_ops.write(r,e,0,n,t,!1);return 0}}};function zr(r,e,t,n){var o=n?"":mr("al "+r);u(r,(function(t){P(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&pr(o)}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&hr(o)}var jr={},Ur={isWindows:!1,staticInit:()=>{Ur.isWindows=!!process.platform.match(/^win/);var r=process["binding"]("constants");r["fs"]&&(r=r["fs"]),Ur.flagsForNodeMap={1024:r["O_APPEND"],64:r["O_CREAT"],128:r["O_EXCL"],256:r["O_NOCTTY"],0:r["O_RDONLY"],2:r["O_RDWR"],4096:r["O_SYNC"],512:r["O_TRUNC"],1:r["O_WRONLY"],131072:r["O_NOFOLLOW"]}},convertNodeCode:r=>{var e=r.code;return jr[e]},mount:r=>Ur.createNode(null,"/",Ur.getMode(r.opts.root),0),createNode:(r,e,t,n)=>{if(!Hr.isDir(t)&&!Hr.isFile(t)&&!Hr.isLink(t))throw new Hr.ErrnoError(28);var o=Hr.createNode(r,e,t);return o.node_ops=Ur.node_ops,o.stream_ops=Ur.stream_ops,o},getMode:r=>{var e;try{e=f.lstatSync(r),Ur.isWindows&&(e.mode=e.mode|(292&e.mode)>>2)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}return e.mode},realPath:r=>{var e=[];while(r.parent!==r)e.push(r.name),r=r.parent;return e.push(r.mount.opts.root),e.reverse(),Rr.join.apply(null,e)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var e=0;for(var t in Ur.flagsForNodeMap)r&t&&(e|=Ur.flagsForNodeMap[t],r^=t);if(r)throw new Hr.ErrnoError(28);return e},node_ops:{getattr:r=>{var e,t=Ur.realPath(r);try{e=f.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}return Ur.isWindows&&!e.blksize&&(e.blksize=4096),Ur.isWindows&&!e.blocks&&(e.blocks=(e.size+e.blksize-1)/e.blksize|0),{dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,size:e.size,atime:e.atime,mtime:e.mtime,ctime:e.ctime,blksize:e.blksize,blocks:e.blocks}},setattr:(r,e)=>{var t=Ur.realPath(r);try{if(void 0!==e.mode&&(f.chmodSync(t,e.mode),r.mode=e.mode),void 0!==e.timestamp){var n=new Date(e.timestamp);f.utimesSync(t,n,n)}void 0!==e.size&&f.truncateSync(t,e.size)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},lookup:(r,e)=>{var t=Rr.join2(Ur.realPath(r),e),n=Ur.getMode(t);return Ur.createNode(r,e,n)},mknod:(r,e,t,n)=>{var o=Ur.createNode(r,e,t,n),i=Ur.realPath(o);try{Hr.isDir(o.mode)?f.mkdirSync(i,o.mode):f.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Hr.ErrnoError(Ur.convertNodeCode(a))}return o},rename:(r,e,t)=>{var n=Ur.realPath(r),o=Rr.join2(Ur.realPath(e),t);try{f.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Hr.ErrnoError(Ur.convertNodeCode(i))}r.name=t},unlink:(r,e)=>{var t=Rr.join2(Ur.realPath(r),e);try{f.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},rmdir:(r,e)=>{var t=Rr.join2(Ur.realPath(r),e);try{f.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},readdir:r=>{var e=Ur.realPath(r);try{return f.readdirSync(e)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},symlink:(r,e,t)=>{var n=Rr.join2(Ur.realPath(r),e);try{f.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},readlink:r=>{var e=Ur.realPath(r);try{return e=f.readlinkSync(e),e=l.relative(l.resolve(r.mount.opts.root),e),e}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Hr.ErrnoError(28);throw new Hr.ErrnoError(Ur.convertNodeCode(t))}}},stream_ops:{open:r=>{var e=Ur.realPath(r.node);try{Hr.isFile(r.node.mode)&&(r.nfd=f.openSync(e,Ur.flagsForNode(r.flags)))}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},close:r=>{try{Hr.isFile(r.node.mode)&&r.nfd&&f.closeSync(r.nfd)}catch(e){if(!e.code)throw e;throw new Hr.ErrnoError(Ur.convertNodeCode(e))}},read:(r,e,t,n,o)=>{if(0===n)return 0;try{return f.readSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},write:(r,e,t,n,o)=>{try{return f.writeSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},llseek:(r,e,t)=>{var n=e;if(1===t)n+=r.position;else if(2===t&&Hr.isFile(r.node.mode))try{var o=f.fstatSync(r.nfd);n+=o.size}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}if(n<0)throw new Hr.ErrnoError(28);return n},mmap:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i=Br(e);return Ur.stream_ops.read(r,I,i,e,t),{ptr:i,allocated:!0}},msync:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;Ur.stream_ops.write(r,e,0,n,t,!1);return 0}}},Hr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(r=Ir.resolve(Hr.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new Hr.ErrnoError(32);for(var n=Rr.normalizeArray(r.split("/").filter((r=>!!r)),!1),o=Hr.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&e.parent)break;if(o=Hr.lookupNode(o,n[a]),i=Rr.join2(i,n[a]),Hr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow){var u=0;while(Hr.isLink(o.mode)){var c=Hr.readlink(i);i=Ir.resolve(Rr.dirname(i),c);var f=Hr.lookupPath(i,{recurse_count:e.recurse_count+1});if(o=f.node,u++>40)throw new Hr.ErrnoError(32)}}}return{path:i,node:o}},getPath:r=>{var e;while(1){if(Hr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Hr.nameTable.length},hashAddNode:r=>{var e=Hr.hashName(r.parent.id,r.name);r.name_next=Hr.nameTable[e],Hr.nameTable[e]=r},hashRemoveNode:r=>{var e=Hr.hashName(r.parent.id,r.name);if(Hr.nameTable[e]===r)Hr.nameTable[e]=r.name_next;else{var t=Hr.nameTable[e];while(t){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}}},lookupNode:(r,e)=>{var t=Hr.mayLookup(r);if(t)throw new Hr.ErrnoError(t,r);for(var n=Hr.hashName(r.id,e),o=Hr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Hr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Hr.FSNode(r,e,t,n);return Hr.hashAddNode(o),o},destroyNode:r=>{Hr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768===(61440&r),isDir:r=>16384===(61440&r),isLink:r=>40960===(61440&r),isChrdev:r=>8192===(61440&r),isBlkdev:r=>24576===(61440&r),isFIFO:r=>4096===(61440&r),isSocket:r=>49152===(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Hr.flagModes[r];if("undefined"==typeof e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Hr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Hr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{Hr.lookupNode(r,e);return 20}catch(t){}return Hr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Hr.lookupNode(r,e)}catch(i){return i.errno}var o=Hr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Hr.isDir(n.mode))return 54;if(Hr.isRoot(n)||Hr.getPath(n)===Hr.cwd())return 10}else if(Hr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Hr.isLink(r.mode)?32:Hr.isDir(r.mode)&&("r"!==Hr.flagsToPermissionString(e)||512&e)?31:Hr.nodePermissions(r,Hr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Hr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Hr.streams[t])return t;throw new Hr.ErrnoError(33)},getStream:r=>Hr.streams[r],createStream:(r,e,t)=>{Hr.FSStream||(Hr.FSStream=function(){this.shared={}},Hr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get function(){return this.shared.position},set:function(r){this.shared.position=r}}}),r=Object.assign(new Hr.FSStream,r);var n=Hr.nextfd(e,t);return r.fd=n,Hr.streams[n]=r,r},closeStream:r=>{Hr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Hr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Hr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Hr.devices[r]={stream_ops:e}},getDevice:r=>Hr.devices[r],getMounts:r=>{var e=[],t=[r];while(t.length){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Hr.syncFSRequests++,Hr.syncFSRequests>1&&D("warning: "+Hr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Hr.getMounts(Hr.root.mount),n=0;function o(r){return Hr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Hr.root)throw new Hr.ErrnoError(10);if(!o&&!i){var a=Hr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Hr.isMountpoint(n))throw new Hr.ErrnoError(10);if(!Hr.isDir(n.mode))throw new Hr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Hr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Hr.lookupPath(r,{follow_mount:!1});if(!Hr.isMountpoint(e.node))throw new Hr.ErrnoError(28);var t=e.node,n=t.mounted,o=Hr.getMounts(n);Object.keys(Hr.nameTable).forEach((r=>{var e=Hr.nameTable[r];while(e){var t=e.name_next;o.includes(e.mount)&&Hr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Hr.lookupPath(r,{parent:!0}),o=n.node,i=Rr.basename(r);if(!i||"."===i||".."===i)throw new Hr.ErrnoError(28);var a=Hr.mayCreate(o,i);if(a)throw new Hr.ErrnoError(a);if(!o.node_ops.mknod)throw new Hr.ErrnoError(63);return o.node_ops.mknod(o,i,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Hr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Hr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Hr.mkdir(n,e)}catch(i){if(20!=i.errno)throw i}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Hr.mknod(r,e,t)),symlink:(r,e)=>{if(!Ir.resolve(r))throw new Hr.ErrnoError(44);var t=Hr.lookupPath(e,{parent:!0}),n=t.node;if(!n)throw new Hr.ErrnoError(44);var o=Rr.basename(e),i=Hr.mayCreate(n,o);if(i)throw new Hr.ErrnoError(i);if(!n.node_ops.symlink)throw new Hr.ErrnoError(63);return n.node_ops.symlink(n,o,r)},rename:(r,e)=>{var t,n,o,i=Rr.dirname(r),a=Rr.dirname(e),s=Rr.basename(r),u=Rr.basename(e);if(t=Hr.lookupPath(r,{parent:!0}),n=t.node,t=Hr.lookupPath(e,{parent:!0}),o=t.node,!n||!o)throw new Hr.ErrnoError(44);if(n.mount!==o.mount)throw new Hr.ErrnoError(75);var c,f=Hr.lookupNode(n,s),l=Ir.relative(r,a);if("."!==l.charAt(0))throw new Hr.ErrnoError(28);if(l=Ir.relative(e,i),"."!==l.charAt(0))throw new Hr.ErrnoError(55);try{c=Hr.lookupNode(o,u)}catch(h){}if(f!==c){var d=Hr.isDir(f.mode),m=Hr.mayDelete(n,s,d);if(m)throw new Hr.ErrnoError(m);if(m=c?Hr.mayDelete(o,u,d):Hr.mayCreate(o,u),m)throw new Hr.ErrnoError(m);if(!n.node_ops.rename)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(f)||c&&Hr.isMountpoint(c))throw new Hr.ErrnoError(10);if(o!==n&&(m=Hr.nodePermissions(n,"w"),m))throw new Hr.ErrnoError(m);Hr.hashRemoveNode(f);try{n.node_ops.rename(f,o,u)}catch(h){throw h}finally{Hr.hashAddNode(f)}}},rmdir:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node,n=Rr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!0);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.rmdir)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.rmdir(t,n),Hr.destroyNode(o)},readdir:r=>{var e=Hr.lookupPath(r,{follow:!0}),t=e.node;if(!t.node_ops.readdir)throw new Hr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new Hr.ErrnoError(44);var n=Rr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!1);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.unlink)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.unlink(t,n),Hr.destroyNode(o)},readlink:r=>{var e=Hr.lookupPath(r),t=e.node;if(!t)throw new Hr.ErrnoError(44);if(!t.node_ops.readlink)throw new Hr.ErrnoError(28);return Ir.resolve(Hr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,e)=>{var t=Hr.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new Hr.ErrnoError(44);if(!n.node_ops.getattr)throw new Hr.ErrnoError(63);return n.node_ops.getattr(n)},lstat:r=>Hr.stat(r,!0),chmod:(r,e,t)=>{var n;if("string"==typeof r){var o=Hr.lookupPath(r,{follow:!t});n=o.node}else n=r;if(!n.node_ops.setattr)throw new Hr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Hr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);Hr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if("string"==typeof r){var i=Hr.lookupPath(r,{follow:!n});o=i.node}else o=r;if(!o.node_ops.setattr)throw new Hr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Hr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Hr.getStream(r);if(!n)throw new Hr.ErrnoError(8);Hr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Hr.ErrnoError(28);var t;if("string"==typeof r){var n=Hr.lookupPath(r,{follow:!0});t=n.node}else t=r;if(!t.node_ops.setattr)throw new Hr.ErrnoError(63);if(Hr.isDir(t.mode))throw new Hr.ErrnoError(31);if(!Hr.isFile(t.mode))throw new Hr.ErrnoError(28);var o=Hr.nodePermissions(t,"w");if(o)throw new Hr.ErrnoError(o);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);if(0===(2097155&t.flags))throw new Hr.ErrnoError(28);Hr.truncate(t.node,e)},utime:(r,e,t)=>{var n=Hr.lookupPath(r,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new Hr.ErrnoError(44);var n;if(e="string"==typeof e?Hr.modeStringToFlags(e):e,t="undefined"==typeof t?438:t,t=64&e?4095&t|32768:0,"object"==typeof r)n=r;else{r=Rr.normalize(r);try{var i=Hr.lookupPath(r,{follow:!(131072&e)});n=i.node}catch(c){}}var a=!1;if(64&e)if(n){if(128&e)throw new Hr.ErrnoError(20)}else n=Hr.mknod(r,t,0),a=!0;if(!n)throw new Hr.ErrnoError(44);if(Hr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Hr.isDir(n.mode))throw new Hr.ErrnoError(54);if(!a){var s=Hr.mayOpen(n,e);if(s)throw new Hr.ErrnoError(s)}512&e&&!a&&Hr.truncate(n,0),e&=-131713;var u=Hr.createStream({node:n,path:Hr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&e||(Hr.readFiles||(Hr.readFiles={}),r in Hr.readFiles||(Hr.readFiles[r]=1)),u},close:r=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{Hr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Hr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Hr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(1===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.read)throw new Hr.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.write)throw new Hr.ErrnoError(28);r.seekable&&1024&r.flags&&Hr.llseek(r,0,2);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(e<0||t<=0)throw new Hr.ErrnoError(28);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(!Hr.isFile(r.node.mode)&&!Hr.isDir(r.node.mode))throw new Hr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Hr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&r.flags))throw new Hr.ErrnoError(2);if(1===(2097155&r.flags))throw new Hr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Hr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Hr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=Hr.open(r,e.flags),o=Hr.stat(r),i=o.size,a=new Uint8Array(i);return Hr.read(n,a,0,i,0),"utf8"===e.encoding?t=U(a,0):"binary"===e.encoding&&(t=a),Hr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Hr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(q(e)+1),i=W(e,o,0,o.length);Hr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Hr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Hr.close(n)},cwd:()=>Hr.currentPath,chdir:r=>{var e=Hr.lookupPath(r,{follow:!0});if(null===e.node)throw new Hr.ErrnoError(44);if(!Hr.isDir(e.node.mode))throw new Hr.ErrnoError(54);var t=Hr.nodePermissions(e.node,"x");if(t)throw new Hr.ErrnoError(t);Hr.currentPath=e.path},createDefaultDirectories:()=>{Hr.mkdir("/tmp"),Hr.mkdir("/home"),Hr.mkdir("/home/web_user")},createDefaultDevices:()=>{Hr.mkdir("/dev"),Hr.registerDevice(Hr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Hr.mkdev("/dev/null",Hr.makedev(1,3)),Lr.register(Hr.makedev(5,0),Lr.default_tty_ops),Lr.register(Hr.makedev(6,0),Lr.default_tty1_ops),Hr.mkdev("/dev/tty",Hr.makedev(5,0)),Hr.mkdev("/dev/tty1",Hr.makedev(6,0));var r=Cr();Hr.createDevice("/dev","random",r),Hr.createDevice("/dev","urandom",r),Hr.mkdir("/dev/shm"),Hr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Hr.mkdir("/proc");var r=Hr.mkdir("/proc/self");Hr.mkdir("/proc/self/fd"),Hr.mount({mount:()=>{var e=Hr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Hr.getStream(t);if(!n)throw new Hr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Hr.createDevice("/dev","stdin",o["stdin"]):Hr.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Hr.createDevice("/dev","stdout",null,o["stdout"]):Hr.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Hr.createDevice("/dev","stderr",null,o["stderr"]):Hr.symlink("/dev/tty1","/dev/stderr");Hr.open("/dev/stdin",0),Hr.open("/dev/stdout",1),Hr.open("/dev/stderr",1)},ensureErrnoError:()=>{Hr.ErrnoError||(Hr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Hr.ErrnoError.prototype=new Error,Hr.ErrnoError.prototype.constructor=Hr.ErrnoError,[44].forEach((r=>{Hr.genericErrors[r]=new Hr.ErrnoError(r),Hr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Hr.ensureErrnoError(),Hr.nameTable=new Array(4096),Hr.mount(xr,{},"/"),Hr.createDefaultDirectories(),Hr.createDefaultDevices(),Hr.createSpecialDirectories(),Hr.filesystems={MEMFS:xr,NODEFS:Ur}},init:(r,e,t)=>{Hr.init.initialized=!0,Hr.ensureErrnoError(),o["stdin"]=r||o["stdin"],o["stdout"]=e||o["stdout"],o["stderr"]=t||o["stderr"],Hr.createStandardStreams()},quit:()=>{Hr.init.initialized=!1;for(var r=0;r<Hr.streams.length;r++){var e=Hr.streams[r];e&&Hr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Hr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{var t=Hr.lookupPath(r,{follow:!e});r=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Hr.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Rr.basename(r),t=Hr.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Hr.getPath(r);var o=e.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=Rr.join2(r,i);try{Hr.mkdir(a)}catch(s){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Rr.join2("string"==typeof r?r:Hr.getPath(r),e),a=Hr.getMode(n,o);return Hr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Hr.getPath(r),a=e?Rr.join2(r,e):r);var s=Hr.getMode(n,o),u=Hr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}Hr.chmod(u,146|s);var d=Hr.open(u,577);Hr.write(d,t,0,t.length,0,i),Hr.close(d),Hr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Rr.join2("string"==typeof r?r:Hr.getPath(r),e),i=Hr.getMode(!!t,!!n);Hr.createDevice.major||(Hr.createDevice.major=64);var a=Hr.makedev(Hr.createDevice.major++,0);return Hr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new Hr.ErrnoError(29)}if(void 0===u&&0===a)throw new Hr.ErrnoError(6);if(null===u||void 0===u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(s){throw new Hr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Hr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.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(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Te(s(r.url),!0),r.usedBytes=r.contents.length}catch(e){throw new Hr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Te(o.responseText||"",!0)},u=this;u.setDataGetter((r=>{var e=r*a,t=(r+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[r]&&(u.chunks[r]=s(e,t)),"undefined"==typeof u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,b("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){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;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:t};var u=Hr.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},f=Object.keys(u.stream_ops);function l(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return f.forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return Hr.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(Hr.forceLoadFile(u),l(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{Hr.forceLoadFile(u);var i=Br(e);if(!i)throw new Hr.ErrnoError(48);return l(r,I,i,e,t),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,i,a,s,u,c)=>{var f=e?Ir.resolve(Rr.join2(r,e)):r,l=mr("cp "+f);function d(t){function d(t){c&&c(),s||Hr.createDataFile(r,e,t,n,o,u),i&&i(),pr(l)}Browser.handledByPreloadPlugin(t,f,d,(()=>{a&&a(),pr(l)}))||d(t)}hr(l),"string"==typeof t?zr(t,(r=>d(r)),a):d(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{b("creating db");var r=o.result;r.createObjectStore(Hr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Hr.DB_STORE_NAME],"readwrite"),a=i.objectStore(Hr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?e():t()}r.forEach((r=>{var e=a.put(Hr.analyzePath(r).object.contents,r);e.onsuccess=()=>{s++,s+u==c&&f()},e.onerror=()=>{u++,s+u==c&&f()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Hr.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Hr.DB_STORE_NAME),u=0,c=0,f=r.length;function l(){0==c?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{Hr.analyzePath(r).exists&&Hr.unlink(r),Hr.createDataFile(Rr.dirname(r),Rr.basename(r),e.result,!0,!0,!0),u++,u+c==f&&l()},e.onerror=()=>{c++,u+c==f&&l()}})),a.onerror=t},o.onerror=t}},Wr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Rr.isAbs(e))return e;var n;if(-100===r)n=Hr.cwd();else{var o=Hr.getStream(r);if(!o)throw new Hr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Hr.ErrnoError(44);return n}return Rr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(o){if(o&&o.node&&Rr.normalize(e)!==Rr.normalize(Hr.getPath(o.node)))return-54;throw o}return x[t>>2]=n.dev,x[t+4>>2]=0,x[t+8>>2]=n.ino,x[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,x[t+20>>2]=n.uid,x[t+24>>2]=n.gid,x[t+28>>2]=n.rdev,x[t+32>>2]=0,yr=[n.size>>>0,(vr=n.size,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[t+40>>2]=yr[0],x[t+44>>2]=yr[1],x[t+48>>2]=4096,x[t+52>>2]=n.blocks,x[t+56>>2]=n.atime.getTime()/1e3|0,x[t+60>>2]=0,x[t+64>>2]=n.mtime.getTime()/1e3|0,x[t+68>>2]=0,x[t+72>>2]=n.ctime.getTime()/1e3|0,x[t+76>>2]=0,yr=[n.ino>>>0,(vr=n.ino,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[t+80>>2]=yr[0],x[t+84>>2]=yr[1],0},doMsync:function(r,e,t,n,o){var i=L.slice(r,r+t);Hr.msync(e,i,o,t,n)},varargs:void 0,get:function(){Wr.varargs+=4;var r=x[Wr.varargs-4>>2];return r},getStr:function(r){var e=H(r);return e},getStreamFromFD:function(r){var e=Hr.getStream(r);if(!e)throw new Hr.ErrnoError(8);return e}};function Yr(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e),-8&t)return-28;var o=Hr.lookupPath(e,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Hr.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function qr(r){return x[Le()>>2]=r,r}function Gr(r,e,t){Wr.varargs=t;try{var n=Wr.getStreamFromFD(r);switch(e){case 0:var o,i=Wr.get();return i<0?-28:(o=Hr.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Wr.get();return n.flags|=i,0;case 5:i=Wr.get();var a=0;return B[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return qr(28),-1;default:return-28}}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function Kr(r,e){try{if(0===e)return-28;var t=Hr.cwd(),n=q(t)+1;return e<n?-68:(Y(t,r,e),n)}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return-o.errno}}function Xr(r,e,t){Wr.varargs=t;try{var n=Wr.getStreamFromFD(r);switch(e){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Wr.get();return x[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Wr.get();return Hr.ioctl(n,e,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Er("bad ioctl syscall "+e)}}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function Vr(r,e){try{return r=Wr.getStr(r),Wr.doStat(Hr.lstat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function Qr(r,e,t){try{return e=Wr.getStr(e),e=Wr.calculateAt(r,e),e=Rr.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),Hr.mkdir(e,t,0),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function Jr(r,e,t,n){try{e=Wr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=Wr.calculateAt(r,e,i),Wr.doStat(o?Hr.lstat:Hr.stat,e,t)}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return-a.errno}}function Zr(r,e,t,n){Wr.varargs=n;try{e=Wr.getStr(e),e=Wr.calculateAt(r,e);var o=n?Wr.get():0;return Hr.open(e,t,o).fd}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function $r(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e),n<=0)return-28;var o=Hr.readlink(e),i=Math.min(n,q(o)),a=I[t+i];return Y(o,t,n+1),I[t+i]=a,i}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function re(r,e){try{return r=Wr.getStr(r),Wr.doStat(Hr.stat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function ee(r,e,t){try{return e=Wr.getStr(e),e=Wr.calculateAt(r,e),0===t?Hr.unlink(e):512===t?Hr.rmdir(e):Er("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function te(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e,!0),t){var o=x[t>>2],i=x[t+4>>2];a=1e3*o+i/1e6,t+=8,o=x[t>>2],i=x[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Hr.utime(e,a,s),0}catch(u){if("undefined"==typeof Hr||!(u instanceof Hr.ErrnoError))throw u;return-u.errno}}function ne(){Er("")}function oe(r,e,t){L.copyWithin(r,e,e+t)}function ie(){return 2147483648}function ae(r){try{return N.grow(r-C.byteLength+65535>>>16),Q(N.buffer),1}catch(e){}}function se(r){var e=L.length;r>>>=0;var t=ie();if(r>t)return!1;let n=(r,e)=>r+(e-r%e)%e;for(var o=1;o<=4;o*=2){var i=e*(1+.2/o);i=Math.min(i,r+100663296);var a=Math.min(t,n(Math.max(r,i),65536)),s=ae(a);if(s)return!0}return!1}var ue={};function ce(){return p||"./this.program"}function fe(){if(!fe.strings){var r=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ce()};for(var t in ue)void 0===ue[t]?delete e[t]:e[t]=ue[t];var n=[];for(var t in e)n.push(t+"="+e[t]);fe.strings=n}return fe.strings}function le(r,e){var t=0;return fe().forEach((function(n,o){var i=e+t;z[r+4*o>>2]=i,V(n,i),t+=n.length+1})),0}function de(r,e){var t=fe();z[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),z[e>>2]=n,0}function me(r){Ye(r)}function he(r){try{var e=Wr.getStreamFromFD(r);return Hr.close(e),0}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return t.errno}}function pe(r,e){try{var t=Wr.getStreamFromFD(r),n=t.tty?2:Hr.isDir(t.mode)?3:Hr.isLink(t.mode)?7:4;return I[e>>0]=n,0}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return o.errno}}function Ee(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=z[e>>2],s=z[e+4>>2];e+=8;var u=Hr.read(r,I,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function we(r,e,t,n){try{var o=Wr.getStreamFromFD(r),i=Ee(o,e,t);return x[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ve(r,e){return e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN}function ye(r,e,t,n,o){try{var i=ve(e,t);if(isNaN(i))return 61;var a=Wr.getStreamFromFD(r);return Hr.llseek(a,i,n),yr=[a.position>>>0,(vr=a.position,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[o>>2]=yr[0],x[o+4>>2]=yr[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return s.errno}}function ge(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=z[e>>2],s=z[e+4>>2];e+=8;var u=Hr.write(r,I,a,s,n);if(u<0)return-1;o+=u}return o}function _e(r,e,t,n){try{var o=Wr.getStreamFromFD(r),i=ge(o,e,t);return z[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ke(r){return r%4===0&&(r%100!==0||r%400===0)}function Se(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}var be=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31];function Ne(r,e){var t=new Date(r.getTime());while(e>0){var n=ke(t.getFullYear()),o=t.getMonth(),i=(n?be:De)[o];if(!(e>i-t.getDate()))return t.setDate(t.getDate()+e),t;e-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function Fe(r,e,t,n){var o=x[n+40>>2],i={tm_sec:x[n>>2],tm_min:x[n+4>>2],tm_hour:x[n+8>>2],tm_mday:x[n+12>>2],tm_mon:x[n+16>>2],tm_year:x[n+20>>2],tm_wday:x[n+24>>2],tm_yday:x[n+28>>2],tm_isdst:x[n+32>>2],tm_gmtoff:x[n+36>>2],tm_zone:o?H(o):""},a=H(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,e,t){var n="number"==typeof r?r.toString():r||"";while(n.length<e)n=t[0]+n;return n}function d(r,e){return l(r,e,"0")}function m(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function h(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var e=Ne(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=h(t),i=h(n);return m(o,e)<=0?m(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var E={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){var e=r.tm_year+1900;return d(e/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),d(e,2)},"%j":function(r){return d(r.tm_mday+Se(ke(r.tm_year+1900)?be:De,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return d(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&ke(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ke(r.tm_year%400-1))&&e++}return d(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),E)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),E[u](i)));a=a.replace(/\0\0/g,"%");var w=Te(a,!1);return w.length>e?0:(X(w,r),w.length-1)}function Oe(r,e,t,n){return Fe(r,e,t,n)}var Ae=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Hr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Pe=365,Me=146;function Te(r,e,t){var n=t>0?t:q(r)+1,o=new Array(n),i=W(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Ae.prototype,{read:{get:function(){return(this.mode&Pe)===Pe},set:function(r){r?this.mode|=Pe:this.mode&=~Pe}},write:{get:function(){return(this.mode&Me)===Me},set:function(r){r?this.mode|=Me:this.mode&=~Me}},isFolder:{get:function(){return Hr.isDir(this.mode)}},isDevice:{get:function(){return Hr.isChrdev(this.mode)}}}),Hr.FSNode=Ae,Hr.staticInit(),o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_unlink"]=Hr.unlink,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,y&&(d(),Ur.staticInit()),jr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Re,Ce={a:Pr,b:Tr,k:Yr,e:Gr,x:Kr,i:Xr,s:Vr,q:Qr,r:Jr,j:Zr,p:$r,t:re,o:ee,n:te,c:ne,y:oe,d:se,v:le,w:de,z:me,f:he,u:pe,h:we,l:ye,g:_e,m:Oe},Ie=(Dr(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["B"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["C"]).apply(null,arguments)},o["_malloc"]=function(){return(Ie=o["_malloc"]=o["asm"]["D"]).apply(null,arguments)}),Le=(o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["E"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["F"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["G"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["H"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["I"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["J"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["K"]).apply(null,arguments)},o["___errno_location"]=function(){return(Le=o["___errno_location"]=o["asm"]["L"]).apply(null,arguments)}),Be=o["stackSave"]=function(){return(Be=o["stackSave"]=o["asm"]["N"]).apply(null,arguments)},xe=o["stackRestore"]=function(){return(xe=o["stackRestore"]=o["asm"]["O"]).apply(null,arguments)},ze=o["stackAlloc"]=function(){return(ze=o["stackAlloc"]=o["asm"]["P"]).apply(null,arguments)},je=o["___cxa_is_pointer_type"]=function(){return(je=o["___cxa_is_pointer_type"]=o["asm"]["Q"]).apply(null,arguments)};function Ue(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}o["ccall"]=T,o["cwrap"]=R,o["addRunDependency"]=hr,o["removeRunDependency"]=pr,o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,o["FS_unlink"]=Hr.unlink,o["callMain"]=He,o["AsciiToString"]=G,o["writeArrayToMemory"]=X,o["writeAsciiToMemory"]=V;function He(r){var e=o["_main"];r=r||[],r.unshift(p);var t=r.length,n=ze(4*(t+1)),i=n>>2;r.forEach((r=>{x[i++]=K(r)})),x[i]=0;try{var a=e(t,n);return Ye(a,!0),a}catch(s){return Ar(s)}finally{!0}}function We(r){function e(){Re||(Re=!0,o["calledRun"]=!0,A||(or(),ir(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Ge&&He(r),ar()))}r=r||h,fr>0||(nr(),fr>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),e()}),1)):e()))}function Ye(r,e){O=r,qe(r)}function qe(r){O=r,tr()||(o["onExit"]&&o["onExit"](r),A=!0),E(r,new Ue(r))}if(dr=function r(){Re||We(),Re||(dr=r)},o["run"]=We,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Ge=!1;return o["noInitialRun"]&&(Ge=!1),We(),o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},e.ready}})();"object"===typeof exports&&"object"===typeof module?module.exports=VTKImageIOWriteImage:"function"===typeof define&&define["amd"]?define([],(function(){return VTKImageIOWriteImage})):"object"===typeof exports&&(exports["VTKImageIOWriteImage"]=VTKImageIOWriteImage);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var dicom=(()=>{var e="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(e=e||__filename),function(r){r=r||{};var t,n,o="undefined"!=typeof r?r:{};o["ready"]=new Promise((function(e,r){t=e,n=r}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(e){console.log(e),i+=e+"\n"},o["printErr"]=function(e){console.error(e),a+=e+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,l,c,d,f,p=Object.assign({},o),m=[],h="./this.program",_=(e,r)=>{throw r},y="object"==typeof window,w="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,E="";function g(e){return o["locateFile"]?o["locateFile"](e,E):E+e}function k(e){if(e instanceof Rt)return;let r=e;b("exiting due to exception: "+r)}v?(E=w?require("path").dirname(E)+"/":__dirname+"/",f=()=>{d||(c=require("fs"),d=require("path"))},s=function(e,r){return f(),e=d["normalize"](e),c.readFileSync(e,r?void 0:"utf8")},l=e=>{var r=s(e,!0);return r.buffer||(r=new Uint8Array(r)),r},u=(e,r,t)=>{f(),e=d["normalize"](e),c.readFile(e,(function(e,n){e?t(e):r(n.buffer)}))},process["argv"].length>1&&(h=process["argv"][1].replace(/\\/g,"/")),m=process["argv"].slice(2),process["on"]("uncaughtException",(function(e){if(!(e instanceof Rt))throw e})),process["on"]("unhandledRejection",(function(e){throw e})),_=(e,r)=>{if(ae())throw process["exitCode"]=e,r;k(r),process["exit"](e)},o["inspect"]=function(){return"[Emscripten Module object]"}):(y||w)&&(w?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},w&&(l=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),u=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var j=o["print"]||console.log.bind(console),b=o["printErr"]||console.warn.bind(console);Object.assign(o,p),p=null,o["arguments"]&&(m=o["arguments"]),o["thisProgram"]&&(h=o["thisProgram"]),o["quit"]&&(_=o["quit"]);var C,S=0,D=e=>{S=e},N=()=>S;o["wasmBinary"]&&(C=o["wasmBinary"]);var O,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Ee("no native wasm support detected");var P,A=!1;function T(e,r){e||Ee(r)}function M(e){var r=o["_"+e];return r}function R(e,r,t,n,o){var i={string:function(e){var r=0;if(null!==e&&void 0!==e&&0!==e){var t=1+(e.length<<2);r=ht(t),U(e,r,t)}return r},array:function(e){var r=ht(e.length);return J(e,r),r}};function a(e){return"string"===r?I(e):"boolean"===r?Boolean(e):e}var s=M(e),u=[],l=0;if(n)for(var c=0;c<n.length;c++){var d=i[t[c]];d?(0===l&&(l=pt()),u[c]=d(n[c])):u[c]=n[c]}var f=s.apply(null,u);function p(e){return 0!==l&&mt(l),a(e)}return f=p(f),f}function L(e,r,t,n){t=t||[];var o=t.every((function(e){return"number"===e})),i="string"!==r;return i&&o&&!n?M(e):function(){return R(e,r,t,arguments,n)}}var x="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(e,r,t){var n=r+t,o=r;while(e[o]&&!(o>=n))++o;if(o-r>16&&e.buffer&&x)return x.decode(e.subarray(r,o));var i="";while(r<o){var a=e[r++];if(128&a){var s=63&e[r++];if(192!=(224&a)){var u=63&e[r++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[r++],a<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function I(e,r){return e?z(G,e,r):""}function B(e,r,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343){var u=e.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;r[t++]=s}else if(s<=2047){if(t+1>=i)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=i)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function U(e,r,t){return B(e,G,r,t)}function H(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}function W(e){var r="";while(1){var t=G[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}}var Y,q,G,X,V,K;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function Q(e){var r=H(e)+1,t=lt(r);return t&&B(e,q,t,r),t}function $(e){var r=H(e)+1,t=ht(r);return B(e,q,t,r),t}function J(e,r){q.set(e,r)}function Z(e,r,t){for(var n=0;n<e.length;++n)q[r++>>0]=e.charCodeAt(n);t||(q[r>>0]=0)}function ee(e){Y=e,o["HEAP8"]=q=new Int8Array(e),o["HEAP16"]=X=new Int16Array(e),o["HEAP32"]=V=new Int32Array(e),o["HEAPU8"]=G=new Uint8Array(e),o["HEAPU16"]=new Uint16Array(e),o["HEAPU32"]=K=new Uint32Array(e),o["HEAPF32"]=new Float32Array(e),o["HEAPF64"]=new Float64Array(e)}o["INITIAL_MEMORY"];var re,te=[],ne=[],oe=[],ie=[];function ae(){return F}function se(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)de(o["preRun"].shift())}Fe(te)}function ue(){!0,o["noFSInit"]||Ve.init.initialized||Ve.init(),Ve.ignorePermissions=!1,Be.init(),dr.root=Ve.mount(dr,{},null),Fe(ne)}function le(){Fe(oe)}function ce(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)pe(o["postRun"].shift())}Fe(ie)}function de(e){te.unshift(e)}function fe(e){ne.unshift(e)}function pe(e){ie.unshift(e)}var me=0,he=null,_e=null;function ye(e){return e}function we(e){me++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](me)}function ve(e){if(me--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](me),0==me&&(null!==he&&(clearInterval(he),he=null),_e)){var r=_e;_e=null,r()}}function Ee(e){o["onAbort"]&&o["onAbort"](e),e="Aborted("+e+")",b(e),A=!0,P=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var ge,ke,je,be="data:application/octet-stream;base64,";function Ce(e){return e.startsWith(be)}function Se(e){return e.startsWith("file://")}function De(e){try{if(e==ge&&C)return new Uint8Array(C);if(l)return l(e);throw"both async and sync fetching of the wasm failed"}catch(b){Ee(b)}}function Ne(){if(!C&&(y||w)){if("function"==typeof fetch&&!Se(ge))return fetch(ge,{credentials:"same-origin"}).then((function(e){if(!e["ok"])throw"failed to load wasm binary file at '"+ge+"'";return e["arrayBuffer"]()})).catch((function(){return De(ge)}));if(u)return new Promise((function(e,r){u(ge,(function(r){e(new Uint8Array(r))}),r)}))}return Promise.resolve().then((function(){return De(ge)}))}function Oe(){var e={env:ut,wasi_snapshot_preview1:ut};function r(e,r){var t=e.exports;o["asm"]=t,O=o["asm"]["memory"],ee(O.buffer),re=o["asm"]["__indirect_function_table"],fe(o["asm"]["__wasm_call_ctors"]),ve("wasm-instantiate")}function t(e){r(e["instance"])}function i(r){return Ne().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){b("failed to asynchronously prepare wasm: "+e),Ee(e)}))}function a(){return C||"function"!=typeof WebAssembly.instantiateStreaming||Ce(ge)||Se(ge)||v||"function"!=typeof fetch?i(t):fetch(ge,{credentials:"same-origin"}).then((function(r){var n=WebAssembly.instantiateStreaming(r,e);return n.then(t,(function(e){return b("wasm streaming compile failed: "+e),b("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(we("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](e,r);return s}catch(u){return b("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Fe(e){while(e.length>0){var r=e.shift();if("function"!=typeof r){var t=r.func;"number"==typeof t?void 0===r.arg?Ae(t)():Ae(t)(r.arg):t(void 0===r.arg?null:r.arg)}else r(o)}}ge="dicom.wasm",Ce(ge)||(ge=g(ge));var Pe=[];function Ae(e){var r=Pe[e];return r||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=r=re.get(e)),r}function Te(e){if(e instanceof Rt||"unwind"==e)return P;_(1,e)}function Me(e){return lt(e+24)+24}function Re(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){K[this.ptr+4>>2]=e},this.get_type=function(){return K[this.ptr+4>>2]},this.set_destructor=function(e){K[this.ptr+8>>2]=e},this.get_destructor=function(){return K[this.ptr+8>>2]},this.set_refcount=function(e){V[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,q[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=q[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,q[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=q[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=V[this.ptr>>2];V[this.ptr>>2]=e+1},this.release_ref=function(){var e=V[this.ptr>>2];return V[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){K[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return K[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=_t(this.get_type());if(e)return K[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function Le(e,r,t){var n=new Re(e);throw n.init(r,t),e,e}var xe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>{var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(e).slice(1)},normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=xe.isAbs(e),t="/"===e.substr(-1);return e=xe.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"),e||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=xe.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";e=xe.normalize(e),e=e.replace(/\/$/,"");var r=e.lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return xe.normalize(e.join("/"))},join2:(e,r)=>xe.normalize(e+"/"+r)};function ze(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(v)try{var r=require("crypto");return function(){return r["randomBytes"](1)[0]}}catch(t){}return function(){Ee("randomDevice")}}var Ie={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Ve.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=xe.isAbs(n)}return e=xe.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length;r++)if(""!==e[r])break;for(var t=e.length-1;t>=0;t--)if(""!==e[t])break;return r>t?[]:e.slice(r,t-r+1)}e=Ie.resolve(e).substr(1),r=Ie.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Be={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){Be.ttys[e]={input:[],output:[],ops:r},Ve.registerDevice(e,Be.stream_ops)},stream_ops:{open:function(e){var r=Be.ttys[e.node.rdev];if(!r)throw new Ve.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ve.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new Ve.ErrnoError(29)}if(void 0===s&&0===i)throw new Ve.ErrnoError(6);if(null===s||void 0===s)break;i++,r[t+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ve.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,r[t+i])}catch(a){throw new Ve.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if(v){var t=256,n=Buffer.alloc(t),o=0;try{o=c.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}r=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(r=window.prompt("Input: "),null!==r&&(r+="\n")):"function"==typeof readline&&(r=readline(),null!==r&&(r+="\n"));if(!r)return null;e.input=at(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(j(z(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(j(z(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(b(z(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(b(z(e.output,0)),e.output=[])}}};function Ue(e,r){G.fill(0,e,e+r)}function He(e,r){return Math.ceil(e/r)*r}function We(e){e=He(e,65536);var r=dt(65536,e);return r?(Ue(r,e),r):0}var Ye={ops_table:null,mount:function(e){return Ye.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(Ve.isBlkdev(t)||Ve.isFIFO(t))throw new Ve.ErrnoError(63);Ye.ops_table||(Ye.ops_table={dir:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,lookup:Ye.node_ops.lookup,mknod:Ye.node_ops.mknod,rename:Ye.node_ops.rename,unlink:Ye.node_ops.unlink,rmdir:Ye.node_ops.rmdir,readdir:Ye.node_ops.readdir,symlink:Ye.node_ops.symlink},stream:{llseek:Ye.stream_ops.llseek}},file:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:{llseek:Ye.stream_ops.llseek,read:Ye.stream_ops.read,write:Ye.stream_ops.write,allocate:Ye.stream_ops.allocate,mmap:Ye.stream_ops.mmap,msync:Ye.stream_ops.msync}},link:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,readlink:Ye.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:Ve.chrdev_stream_ops}});var o=Ve.createNode(e,r,t,n);return Ve.isDir(o.mode)?(o.node_ops=Ye.ops_table.dir.node,o.stream_ops=Ye.ops_table.dir.stream,o.contents={}):Ve.isFile(o.mode)?(o.node_ops=Ye.ops_table.file.node,o.stream_ops=Ye.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ve.isLink(o.mode)?(o.node_ops=Ye.ops_table.link.node,o.stream_ops=Ye.ops_table.link.stream):Ve.isChrdev(o.mode)&&(o.node_ops=Ye.ops_table.chrdev.node,o.stream_ops=Ye.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=Ve.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ve.isDir(e.mode)?r.size=4096:Ve.isFile(e.mode)?r.size=e.usedBytes:Ve.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Ye.resizeFileStorage(e,r.size)},lookup:function(e,r){throw Ve.genericErrors[44]},mknod:function(e,r,t,n){return Ye.createNode(e,r,t,n)},rename:function(e,r,t){if(Ve.isDir(e.mode)){var n;try{n=Ve.lookupNode(r,t)}catch(i){}if(n)for(var o in n.contents)throw new Ve.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=Ve.lookupNode(e,r);for(var n in t.contents)throw new Ve.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=Ye.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!Ve.isLink(e.mode))throw new Ve.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)r.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)r[t+s]=i[o+s];return a},write:function(e,r,t,n,o,i){if(r.buffer===q.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=r.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=r.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(t,t+n),o),n}if(Ye.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=r[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Ve.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ve.ErrnoError(28);return n},allocate:function(e,r,t){Ye.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==Y){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),a=!0,i=We(r),!i)throw new Ve.ErrnoError(48);q.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(e,r,t,n,o){if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);if(2&o)return 0;Ye.stream_ops.write(e,r,0,n,t,!1);return 0}}};function qe(e,r,t,n){var o=n?"":ye("al "+e);u(e,(function(t){T(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&ve(o)}),(function(r){if(!t)throw'Loading data file "'+e+'" failed.';t()})),o&&we(o)}var Ge={},Xe={isWindows:!1,staticInit:()=>{Xe.isWindows=!!process.platform.match(/^win/);var e=process["binding"]("constants");e["fs"]&&(e=e["fs"]),Xe.flagsForNodeMap={1024:e["O_APPEND"],64:e["O_CREAT"],128:e["O_EXCL"],256:e["O_NOCTTY"],0:e["O_RDONLY"],2:e["O_RDWR"],4096:e["O_SYNC"],512:e["O_TRUNC"],1:e["O_WRONLY"],131072:e["O_NOFOLLOW"]}},convertNodeCode:e=>{var r=e.code;return Ge[r]},mount:e=>Xe.createNode(null,"/",Xe.getMode(e.opts.root),0),createNode:(e,r,t,n)=>{if(!Ve.isDir(t)&&!Ve.isFile(t)&&!Ve.isLink(t))throw new Ve.ErrnoError(28);var o=Ve.createNode(e,r,t);return o.node_ops=Xe.node_ops,o.stream_ops=Xe.stream_ops,o},getMode:e=>{var r;try{r=c.lstatSync(e),Xe.isWindows&&(r.mode=r.mode|(292&r.mode)>>2)}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}return r.mode},realPath:e=>{var r=[];while(e.parent!==e)r.push(e.name),e=e.parent;return r.push(e.mount.opts.root),r.reverse(),xe.join.apply(null,r)},flagsForNode:e=>{e&=-2097153,e&=-2049,e&=-32769,e&=-524289,e&=-65537;var r=0;for(var t in Xe.flagsForNodeMap)e&t&&(r|=Xe.flagsForNodeMap[t],e^=t);if(e)throw new Ve.ErrnoError(28);return r},node_ops:{getattr:e=>{var r,t=Xe.realPath(e);try{r=c.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}return Xe.isWindows&&!r.blksize&&(r.blksize=4096),Xe.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:(e,r)=>{var t=Xe.realPath(e);try{if(void 0!==r.mode&&(c.chmodSync(t,r.mode),e.mode=r.mode),void 0!==r.timestamp){var n=new Date(r.timestamp);c.utimesSync(t,n,n)}void 0!==r.size&&c.truncateSync(t,r.size)}catch(o){if(!o.code)throw o;throw new Ve.ErrnoError(Xe.convertNodeCode(o))}},lookup:(e,r)=>{var t=xe.join2(Xe.realPath(e),r),n=Xe.getMode(t);return Xe.createNode(e,r,n)},mknod:(e,r,t,n)=>{var o=Xe.createNode(e,r,t,n),i=Xe.realPath(o);try{Ve.isDir(o.mode)?c.mkdirSync(i,o.mode):c.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Ve.ErrnoError(Xe.convertNodeCode(a))}return o},rename:(e,r,t)=>{var n=Xe.realPath(e),o=xe.join2(Xe.realPath(r),t);try{c.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Ve.ErrnoError(Xe.convertNodeCode(i))}e.name=t},unlink:(e,r)=>{var t=xe.join2(Xe.realPath(e),r);try{c.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}},rmdir:(e,r)=>{var t=xe.join2(Xe.realPath(e),r);try{c.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}},readdir:e=>{var r=Xe.realPath(e);try{return c.readdirSync(r)}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}},symlink:(e,r,t)=>{var n=xe.join2(Xe.realPath(e),r);try{c.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Ve.ErrnoError(Xe.convertNodeCode(o))}},readlink:e=>{var r=Xe.realPath(e);try{return r=c.readlinkSync(r),r=d.relative(d.resolve(e.mount.opts.root),r),r}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Ve.ErrnoError(28);throw new Ve.ErrnoError(Xe.convertNodeCode(t))}}},stream_ops:{open:e=>{var r=Xe.realPath(e.node);try{Ve.isFile(e.node.mode)&&(e.nfd=c.openSync(r,Xe.flagsForNode(e.flags)))}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}},close:e=>{try{Ve.isFile(e.node.mode)&&e.nfd&&c.closeSync(e.nfd)}catch(r){if(!r.code)throw r;throw new Ve.ErrnoError(Xe.convertNodeCode(r))}},read:(e,r,t,n,o)=>{if(0===n)return 0;try{return c.readSync(e.nfd,Buffer.from(r.buffer),t,n,o)}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}},write:(e,r,t,n,o)=>{try{return c.writeSync(e.nfd,Buffer.from(r.buffer),t,n,o)}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}},llseek:(e,r,t)=>{var n=r;if(1===t)n+=e.position;else if(2===t&&Ve.isFile(e.node.mode))try{var o=c.fstatSync(e.nfd);n+=o.size}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}if(n<0)throw new Ve.ErrnoError(28);return n},mmap:(e,r,t,n,o)=>{if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);var i=We(r);return Xe.stream_ops.read(e,q,i,r,t),{ptr:i,allocated:!0}},msync:(e,r,t,n,o)=>{if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);if(2&o)return 0;Xe.stream_ops.write(e,r,0,n,t,!1);return 0}}},Ve={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(e=Ie.resolve(Ve.cwd(),e),!e)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(r=Object.assign(t,r),r.recurse_count>8)throw new Ve.ErrnoError(32);for(var n=xe.normalizeArray(e.split("/").filter((e=>!!e)),!1),o=Ve.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&r.parent)break;if(o=Ve.lookupNode(o,n[a]),i=xe.join2(i,n[a]),Ve.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow){var u=0;while(Ve.isLink(o.mode)){var l=Ve.readlink(i);i=Ie.resolve(xe.dirname(i),l);var c=Ve.lookupPath(i,{recurse_count:r.recurse_count+1});if(o=c.node,u++>40)throw new Ve.ErrnoError(32)}}}return{path:i,node:o}},getPath:e=>{var r;while(1){if(Ve.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Ve.nameTable.length},hashAddNode:e=>{var r=Ve.hashName(e.parent.id,e.name);e.name_next=Ve.nameTable[r],Ve.nameTable[r]=e},hashRemoveNode:e=>{var r=Ve.hashName(e.parent.id,e.name);if(Ve.nameTable[r]===e)Ve.nameTable[r]=e.name_next;else{var t=Ve.nameTable[r];while(t){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}}},lookupNode:(e,r)=>{var t=Ve.mayLookup(e);if(t)throw new Ve.ErrnoError(t,e);for(var n=Ve.hashName(e.id,r),o=Ve.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===r)return o}return Ve.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new Ve.FSNode(e,r,t,n);return Ve.hashAddNode(o),o},destroyNode:e=>{Ve.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),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=Ve.flagModes[e];if("undefined"==typeof r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ve.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=Ve.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{Ve.lookupNode(e,r);return 20}catch(t){}return Ve.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=Ve.lookupNode(e,r)}catch(i){return i.errno}var o=Ve.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ve.isDir(n.mode))return 54;if(Ve.isRoot(n)||Ve.getPath(n)===Ve.cwd())return 10}else if(Ve.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ve.isLink(e.mode)?32:Ve.isDir(e.mode)&&("r"!==Ve.flagsToPermissionString(r)||512&r)?31:Ve.nodePermissions(e,Ve.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=Ve.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!Ve.streams[t])return t;throw new Ve.ErrnoError(33)},getStream:e=>Ve.streams[e],createStream:(e,r,t)=>{Ve.FSStream||(Ve.FSStream=function(){this.shared={}},Ve.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new Ve.FSStream,e);var n=Ve.nextfd(r,t);return e.fd=n,Ve.streams[n]=e,e},closeStream:e=>{Ve.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=Ve.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Ve.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{Ve.devices[e]={stream_ops:r}},getDevice:e=>Ve.devices[e],getMounts:e=>{var r=[],t=[e];while(t.length){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),Ve.syncFSRequests++,Ve.syncFSRequests>1&&b("warning: "+Ve.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Ve.getMounts(Ve.root.mount),n=0;function o(e){return Ve.syncFSRequests--,r(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return i(null);r.type.syncfs(r,e,i)}))},mount:(e,r,t)=>{var n,o="/"===t,i=!t;if(o&&Ve.root)throw new Ve.ErrnoError(10);if(!o&&!i){var a=Ve.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Ve.isMountpoint(n))throw new Ve.ErrnoError(10);if(!Ve.isDir(n.mode))throw new Ve.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Ve.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=Ve.lookupPath(e,{follow_mount:!1});if(!Ve.isMountpoint(r.node))throw new Ve.ErrnoError(28);var t=r.node,n=t.mounted,o=Ve.getMounts(n);Object.keys(Ve.nameTable).forEach((e=>{var r=Ve.nameTable[e];while(r){var t=r.name_next;o.includes(r.mount)&&Ve.destroyNode(r),r=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=Ve.lookupPath(e,{parent:!0}),o=n.node,i=xe.basename(e);if(!i||"."===i||".."===i)throw new Ve.ErrnoError(28);var a=Ve.mayCreate(o,i);if(a)throw new Ve.ErrnoError(a);if(!o.node_ops.mknod)throw new Ve.ErrnoError(63);return o.node_ops.mknod(o,i,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ve.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ve.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Ve.mkdir(n,r)}catch(i){if(20!=i.errno)throw i}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,Ve.mknod(e,r,t)),symlink:(e,r)=>{if(!Ie.resolve(e))throw new Ve.ErrnoError(44);var t=Ve.lookupPath(r,{parent:!0}),n=t.node;if(!n)throw new Ve.ErrnoError(44);var o=xe.basename(r),i=Ve.mayCreate(n,o);if(i)throw new Ve.ErrnoError(i);if(!n.node_ops.symlink)throw new Ve.ErrnoError(63);return n.node_ops.symlink(n,o,e)},rename:(e,r)=>{var t,n,o,i=xe.dirname(e),a=xe.dirname(r),s=xe.basename(e),u=xe.basename(r);if(t=Ve.lookupPath(e,{parent:!0}),n=t.node,t=Ve.lookupPath(r,{parent:!0}),o=t.node,!n||!o)throw new Ve.ErrnoError(44);if(n.mount!==o.mount)throw new Ve.ErrnoError(75);var l,c=Ve.lookupNode(n,s),d=Ie.relative(e,a);if("."!==d.charAt(0))throw new Ve.ErrnoError(28);if(d=Ie.relative(r,i),"."!==d.charAt(0))throw new Ve.ErrnoError(55);try{l=Ve.lookupNode(o,u)}catch(m){}if(c!==l){var f=Ve.isDir(c.mode),p=Ve.mayDelete(n,s,f);if(p)throw new Ve.ErrnoError(p);if(p=l?Ve.mayDelete(o,u,f):Ve.mayCreate(o,u),p)throw new Ve.ErrnoError(p);if(!n.node_ops.rename)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(c)||l&&Ve.isMountpoint(l))throw new Ve.ErrnoError(10);if(o!==n&&(p=Ve.nodePermissions(n,"w"),p))throw new Ve.ErrnoError(p);Ve.hashRemoveNode(c);try{n.node_ops.rename(c,o,u)}catch(m){throw m}finally{Ve.hashAddNode(c)}}},rmdir:e=>{var r=Ve.lookupPath(e,{parent:!0}),t=r.node,n=xe.basename(e),o=Ve.lookupNode(t,n),i=Ve.mayDelete(t,n,!0);if(i)throw new Ve.ErrnoError(i);if(!t.node_ops.rmdir)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(o))throw new Ve.ErrnoError(10);t.node_ops.rmdir(t,n),Ve.destroyNode(o)},readdir:e=>{var r=Ve.lookupPath(e,{follow:!0}),t=r.node;if(!t.node_ops.readdir)throw new Ve.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var r=Ve.lookupPath(e,{parent:!0}),t=r.node;if(!t)throw new Ve.ErrnoError(44);var n=xe.basename(e),o=Ve.lookupNode(t,n),i=Ve.mayDelete(t,n,!1);if(i)throw new Ve.ErrnoError(i);if(!t.node_ops.unlink)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(o))throw new Ve.ErrnoError(10);t.node_ops.unlink(t,n),Ve.destroyNode(o)},readlink:e=>{var r=Ve.lookupPath(e),t=r.node;if(!t)throw new Ve.ErrnoError(44);if(!t.node_ops.readlink)throw new Ve.ErrnoError(28);return Ie.resolve(Ve.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,r)=>{var t=Ve.lookupPath(e,{follow:!r}),n=t.node;if(!n)throw new Ve.ErrnoError(44);if(!n.node_ops.getattr)throw new Ve.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>Ve.stat(e,!0),chmod:(e,r,t)=>{var n;if("string"==typeof e){var o=Ve.lookupPath(e,{follow:!t});n=o.node}else n=e;if(!n.node_ops.setattr)throw new Ve.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{Ve.chmod(e,r,!0)},fchmod:(e,r)=>{var t=Ve.getStream(e);if(!t)throw new Ve.ErrnoError(8);Ve.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if("string"==typeof e){var i=Ve.lookupPath(e,{follow:!n});o=i.node}else o=e;if(!o.node_ops.setattr)throw new Ve.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{Ve.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=Ve.getStream(e);if(!n)throw new Ve.ErrnoError(8);Ve.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new Ve.ErrnoError(28);var t;if("string"==typeof e){var n=Ve.lookupPath(e,{follow:!0});t=n.node}else t=e;if(!t.node_ops.setattr)throw new Ve.ErrnoError(63);if(Ve.isDir(t.mode))throw new Ve.ErrnoError(31);if(!Ve.isFile(t.mode))throw new Ve.ErrnoError(28);var o=Ve.nodePermissions(t,"w");if(o)throw new Ve.ErrnoError(o);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=Ve.getStream(e);if(!t)throw new Ve.ErrnoError(8);if(0===(2097155&t.flags))throw new Ve.ErrnoError(28);Ve.truncate(t.node,r)},utime:(e,r,t)=>{var n=Ve.lookupPath(e,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new Ve.ErrnoError(44);var n;if(r="string"==typeof r?Ve.modeStringToFlags(r):r,t="undefined"==typeof t?438:t,t=64&r?4095&t|32768:0,"object"==typeof e)n=e;else{e=xe.normalize(e);try{var i=Ve.lookupPath(e,{follow:!(131072&r)});n=i.node}catch(l){}}var a=!1;if(64&r)if(n){if(128&r)throw new Ve.ErrnoError(20)}else n=Ve.mknod(e,t,0),a=!0;if(!n)throw new Ve.ErrnoError(44);if(Ve.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ve.isDir(n.mode))throw new Ve.ErrnoError(54);if(!a){var s=Ve.mayOpen(n,r);if(s)throw new Ve.ErrnoError(s)}512&r&&!a&&Ve.truncate(n,0),r&=-131713;var u=Ve.createStream({node:n,path:Ve.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&r||(Ve.readFiles||(Ve.readFiles={}),e in Ve.readFiles||(Ve.readFiles[e]=1)),u},close:e=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{Ve.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ve.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ve.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(1===(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.read)throw new Ve.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new Ve.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,r,t,n,o);return i||(e.position+=a),a},write:(e,r,t,n,o,i)=>{if(n<0||o<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(0===(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.write)throw new Ve.ErrnoError(28);e.seekable&&1024&e.flags&&Ve.llseek(e,0,2);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new Ve.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,i);return a||(e.position+=s),s},allocate:(e,r,t)=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(r<0||t<=0)throw new Ve.ErrnoError(28);if(0===(2097155&e.flags))throw new Ve.ErrnoError(8);if(!Ve.isFile(e.node.mode)&&!Ve.isDir(e.node.mode))throw new Ve.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ve.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&e.flags))throw new Ve.ErrnoError(2);if(1===(2097155&e.flags))throw new Ve.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ve.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new Ve.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=Ve.open(e,r.flags),o=Ve.stat(e),i=o.size,a=new Uint8Array(i);return Ve.read(n,a,0,i,0),"utf8"===r.encoding?t=z(a,0):"binary"===r.encoding&&(t=a),Ve.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=Ve.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(H(r)+1),i=B(r,o,0,o.length);Ve.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ve.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ve.close(n)},cwd:()=>Ve.currentPath,chdir:e=>{var r=Ve.lookupPath(e,{follow:!0});if(null===r.node)throw new Ve.ErrnoError(44);if(!Ve.isDir(r.node.mode))throw new Ve.ErrnoError(54);var t=Ve.nodePermissions(r.node,"x");if(t)throw new Ve.ErrnoError(t);Ve.currentPath=r.path},createDefaultDirectories:()=>{Ve.mkdir("/tmp"),Ve.mkdir("/home"),Ve.mkdir("/home/web_user")},createDefaultDevices:()=>{Ve.mkdir("/dev"),Ve.registerDevice(Ve.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ve.mkdev("/dev/null",Ve.makedev(1,3)),Be.register(Ve.makedev(5,0),Be.default_tty_ops),Be.register(Ve.makedev(6,0),Be.default_tty1_ops),Ve.mkdev("/dev/tty",Ve.makedev(5,0)),Ve.mkdev("/dev/tty1",Ve.makedev(6,0));var e=ze();Ve.createDevice("/dev","random",e),Ve.createDevice("/dev","urandom",e),Ve.mkdir("/dev/shm"),Ve.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Ve.mkdir("/proc");var e=Ve.mkdir("/proc/self");Ve.mkdir("/proc/self/fd"),Ve.mount({mount:()=>{var r=Ve.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=Ve.getStream(t);if(!n)throw new Ve.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Ve.createDevice("/dev","stdin",o["stdin"]):Ve.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Ve.createDevice("/dev","stdout",null,o["stdout"]):Ve.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Ve.createDevice("/dev","stderr",null,o["stderr"]):Ve.symlink("/dev/tty1","/dev/stderr");Ve.open("/dev/stdin",0),Ve.open("/dev/stdout",1),Ve.open("/dev/stderr",1)},ensureErrnoError:()=>{Ve.ErrnoError||(Ve.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ve.ErrnoError.prototype=new Error,Ve.ErrnoError.prototype.constructor=Ve.ErrnoError,[44].forEach((e=>{Ve.genericErrors[e]=new Ve.ErrnoError(e),Ve.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Ve.ensureErrnoError(),Ve.nameTable=new Array(4096),Ve.mount(Ye,{},"/"),Ve.createDefaultDirectories(),Ve.createDefaultDevices(),Ve.createSpecialDirectories(),Ve.filesystems={MEMFS:Ye,NODEFS:Xe}},init:(e,r,t)=>{Ve.init.initialized=!0,Ve.ensureErrnoError(),o["stdin"]=e||o["stdin"],o["stdout"]=r||o["stdout"],o["stderr"]=t||o["stderr"],Ve.createStandardStreams()},quit:()=>{Ve.init.initialized=!1;for(var e=0;e<Ve.streams.length;e++){var r=Ve.streams[e];r&&Ve.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=Ve.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=Ve.lookupPath(e,{follow:!r});e=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Ve.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=xe.basename(e),t=Ve.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:Ve.getPath(e);var o=r.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=xe.join2(e,i);try{Ve.mkdir(a)}catch(s){}e=a}}return a},createFile:(e,r,t,n,o)=>{var i=xe.join2("string"==typeof e?e:Ve.getPath(e),r),a=Ve.getMode(n,o);return Ve.create(i,a)},createDataFile:(e,r,t,n,o,i)=>{var a=r;e&&(e="string"==typeof e?e:Ve.getPath(e),a=r?xe.join2(e,r):e);var s=Ve.getMode(n,o),u=Ve.create(a,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}Ve.chmod(u,146|s);var f=Ve.open(u,577);Ve.write(f,t,0,t.length,0,i),Ve.close(f),Ve.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=xe.join2("string"==typeof e?e:Ve.getPath(e),r),i=Ve.getMode(!!t,!!n);Ve.createDevice.major||(Ve.createDevice.major=64);var a=Ve.makedev(Ve.createDevice.major++,0);return Ve.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(l){throw new Ve.ErrnoError(29)}if(void 0===u&&0===a)throw new Ve.ErrnoError(6);if(null===u||void 0===u)break;a++,r[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:(e,r,t,o,i)=>{for(var a=0;a<o;a++)try{n(r[t+a])}catch(s){throw new Ve.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Ve.mkdev(o,i,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(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=at(s(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new Ve.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):at(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*a,t=(e+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[e]&&(u.chunks[e]=s(r,t)),"undefined"==typeof u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,j("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){if(!w)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;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:t};var u=Ve.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={},c=Object.keys(u.stream_ops);function d(e,r,t,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)r[t+s]=i[o+s];else for(s=0;s<a;s++)r[t+s]=i.get(o+s);return a}return c.forEach((e=>{var r=u.stream_ops[e];l[e]=function(){return Ve.forceLoadFile(u),r.apply(null,arguments)}})),l.read=(e,r,t,n,o)=>(Ve.forceLoadFile(u),d(e,r,t,n,o)),l.mmap=(e,r,t,n,o)=>{Ve.forceLoadFile(u);var i=We(r);if(!i)throw new Ve.ErrnoError(48);return d(e,q,i,r,t),{ptr:i,allocated:!0}},u.stream_ops=l,u},createPreloadedFile:(e,r,t,n,o,i,a,s,u,l)=>{var c=r?Ie.resolve(xe.join2(e,r)):e,d=ye("cp "+c);function f(t){function f(t){l&&l(),s||Ve.createDataFile(e,r,t,n,o,u),i&&i(),ve(d)}Browser.handledByPreloadPlugin(t,c,f,(()=>{a&&a(),ve(d)}))||f(t)}we(d),"string"==typeof t?qe(t,(e=>f(e)),a):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ve.indexedDB();try{var o=n.open(Ve.DB_NAME(),Ve.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{j("creating db");var e=o.result;e.createObjectStore(Ve.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Ve.DB_STORE_NAME],"readwrite"),a=i.objectStore(Ve.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach((e=>{var r=a.put(Ve.analyzePath(e).object.contents,e);r.onsuccess=()=>{s++,s+u==l&&c()},r.onerror=()=>{u++,s+u==l&&c()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ve.indexedDB();try{var o=n.open(Ve.DB_NAME(),Ve.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Ve.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Ve.DB_STORE_NAME),u=0,l=0,c=e.length;function d(){0==l?r():t()}e.forEach((e=>{var r=s.get(e);r.onsuccess=()=>{Ve.analyzePath(e).exists&&Ve.unlink(e),Ve.createDataFile(xe.dirname(e),xe.basename(e),r.result,!0,!0,!0),u++,u+l==c&&d()},r.onerror=()=>{l++,u+l==c&&d()}})),a.onerror=t},o.onerror=t}},Ke={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(xe.isAbs(r))return r;var n;if(-100===e)n=Ve.cwd();else{var o=Ve.getStream(e);if(!o)throw new Ve.ErrnoError(8);n=o.path}if(0==r.length){if(!t)throw new Ve.ErrnoError(44);return n}return xe.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(o){if(o&&o.node&&xe.normalize(r)!==xe.normalize(Ve.getPath(o.node)))return-54;throw o}return V[t>>2]=n.dev,V[t+4>>2]=0,V[t+8>>2]=n.ino,V[t+12>>2]=n.mode,V[t+16>>2]=n.nlink,V[t+20>>2]=n.uid,V[t+24>>2]=n.gid,V[t+28>>2]=n.rdev,V[t+32>>2]=0,je=[n.size>>>0,(ke=n.size,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[t+40>>2]=je[0],V[t+44>>2]=je[1],V[t+48>>2]=4096,V[t+52>>2]=n.blocks,V[t+56>>2]=n.atime.getTime()/1e3|0,V[t+60>>2]=0,V[t+64>>2]=n.mtime.getTime()/1e3|0,V[t+68>>2]=0,V[t+72>>2]=n.ctime.getTime()/1e3|0,V[t+76>>2]=0,je=[n.ino>>>0,(ke=n.ino,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[t+80>>2]=je[0],V[t+84>>2]=je[1],0},doMsync:function(e,r,t,n,o){var i=G.slice(e,e+t);Ve.msync(r,i,o,t,n)},varargs:void 0,get:function(){Ke.varargs+=4;var e=V[Ke.varargs-4>>2];return e},getStr:function(e){var r=I(e);return r},getStreamFromFD:function(e){var r=Ve.getStream(e);if(!r)throw new Ve.ErrnoError(8);return r}};function Qe(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r),-8&t)return-28;var o=Ve.lookupPath(r,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Ve.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function $e(e){return V[ct()>>2]=e,e}function Je(e,r,t){Ke.varargs=t;try{var n=Ke.getStreamFromFD(e);switch(r){case 0:var o,i=Ke.get();return i<0?-28:(o=Ve.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Ke.get();return n.flags|=i,0;case 5:i=Ke.get();var a=0;return X[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return $e(28),-1;default:return-28}}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function Ze(e,r){try{var t=Ke.getStreamFromFD(e);return Ke.doStat(Ve.stat,t.path,r)}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function er(e,r){return r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN}function rr(e,r,t){try{var n=er(r,t);return isNaN(n)?-61:(Ve.ftruncate(e,n),0)}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function tr(e,r){try{if(0===r)return-28;var t=Ve.cwd(),n=H(t)+1;return r<n?-68:(U(t,e,r),n)}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function nr(e,r,t){try{var n=Ke.getStreamFromFD(e);n.getdents||(n.getdents=Ve.readdir(n.path));var o=280,i=0,a=Ve.llseek(n,0,1),s=Math.floor(a/o);while(s<n.getdents.length&&i+o<=t){var u,l,c=n.getdents[s];if("."===c)u=n.node.id,l=4;else if(".."===c){var d=Ve.lookupPath(n.path,{parent:!0});u=d.node.id,l=4}else{var f=Ve.lookupNode(n.node,c);u=f.id,l=Ve.isChrdev(f.mode)?2:Ve.isDir(f.mode)?4:Ve.isLink(f.mode)?10:8}je=[u>>>0,(ke=u,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[r+i>>2]=je[0],V[r+i+4>>2]=je[1],je=[(s+1)*o>>>0,(ke=(s+1)*o,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[r+i+8>>2]=je[0],V[r+i+12>>2]=je[1],X[r+i+16>>1]=280,q[r+i+18>>0]=l,U(c,r+i+19,256),i+=o,s+=1}return Ve.llseek(n,s*o,0),i}catch(p){if("undefined"==typeof Ve||!(p instanceof Ve.ErrnoError))throw p;return-p.errno}}function or(e,r,t){Ke.varargs=t;try{var n=Ke.getStreamFromFD(e);switch(r){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Ke.get();return V[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Ke.get();return Ve.ioctl(n,r,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Ee("bad ioctl syscall "+r)}}catch(i){if("undefined"==typeof Ve||!(i instanceof Ve.ErrnoError))throw i;return-i.errno}}function ir(e,r){try{return e=Ke.getStr(e),Ke.doStat(Ve.lstat,e,r)}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return-t.errno}}function ar(e,r,t){try{return r=Ke.getStr(r),r=Ke.calculateAt(e,r),r=xe.normalize(r),"/"===r[r.length-1]&&(r=r.substr(0,r.length-1)),Ve.mkdir(r,t,0),0}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function sr(e,r,t,n){try{r=Ke.getStr(r);var o=256&n,i=4096&n;return n&=-4353,r=Ke.calculateAt(e,r,i),Ke.doStat(o?Ve.lstat:Ve.stat,r,t)}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return-a.errno}}function ur(e,r,t,n){Ke.varargs=n;try{r=Ke.getStr(r),r=Ke.calculateAt(e,r);var o=n?Ke.get():0;return Ve.open(r,t,o).fd}catch(i){if("undefined"==typeof Ve||!(i instanceof Ve.ErrnoError))throw i;return-i.errno}}function lr(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r),n<=0)return-28;var o=Ve.readlink(r),i=Math.min(n,H(o)),a=q[t+i];return U(o,t,n+1),q[t+i]=a,i}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function cr(e){try{return e=Ke.getStr(e),Ve.rmdir(e),0}catch(r){if("undefined"==typeof Ve||!(r instanceof Ve.ErrnoError))throw r;return-r.errno}}var dr={mount:function(e){return o["websocket"]=o["websocket"]&&"object"===typeof o["websocket"]?o["websocket"]:{},o["websocket"]._callbacks={},o["websocket"]["on"]=function(e,r){return"function"===typeof r&&(this._callbacks[e]=r),this},o["websocket"].emit=function(e,r){"function"===typeof this._callbacks[e]&&this._callbacks[e].call(this,r)},Ve.createNode(null,"/",16895,0)},createSocket:function(e,r,t){r&=-526337;var n=1==r;if(n&&t&&6!=t)throw new Ve.ErrnoError(66);var o={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:dr.websocket_sock_ops},i=dr.nextname(),a=Ve.createNode(dr.root,i,49152,0);a.sock=o;var s=Ve.createStream({path:i,node:a,flags:2,seekable:!1,stream_ops:dr.stream_ops});return o.stream=s,o},getSocket:function(e){var r=Ve.getStream(e);return r&&Ve.isSocket(r.node.mode)?r.node.sock:null},stream_ops:{poll:function(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl:function(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read:function(e,r,t,n,o){var i=e.node.sock,a=i.sock_ops.recvmsg(i,n);return a?(r.set(a.buffer,t),a.buffer.length):0},write:function(e,r,t,n,o){var i=e.node.sock;return i.sock_ops.sendmsg(i,r,t,n)},close:function(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname:function(){return dr.nextname.current||(dr.nextname.current=0),"socket["+dr.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,r,t){var n;if("object"==typeof r&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var i=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!i)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=i[1],t=parseInt(i[2],10)}else try{var a=o["websocket"]&&"object"===typeof o["websocket"],s="ws:#".replace("#","//");if(a&&"string"===typeof o["websocket"]["url"]&&(s=o["websocket"]["url"]),"ws://"===s||"wss://"===s){var u=r.split("/");s=s+u[0]+":"+t+"/"+u.slice(1).join("/")}var l="binary";a&&"string"===typeof o["websocket"]["subprotocol"]&&(l=o["websocket"]["subprotocol"]);var c,d=void 0;"null"!==l&&(l=l.replace(/^ +| +$/g,"").split(/ *, */),d=l),a&&null===o["websocket"]["subprotocol"]&&(l="null",d=void 0),c=v?require("ws"):WebSocket,n=new c(s,d),n.binaryType="arraybuffer"}catch(p){throw new Ve.ErrnoError(23)}var f={addr:r,port:t,socket:n,dgram_send_queue:[]};return dr.websocket_sock_ops.addPeer(e,f),dr.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&"undefined"!=typeof e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,r,t){return e.peers[r+":"+t]},addPeer:function(e,r){e.peers[r.addr+":"+r.port]=r},removePeer:function(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents:function(e,r){var t=!0,n=function(){o["websocket"].emit("open",e.stream.fd);try{var t=r.dgram_send_queue.shift();while(t)r.socket.send(t),t=r.dgram_send_queue.shift()}catch(n){r.socket.close()}};function i(n){if("string"==typeof n){var i=new TextEncoder;n=i.encode(n)}else{if(T(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var a=t;if(t=!1,a&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return dr.websocket_sock_ops.removePeer(e,r),r.port=s,void dr.websocket_sock_ops.addPeer(e,r)}e.recv_queue.push({addr:r.addr,port:r.port,data:n}),o["websocket"].emit("message",e.stream.fd)}v?(r.socket.on("open",n),r.socket.on("message",(function(e,r){r&&i(new Uint8Array(e).buffer)})),r.socket.on("close",(function(){o["websocket"].emit("close",e.stream.fd)})),r.socket.on("error",(function(r){e.error=14,o["websocket"].emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])}))):(r.socket.onopen=n,r.socket.onclose=function(){o["websocket"].emit("close",e.stream.fd)},r.socket.onmessage=function(e){i(e.data)},r.socket.onerror=function(r){e.error=14,o["websocket"].emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var r=0,t=1===e.type?dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl:function(e,r,t){switch(r){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),V[t>>2]=n,0;default:return 28}},close:function(e){if(e.server){try{e.server.close()}catch(o){}e.server=null}for(var r=Object.keys(e.peers),t=0;t<r.length;t++){var n=e.peers[r[t]];try{n.socket.close()}catch(o){}dr.websocket_sock_ops.removePeer(e,n)}return 0},bind:function(e,r,t){if("undefined"!=typeof e.saddr||"undefined"!=typeof e.sport)throw new Ve.ErrnoError(28);if(e.saddr=r,e.sport=t,2===e.type){e.server&&(e.server.close(),e.server=null);try{e.sock_ops.listen(e,0)}catch(n){if(!(n instanceof Ve.ErrnoError))throw n;if(138!==n.errno)throw n}}},connect:function(e,r,t){if(e.server)throw new Ve.ErrnoError(138);if("undefined"!=typeof e.daddr&&"undefined"!=typeof e.dport){var n=dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new Ve.ErrnoError(7):new Ve.ErrnoError(30)}var o=dr.websocket_sock_ops.createPeer(e,r,t);throw e.daddr=o.addr,e.dport=o.port,new Ve.ErrnoError(26)},listen:function(e,r){if(!v)throw new Ve.ErrnoError(138);if(e.server)throw new Ve.ErrnoError(28);var t=require("ws").Server,n=e.saddr;e.server=new t({host:n,port:e.sport}),o["websocket"].emit("listen",e.stream.fd),e.server.on("connection",(function(r){if(1===e.type){var t=dr.createSocket(e.family,e.type,e.protocol),n=dr.websocket_sock_ops.createPeer(t,r);t.daddr=n.addr,t.dport=n.port,e.pending.push(t),o["websocket"].emit("connection",t.stream.fd)}else dr.websocket_sock_ops.createPeer(e,r),o["websocket"].emit("connection",e.stream.fd)})),e.server.on("close",(function(){o["websocket"].emit("close",e.stream.fd),e.server=null})),e.server.on("error",(function(r){e.error=23,o["websocket"].emit("error",[e.stream.fd,e.error,"EHOSTUNREACH: Host is unreachable"])}))},accept:function(e){if(!e.server||!e.pending.length)throw new Ve.ErrnoError(28);var r=e.pending.shift();return r.stream.flags=e.stream.flags,r},getname:function(e,r){var t,n;if(r){if(void 0===e.daddr||void 0===e.dport)throw new Ve.ErrnoError(53);t=e.daddr,n=e.dport}else t=e.saddr||0,n=e.sport||0;return{addr:t,port:n}},sendmsg:function(e,r,t,n,o,i){if(2===e.type){if(void 0!==o&&void 0!==i||(o=e.daddr,i=e.dport),void 0===o||void 0===i)throw new Ve.ErrnoError(17)}else o=e.daddr,i=e.dport;var a,s=dr.websocket_sock_ops.getPeer(e,o,i);if(1===e.type){if(!s||s.socket.readyState===s.socket.CLOSING||s.socket.readyState===s.socket.CLOSED)throw new Ve.ErrnoError(53);if(s.socket.readyState===s.socket.CONNECTING)throw new Ve.ErrnoError(6)}if(ArrayBuffer.isView(r)&&(t+=r.byteOffset,r=r.buffer),a=r.slice(t,t+n),2===e.type&&(!s||s.socket.readyState!==s.socket.OPEN))return s&&s.socket.readyState!==s.socket.CLOSING&&s.socket.readyState!==s.socket.CLOSED||(s=dr.websocket_sock_ops.createPeer(e,o,i)),s.dgram_send_queue.push(a),n;try{return s.socket.send(a),n}catch(u){throw new Ve.ErrnoError(28)}},recvmsg:function(e,r){if(1===e.type&&e.server)throw new Ve.ErrnoError(53);var t=e.recv_queue.shift();if(!t){if(1===e.type){var n=dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n){if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new Ve.ErrnoError(6)}throw new Ve.ErrnoError(53)}throw new Ve.ErrnoError(6)}var o=t.data.byteLength||t.data.length,i=t.data.byteOffset||0,a=t.data.buffer||t.data,s=Math.min(r,o),u={buffer:new Uint8Array(a,i,s),addr:t.addr,port:t.port};if(1===e.type&&s<o){var l=o-s;t.data=new Uint8Array(a,i+s,l),e.recv_queue.unshift(t)}return u}}};function fr(e,r,t){try{var n=dr.createSocket(e,r,t);return n.stream.fd}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function pr(e,r){try{return e=Ke.getStr(e),Ke.doStat(Ve.stat,e,r)}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return-t.errno}}function mr(e,r,t){try{return r=Ke.getStr(r),r=Ke.calculateAt(e,r),0===t?Ve.unlink(r):512===t?Ve.rmdir(r):Ee("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function hr(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r,!0),t){var o=V[t>>2],i=V[t+4>>2];a=1e3*o+i/1e6,t+=8,o=V[t>>2],i=V[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Ve.utime(r,a,s),0}catch(u){if("undefined"==typeof Ve||!(u instanceof Ve.ErrnoError))throw u;return-u.errno}}function _r(e){}var yr,wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function vr(e,r){Ee(wr)}function Er(e,r){Ee(wr)}function gr(){return Date.now()}function kr(){throw 1/0}function jr(e,r){var t=new Date(1e3*V[e>>2]);V[r>>2]=t.getUTCSeconds(),V[r+4>>2]=t.getUTCMinutes(),V[r+8>>2]=t.getUTCHours(),V[r+12>>2]=t.getUTCDate(),V[r+16>>2]=t.getUTCMonth(),V[r+20>>2]=t.getUTCFullYear()-1900,V[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;V[r+28>>2]=o}function br(e,r){var t=new Date(1e3*V[e>>2]);V[r>>2]=t.getSeconds(),V[r+4>>2]=t.getMinutes(),V[r+8>>2]=t.getHours(),V[r+12>>2]=t.getDate(),V[r+16>>2]=t.getMonth(),V[r+20>>2]=t.getFullYear()-1900,V[r+24>>2]=t.getDay();var n=new Date(t.getFullYear(),0,1),o=(t.getTime()-n.getTime())/864e5|0;V[r+28>>2]=o,V[r+36>>2]=-60*t.getTimezoneOffset();var i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&t.getTimezoneOffset()==Math.min(a,i));V[r+32>>2]=s}function Cr(e){var r=new Date(V[e+20>>2]+1900,V[e+16>>2],V[e+12>>2],V[e+8>>2],V[e+4>>2],V[e>>2],0),t=V[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(t<0)V[e+32>>2]=Number(i!=a&&s==n);else if(t>0!=(s==n)){var u=Math.max(a,i),l=t>0?s:u;r.setTime(r.getTime()+6e4*(l-n))}V[e+24>>2]=r.getDay();var c=(r.getTime()-o.getTime())/864e5|0;return V[e+28>>2]=c,V[e>>2]=r.getSeconds(),V[e+4>>2]=r.getMinutes(),V[e+8>>2]=r.getHours(),V[e+12>>2]=r.getDate(),V[e+16>>2]=r.getMonth(),r.getTime()/1e3|0}function Sr(e,r,t,n,o,i){try{var a=Ve.getStream(n);if(!a)return-8;var s=Ve.mmap(a,e,o,r,t),u=s.ptr;return V[i>>2]=s.allocated,u}catch(l){if("undefined"==typeof Ve||!(l instanceof Ve.ErrnoError))throw l;return-l.errno}}function Dr(e,r,t,n,o,i){try{var a=Ve.getStream(o);a&&(2&t&&Ke.doMsync(e,a,r,n,i),Ve.munmap(a))}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function Nr(e,r,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),u=Math.max(a,s);function l(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}V[e>>2]=60*u,V[r>>2]=Number(a!=s);var c=l(o),d=l(i),f=Q(c),p=Q(d);s<a?(K[t>>2]=f,K[t+4>>2]=p):(K[t>>2]=p,K[t+4>>2]=f)}function Or(e,r,t){Or.called||(Or.called=!0,Nr(e,r,t))}function Fr(){Ee("")}function Pr(e,r,t){G.copyWithin(e,r,r+t)}function Ar(){return 2147483648}function Tr(e){try{return O.grow(e-Y.byteLength+65535>>>16),ee(O.buffer),1}catch(r){}}function Mr(e){var r=G.length;e>>>=0;var t=Ar();if(e>t)return!1;let n=(e,r)=>e+(r-e%r)%r;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(t,n(Math.max(e,i),65536)),s=Tr(a);if(s)return!0}return!1}yr=v?()=>{var e=process["hrtime"]();return 1e3*e[0]+e[1]/1e6}:()=>performance.now();var Rr={};function Lr(){return h||"./this.program"}function xr(){if(!xr.strings){var e=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Lr()};for(var t in Rr)void 0===Rr[t]?delete r[t]:r[t]=Rr[t];var n=[];for(var t in r)n.push(t+"="+r[t]);xr.strings=n}return xr.strings}function zr(e,r){var t=0;return xr().forEach((function(n,o){var i=r+t;K[e+4*o>>2]=i,Z(n,i),t+=n.length+1})),0}function Ir(e,r){var t=xr();K[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),K[r>>2]=n,0}function Br(e){zt(e)}function Ur(e){try{var r=Ke.getStreamFromFD(e);return Ve.close(r),0}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return t.errno}}function Hr(e,r){try{var t=Ke.getStreamFromFD(e),n=t.tty?2:Ve.isDir(t.mode)?3:Ve.isLink(t.mode)?7:4;return q[r>>0]=n,0}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return o.errno}}function Wr(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=K[r>>2],s=K[r+4>>2];r+=8;var u=Ve.read(e,q,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function Yr(e,r,t,n){try{var o=Ke.getStreamFromFD(e),i=Wr(o,r,t);return V[n>>2]=i,0}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return a.errno}}function qr(e,r,t,n,o){try{var i=er(r,t);if(isNaN(i))return 61;var a=Ke.getStreamFromFD(e);return Ve.llseek(a,i,n),je=[a.position>>>0,(ke=a.position,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[o>>2]=je[0],V[o+4>>2]=je[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return s.errno}}function Gr(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=K[r>>2],s=K[r+4>>2];r+=8;var u=Ve.write(e,q,a,s,n);if(u<0)return-1;o+=u}return o}function Xr(e,r,t,n){try{var o=Ke.getStreamFromFD(e),i=Gr(o,r,t);return K[n>>2]=i,0}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return a.errno}}function Vr(){return N()}function Kr(e){D(e)}function Qr(e){return e%4===0&&(e%100!==0||e%400===0)}function $r(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}var Jr=[31,29,31,30,31,30,31,31,30,31,30,31],Zr=[31,28,31,30,31,30,31,31,30,31,30,31];function et(e,r){var t=new Date(e.getTime());while(r>0){var n=Qr(t.getFullYear()),o=t.getMonth(),i=(n?Jr:Zr)[o];if(!(r>i-t.getDate()))return t.setDate(t.getDate()+r),t;r-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function rt(e,r,t,n){var o=V[n+40>>2],i={tm_sec:V[n>>2],tm_min:V[n+4>>2],tm_hour:V[n+8>>2],tm_mday:V[n+12>>2],tm_mon:V[n+16>>2],tm_year:V[n+20>>2],tm_wday:V[n+24>>2],tm_yday:V[n+28>>2],tm_isdst:V[n+32>>2],tm_gmtoff:V[n+36>>2],tm_zone:o?I(o):""},a=I(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,r,t){var n="number"==typeof e?e.toString():e||"";while(n.length<r)n=t[0]+n;return n}function f(e,r){return d(e,r,"0")}function p(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function m(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 h(e){var r=et(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),i=m(n);return p(o,r)<=0?p(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var _={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){var r=e.tm_year+1900;return f(r/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":function(e){return f(e.tm_mday+$r(Qr(e.tm_year+1900)?Jr:Zr,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Qr(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Qr(e.tm_year%400-1))&&r++}return f(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff,t=r>=0;return r=Math.abs(r)/60,r=r/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),_)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),_[u](i)));a=a.replace(/\0\0/g,"%");var y=at(a,!1);return y.length>r?0:(J(y,e),y.length-1)}function tt(e,r,t,n){return rt(e,r,t,n)}var nt=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ve.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},ot=365,it=146;Object.defineProperties(nt.prototype,{read:{get:function(){return(this.mode&ot)===ot},set:function(e){e?this.mode|=ot:this.mode&=~ot}},write:{get:function(){return(this.mode&it)===it},set:function(e){e?this.mode|=it:this.mode&=~it}},isFolder:{get:function(){return Ve.isDir(this.mode)}},isDevice:{get:function(){return Ve.isChrdev(this.mode)}}}),Ve.FSNode=nt,Ve.staticInit(),o["FS_createPath"]=Ve.createPath,o["FS_createDataFile"]=Ve.createDataFile,o["FS_createPreloadedFile"]=Ve.createPreloadedFile,o["FS_unlink"]=Ve.unlink,o["FS_createLazyFile"]=Ve.createLazyFile,o["FS_createDevice"]=Ve.createDevice,v&&(f(),Xe.staticInit()),Ge={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};function at(e,r,t){var n=t>0?t:H(e)+1,o=new Array(n),i=B(e,o,0,o.length);return r&&(o.length=i),o}"function"==typeof atob&&atob;var st,ut={__cxa_allocate_exception:Me,__cxa_throw:Le,__syscall_faccessat:Qe,__syscall_fcntl64:Je,__syscall_fstat64:Ze,__syscall_ftruncate64:rr,__syscall_getcwd:tr,__syscall_getdents64:nr,__syscall_ioctl:or,__syscall_lstat64:ir,__syscall_mkdirat:ar,__syscall_newfstatat:sr,__syscall_openat:ur,__syscall_readlinkat:lr,__syscall_rmdir:cr,__syscall_socket:fr,__syscall_stat64:pr,__syscall_unlinkat:mr,__syscall_utimensat:hr,_dlinit:_r,_dlopen_js:vr,_dlsym_js:Er,_emscripten_date_now:gr,_emscripten_throw_longjmp:kr,_gmtime_js:jr,_localtime_js:br,_mktime_js:Cr,_mmap_js:Sr,_munmap_js:Dr,_tzset_js:Or,abort:Fr,emscripten_get_now:yr,emscripten_memcpy_big:Pr,emscripten_resize_heap:Mr,environ_get:zr,environ_sizes_get:Ir,exit:Br,fd_close:Ur,fd_fdstat_get:Hr,fd_read:Yr,fd_seek:qr,fd_write:Xr,getTempRet0:Vr,invoke_di:Ot,invoke_i:Ct,invoke_ii:wt,invoke_iii:gt,invoke_iiii:Et,invoke_iiiii:kt,invoke_iiiiii:bt,invoke_iiiiiii:Tt,invoke_iiij:Mt,invoke_vi:vt,invoke_vii:jt,invoke_viid:Ft,invoke_viii:Dt,invoke_viiii:St,invoke_viiiii:Pt,invoke_viiiiii:At,invoke_viiiiiiii:Nt,setTempRet0:Kr,strftime:rt,strftime_l:tt},lt=(Oe(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["__wasm_call_ctors"]).apply(null,arguments)},o["_unpack_error_what"]=function(){return(o["_unpack_error_what"]=o["asm"]["unpack_error_what"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["main"]).apply(null,arguments)},o["_malloc"]=function(){return(lt=o["_malloc"]=o["asm"]["malloc"]).apply(null,arguments)}),ct=(o["_free"]=function(){return(o["_free"]=o["asm"]["free"]).apply(null,arguments)},o["___errno_location"]=function(){return(ct=o["___errno_location"]=o["asm"]["__errno_location"]).apply(null,arguments)}),dt=(o["_itkPNGWriteErrorFunction"]=function(){return(o["_itkPNGWriteErrorFunction"]=o["asm"]["itkPNGWriteErrorFunction"]).apply(null,arguments)},o["_itkPNGWriteWarningFunction"]=function(){return(o["_itkPNGWriteWarningFunction"]=o["asm"]["itkPNGWriteWarningFunction"]).apply(null,arguments)},o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["itk_wasm_input_array_alloc"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["itk_wasm_input_json_alloc"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["itk_wasm_output_json_address"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["itk_wasm_output_json_size"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["itk_wasm_output_array_address"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["itk_wasm_output_array_size"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["itk_wasm_free_all"]).apply(null,arguments)},o["___dl_seterr"]=function(){return(o["___dl_seterr"]=o["asm"]["__dl_seterr"]).apply(null,arguments)},o["_emscripten_builtin_memalign"]=function(){return(dt=o["_emscripten_builtin_memalign"]=o["asm"]["emscripten_builtin_memalign"]).apply(null,arguments)}),ft=o["_setThrew"]=function(){return(ft=o["_setThrew"]=o["asm"]["setThrew"]).apply(null,arguments)},pt=(o["_saveSetjmp"]=function(){return(o["_saveSetjmp"]=o["asm"]["saveSetjmp"]).apply(null,arguments)},o["stackSave"]=function(){return(pt=o["stackSave"]=o["asm"]["stackSave"]).apply(null,arguments)}),mt=o["stackRestore"]=function(){return(mt=o["stackRestore"]=o["asm"]["stackRestore"]).apply(null,arguments)},ht=o["stackAlloc"]=function(){return(ht=o["stackAlloc"]=o["asm"]["stackAlloc"]).apply(null,arguments)},_t=o["___cxa_is_pointer_type"]=function(){return(_t=o["___cxa_is_pointer_type"]=o["asm"]["__cxa_is_pointer_type"]).apply(null,arguments)},yt=o["dynCall_iiij"]=function(){return(yt=o["dynCall_iiij"]=o["asm"]["dynCall_iiij"]).apply(null,arguments)};o["dynCall_iiji"]=function(){return(o["dynCall_iiji"]=o["asm"]["dynCall_iiji"]).apply(null,arguments)},o["dynCall_ji"]=function(){return(o["dynCall_ji"]=o["asm"]["dynCall_ji"]).apply(null,arguments)},o["dynCall_jiji"]=function(){return(o["dynCall_jiji"]=o["asm"]["dynCall_jiji"]).apply(null,arguments)},o["dynCall_viij"]=function(){return(o["dynCall_viij"]=o["asm"]["dynCall_viij"]).apply(null,arguments)},o["dynCall_ijii"]=function(){return(o["dynCall_ijii"]=o["asm"]["dynCall_ijii"]).apply(null,arguments)},o["dynCall_ijjiiiiiij"]=function(){return(o["dynCall_ijjiiiiiij"]=o["asm"]["dynCall_ijjiiiiiij"]).apply(null,arguments)},o["dynCall_ijjiiiiii"]=function(){return(o["dynCall_ijjiiiiii"]=o["asm"]["dynCall_ijjiiiiii"]).apply(null,arguments)},o["dynCall_iji"]=function(){return(o["dynCall_iji"]=o["asm"]["dynCall_iji"]).apply(null,arguments)},o["dynCall_jji"]=function(){return(o["dynCall_jji"]=o["asm"]["dynCall_jji"]).apply(null,arguments)},o["dynCall_ijjii"]=function(){return(o["dynCall_ijjii"]=o["asm"]["dynCall_ijjii"]).apply(null,arguments)},o["dynCall_iiijii"]=function(){return(o["dynCall_iiijii"]=o["asm"]["dynCall_iiijii"]).apply(null,arguments)},o["dynCall_ijiii"]=function(){return(o["dynCall_ijiii"]=o["asm"]["dynCall_ijiii"]).apply(null,arguments)},o["dynCall_iijiii"]=function(){return(o["dynCall_iijiii"]=o["asm"]["dynCall_iijiii"]).apply(null,arguments)},o["dynCall_viiiij"]=function(){return(o["dynCall_viiiij"]=o["asm"]["dynCall_viiiij"]).apply(null,arguments)},o["dynCall_iiiij"]=function(){return(o["dynCall_iiiij"]=o["asm"]["dynCall_iiiij"]).apply(null,arguments)},o["dynCall_viiij"]=function(){return(o["dynCall_viiij"]=o["asm"]["dynCall_viiij"]).apply(null,arguments)},o["dynCall_viijii"]=function(){return(o["dynCall_viijii"]=o["asm"]["dynCall_viijii"]).apply(null,arguments)},o["dynCall_vij"]=function(){return(o["dynCall_vij"]=o["asm"]["dynCall_vij"]).apply(null,arguments)},o["dynCall_iiijiiii"]=function(){return(o["dynCall_iiijiiii"]=o["asm"]["dynCall_iiijiiii"]).apply(null,arguments)},o["dynCall_iijii"]=function(){return(o["dynCall_iijii"]=o["asm"]["dynCall_iijii"]).apply(null,arguments)},o["dynCall_iijiiii"]=function(){return(o["dynCall_iijiiii"]=o["asm"]["dynCall_iijiiii"]).apply(null,arguments)},o["dynCall_iijjii"]=function(){return(o["dynCall_iijjii"]=o["asm"]["dynCall_iijjii"]).apply(null,arguments)},o["dynCall_iijiiiiiii"]=function(){return(o["dynCall_iijiiiiiii"]=o["asm"]["dynCall_iijiiiiiii"]).apply(null,arguments)},o["dynCall_iijiiiii"]=function(){return(o["dynCall_iijiiiii"]=o["asm"]["dynCall_iijiiiii"]).apply(null,arguments)},o["dynCall_iiijiii"]=function(){return(o["dynCall_iiijiii"]=o["asm"]["dynCall_iiijiii"]).apply(null,arguments)},o["dynCall_iiiiji"]=function(){return(o["dynCall_iiiiji"]=o["asm"]["dynCall_iiiiji"]).apply(null,arguments)},o["dynCall_iij"]=function(){return(o["dynCall_iij"]=o["asm"]["dynCall_iij"]).apply(null,arguments)},o["dynCall_iiijj"]=function(){return(o["dynCall_iiijj"]=o["asm"]["dynCall_iiijj"]).apply(null,arguments)},o["dynCall_jii"]=function(){return(o["dynCall_jii"]=o["asm"]["dynCall_jii"]).apply(null,arguments)},o["dynCall_iiijjii"]=function(){return(o["dynCall_iiijjii"]=o["asm"]["dynCall_iiijjii"]).apply(null,arguments)},o["dynCall_iiijji"]=function(){return(o["dynCall_iiijji"]=o["asm"]["dynCall_iiijji"]).apply(null,arguments)},o["dynCall_jijiijj"]=function(){return(o["dynCall_jijiijj"]=o["asm"]["dynCall_jijiijj"]).apply(null,arguments)},o["dynCall_ij"]=function(){return(o["dynCall_ij"]=o["asm"]["dynCall_ij"]).apply(null,arguments)},o["dynCall_iiiijjjjji"]=function(){return(o["dynCall_iiiijjjjji"]=o["asm"]["dynCall_iiiijjjjji"]).apply(null,arguments)},o["dynCall_iiiijji"]=function(){return(o["dynCall_iiiijji"]=o["asm"]["dynCall_iiiijji"]).apply(null,arguments)},o["dynCall_iijiji"]=function(){return(o["dynCall_iijiji"]=o["asm"]["dynCall_iijiji"]).apply(null,arguments)},o["dynCall_iiiijii"]=function(){return(o["dynCall_iiiijii"]=o["asm"]["dynCall_iiiijii"]).apply(null,arguments)},o["dynCall_iiiijjjjjji"]=function(){return(o["dynCall_iiiijjjjjji"]=o["asm"]["dynCall_iiiijjjjjji"]).apply(null,arguments)},o["dynCall_iijjjjii"]=function(){return(o["dynCall_iijjjjii"]=o["asm"]["dynCall_iijjjjii"]).apply(null,arguments)},o["dynCall_iiijjji"]=function(){return(o["dynCall_iiijjji"]=o["asm"]["dynCall_iiijjji"]).apply(null,arguments)},o["dynCall_iiiijjjji"]=function(){return(o["dynCall_iiiijjjji"]=o["asm"]["dynCall_iiiijjjji"]).apply(null,arguments)},o["dynCall_iiiijjjii"]=function(){return(o["dynCall_iiiijjjii"]=o["asm"]["dynCall_iiiijjjii"]).apply(null,arguments)},o["dynCall_iiiiijjji"]=function(){return(o["dynCall_iiiiijjji"]=o["asm"]["dynCall_iiiiijjji"]).apply(null,arguments)},o["dynCall_iiiiiiijjji"]=function(){return(o["dynCall_iiiiiiijjji"]=o["asm"]["dynCall_iiiiiiijjji"]).apply(null,arguments)},o["dynCall_ijjj"]=function(){return(o["dynCall_ijjj"]=o["asm"]["dynCall_ijjj"]).apply(null,arguments)},o["dynCall_iiiiij"]=function(){return(o["dynCall_iiiiij"]=o["asm"]["dynCall_iiiiij"]).apply(null,arguments)},o["dynCall_iiiiijj"]=function(){return(o["dynCall_iiiiijj"]=o["asm"]["dynCall_iiiiijj"]).apply(null,arguments)},o["dynCall_iiiiiijj"]=function(){return(o["dynCall_iiiiiijj"]=o["asm"]["dynCall_iiiiiijj"]).apply(null,arguments)};function wt(e,r){var t=pt();try{return Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function vt(e,r){var t=pt();try{Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function Et(e,r,t,n){var o=pt();try{return Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function gt(e,r,t){var n=pt();try{return Ae(e)(r,t)}catch(o){if(mt(n),o!==o+0)throw o;ft(1,0)}}function kt(e,r,t,n,o){var i=pt();try{return Ae(e)(r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function jt(e,r,t){var n=pt();try{Ae(e)(r,t)}catch(o){if(mt(n),o!==o+0)throw o;ft(1,0)}}function bt(e,r,t,n,o,i){var a=pt();try{return Ae(e)(r,t,n,o,i)}catch(s){if(mt(a),s!==s+0)throw s;ft(1,0)}}function Ct(e){var r=pt();try{return Ae(e)()}catch(t){if(mt(r),t!==t+0)throw t;ft(1,0)}}function St(e,r,t,n,o){var i=pt();try{Ae(e)(r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function Dt(e,r,t,n){var o=pt();try{Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function Nt(e,r,t,n,o,i,a,s,u){var l=pt();try{Ae(e)(r,t,n,o,i,a,s,u)}catch(c){if(mt(l),c!==c+0)throw c;ft(1,0)}}function Ot(e,r){var t=pt();try{return Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function Ft(e,r,t,n){var o=pt();try{Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function Pt(e,r,t,n,o,i){var a=pt();try{Ae(e)(r,t,n,o,i)}catch(s){if(mt(a),s!==s+0)throw s;ft(1,0)}}function At(e,r,t,n,o,i,a){var s=pt();try{Ae(e)(r,t,n,o,i,a)}catch(u){if(mt(s),u!==u+0)throw u;ft(1,0)}}function Tt(e,r,t,n,o,i,a){var s=pt();try{return Ae(e)(r,t,n,o,i,a)}catch(u){if(mt(s),u!==u+0)throw u;ft(1,0)}}function Mt(e,r,t,n,o){var i=pt();try{return yt(e,r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function Rt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}o["ccall"]=R,o["cwrap"]=L,o["addRunDependency"]=we,o["removeRunDependency"]=ve,o["FS_createPath"]=Ve.createPath,o["FS_createDataFile"]=Ve.createDataFile,o["FS_createPreloadedFile"]=Ve.createPreloadedFile,o["FS_createLazyFile"]=Ve.createLazyFile,o["FS_createDevice"]=Ve.createDevice,o["FS_unlink"]=Ve.unlink,o["callMain"]=Lt,o["AsciiToString"]=W,o["writeArrayToMemory"]=J,o["writeAsciiToMemory"]=Z;function Lt(e){var r=o["_main"];e=e||[],e.unshift(h);var t=e.length,n=ht(4*(t+1)),i=n>>2;e.forEach((e=>{V[i++]=$(e)})),V[i]=0;try{var a=r(t,n);return zt(a,!0),a}catch(s){return Te(s)}finally{!0}}function xt(e){function r(){st||(st=!0,o["calledRun"]=!0,A||(ue(),le(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Bt&&Lt(e),ce()))}e=e||m,me>0||(se(),me>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),r()}),1)):r()))}function zt(e,r){P=e,It(e)}function It(e){P=e,ae()||(o["onExit"]&&o["onExit"](e),A=!0),_(e,new Rt(e))}if(_e=function e(){st||xt(),st||(_e=e)},o["run"]=xt,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Bt=!1;return o["noInitialRun"]&&(Bt=!1),xt(),o.mountContainingDir=function(e){if(v){var r=require("path"),t=r.dirname(e);if(!Ve.isDir(t)&&"/"!==t){for(var n="/",o=t.split(r.sep),i=1;i<o.length;i++)n+=o[i],Ve.analyzePath(n).exists||Ve.mkdir(n),n+="/";return Ve.mount(Xe,{root:t},n),n+r.basename(e)}}},o.unmountContainingDir=function(e){if(v){var r=require("path"),t=r.dirname(e);Ve.unmount(t)}},o.fs_mkdirs=function(e){for(var r="/",t=e.split("/"),n=1;n<t.length;++n)r+=t[n],Ve.analyzePath(r).exists||Ve.mkdir(r),r+="/"},o.fs_readFile=function(e,r){return Ve.readFile(e,r)},o.fs_writeFile=function(e,r,t){return Ve.writeFile(e,r,t)},o.fs_unlink=function(e){return Ve.unlink(e)},o.fs_open=function(e,r,t){return Ve.open(e,r,t)},o.fs_stat=function(e){return Ve.stat(e)},o.fs_read=function(e,r,t,n,o){return Ve.read(e,r,t,n,o)},o.fs_close=function(e){return Ve.close(e)},r.ready}})();export default dicom;
|